From: Florian Fainelli Date: Sat, 27 Sep 2014 19:10:51 +0000 (+0000) Subject: brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6918ea2484861cbf806c812b95a814ab40063c05;p=openwrt%2Fstaging%2Frmilecki.git brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014 Update the 3.10 rasperry patches by rebasing raspberry/rpi-3.10-y against linux-stable/v3.10.49. Signed-off-by: Florian Fainelli SVN-Revision: 42678 --- diff --git a/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch b/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch index 962c399681b..87e51b84d59 100644 --- a/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch +++ b/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch @@ -1,7 +1,7 @@ -From 47ecfc09ad3289994f80bd3dcaec876ac536d884 Mon Sep 17 00:00:00 2001 +From 8775cd3a02a2eb38e20465b0ca5db05de1f75125 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:24:19 +0100 -Subject: [PATCH 001/174] Main bcm2708 linux port +Subject: [PATCH 001/196] Main bcm2708 linux port Signed-off-by: popcornmix --- @@ -95,6 +95,8 @@ Signed-off-by: popcornmix create mode 100644 arch/arm/mach-bcm2708/vcio.c create mode 100644 drivers/mmc/host/sdhci-bcm2708.c +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 18a9f5e..eb291c7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -361,6 +361,21 @@ config ARCH_AT91 @@ -127,6 +129,8 @@ Signed-off-by: popcornmix source "arch/arm/mach-zynq/Kconfig" +diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug +index 1d41908..52377c9 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -519,6 +519,14 @@ choice @@ -144,9 +148,11 @@ Signed-off-by: popcornmix endchoice config DEBUG_EXYNOS_UART +diff --git a/arch/arm/Makefile b/arch/arm/Makefile +index 1ba358b..fb73cf0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile -@@ -144,6 +144,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x0020 +@@ -139,6 +139,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 # by CONFIG_* macro name. machine-$(CONFIG_ARCH_AT91) += at91 machine-$(CONFIG_ARCH_BCM) += bcm @@ -154,6 +160,9 @@ Signed-off-by: popcornmix machine-$(CONFIG_ARCH_BCM2835) += bcm2835 machine-$(CONFIG_ARCH_CLPS711X) += clps711x machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx +diff --git a/arch/arm/configs/bcmrpi_cutdown_defconfig b/arch/arm/configs/bcmrpi_cutdown_defconfig +new file mode 100644 +index 0000000..74f2dc9 --- /dev/null +++ b/arch/arm/configs/bcmrpi_cutdown_defconfig @@ -0,0 +1,474 @@ @@ -631,6 +640,9 @@ Signed-off-by: popcornmix +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +new file mode 100644 +index 0000000..339aabf --- /dev/null +++ b/arch/arm/configs/bcmrpi_defconfig @@ -0,0 +1,510 @@ @@ -1144,6 +1156,9 @@ Signed-off-by: popcornmix +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +diff --git a/arch/arm/configs/bcmrpi_emergency_defconfig b/arch/arm/configs/bcmrpi_emergency_defconfig +new file mode 100644 +index 0000000..3b40c49 --- /dev/null +++ b/arch/arm/configs/bcmrpi_emergency_defconfig @@ -0,0 +1,532 @@ @@ -1679,6 +1694,8 @@ Signed-off-by: popcornmix +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c +index ac4c2e5..d3a6810 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -174,7 +174,7 @@ void arch_cpu_idle(void) @@ -1690,6 +1707,9 @@ Signed-off-by: popcornmix int __init reboot_setup(char *str) { +diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig +new file mode 100644 +index 0000000..63bb76c --- /dev/null +++ b/arch/arm/mach-bcm2708/Kconfig @@ -0,0 +1,34 @@ @@ -1727,6 +1747,9 @@ Signed-off-by: popcornmix + Do not allow ARM to use GPU's L2 cache. Requires disable_l2cache in config.txt. + +endmenu +diff --git a/arch/arm/mach-bcm2708/Makefile b/arch/arm/mach-bcm2708/Makefile +new file mode 100644 +index 0000000..164ecb2 --- /dev/null +++ b/arch/arm/mach-bcm2708/Makefile @@ -0,0 +1,8 @@ @@ -1738,12 +1761,18 @@ Signed-off-by: popcornmix +obj-$(CONFIG_BCM2708_GPIO) += bcm2708_gpio.o +obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o + +diff --git a/arch/arm/mach-bcm2708/Makefile.boot b/arch/arm/mach-bcm2708/Makefile.boot +new file mode 100644 +index 0000000..67039c3 --- /dev/null +++ b/arch/arm/mach-bcm2708/Makefile.boot @@ -0,0 +1,3 @@ + zreladdr-y := 0x00008000 +params_phys-y := 0x00000100 +initrd_phys-y := 0x00800000 +diff --git a/arch/arm/mach-bcm2708/armctrl.c b/arch/arm/mach-bcm2708/armctrl.c +new file mode 100644 +index 0000000..da18725 --- /dev/null +++ b/arch/arm/mach-bcm2708/armctrl.c @@ -0,0 +1,208 @@ @@ -1955,6 +1984,9 @@ Signed-off-by: popcornmix + armctrl_pm_register(base, irq_start, resume_sources); + return 0; +} +diff --git a/arch/arm/mach-bcm2708/armctrl.h b/arch/arm/mach-bcm2708/armctrl.h +new file mode 100644 +index 0000000..0aa916e --- /dev/null +++ b/arch/arm/mach-bcm2708/armctrl.h @@ -0,0 +1,27 @@ @@ -1985,6 +2017,9 @@ Signed-off-by: popcornmix + u32 armctrl_sources, u32 resume_sources); + +#endif +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +new file mode 100644 +index 0000000..64a2783 --- /dev/null +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -0,0 +1,695 @@ @@ -2683,6 +2718,9 @@ Signed-off-by: popcornmix +module_param(serial, uint, 0644); +module_param(uart_clock, uint, 0644); +module_param(reboot_part, uint, 0644); +diff --git a/arch/arm/mach-bcm2708/bcm2708.h b/arch/arm/mach-bcm2708/bcm2708.h +new file mode 100644 +index 0000000..dfe8700 --- /dev/null +++ b/arch/arm/mach-bcm2708/bcm2708.h @@ -0,0 +1,51 @@ @@ -2737,6 +2775,9 @@ Signed-off-by: popcornmix +} + +#endif +diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c +new file mode 100644 +index 0000000..d0339eb --- /dev/null +++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c @@ -0,0 +1,339 @@ @@ -3079,6 +3120,9 @@ Signed-off-by: popcornmix + +MODULE_DESCRIPTION("Broadcom BCM2708 GPIO driver"); +MODULE_LICENSE("GPL"); +diff --git a/arch/arm/mach-bcm2708/clock.c b/arch/arm/mach-bcm2708/clock.c +new file mode 100644 +index 0000000..4fc556e --- /dev/null +++ b/arch/arm/mach-bcm2708/clock.c @@ -0,0 +1,61 @@ @@ -3143,6 +3187,9 @@ Signed-off-by: popcornmix + return -EIO; +} +EXPORT_SYMBOL(clk_set_rate); +diff --git a/arch/arm/mach-bcm2708/clock.h b/arch/arm/mach-bcm2708/clock.h +new file mode 100644 +index 0000000..5f9d725 --- /dev/null +++ b/arch/arm/mach-bcm2708/clock.h @@ -0,0 +1,24 @@ @@ -3170,6 +3217,9 @@ Signed-off-by: popcornmix +struct clk { + unsigned long rate; +}; +diff --git a/arch/arm/mach-bcm2708/dma.c b/arch/arm/mach-bcm2708/dma.c +new file mode 100644 +index 0000000..51d147a --- /dev/null +++ b/arch/arm/mach-bcm2708/dma.c @@ -0,0 +1,399 @@ @@ -3572,6 +3622,9 @@ Signed-off-by: popcornmix +MODULE_LICENSE("GPL"); + +MODULE_PARM_DESC(dmachans, "Bitmap of DMA channels available to the ARM"); +diff --git a/arch/arm/mach-bcm2708/include/mach/arm_control.h b/arch/arm/mach-bcm2708/include/mach/arm_control.h +new file mode 100644 +index 0000000..a82bb92 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/arm_control.h @@ -0,0 +1,419 @@ @@ -3994,6 +4047,9 @@ Signed-off-by: popcornmix +#define AJBTDO HW_REGISTER_RW(AJB_BASE+0x0c) + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/arm_power.h b/arch/arm/mach-bcm2708/include/mach/arm_power.h +new file mode 100644 +index 0000000..aae9136 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/arm_power.h @@ -0,0 +1,60 @@ @@ -4057,6 +4113,9 @@ Signed-off-by: popcornmix +}; + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/clkdev.h b/arch/arm/mach-bcm2708/include/mach/clkdev.h +new file mode 100644 +index 0000000..04b37a8 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/clkdev.h @@ -0,0 +1,7 @@ @@ -4067,6 +4126,9 @@ Signed-off-by: popcornmix +#define __clk_put(clk) do { } while (0) + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/debug-macro.S b/arch/arm/mach-bcm2708/include/mach/debug-macro.S +new file mode 100644 +index 0000000..2d0dc1c --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/debug-macro.S @@ -0,0 +1,22 @@ @@ -4092,6 +4154,9 @@ Signed-off-by: popcornmix + .endm + +#include +diff --git a/arch/arm/mach-bcm2708/include/mach/dma.h b/arch/arm/mach-bcm2708/include/mach/dma.h +new file mode 100644 +index 0000000..ac7a4a0 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/dma.h @@ -0,0 +1,86 @@ @@ -4181,6 +4246,9 @@ Signed-off-by: popcornmix + + +#endif /* _MACH_BCM2708_DMA_H */ +diff --git a/arch/arm/mach-bcm2708/include/mach/entry-macro.S b/arch/arm/mach-bcm2708/include/mach/entry-macro.S +new file mode 100644 +index 0000000..79b62d9 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/entry-macro.S @@ -0,0 +1,69 @@ @@ -4253,6 +4321,9 @@ Signed-off-by: popcornmix +1020: @ EQ will be set if no irqs pending + + .endm +diff --git a/arch/arm/mach-bcm2708/include/mach/frc.h b/arch/arm/mach-bcm2708/include/mach/frc.h +new file mode 100644 +index 0000000..dd51e07 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/frc.h @@ -0,0 +1,38 @@ @@ -4294,6 +4365,9 @@ Signed-off-by: popcornmix +extern unsigned long long frc_clock_ticks63(void); + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/gpio.h b/arch/arm/mach-bcm2708/include/mach/gpio.h +new file mode 100644 +index 0000000..f600bc7 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/gpio.h @@ -0,0 +1,18 @@ @@ -4315,6 +4389,9 @@ Signed-off-by: popcornmix + +#endif + +diff --git a/arch/arm/mach-bcm2708/include/mach/hardware.h b/arch/arm/mach-bcm2708/include/mach/hardware.h +new file mode 100644 +index 0000000..c2954e8 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/hardware.h @@ -0,0 +1,28 @@ @@ -4346,6 +4423,9 @@ Signed-off-by: popcornmix +#include + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/io.h b/arch/arm/mach-bcm2708/include/mach/io.h +new file mode 100644 +index 0000000..e6eb84d --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/io.h @@ -0,0 +1,27 @@ @@ -4376,6 +4456,9 @@ Signed-off-by: popcornmix +#define __io(a) __typesafe_io(a) + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/irqs.h b/arch/arm/mach-bcm2708/include/mach/irqs.h +new file mode 100644 +index 0000000..e8bb068 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/irqs.h @@ -0,0 +1,196 @@ @@ -4575,6 +4658,9 @@ Signed-off-by: popcornmix + + +#endif /* _BCM2708_IRQS_H_ */ +diff --git a/arch/arm/mach-bcm2708/include/mach/memory.h b/arch/arm/mach-bcm2708/include/mach/memory.h +new file mode 100644 +index 0000000..521540d --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/memory.h @@ -0,0 +1,57 @@ @@ -4635,6 +4721,9 @@ Signed-off-by: popcornmix +#define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PLAT_PHYS_OFFSET)) + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h +new file mode 100644 +index 0000000..110ce07 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -0,0 +1,220 @@ @@ -4858,6 +4947,9 @@ Signed-off-by: popcornmix +#endif + +/* END */ +diff --git a/arch/arm/mach-bcm2708/include/mach/power.h b/arch/arm/mach-bcm2708/include/mach/power.h +new file mode 100644 +index 0000000..52b3b02 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/power.h @@ -0,0 +1,26 @@ @@ -4887,6 +4979,9 @@ Signed-off-by: popcornmix +extern int bcm_power_close(BCM_POWER_HANDLE_T handle); + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/system.h b/arch/arm/mach-bcm2708/include/mach/system.h +new file mode 100644 +index 0000000..2d0b821 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/system.h @@ -0,0 +1,38 @@ @@ -4928,6 +5023,9 @@ Signed-off-by: popcornmix +} + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/timex.h b/arch/arm/mach-bcm2708/include/mach/timex.h +new file mode 100644 +index 0000000..64a660c --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/timex.h @@ -0,0 +1,23 @@ @@ -4954,6 +5052,9 @@ Signed-off-by: popcornmix + */ + +#define CLOCK_TICK_RATE (1000000) +diff --git a/arch/arm/mach-bcm2708/include/mach/uncompress.h b/arch/arm/mach-bcm2708/include/mach/uncompress.h +new file mode 100644 +index 0000000..6ff8f94 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/uncompress.h @@ -0,0 +1,85 @@ @@ -5042,6 +5143,9 @@ Signed-off-by: popcornmix + */ +#define arch_decomp_wdog() + +diff --git a/arch/arm/mach-bcm2708/include/mach/vc_mem.h b/arch/arm/mach-bcm2708/include/mach/vc_mem.h +new file mode 100644 +index 0000000..d29125b --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vc_mem.h @@ -0,0 +1,36 @@ @@ -5081,6 +5185,9 @@ Signed-off-by: popcornmix + +#endif /* VC_MEM_H */ + +diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h +new file mode 100644 +index 0000000..b522ba9 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vcio.h @@ -0,0 +1,141 @@ @@ -5225,6 +5332,9 @@ Signed-off-by: popcornmix +#define DEVICE_FILE_NAME "char_dev" + +#endif +diff --git a/arch/arm/mach-bcm2708/include/mach/vmalloc.h b/arch/arm/mach-bcm2708/include/mach/vmalloc.h +new file mode 100644 +index 0000000..502c617 --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vmalloc.h @@ -0,0 +1,20 @@ @@ -5248,6 +5358,9 @@ Signed-off-by: popcornmix + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#define VMALLOC_END (0xe8000000) +diff --git a/arch/arm/mach-bcm2708/power.c b/arch/arm/mach-bcm2708/power.c +new file mode 100644 +index 0000000..256bf1a --- /dev/null +++ b/arch/arm/mach-bcm2708/power.c @@ -0,0 +1,194 @@ @@ -5445,6 +5558,9 @@ Signed-off-by: popcornmix +MODULE_AUTHOR("Phil Elwell"); +MODULE_DESCRIPTION("Interface to BCM2708 power management"); +MODULE_LICENSE("GPL"); +diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c +new file mode 100644 +index 0000000..aeae4d5 --- /dev/null +++ b/arch/arm/mach-bcm2708/vc_mem.c @@ -0,0 +1,462 @@ @@ -5910,6 +6026,9 @@ Signed-off-by: popcornmix +module_param(mem_size, uint, 0644); +module_param(mem_base, uint, 0644); + +diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c +new file mode 100644 +index 0000000..599eb63 --- /dev/null +++ b/arch/arm/mach-bcm2708/vcio.c @@ -0,0 +1,474 @@ @@ -6387,6 +6506,8 @@ Signed-off-by: popcornmix +MODULE_DESCRIPTION("ARM I/O to VideoCore processor"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:bcm-mbox"); +diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig +index c21082d..6ae2668 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -358,7 +358,7 @@ config CPU_PJ4B @@ -6398,6 +6519,8 @@ Signed-off-by: popcornmix select CPU_32v6 select CPU_ABRT_EV6 select CPU_CACHE_V6 +diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S +index d073528..223fc69 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S @@ -73,10 +73,19 @@ ENDPROC(cpu_v6_reset) @@ -6423,6 +6546,8 @@ Signed-off-by: popcornmix mov pc, lr ENTRY(cpu_v6_dcache_clean_area) +diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types +index a10297d..c9ddd87 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types @@ -522,6 +522,7 @@ torbreck MACH_TORBRECK TORBRECK 3090 @@ -6433,6 +6558,8 @@ Signed-off-by: popcornmix ag5evm MACH_AG5EVM AG5EVM 3189 ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 +diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig +index 9ab8f8d..74e7543 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -249,6 +249,27 @@ config MMC_SDHCI_S3C_DMA @@ -6463,9 +6590,11 @@ Signed-off-by: popcornmix config MMC_SDHCI_BCM2835 tristate "SDHCI platform support for the BCM2835 SD/MMC Controller" depends on ARCH_BCM2835 +diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile +index cd32280..6a7b985 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile -@@ -15,6 +15,7 @@ obj-$(CONFIG_MMC_SDHCI_PXAV2) += sdhci-p +@@ -15,6 +15,7 @@ obj-$(CONFIG_MMC_SDHCI_PXAV2) += sdhci-pxav2.o obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o obj-$(CONFIG_MMC_SDHCI_SIRF) += sdhci-sirf.o obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o @@ -6473,6 +6602,9 @@ Signed-off-by: popcornmix obj-$(CONFIG_MMC_WBSD) += wbsd.o obj-$(CONFIG_MMC_AU1X) += au1xmmc.o obj-$(CONFIG_MMC_OMAP) += omap.o +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +new file mode 100644 +index 0000000..e79723d --- /dev/null +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -0,0 +1,1425 @@ @@ -7901,6 +8033,8 @@ Signed-off-by: popcornmix +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:"DRIVER_NAME); + +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c +index 2ea429c..179e83e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -28,6 +28,7 @@ @@ -7911,7 +8045,7 @@ Signed-off-by: popcornmix #include #include "sdhci.h" -@@ -315,7 +316,7 @@ static void sdhci_read_block_pio(struct +@@ -315,7 +316,7 @@ static void sdhci_read_block_pio(struct sdhci_host *host) u32 uninitialized_var(scratch); u8 *buf; @@ -7920,7 +8054,7 @@ Signed-off-by: popcornmix blksize = host->data->blksz; chunk = 0; -@@ -360,7 +361,7 @@ static void sdhci_write_block_pio(struct +@@ -360,7 +361,7 @@ static void sdhci_write_block_pio(struct sdhci_host *host) u32 scratch; u8 *buf; @@ -7929,7 +8063,7 @@ Signed-off-by: popcornmix blksize = host->data->blksz; chunk = 0; -@@ -399,19 +400,28 @@ static void sdhci_write_block_pio(struct +@@ -399,19 +400,28 @@ static void sdhci_write_block_pio(struct sdhci_host *host) local_irq_restore(flags); } @@ -7961,7 +8095,7 @@ Signed-off-by: popcornmix /* * Some controllers (JMicron JMB38x) mess up the buffer bits -@@ -422,7 +432,7 @@ static void sdhci_transfer_pio(struct sd +@@ -422,7 +432,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host) (host->data->blocks == 1)) mask = ~0; @@ -7970,7 +8104,7 @@ Signed-off-by: popcornmix if (host->quirks & SDHCI_QUIRK_PIO_NEEDS_DELAY) udelay(100); -@@ -434,9 +444,11 @@ static void sdhci_transfer_pio(struct sd +@@ -434,9 +444,11 @@ static void sdhci_transfer_pio(struct sdhci_host *host) host->blocks--; if (host->blocks == 0) break; @@ -7983,7 +8117,7 @@ Signed-off-by: popcornmix } static char *sdhci_kmap_atomic(struct scatterlist *sg, unsigned long *flags) -@@ -709,7 +721,9 @@ static void sdhci_set_transfer_irqs(stru +@@ -709,7 +721,9 @@ static void sdhci_set_transfer_irqs(struct sdhci_host *host) u32 pio_irqs = SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL; u32 dma_irqs = SDHCI_INT_DMA_END | SDHCI_INT_ADMA_ERROR; @@ -7994,7 +8128,7 @@ Signed-off-by: popcornmix sdhci_clear_set_irqs(host, pio_irqs, dma_irqs); else sdhci_clear_set_irqs(host, dma_irqs, pio_irqs); -@@ -741,44 +755,25 @@ static void sdhci_prepare_data(struct sd +@@ -741,44 +755,25 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) host->data_early = 0; host->data->bytes_xfered = 0; @@ -8047,7 +8181,7 @@ Signed-off-by: popcornmix int broken, i; struct scatterlist *sg; -@@ -837,7 +832,8 @@ static void sdhci_prepare_data(struct sd +@@ -837,7 +832,8 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) */ WARN_ON(1); host->flags &= ~SDHCI_REQ_USE_DMA; @@ -8057,7 +8191,7 @@ Signed-off-by: popcornmix WARN_ON(sg_cnt != 1); sdhci_writel(host, sg_dma_address(data->sg), SDHCI_DMA_ADDRESS); -@@ -853,11 +849,13 @@ static void sdhci_prepare_data(struct sd +@@ -853,11 +849,13 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd) if (host->version >= SDHCI_SPEC_200) { ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL); ctrl &= ~SDHCI_CTRL_DMA_MASK; @@ -8071,7 +8205,7 @@ Signed-off-by: popcornmix sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } -@@ -909,7 +907,8 @@ static void sdhci_set_transfer_mode(stru +@@ -909,7 +907,8 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host, if (data->flags & MMC_DATA_READ) mode |= SDHCI_TRNS_READ; @@ -8081,7 +8215,7 @@ Signed-off-by: popcornmix mode |= SDHCI_TRNS_DMA; sdhci_writew(host, mode, SDHCI_TRANSFER_MODE); -@@ -925,13 +924,16 @@ static void sdhci_finish_data(struct sdh +@@ -925,13 +924,16 @@ static void sdhci_finish_data(struct sdhci_host *host) host->data = NULL; if (host->flags & SDHCI_REQ_USE_DMA) { @@ -8102,7 +8236,7 @@ Signed-off-by: popcornmix } /* -@@ -984,6 +986,12 @@ static void sdhci_send_command(struct sd +@@ -984,6 +986,12 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY)) mask |= SDHCI_DATA_INHIBIT; @@ -8115,7 +8249,7 @@ Signed-off-by: popcornmix /* We shouldn't wait for data inihibit for stop commands, even though they might use busy signaling */ if (host->mrq->data && (cmd == host->mrq->data->stop)) -@@ -1001,10 +1009,16 @@ static void sdhci_send_command(struct sd +@@ -1001,10 +1009,16 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) timeout--; mdelay(1); } @@ -8132,7 +8266,7 @@ Signed-off-by: popcornmix sdhci_prepare_data(host, cmd); -@@ -1470,7 +1484,7 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1470,7 +1484,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) else ctrl &= ~SDHCI_CTRL_HISPD; @@ -8141,7 +8275,7 @@ Signed-off-by: popcornmix u16 clk, ctrl_2; /* In case of UHS-I modes, set High Speed Enable */ -@@ -2164,7 +2178,7 @@ static void sdhci_timeout_timer(unsigned +@@ -2164,7 +2178,7 @@ static void sdhci_timeout_timer(unsigned long data) if (host->mrq) { pr_err("%s: Timeout waiting for hardware " @@ -8150,7 +8284,7 @@ Signed-off-by: popcornmix sdhci_dumpregs(host); if (host->data) { -@@ -2209,10 +2223,13 @@ static void sdhci_cmd_irq(struct sdhci_h +@@ -2209,10 +2223,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask) BUG_ON(intmask == 0); if (!host->cmd) { @@ -8164,7 +8298,7 @@ Signed-off-by: popcornmix return; } -@@ -2282,6 +2299,19 @@ static void sdhci_show_adma_error(struct +@@ -2282,6 +2299,19 @@ static void sdhci_show_adma_error(struct sdhci_host *host) static void sdhci_show_adma_error(struct sdhci_host *host) { } #endif @@ -8184,7 +8318,7 @@ Signed-off-by: popcornmix static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) { u32 command; -@@ -2311,23 +2341,39 @@ static void sdhci_data_irq(struct sdhci_ +@@ -2311,23 +2341,39 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) } } @@ -8228,7 +8362,7 @@ Signed-off-by: popcornmix pr_err("%s: ADMA error\n", mmc_hostname(host->mmc)); sdhci_show_adma_error(host); host->data->error = -EIO; -@@ -2335,11 +2381,18 @@ static void sdhci_data_irq(struct sdhci_ +@@ -2335,11 +2381,18 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) host->ops->adma_workaround(host, intmask); } @@ -8251,7 +8385,7 @@ Signed-off-by: popcornmix /* * We currently don't do anything fancy with DMA -@@ -2368,18 +2421,8 @@ static void sdhci_data_irq(struct sdhci_ +@@ -2368,18 +2421,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask) sdhci_writel(host, dmanow, SDHCI_DMA_ADDRESS); } @@ -8310,7 +8444,7 @@ Signed-off-by: popcornmix if (intmask & SDHCI_INT_BUS_POWER) { pr_err("%s: Card is consuming too much power!\n", -@@ -2569,7 +2634,8 @@ int sdhci_resume_host(struct sdhci_host +@@ -2569,7 +2634,8 @@ int sdhci_resume_host(struct sdhci_host *host) { int ret; @@ -8320,7 +8454,7 @@ Signed-off-by: popcornmix if (host->ops->enable_dma) host->ops->enable_dma(host); } -@@ -2785,14 +2851,16 @@ int sdhci_add_host(struct sdhci_host *ho +@@ -2785,14 +2851,16 @@ int sdhci_add_host(struct sdhci_host *host) host->flags &= ~SDHCI_USE_ADMA; } @@ -8339,7 +8473,7 @@ Signed-off-by: popcornmix } } } -@@ -3080,6 +3148,12 @@ int sdhci_add_host(struct sdhci_host *ho +@@ -3080,6 +3148,12 @@ int sdhci_add_host(struct sdhci_host *host) SDHCI_MAX_CURRENT_MULTIPLIER; } @@ -8352,7 +8486,7 @@ Signed-off-by: popcornmix mmc->ocr_avail = ocr_avail; mmc->ocr_avail_sdio = ocr_avail; if (host->ocr_avail_sdio) -@@ -3210,6 +3284,7 @@ int sdhci_add_host(struct sdhci_host *ho +@@ -3210,6 +3284,7 @@ int sdhci_add_host(struct sdhci_host *host) pr_info("%s: SDHCI controller on %s [%s] using %s\n", mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)), @@ -8360,6 +8494,8 @@ Signed-off-by: popcornmix (host->flags & SDHCI_USE_ADMA) ? "ADMA" : (host->flags & SDHCI_USE_SDMA) ? "DMA" : "PIO"); +diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h +index 379e09d..f90574e 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -289,6 +289,20 @@ struct sdhci_ops { @@ -8383,7 +8519,7 @@ Signed-off-by: popcornmix void (*hw_reset)(struct sdhci_host *host); void (*platform_suspend)(struct sdhci_host *host); void (*platform_resume)(struct sdhci_host *host); -@@ -399,6 +413,29 @@ extern int sdhci_resume_host(struct sdhc +@@ -399,6 +413,29 @@ extern int sdhci_resume_host(struct sdhci_host *host); extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); #endif @@ -8413,6 +8549,8 @@ Signed-off-by: popcornmix #ifdef CONFIG_PM_RUNTIME extern int sdhci_runtime_suspend_host(struct sdhci_host *host); extern int sdhci_runtime_resume_host(struct sdhci_host *host); +diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h +index b838ffc..f3a39c1 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -128,6 +128,7 @@ struct sdhci_host { @@ -8431,3 +8569,6 @@ Signed-off-by: popcornmix struct mmc_data *data; /* Current data request */ unsigned int data_early:1; /* Data finished before cmd */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0002-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-3.10/0002-Add-dwc_otg-driver.patch index 7f7db6341cc..997f613ed22 100644 --- a/target/linux/brcm2708/patches-3.10/0002-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0002-Add-dwc_otg-driver.patch @@ -1,7 +1,7 @@ -From ee24f1f0affd88d3e101a7e66c5ebfd8e582b868 Mon Sep 17 00:00:00 2001 +From 344d6f31638c96846ac26f40a74ee1cc495f421e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:46:17 +0100 -Subject: [PATCH 002/174] Add dwc_otg driver +Subject: [PATCH 002/196] Add dwc_otg driver Signed-off-by: popcornmix --- @@ -129,6 +129,8 @@ Signed-off-by: popcornmix create mode 100644 drivers/usb/host/dwc_otg/test/test_mod_param.pl create mode 100644 drivers/usb/host/dwc_otg/test/test_sysfs.pl +diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile +index c41feba..0b5c606 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -23,6 +23,7 @@ obj-$(CONFIG_USB_U132_HCD) += host/ @@ -139,9 +141,11 @@ Signed-off-by: popcornmix obj-$(CONFIG_USB_IMX21_HCD) += host/ obj-$(CONFIG_USB_FSL_MPH_DR_OF) += host/ +diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c +index acbfeb0..7d675c8 100644 --- a/drivers/usb/core/generic.c +++ b/drivers/usb/core/generic.c -@@ -152,6 +152,7 @@ int usb_choose_configuration(struct usb_ +@@ -152,6 +152,7 @@ int usb_choose_configuration(struct usb_device *udev) dev_warn(&udev->dev, "no configuration chosen from %d choice%s\n", num_configs, plural(num_configs)); @@ -149,6 +153,8 @@ Signed-off-by: popcornmix } return i; } +diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c +index 444d30e..3ff77fa 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1875,6 +1875,85 @@ free_interfaces: @@ -237,6 +243,8 @@ Signed-off-by: popcornmix /* Now that the interfaces are installed, re-enable LPM. */ usb_unlocked_enable_lpm(dev); +diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_whitelist.h +index e8cdce5..3a0da17 100644 --- a/drivers/usb/core/otg_whitelist.h +++ b/drivers/usb/core/otg_whitelist.h @@ -19,33 +19,82 @@ @@ -328,20 +336,14 @@ Signed-off-by: popcornmix static int is_targeted(struct usb_device *dev) { struct usb_device_id *id = whitelist_table; -@@ -55,58 +104,83 @@ static int is_targeted(struct usb_device +@@ -55,58 +104,83 @@ static int is_targeted(struct usb_device *dev) return 1; /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */ - if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && - le16_to_cpu(dev->descriptor.idProduct) == 0xbadd)) - return 0; -+ if (dev->descriptor.idVendor == 0x1a0a && -+ dev->descriptor.idProduct == 0xbadd) { -+ return 0; -+ } else if (!enable_whitelist) { -+ return 1; -+ } else { - +- - /* NOTE: can't use usb_match_id() since interface caches - * aren't set up yet. this is cut/paste from that code. - */ @@ -375,6 +377,13 @@ Signed-off-by: popcornmix - if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && - (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) - continue; ++ if (dev->descriptor.idVendor == 0x1a0a && ++ dev->descriptor.idProduct == 0xbadd) { ++ return 0; ++ } else if (!enable_whitelist) { ++ return 1; ++ } else { ++ +#ifdef DEBUG + dev_dbg(&dev->dev, "device V:%04x P:%04x DC:%04x SC:%04x PR:%04x \n", + dev->descriptor.idVendor, @@ -454,6 +463,9 @@ Signed-off-by: popcornmix #endif } +diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c +new file mode 100644 +index 0000000..a896d73 --- /dev/null +++ b/drivers/usb/gadget/file_storage.c @@ -0,0 +1,3676 @@ @@ -4133,6 +4145,8 @@ Signed-off-by: popcornmix + kref_put(&fsg->ref, fsg_release); +} +module_exit(fsg_cleanup); +diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig +index 344d5e2..0937bde 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -663,6 +663,19 @@ config USB_HWA_HCD @@ -4155,6 +4169,8 @@ Signed-off-by: popcornmix config USB_IMX21_HCD tristate "i.MX21 HCD support" depends on ARM && ARCH_MXC +diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile +index 4fb73c1..76d97de 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -47,6 +47,8 @@ obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o @@ -4166,6 +4182,9 @@ Signed-off-by: popcornmix obj-$(CONFIG_USB_IMX21_HCD) += imx21-hcd.o obj-$(CONFIG_USB_FSL_MPH_DR_OF) += fsl-mph-dr-of.o obj-$(CONFIG_USB_OCTEON2_COMMON) += octeon2-common.o +diff --git a/drivers/usb/host/dwc_common_port/Makefile b/drivers/usb/host/dwc_common_port/Makefile +new file mode 100644 +index 0000000..63e3485 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile @@ -0,0 +1,58 @@ @@ -4227,6 +4246,9 @@ Signed-off-by: popcornmix + +clean: + rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/ +diff --git a/drivers/usb/host/dwc_common_port/Makefile.fbsd b/drivers/usb/host/dwc_common_port/Makefile.fbsd +new file mode 100644 +index 0000000..45db991 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile.fbsd @@ -0,0 +1,17 @@ @@ -4247,6 +4269,9 @@ Signed-off-by: popcornmix + dwc_common_fbsd.c dwc_mem.c + +.include +diff --git a/drivers/usb/host/dwc_common_port/Makefile.linux b/drivers/usb/host/dwc_common_port/Makefile.linux +new file mode 100644 +index 0000000..961df3f --- /dev/null +++ b/drivers/usb/host/dwc_common_port/Makefile.linux @@ -0,0 +1,49 @@ @@ -4299,6 +4324,9 @@ Signed-off-by: popcornmix + +clean: + rm -rf *.o *.ko .*.cmd *.mod.c .*.o.d .*.o.tmp modules.order Module.markers Module.symvers .tmp_versions/ +diff --git a/drivers/usb/host/dwc_common_port/changes.txt b/drivers/usb/host/dwc_common_port/changes.txt +new file mode 100644 +index 0000000..f6839f9 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/changes.txt @@ -0,0 +1,174 @@ @@ -4476,6 +4504,9 @@ Signed-off-by: popcornmix +A DWC_LIBMODULE #define has also been added. If this is not defined, then the +module code in dwc_common_linux.c is not compiled in. This allows linking the +library code directly into a driver module, instead of as a standalone module. +diff --git a/drivers/usb/host/dwc_common_port/doc/doxygen.cfg b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg +new file mode 100644 +index 0000000..605b9dab --- /dev/null +++ b/drivers/usb/host/dwc_common_port/doc/doxygen.cfg @@ -0,0 +1,270 @@ @@ -4749,6 +4780,9 @@ Signed-off-by: popcornmix +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.c b/drivers/usb/host/dwc_common_port/dwc_cc.c +new file mode 100644 +index 0000000..613c901 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.c @@ -0,0 +1,532 @@ @@ -5284,6 +5318,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_CCLIB */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_cc.h b/drivers/usb/host/dwc_common_port/dwc_cc.h +new file mode 100644 +index 0000000..6b2bbaf --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_cc.h @@ -0,0 +1,225 @@ @@ -5512,6 +5549,9 @@ Signed-off-by: popcornmix + +#endif /* _DWC_CC_H_ */ + +diff --git a/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c +new file mode 100644 +index 0000000..6dd04b5 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_fbsd.c @@ -0,0 +1,1308 @@ @@ -6823,6 +6863,9 @@ Signed-off-by: popcornmix +{ + return wq->pending; +} +diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c +new file mode 100644 +index 0000000..f00a9ff --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c @@ -0,0 +1,1421 @@ @@ -8247,6 +8290,9 @@ Signed-off-by: popcornmix +MODULE_LICENSE ("GPL"); + +#endif /* DWC_LIBMODULE */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c +new file mode 100644 +index 0000000..49b07e1 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_common_nbsd.c @@ -0,0 +1,1275 @@ @@ -9525,6 +9571,9 @@ Signed-off-by: popcornmix +{ + return wq->pending; +} +diff --git a/drivers/usb/host/dwc_common_port/dwc_crypto.c b/drivers/usb/host/dwc_common_port/dwc_crypto.c +new file mode 100644 +index 0000000..3b03532 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_crypto.c @@ -0,0 +1,308 @@ @@ -9836,6 +9885,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_CRYPTOLIB */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_crypto.h b/drivers/usb/host/dwc_common_port/dwc_crypto.h +new file mode 100644 +index 0000000..26fcddc --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_crypto.h @@ -0,0 +1,111 @@ @@ -9950,6 +10002,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* _DWC_CRYPTO_H_ */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_dh.c b/drivers/usb/host/dwc_common_port/dwc_dh.c +new file mode 100644 +index 0000000..997f753 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_dh.c @@ -0,0 +1,291 @@ @@ -10244,6 +10299,9 @@ Signed-off-by: popcornmix +#endif /* !CONFIG_MACH_IPMATE */ + +#endif /* DWC_CRYPTOLIB */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_dh.h b/drivers/usb/host/dwc_common_port/dwc_dh.h +new file mode 100644 +index 0000000..25c1cc0 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_dh.h @@ -0,0 +1,106 @@ @@ -10353,6 +10411,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* _DWC_DH_H_ */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_list.h b/drivers/usb/host/dwc_common_port/dwc_list.h +new file mode 100644 +index 0000000..89cc325 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_list.h @@ -0,0 +1,594 @@ @@ -10950,6 +11011,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* _DWC_LIST_H_ */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_mem.c b/drivers/usb/host/dwc_common_port/dwc_mem.c +new file mode 100644 +index 0000000..ad645ff --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_mem.c @@ -0,0 +1,245 @@ @@ -11198,6 +11262,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_DEBUG_MEMORY */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_modpow.c b/drivers/usb/host/dwc_common_port/dwc_modpow.c +new file mode 100644 +index 0000000..b7c456b --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_modpow.c @@ -0,0 +1,636 @@ @@ -11837,6 +11904,9 @@ Signed-off-by: popcornmix +#endif /* CONFIG_MACH_IPMATE */ + +#endif /*DWC_CRYPTOLIB */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_modpow.h b/drivers/usb/host/dwc_common_port/dwc_modpow.h +new file mode 100644 +index 0000000..64f00c2 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_modpow.h @@ -0,0 +1,34 @@ @@ -11874,6 +11944,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* _LINUX_BIGNUM_H */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_notifier.c b/drivers/usb/host/dwc_common_port/dwc_notifier.c +new file mode 100644 +index 0000000..8b3772a --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_notifier.c @@ -0,0 +1,319 @@ @@ -12196,6 +12269,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_NOTIFYLIB */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_notifier.h b/drivers/usb/host/dwc_common_port/dwc_notifier.h +new file mode 100644 +index 0000000..4a8cdfe --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_notifier.h @@ -0,0 +1,122 @@ @@ -12321,6 +12397,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* __DWC_NOTIFIER_H__ */ +diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_common_port/dwc_os.h +new file mode 100644 +index 0000000..308ddd5 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/dwc_os.h @@ -0,0 +1,1260 @@ @@ -13584,6 +13663,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* _DWC_OS_H_ */ +diff --git a/drivers/usb/host/dwc_common_port/usb.h b/drivers/usb/host/dwc_common_port/usb.h +new file mode 100644 +index 0000000..27bda82 --- /dev/null +++ b/drivers/usb/host/dwc_common_port/usb.h @@ -0,0 +1,946 @@ @@ -14533,6 +14615,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* _USB_H_ */ +diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile +new file mode 100644 +index 0000000..c4c6e4e --- /dev/null +++ b/drivers/usb/host/dwc_otg/Makefile @@ -0,0 +1,80 @@ @@ -14616,6 +14701,9 @@ Signed-off-by: popcornmix + rm -rf *.o *.ko .*cmd *.mod.c .tmp_versions Module.symvers + +endif +diff --git a/drivers/usb/host/dwc_otg/doc/doxygen.cfg b/drivers/usb/host/dwc_otg/doc/doxygen.cfg +new file mode 100644 +index 0000000..537c676 --- /dev/null +++ b/drivers/usb/host/dwc_otg/doc/doxygen.cfg @@ -0,0 +1,224 @@ @@ -14843,6 +14931,9 @@ Signed-off-by: popcornmix +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO +diff --git a/drivers/usb/host/dwc_otg/dummy_audio.c b/drivers/usb/host/dwc_otg/dummy_audio.c +new file mode 100644 +index 0000000..530ac8b --- /dev/null +++ b/drivers/usb/host/dwc_otg/dummy_audio.c @@ -0,0 +1,1575 @@ @@ -16421,6 +16512,9 @@ Signed-off-by: popcornmix + remove_proc_entry("isoc_test", NULL); +} +module_exit (cleanup); +diff --git a/drivers/usb/host/dwc_otg/dwc_cfi_common.h b/drivers/usb/host/dwc_otg/dwc_cfi_common.h +new file mode 100644 +index 0000000..be56af4 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_cfi_common.h @@ -0,0 +1,142 @@ @@ -16566,6 +16660,9 @@ Signed-off-by: popcornmix +typedef struct cfi_string cfi_string_t; + +#endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.c b/drivers/usb/host/dwc_otg/dwc_otg_adp.c +new file mode 100644 +index 0000000..0877472 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.c @@ -0,0 +1,854 @@ @@ -17423,6 +17520,9 @@ Signed-off-by: popcornmix +#endif + return 1; +} +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_adp.h b/drivers/usb/host/dwc_otg/dwc_otg_adp.h +new file mode 100644 +index 0000000..d8c3f85 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_adp.h @@ -0,0 +1,80 @@ @@ -17506,6 +17606,9 @@ Signed-off-by: popcornmix +extern int32_t dwc_otg_adp_handle_srp_intr(dwc_otg_core_if_t * core_if); + +#endif //__DWC_OTG_ADP_H__ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c +new file mode 100644 +index 0000000..95eb7f8 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c @@ -0,0 +1,1210 @@ @@ -18719,6 +18822,9 @@ Signed-off-by: popcornmix + device_remove_file(&dev->dev, &dev_attr_sleep_status); +#endif +} +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.h b/drivers/usb/host/dwc_otg/dwc_otg_attr.h +new file mode 100644 +index 0000000..fc14d94 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.h @@ -0,0 +1,89 @@ @@ -18811,6 +18917,9 @@ Signed-off-by: popcornmix +#endif + ); +#endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.c b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c +new file mode 100644 +index 0000000..a9878d6 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.c @@ -0,0 +1,1876 @@ @@ -20690,6 +20799,9 @@ Signed-off-by: popcornmix +} + +#endif //DWC_UTE_CFI +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cfi.h b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h +new file mode 100644 +index 0000000..cbccdab --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cfi.h @@ -0,0 +1,320 @@ @@ -21013,6 +21125,9 @@ Signed-off-by: popcornmix +int cfi_setup(struct dwc_otg_pcd *pcd, struct cfi_usb_ctrlrequest *ctrl); + +#endif /* (__DWC_OTG_CFI_H__) */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.c b/drivers/usb/host/dwc_otg/dwc_otg_cil.c +new file mode 100644 +index 0000000..9b67537 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.c @@ -0,0 +1,7151 @@ @@ -28167,6 +28282,9 @@ Signed-off-by: popcornmix + dwc_otg_pcd_start_srp_timer(core_if); + return; +} +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil.h b/drivers/usb/host/dwc_otg/dwc_otg_cil.h +new file mode 100644 +index 0000000..d367cd1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil.h @@ -0,0 +1,1464 @@ @@ -29634,6 +29752,9 @@ Signed-off-by: popcornmix +////////////////////////////////////////////////////////////////////// + +#endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +new file mode 100644 +index 0000000..21804c4 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -0,0 +1,1563 @@ @@ -31200,6 +31321,9 @@ Signed-off-by: popcornmix + + return retval; +} +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_core_if.h b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h +new file mode 100644 +index 0000000..10b68c4 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_core_if.h @@ -0,0 +1,705 @@ @@ -31908,6 +32032,9 @@ Signed-off-by: popcornmix +/** @} */ + +#endif /* __DWC_CORE_IF_H__ */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h +new file mode 100644 +index 0000000..8681aa9 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h @@ -0,0 +1,116 @@ @@ -32027,6 +32154,9 @@ Signed-off-by: popcornmix + +#endif /*DEBUG*/ +#endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c +new file mode 100644 +index 0000000..e7f99e1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -0,0 +1,1700 @@ @@ -33730,6 +33860,9 @@ Signed-off-by: popcornmix + + +*/ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.h b/drivers/usb/host/dwc_otg/dwc_otg_driver.h +new file mode 100644 +index 0000000..8a0e41b --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.h @@ -0,0 +1,86 @@ @@ -33819,6 +33952,9 @@ Signed-off-by: popcornmix +#endif + +#endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +new file mode 100644 +index 0000000..434d0c4 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -0,0 +1,3473 @@ @@ -37295,6 +37431,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +new file mode 100644 +index 0000000..8075595 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -0,0 +1,824 @@ @@ -38122,6 +38261,9 @@ Signed-off-by: popcornmix +#endif +#endif +#endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +new file mode 100644 +index 0000000..d0d5fa1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c @@ -0,0 +1,1133 @@ @@ -39258,6 +39400,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h +new file mode 100644 +index 0000000..b3dc806 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h @@ -0,0 +1,412 @@ @@ -39673,6 +39818,9 @@ Signed-off-by: popcornmix + +#endif /* __DWC_HCD_IF_H__ */ +#endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +new file mode 100644 +index 0000000..63c1b55 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -0,0 +1,2106 @@ @@ -41782,6 +41930,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +new file mode 100644 +index 0000000..4a985a6 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -0,0 +1,893 @@ @@ -42678,6 +42829,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +new file mode 100644 +index 0000000..08c1669 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -0,0 +1,922 @@ @@ -43603,6 +43757,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h +new file mode 100644 +index 0000000..a7e9076 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h @@ -0,0 +1,185 @@ @@ -43791,6 +43948,9 @@ Signed-off-by: popcornmix + + +#endif /* _DWC_OS_DEP_H_ */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c +new file mode 100644 +index 0000000..c97d65c --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.c @@ -0,0 +1,2708 @@ @@ -46502,6 +46662,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_HOST_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd.h b/drivers/usb/host/dwc_otg/dwc_otg_pcd.h +new file mode 100644 +index 0000000..8ef7ba6 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd.h @@ -0,0 +1,266 @@ @@ -46771,6 +46934,9 @@ Signed-off-by: popcornmix +extern void do_test_mode(void *data); +#endif +#endif /* DWC_HOST_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h +new file mode 100644 +index 0000000..c8d2e0e --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_if.h @@ -0,0 +1,360 @@ @@ -47134,6 +47300,9 @@ Signed-off-by: popcornmix +#endif /* __DWC_PCD_IF_H__ */ + +#endif /* DWC_HOST_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +new file mode 100644 +index 0000000..27061d3 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -0,0 +1,5147 @@ @@ -52284,6 +52453,9 @@ Signed-off-by: popcornmix +} + +#endif /* DWC_HOST_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c +new file mode 100644 +index 0000000..a591d89 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c @@ -0,0 +1,1358 @@ @@ -53645,6 +53817,9 @@ Signed-off-by: popcornmix +EXPORT_SYMBOL(usb_gadget_unregister_driver); + +#endif /* DWC_HOST_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_regs.h b/drivers/usb/host/dwc_otg/dwc_otg_regs.h +new file mode 100644 +index 0000000..0572642 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_regs.h @@ -0,0 +1,2550 @@ @@ -56198,6 +56373,9 @@ Signed-off-by: popcornmix +} gpwrdn_data_t; + +#endif +diff --git a/drivers/usb/host/dwc_otg/test/Makefile b/drivers/usb/host/dwc_otg/test/Makefile +new file mode 100644 +index 0000000..fc45375 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/Makefile @@ -0,0 +1,16 @@ @@ -56217,6 +56395,9 @@ Signed-off-by: popcornmix + else echo "=======> $$test, FAILED" ; \ + fi \ + done +diff --git a/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm +new file mode 100644 +index 0000000..233b04a --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/dwc_otg_test.pm @@ -0,0 +1,337 @@ @@ -56557,6 +56738,9 @@ Signed-off-by: popcornmix +); + +1; +diff --git a/drivers/usb/host/dwc_otg/test/test_mod_param.pl b/drivers/usb/host/dwc_otg/test/test_mod_param.pl +new file mode 100644 +index 0000000..e887dce --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_mod_param.pl @@ -0,0 +1,133 @@ @@ -56693,6 +56877,9 @@ Signed-off-by: popcornmix + +test_main(); +0; +diff --git a/drivers/usb/host/dwc_otg/test/test_sysfs.pl b/drivers/usb/host/dwc_otg/test/test_sysfs.pl +new file mode 100644 +index 0000000..abcf284 --- /dev/null +++ b/drivers/usb/host/dwc_otg/test/test_sysfs.pl @@ -0,0 +1,193 @@ @@ -56889,3 +57076,6 @@ Signed-off-by: popcornmix + +test_main(); +0; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0003-bcm2708-watchdog-driver.patch b/target/linux/brcm2708/patches-3.10/0003-bcm2708-watchdog-driver.patch index be05d8396da..04bef7a653e 100644 --- a/target/linux/brcm2708/patches-3.10/0003-bcm2708-watchdog-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0003-bcm2708-watchdog-driver.patch @@ -1,7 +1,7 @@ -From dd611b3364087514ef5fc59c6106d8924d2a2a30 Mon Sep 17 00:00:00 2001 +From 34844524c88edbb0fd75339fd655f6b69b221b0a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:54:32 +0100 -Subject: [PATCH 003/174] bcm2708 watchdog driver +Subject: [PATCH 003/196] bcm2708 watchdog driver Signed-off-by: popcornmix --- @@ -11,6 +11,8 @@ Signed-off-by: popcornmix 3 files changed, 392 insertions(+) create mode 100644 drivers/watchdog/bcm2708_wdog.c +diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig +index e89fc31..60ca320 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -391,6 +391,12 @@ config RETU_WATCHDOG @@ -26,9 +28,11 @@ Signed-off-by: popcornmix # AVR32 Architecture config AT32AP700X_WDT +diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile +index a300b94..0e357711 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile -@@ -54,6 +54,7 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_ +@@ -54,6 +54,7 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o @@ -36,6 +40,9 @@ Signed-off-by: popcornmix # AVR32 Architecture obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o +diff --git a/drivers/watchdog/bcm2708_wdog.c b/drivers/watchdog/bcm2708_wdog.c +new file mode 100644 +index 0000000..dd33c35 --- /dev/null +++ b/drivers/watchdog/bcm2708_wdog.c @@ -0,0 +1,385 @@ @@ -424,3 +431,6 @@ Signed-off-by: popcornmix +MODULE_ALIAS_MISCDEV(TEMP_MINOR); +MODULE_LICENSE("GPL"); + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0004-bcm2708-framebuffer-driver.patch b/target/linux/brcm2708/patches-3.10/0004-bcm2708-framebuffer-driver.patch index 3191935e4a8..4d50916d905 100644 --- a/target/linux/brcm2708/patches-3.10/0004-bcm2708-framebuffer-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0004-bcm2708-framebuffer-driver.patch @@ -1,7 +1,7 @@ -From c9fbd3932a41a14af51d04fb6f43c45d60e66f8c Mon Sep 17 00:00:00 2001 +From db56ac21f4312a9cf97d4f9f35ff2593b5b81f7d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 19:55:09 +0100 -Subject: [PATCH 004/174] bcm2708 framebuffer driver +Subject: [PATCH 004/196] bcm2708 framebuffer driver Signed-off-by: popcornmix --- @@ -12,6 +12,8 @@ Signed-off-by: popcornmix 4 files changed, 1387 insertions(+), 1602 deletions(-) create mode 100644 drivers/video/bcm2708_fb.c +diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig +index 2e937bd..9f4c58f 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -310,6 +310,20 @@ config FB_PM2_FIFO_DISCONNECT @@ -35,9 +37,11 @@ Signed-off-by: popcornmix config FB_ARMCLCD tristate "ARM PrimeCell PL110 support" depends on FB && ARM && ARM_AMBA +diff --git a/drivers/video/Makefile b/drivers/video/Makefile +index e8bae8d..032f386 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile -@@ -100,6 +100,7 @@ obj-$(CONFIG_FB_PVR2) += pvr +@@ -100,6 +100,7 @@ obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o obj-$(CONFIG_FB_GOLDFISH) += goldfishfb.o @@ -45,6 +49,9 @@ Signed-off-by: popcornmix obj-$(CONFIG_FB_68328) += 68328fb.o obj-$(CONFIG_FB_GBE) += gbefb.o obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o +diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c +new file mode 100644 +index 0000000..08d9238 --- /dev/null +++ b/drivers/video/bcm2708_fb.c @@ -0,0 +1,491 @@ @@ -539,6 +546,8 @@ Signed-off-by: popcornmix +MODULE_PARM_DESC(fbwidth, "Width of ARM Framebuffer"); +MODULE_PARM_DESC(fbheight, "Height of ARM Framebuffer"); +MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); +diff --git a/drivers/video/logo/logo_linux_clut224.ppm b/drivers/video/logo/logo_linux_clut224.ppm +index 3c14e43..7626beb 100644 --- a/drivers/video/logo/logo_linux_clut224.ppm +++ b/drivers/video/logo/logo_linux_clut224.ppm @@ -1,1604 +1,883 @@ @@ -3027,3 +3036,6 @@ Signed-off-by: popcornmix +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0005-bcm2708-vchiq-driver.patch b/target/linux/brcm2708/patches-3.10/0005-bcm2708-vchiq-driver.patch index 3212e085da9..23decd64d93 100644 --- a/target/linux/brcm2708/patches-3.10/0005-bcm2708-vchiq-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0005-bcm2708-vchiq-driver.patch @@ -1,7 +1,7 @@ -From 2fdd1c3ab61a7a58a3ef3bc5b3d1504202bbc108 Mon Sep 17 00:00:00 2001 +From 8edd8c6dbdb6a5288c7116ea6e9dc59705b15a6a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 2 Jul 2013 23:42:01 +0100 -Subject: [PATCH 005/174] bcm2708 vchiq driver +Subject: [PATCH 005/196] bcm2708 vchiq driver Signed-off-by: popcornmix --- @@ -71,6 +71,8 @@ Signed-off-by: popcornmix create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h create mode 100644 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c +diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig +index c002d86..84d3100 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -536,4 +536,6 @@ source "drivers/misc/carma/Kconfig" @@ -80,6 +82,8 @@ Signed-off-by: popcornmix +source "drivers/misc/vc04_services/Kconfig" endmenu + +diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile +index c235d5b..d72aaf2 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -53,3 +53,4 @@ obj-$(CONFIG_INTEL_MEI) += mei/ @@ -87,6 +91,9 @@ Signed-off-by: popcornmix obj-$(CONFIG_LATTICE_ECP3_CONFIG) += lattice-ecp3-config.o obj-$(CONFIG_SRAM) += sram.o +obj-y += vc04_services/ +diff --git a/drivers/misc/vc04_services/Kconfig b/drivers/misc/vc04_services/Kconfig +new file mode 100644 +index 0000000..b48a3f3 --- /dev/null +++ b/drivers/misc/vc04_services/Kconfig @@ -0,0 +1,10 @@ @@ -100,6 +107,9 @@ Signed-off-by: popcornmix + Defaults to Y when the Broadcom Videocore services + are included in the build, N otherwise. + +diff --git a/drivers/misc/vc04_services/Makefile b/drivers/misc/vc04_services/Makefile +new file mode 100644 +index 0000000..1aeb20a --- /dev/null +++ b/drivers/misc/vc04_services/Makefile @@ -0,0 +1,18 @@ @@ -121,6 +131,9 @@ Signed-off-by: popcornmix + +endif + +diff --git a/drivers/misc/vc04_services/interface/vchi/connections/connection.h b/drivers/misc/vc04_services/interface/vchi/connections/connection.h +new file mode 100644 +index 0000000..fef6ac3 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/connections/connection.h @@ -0,0 +1,328 @@ @@ -452,6 +465,9 @@ Signed-off-by: popcornmix +#endif /* CONNECTION_H_ */ + +/****************************** End of file **********************************/ +diff --git a/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h b/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h +new file mode 100644 +index 0000000..8b3f767 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/message_drivers/message.h @@ -0,0 +1,204 @@ @@ -659,6 +675,9 @@ Signed-off-by: popcornmix +#endif // _VCHI_MESSAGE_H_ + +/****************************** End of file ***********************************/ +diff --git a/drivers/misc/vc04_services/interface/vchi/vchi.h b/drivers/misc/vc04_services/interface/vchi/vchi.h +new file mode 100644 +index 0000000..cee5291 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi.h @@ -0,0 +1,373 @@ @@ -1035,6 +1054,9 @@ Signed-off-by: popcornmix +#endif /* VCHI_H_ */ + +/****************************** End of file **********************************/ +diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h +new file mode 100644 +index 0000000..26bc2d3 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg.h @@ -0,0 +1,224 @@ @@ -1262,6 +1284,9 @@ Signed-off-by: popcornmix +#endif /* VCHI_CFG_H_ */ + +/****************************** End of file **********************************/ +diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h b/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h +new file mode 100644 +index 0000000..35dcba4 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h @@ -0,0 +1,71 @@ @@ -1336,6 +1361,9 @@ Signed-off-by: popcornmix +//#define VCHI_RX_NANOLOCKS + +#endif /*VCHI_CFG_INTERNAL_H_*/ +diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_common.h b/drivers/misc/vc04_services/interface/vchi/vchi_common.h +new file mode 100644 +index 0000000..9e6c00e --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_common.h @@ -0,0 +1,163 @@ @@ -1502,6 +1530,9 @@ Signed-off-by: popcornmix + + +#endif // VCHI_COMMON_H_ +diff --git a/drivers/misc/vc04_services/interface/vchi/vchi_mh.h b/drivers/misc/vc04_services/interface/vchi/vchi_mh.h +new file mode 100644 +index 0000000..198bd07 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchi/vchi_mh.h @@ -0,0 +1,42 @@ @@ -1547,6 +1578,9 @@ Signed-off-by: popcornmix +#define VCHI_MEM_HANDLE_INVALID 0 + +#endif +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h +new file mode 100644 +index 0000000..f87dcbd --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h @@ -0,0 +1,41 @@ @@ -1591,6 +1625,9 @@ Signed-off-by: popcornmix + +#endif + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h +new file mode 100644 +index 0000000..7ea5c64 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835.h @@ -0,0 +1,42 @@ @@ -1636,6 +1673,9 @@ Signed-off-by: popcornmix +#define VCHIQ_PLATFORM_FRAGMENTS_COUNT_IDX 1 + +#endif /* VCHIQ_2835_H */ +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +new file mode 100644 +index 0000000..2b5fa56 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c @@ -0,0 +1,538 @@ @@ -2177,6 +2217,9 @@ Signed-off-by: popcornmix + + kfree(pagelist); +} +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c +new file mode 100644 +index 0000000..f44d4b4 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -0,0 +1,2813 @@ @@ -4993,6 +5036,9 @@ Signed-off-by: popcornmix +module_exit(vchiq_exit); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Broadcom Corporation"); +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h +new file mode 100644 +index 0000000..75ad4c6 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -0,0 +1,212 @@ @@ -5208,6 +5254,9 @@ Signed-off-by: popcornmix + + +#endif /* VCHIQ_ARM_H */ +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h +new file mode 100644 +index 0000000..df64581 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_build_info.h @@ -0,0 +1,37 @@ @@ -5248,6 +5297,9 @@ Signed-off-by: popcornmix +const char *vchiq_get_build_version(void); +const char *vchiq_get_build_time(void); +const char *vchiq_get_build_date(void); +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h +new file mode 100644 +index 0000000..493c86c --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h @@ -0,0 +1,60 @@ @@ -5311,6 +5363,9 @@ Signed-off-by: popcornmix +#endif + +#endif /* VCHIQ_CFG_H */ +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c +new file mode 100644 +index 0000000..65f4b52 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c @@ -0,0 +1,119 @@ @@ -5433,6 +5488,9 @@ Signed-off-by: popcornmix + mutex_unlock(&g_connected_mutex); +} +EXPORT_SYMBOL(vchiq_add_connected_callback); +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h +new file mode 100644 +index 0000000..e4cfdcc --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h @@ -0,0 +1,51 @@ @@ -5487,6 +5545,9 @@ Signed-off-by: popcornmix + +#endif /* VCHIQ_CONNECTED_H */ + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c +new file mode 100644 +index 0000000..f35ed4f --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -0,0 +1,3824 @@ @@ -9314,6 +9375,9 @@ Signed-off-by: popcornmix + numBytes = 0; + } +} +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h +new file mode 100644 +index 0000000..47cdf27 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -0,0 +1,706 @@ @@ -10023,6 +10087,9 @@ Signed-off-by: popcornmix + size_t numBytes); + +#endif +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion +new file mode 100644 +index 0000000..77dd613 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion @@ -0,0 +1,89 @@ @@ -10115,6 +10182,9 @@ Signed-off-by: popcornmix +EOF + + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h +new file mode 100644 +index 0000000..50359b0 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h @@ -0,0 +1,188 @@ @@ -10306,6 +10376,9 @@ Signed-off-by: popcornmix + short *peer_version); + +#endif /* VCHIQ_IF_H */ +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h +new file mode 100644 +index 0000000..e248037 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h @@ -0,0 +1,129 @@ @@ -10438,6 +10511,9 @@ Signed-off-by: popcornmix +#define VCHIQ_IOC_MAX 15 + +#endif +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c +new file mode 100644 +index 0000000..be9735f --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c @@ -0,0 +1,456 @@ @@ -10897,6 +10973,9 @@ Signed-off-by: popcornmix + + return status; +} +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h +new file mode 100644 +index 0000000..d02e776 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h @@ -0,0 +1,71 @@ @@ -10971,6 +11050,9 @@ Signed-off-by: popcornmix + const VCHIQ_PLATFORM_DATA_T * platform_data); + +#endif +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h +new file mode 100644 +index 0000000..54a3ece --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_pagelist.h @@ -0,0 +1,58 @@ @@ -11032,6 +11114,9 @@ Signed-off-by: popcornmix +} FRAGMENTS_T; + +#endif /* VCHIQ_PAGELIST_H */ +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_proc.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_proc.c +new file mode 100644 +index 0000000..dc3bdda --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_proc.c @@ -0,0 +1,254 @@ @@ -11289,6 +11374,9 @@ Signed-off-by: popcornmix + +#endif + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c +new file mode 100644 +index 0000000..f752f8d --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -0,0 +1,815 @@ @@ -12107,6 +12195,9 @@ Signed-off-by: popcornmix + return ret; +} +EXPORT_SYMBOL(vchi_service_release); +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c +new file mode 100644 +index 0000000..c2eefef --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c @@ -0,0 +1,151 @@ @@ -12261,6 +12352,9 @@ Signed-off-by: popcornmix + + return header; +} +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h +new file mode 100644 +index 0000000..7c4bf7c --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h @@ -0,0 +1,82 @@ @@ -12346,6 +12440,9 @@ Signed-off-by: popcornmix + +#endif + +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c +new file mode 100644 +index 0000000..b6bfa21 --- /dev/null +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_version.c @@ -0,0 +1,59 @@ @@ -12408,3 +12505,6 @@ Signed-off-by: popcornmix +{ + return vchiq_build_time; +} +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0006-cma-Add-vc_cma-driver-to-enable-use-of-CMA.patch b/target/linux/brcm2708/patches-3.10/0006-cma-Add-vc_cma-driver-to-enable-use-of-CMA.patch index c9485340bf5..aef8e68c6bc 100644 --- a/target/linux/brcm2708/patches-3.10/0006-cma-Add-vc_cma-driver-to-enable-use-of-CMA.patch +++ b/target/linux/brcm2708/patches-3.10/0006-cma-Add-vc_cma-driver-to-enable-use-of-CMA.patch @@ -1,7 +1,7 @@ -From ff28398a53a45795382bdb25db71f2a8b3394dab Mon Sep 17 00:00:00 2001 +From 15b3faf99f1b16184620bc89be78a5f205acbe92 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:31:47 +0100 -Subject: [PATCH 006/174] cma: Add vc_cma driver to enable use of CMA +Subject: [PATCH 006/196] cma: Add vc_cma driver to enable use of CMA Signed-off-by: popcornmix --- @@ -20,6 +20,8 @@ Signed-off-by: popcornmix create mode 100644 drivers/char/broadcom/vc_cma/vc_cma.c create mode 100644 include/linux/broadcom/vc_cma.h +diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig +index 3bb6fa3..022b91c 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -586,6 +586,8 @@ config DEVPORT @@ -31,6 +33,8 @@ Signed-off-by: popcornmix config MSM_SMD_PKT bool "Enable device interface for some SMD packet ports" default n +diff --git a/drivers/char/Makefile b/drivers/char/Makefile +index 7ff1d0d..c594502 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -62,3 +62,6 @@ obj-$(CONFIG_JS_RTC) += js-rtc.o @@ -40,6 +44,9 @@ Signed-off-by: popcornmix + +obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/ + +diff --git a/drivers/char/broadcom/Kconfig b/drivers/char/broadcom/Kconfig +new file mode 100644 +index 0000000..e23b440 --- /dev/null +++ b/drivers/char/broadcom/Kconfig @@ -0,0 +1,16 @@ @@ -59,11 +66,17 @@ Signed-off-by: popcornmix + help + Helper for videocore CMA access. + +diff --git a/drivers/char/broadcom/Makefile b/drivers/char/broadcom/Makefile +new file mode 100644 +index 0000000..c8574c8 --- /dev/null +++ b/drivers/char/broadcom/Makefile @@ -0,0 +1,2 @@ +obj-$(CONFIG_BCM_VC_CMA) += vc_cma/ + +diff --git a/drivers/char/broadcom/vc_cma/Makefile b/drivers/char/broadcom/vc_cma/Makefile +new file mode 100644 +index 0000000..ae71918 --- /dev/null +++ b/drivers/char/broadcom/vc_cma/Makefile @@ -0,0 +1,15 @@ @@ -82,6 +95,9 @@ Signed-off-by: popcornmix + +vc-cma-objs := vc_cma.o + +diff --git a/drivers/char/broadcom/vc_cma/vc_cma.c b/drivers/char/broadcom/vc_cma/vc_cma.c +new file mode 100644 +index 0000000..fe80887 --- /dev/null +++ b/drivers/char/broadcom/vc_cma/vc_cma.c @@ -0,0 +1,1143 @@ @@ -1228,6 +1244,8 @@ Signed-off-by: popcornmix +module_exit(vc_cma_exit); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Broadcom Corporation"); +diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile +index d72aaf2..24b40c3 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -53,4 +53,4 @@ obj-$(CONFIG_INTEL_MEI) += mei/ @@ -1236,6 +1254,9 @@ Signed-off-by: popcornmix obj-$(CONFIG_SRAM) += sram.o -obj-y += vc04_services/ +obj-$(CONFIG_BCM2708_VCHIQ) += vc04_services/ +diff --git a/include/linux/broadcom/vc_cma.h b/include/linux/broadcom/vc_cma.h +new file mode 100644 +index 0000000..bdc9d79 --- /dev/null +++ b/include/linux/broadcom/vc_cma.h @@ -0,0 +1,30 @@ @@ -1269,3 +1290,6 @@ Signed-off-by: popcornmix + +#endif /* VC_CMA_H */ + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0007-bcm2708-alsa-sound-driver.patch b/target/linux/brcm2708/patches-3.10/0007-bcm2708-alsa-sound-driver.patch index 20736c307a3..4b6fd6f6535 100644 --- a/target/linux/brcm2708/patches-3.10/0007-bcm2708-alsa-sound-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0007-bcm2708-alsa-sound-driver.patch @@ -1,7 +1,7 @@ -From 7868fb252f8846b21a00b9a42a8bfa10f1c969ee Mon Sep 17 00:00:00 2001 +From f99826368eeb17ddaf6b9459f577356c0387f365 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 26 Mar 2012 22:15:50 +0100 -Subject: [PATCH 007/174] bcm2708: alsa sound driver +Subject: [PATCH 007/196] bcm2708: alsa sound driver Signed-off-by: popcornmix --- @@ -24,6 +24,8 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver create mode 100755 sound/arm/bcm2835.h create mode 100644 sound/arm/vc_vchi_audioserv_defs.h +diff --git a/arch/arm/configs/bcmrpi_cutdown_defconfig b/arch/arm/configs/bcmrpi_cutdown_defconfig +index 74f2dc9..e519412 100644 --- a/arch/arm/configs/bcmrpi_cutdown_defconfig +++ b/arch/arm/configs/bcmrpi_cutdown_defconfig @@ -208,6 +208,26 @@ CONFIG_FRAMEBUFFER_CONSOLE=y @@ -53,6 +55,8 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver CONFIG_HID_PID=y CONFIG_USB_HIDDEV=y CONFIG_HID_A4TECH=m +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 339aabf..df947e5 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -225,6 +225,26 @@ CONFIG_FRAMEBUFFER_CONSOLE=y @@ -82,9 +86,11 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver CONFIG_HID_PID=y CONFIG_USB_HIDDEV=y CONFIG_HID_A4TECH=m +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 64a2783..67f3608 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -424,6 +424,16 @@ struct platform_device bcm2708_powerman_ +@@ -424,6 +424,16 @@ struct platform_device bcm2708_powerman_device = { .coherent_dma_mask = 0xffffffffUL}, }; @@ -110,6 +116,8 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { struct amba_device *d = amba_devs[i]; +diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig +index 885683a..f7ceafd 100644 --- a/sound/arm/Kconfig +++ b/sound/arm/Kconfig @@ -39,5 +39,12 @@ config SND_PXA2XX_AC97 @@ -125,9 +133,11 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver + endif # SND_ARM +diff --git a/sound/arm/Makefile b/sound/arm/Makefile +index 8c0c851..181cb57 100644 --- a/sound/arm/Makefile +++ b/sound/arm/Makefile -@@ -14,3 +14,9 @@ snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_A +@@ -14,3 +14,9 @@ snd-pxa2xx-lib-$(CONFIG_SND_PXA2XX_LIB_AC97) += pxa2xx-ac97-lib.o obj-$(CONFIG_SND_PXA2XX_AC97) += snd-pxa2xx-ac97.o snd-pxa2xx-ac97-objs := pxa2xx-ac97.o @@ -137,6 +147,9 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver + +EXTRA_CFLAGS += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 + +diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c +new file mode 100755 +index 0000000..c3e0f7a --- /dev/null +++ b/sound/arm/bcm2835-ctl.c @@ -0,0 +1,200 @@ @@ -340,6 +353,9 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver + } + return 0; +} +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +new file mode 100755 +index 0000000..4206b7e --- /dev/null +++ b/sound/arm/bcm2835-pcm.c @@ -0,0 +1,409 @@ @@ -752,6 +768,9 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver + + return 0; +} +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +new file mode 100755 +index 0000000..9ecb2d6 --- /dev/null +++ b/sound/arm/bcm2835-vchiq.c @@ -0,0 +1,844 @@ @@ -1599,6 +1618,9 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver + +module_param(force_bulk, bool, 0444); +MODULE_PARM_DESC(force_bulk, "Force use of vchiq bulk for audio"); +diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c +new file mode 100755 +index 0000000..e5ac894 --- /dev/null +++ b/sound/arm/bcm2835.c @@ -0,0 +1,413 @@ @@ -2015,6 +2037,9 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver +MODULE_DESCRIPTION("Alsa driver for BCM2835 chip"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:bcm2835_alsa"); +diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h +new file mode 100755 +index 0000000..b966e28 --- /dev/null +++ b/sound/arm/bcm2835.h @@ -0,0 +1,155 @@ @@ -2173,6 +2198,9 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver +void bcm2835_audio_flush_playback_buffers(bcm2835_alsa_stream_t * alsa_stream); + +#endif /* __SOUND_ARM_BCM2835_H */ +diff --git a/sound/arm/vc_vchi_audioserv_defs.h b/sound/arm/vc_vchi_audioserv_defs.h +new file mode 100644 +index 0000000..af3e6eb --- /dev/null +++ b/sound/arm/vc_vchi_audioserv_defs.h @@ -0,0 +1,116 @@ @@ -2292,3 +2320,6 @@ Subject: [PATCH 007/174] bcm2708: alsa sound driver +} VC_AUDIO_MSG_T; + +#endif // _VC_AUDIO_DEFS_H_ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0008-Allow-mac-address-to-be-set-in-smsc95xx.patch b/target/linux/brcm2708/patches-3.10/0008-Allow-mac-address-to-be-set-in-smsc95xx.patch index b8886e5761c..127e07dca97 100644 --- a/target/linux/brcm2708/patches-3.10/0008-Allow-mac-address-to-be-set-in-smsc95xx.patch +++ b/target/linux/brcm2708/patches-3.10/0008-Allow-mac-address-to-be-set-in-smsc95xx.patch @@ -1,13 +1,15 @@ -From bd5ea6c71eb31d1c65f718a2938ea9a4272c8b8e Mon Sep 17 00:00:00 2001 +From 6bcf2da9cea3a1565a87f848f4e17bc634bb160c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 17:26:38 +0000 -Subject: [PATCH 008/174] Allow mac address to be set in smsc95xx +Subject: [PATCH 008/196] Allow mac address to be set in smsc95xx Signed-off-by: popcornmix --- drivers/net/usb/smsc95xx.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) +diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c +index 9375b8c..f024562 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -61,6 +61,7 @@ @@ -29,7 +31,7 @@ Signed-off-by: popcornmix static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, u32 *data, int in_pm) { -@@ -765,8 +770,59 @@ static int smsc95xx_ioctl(struct net_dev +@@ -765,8 +770,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); } @@ -89,3 +91,6 @@ Signed-off-by: popcornmix /* try reading mac address from EEPROM */ if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN, dev->net->dev_addr) == 0) { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0009-possible-fix-for-sdcard-missing-status.-Thank-naren.patch b/target/linux/brcm2708/patches-3.10/0009-possible-fix-for-sdcard-missing-status.-Thank-naren.patch index d38445afdc8..c27ae4433c8 100644 --- a/target/linux/brcm2708/patches-3.10/0009-possible-fix-for-sdcard-missing-status.-Thank-naren.patch +++ b/target/linux/brcm2708/patches-3.10/0009-possible-fix-for-sdcard-missing-status.-Thank-naren.patch @@ -1,15 +1,17 @@ -From f7ea3b11c29f79b86cbb2e25fa4cd1598a4350e3 Mon Sep 17 00:00:00 2001 +From ea8076fd5bc2996fbc04cc54178bb1f113ee0ccc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 8 May 2012 23:12:13 +0100 -Subject: [PATCH 009/174] possible fix for sdcard missing status. Thank naren +Subject: [PATCH 009/196] possible fix for sdcard missing status. Thank naren --- drivers/mmc/host/sdhci-bcm2708.c | 9 +++++++++ 1 file changed, 9 insertions(+) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index e79723d..a405114 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1173,6 +1173,14 @@ static unsigned int sdhci_bcm2708_uhs_br +@@ -1173,6 +1173,14 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) return 1; } @@ -24,7 +26,7 @@ Subject: [PATCH 009/174] possible fix for sdcard missing status. Thank naren /***************************************************************************** \ * * * Device ops * -@@ -1206,6 +1214,7 @@ static struct sdhci_ops sdhci_bcm2708_op +@@ -1206,6 +1214,7 @@ static struct sdhci_ops sdhci_bcm2708_ops = { .spurious_crc_acmd51 = sdhci_bcm2708_quirk_spurious_crc, .voltage_broken = sdhci_bcm2708_quirk_voltage_broken, .uhs_broken = sdhci_bcm2708_uhs_broken, @@ -32,3 +34,6 @@ Subject: [PATCH 009/174] possible fix for sdcard missing status. Thank naren }; /*****************************************************************************\ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0010-sdcard-patch-improvements-from-naren.patch b/target/linux/brcm2708/patches-3.10/0010-sdcard-patch-improvements-from-naren.patch index 1dfd3f8ed52..3ff7e12fa19 100644 --- a/target/linux/brcm2708/patches-3.10/0010-sdcard-patch-improvements-from-naren.patch +++ b/target/linux/brcm2708/patches-3.10/0010-sdcard-patch-improvements-from-naren.patch @@ -1,15 +1,17 @@ -From 7063eab83522ea1f24934b971418bfdd4c5578f1 Mon Sep 17 00:00:00 2001 +From c655ceea69b95ccf2cc486a83048e41c3f664d1f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 17 May 2012 14:44:19 +0100 -Subject: [PATCH 010/174] sdcard patch improvements from naren +Subject: [PATCH 010/196] sdcard patch improvements from naren --- drivers/mmc/host/sdhci-bcm2708.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index a405114..ae8edf7 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -886,8 +886,7 @@ static void sdhci_bcm2708_dma_complete_i +@@ -886,8 +886,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, We get CRC and DEND errors unless we wait for the SD controller to finish reading/writing to the card. */ u32 state_mask; @@ -19,7 +21,7 @@ Subject: [PATCH 010/174] sdcard patch improvements from naren DBG("PDMA over - sync card\n"); if (data->flags & MMC_DATA_READ) -@@ -895,17 +894,12 @@ static void sdhci_bcm2708_dma_complete_i +@@ -895,17 +894,12 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, else state_mask = SDHCI_DOING_WRITE; @@ -42,7 +44,7 @@ Subject: [PATCH 010/174] sdcard patch improvements from naren if (timeout <= 0) printk(KERN_ERR"%s: final %s to SD card still " "running\n", -@@ -1175,10 +1169,7 @@ static unsigned int sdhci_bcm2708_uhs_br +@@ -1175,10 +1169,7 @@ static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) { @@ -54,3 +56,6 @@ Subject: [PATCH 010/174] sdcard patch improvements from naren } /***************************************************************************** \ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0011-sdhci-bcm2708-speed-up-DMA-sync.patch b/target/linux/brcm2708/patches-3.10/0011-sdhci-bcm2708-speed-up-DMA-sync.patch index 5087146fe78..1321f098924 100644 --- a/target/linux/brcm2708/patches-3.10/0011-sdhci-bcm2708-speed-up-DMA-sync.patch +++ b/target/linux/brcm2708/patches-3.10/0011-sdhci-bcm2708-speed-up-DMA-sync.patch @@ -1,7 +1,7 @@ -From e38d3d05747f6877a2ad1a7af1ac26e6a48a8be3 Mon Sep 17 00:00:00 2001 +From 07947cfde701f7ba29b06574e9533bd6459da8ad Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 4 Jun 2012 04:27:48 +0200 -Subject: [PATCH 011/174] sdhci-bcm2708: speed up DMA sync +Subject: [PATCH 011/196] sdhci-bcm2708: speed up DMA sync Experiments show that it doesn't really take that long to sync, so we can reduce the poll interval slightly. Might improve performance a bit. @@ -9,9 +9,11 @@ can reduce the poll interval slightly. Might improve performance a bit. drivers/mmc/host/sdhci-bcm2708.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index ae8edf7..a6bdc25 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -897,7 +897,7 @@ static void sdhci_bcm2708_dma_complete_i +@@ -897,7 +897,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, while (0 != (sdhci_bcm2708_raw_readl(host, SDHCI_PRESENT_STATE) & state_mask) && --timeout > 0) { @@ -20,3 +22,6 @@ can reduce the poll interval slightly. Might improve performance a bit. continue; } if (timeout <= 0) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0012-sdhci-bcm2708-remove-custom-clock-handling.patch b/target/linux/brcm2708/patches-3.10/0012-sdhci-bcm2708-remove-custom-clock-handling.patch index 58bcee3d564..0145d79769a 100644 --- a/target/linux/brcm2708/patches-3.10/0012-sdhci-bcm2708-remove-custom-clock-handling.patch +++ b/target/linux/brcm2708/patches-3.10/0012-sdhci-bcm2708-remove-custom-clock-handling.patch @@ -1,7 +1,7 @@ -From 3f65aaaabc3ddc09bacf06bb608f8bab5671fb18 Mon Sep 17 00:00:00 2001 +From d63cca1d57881d931236d101fe16fd249d91b060 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:52:04 +0200 -Subject: [PATCH 012/174] sdhci-bcm2708: remove custom clock handling +Subject: [PATCH 012/196] sdhci-bcm2708: remove custom clock handling The custom clock handling code is redundant and buggy. The MMC/SDHCI subsystem does a better job than it, so remove it for good. @@ -9,9 +9,11 @@ subsystem does a better job than it, so remove it for good. drivers/mmc/host/sdhci-bcm2708.c | 65 +--------------------------------------- 1 file changed, 1 insertion(+), 64 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index a6bdc25..0ed4d85 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -353,68 +353,9 @@ void sdhci_bcm2708_writeb(struct sdhci_h +@@ -353,68 +353,9 @@ void sdhci_bcm2708_writeb(struct sdhci_host *host, u8 val, int reg) static unsigned int sdhci_bcm2708_get_max_clock(struct sdhci_host *host) { @@ -81,7 +83,7 @@ subsystem does a better job than it, so remove it for good. /*****************************************************************************\ * * * DMA Operation * -@@ -1189,11 +1130,7 @@ static struct sdhci_ops sdhci_bcm2708_op +@@ -1189,11 +1130,7 @@ static struct sdhci_ops sdhci_bcm2708_ops = { #else #error The BCM2708 SDHCI driver needs CONFIG_MMC_SDHCI_IO_ACCESSORS to be set #endif @@ -93,3 +95,6 @@ subsystem does a better job than it, so remove it for good. #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA // Platform DMA operations +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0013-sdhci-bcm2708-add-additional-quirks.patch b/target/linux/brcm2708/patches-3.10/0013-sdhci-bcm2708-add-additional-quirks.patch index ebf3dc14be2..60a971274ad 100644 --- a/target/linux/brcm2708/patches-3.10/0013-sdhci-bcm2708-add-additional-quirks.patch +++ b/target/linux/brcm2708/patches-3.10/0013-sdhci-bcm2708-add-additional-quirks.patch @@ -1,7 +1,7 @@ -From b567bbb9b16e9c860c8d7a4f2c6cf44c66533dfa Mon Sep 17 00:00:00 2001 +From fa0e27879ec0fc9034eca320e4055539a1b97797 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:53:59 +0200 -Subject: [PATCH 013/174] sdhci-bcm2708: add additional quirks +Subject: [PATCH 013/196] sdhci-bcm2708: add additional quirks Some additional quirks are needed for correct operation. There's no SDHCI capabilities register documented, and it always reads @@ -12,9 +12,11 @@ high-speed mode, so add it as well. drivers/mmc/host/sdhci-bcm2708.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 0ed4d85..3001836 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1189,7 +1189,9 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1189,7 +1189,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) host->quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | @@ -25,3 +27,6 @@ high-speed mode, so add it as well. #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA host->flags = SDHCI_USE_PLATDMA; #endif +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0014-sdhci-bcm2708-add-allow_highspeed-parameter.patch b/target/linux/brcm2708/patches-3.10/0014-sdhci-bcm2708-add-allow_highspeed-parameter.patch index b566ad9b46f..754a496609c 100644 --- a/target/linux/brcm2708/patches-3.10/0014-sdhci-bcm2708-add-allow_highspeed-parameter.patch +++ b/target/linux/brcm2708/patches-3.10/0014-sdhci-bcm2708-add-allow_highspeed-parameter.patch @@ -1,7 +1,7 @@ -From f779191cd42376e2b1f555be1b2c486dd99b2fef Mon Sep 17 00:00:00 2001 +From 06d314090d1c837d5f2c42c9686c8e8fa7db7370 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:57:13 +0200 -Subject: [PATCH 014/174] sdhci-bcm2708: add allow_highspeed parameter +Subject: [PATCH 014/196] sdhci-bcm2708: add allow_highspeed parameter Add a parameter to disable high-speed mode for the few cards that still might have problems. High-speed mode is enabled by default. @@ -9,9 +9,11 @@ still might have problems. High-speed mode is enabled by default. drivers/mmc/host/sdhci-bcm2708.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 3001836..c64de21 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -129,6 +129,8 @@ static inline unsigned long int since_ns +@@ -129,6 +129,8 @@ static inline unsigned long int since_ns(hptime_t t) return (unsigned long)((hptime() - t) * HPTIME_CLK_NS); } @@ -20,7 +22,7 @@ still might have problems. High-speed mode is enabled by default. #if 0 static void hptime_test(void) { -@@ -1254,7 +1256,8 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1254,7 +1256,8 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) host_priv->dma_chan, host_priv->dma_chan_base, host_priv->dma_irq); @@ -43,3 +45,6 @@ still might have problems. High-speed mode is enabled by default. +MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0015-sdhci-bcm2708-assume-50-MHz-eMMC-clock.patch b/target/linux/brcm2708/patches-3.10/0015-sdhci-bcm2708-assume-50-MHz-eMMC-clock.patch index cc34aff13e9..b18fe687a4c 100644 --- a/target/linux/brcm2708/patches-3.10/0015-sdhci-bcm2708-assume-50-MHz-eMMC-clock.patch +++ b/target/linux/brcm2708/patches-3.10/0015-sdhci-bcm2708-assume-50-MHz-eMMC-clock.patch @@ -1,7 +1,7 @@ -From 55ed27d2c44fcf2e808ba26cc2a1c9c4041500da Mon Sep 17 00:00:00 2001 +From 4e5732952c3c2f14058bd7dbcba67d911d77bd39 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 11 Jun 2012 18:58:40 +0200 -Subject: [PATCH 015/174] sdhci-bcm2708: assume 50 MHz eMMC clock +Subject: [PATCH 015/196] sdhci-bcm2708: assume 50 MHz eMMC clock 80 MHz clock isnt't suited well to be dividable to get SD clocks of 25 MHz (default mode) or 50 MHz (high speed mode). 50 MHz are perfect to @@ -10,6 +10,8 @@ drive the SD interface at ideal frequencies. drivers/mmc/host/sdhci-bcm2708.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index c64de21..d174938 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -73,7 +73,7 @@ @@ -21,3 +23,6 @@ drive the SD interface at ideal frequencies. /*****************************************************************************\ * * +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0016-Allow-emmc-clock-to-be-specified-as-command-line-par.patch b/target/linux/brcm2708/patches-3.10/0016-Allow-emmc-clock-to-be-specified-as-command-line-par.patch index dba7e0e18ce..55174fc54de 100644 --- a/target/linux/brcm2708/patches-3.10/0016-Allow-emmc-clock-to-be-specified-as-command-line-par.patch +++ b/target/linux/brcm2708/patches-3.10/0016-Allow-emmc-clock-to-be-specified-as-command-line-par.patch @@ -1,16 +1,18 @@ -From 9227615100c139c48fbbf39312b38c4430eac00d Mon Sep 17 00:00:00 2001 +From f3cbdb41b8e7194b03523eceed5dd8b488f93909 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Jun 2012 22:31:55 +0100 -Subject: [PATCH 016/174] Allow emmc clock to be specified as command line +Subject: [PATCH 016/196] Allow emmc clock to be specified as command line parameter --- drivers/mmc/host/sdhci-bcm2708.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index d174938..0ee983c 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -130,6 +130,7 @@ static inline unsigned long int since_ns +@@ -130,6 +130,7 @@ static inline unsigned long int since_ns(hptime_t t) } static bool allow_highspeed = 1; @@ -18,7 +20,7 @@ Subject: [PATCH 016/174] Allow emmc clock to be specified as command line #if 0 static void hptime_test(void) -@@ -355,7 +356,7 @@ void sdhci_bcm2708_writeb(struct sdhci_h +@@ -355,7 +356,7 @@ void sdhci_bcm2708_writeb(struct sdhci_host *host, u8 val, int reg) static unsigned int sdhci_bcm2708_get_max_clock(struct sdhci_host *host) { @@ -42,3 +44,6 @@ Subject: [PATCH 016/174] Allow emmc clock to be specified as command line +MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0017-sdhci-bcm2708-raise-DMA-sync-timeout.patch b/target/linux/brcm2708/patches-3.10/0017-sdhci-bcm2708-raise-DMA-sync-timeout.patch index 89f86facafa..fd0d9923f6b 100644 --- a/target/linux/brcm2708/patches-3.10/0017-sdhci-bcm2708-raise-DMA-sync-timeout.patch +++ b/target/linux/brcm2708/patches-3.10/0017-sdhci-bcm2708-raise-DMA-sync-timeout.patch @@ -1,7 +1,7 @@ -From a6544a62be8711e727a0d774b55c5edeec12e531 Mon Sep 17 00:00:00 2001 +From 93ad4d743dfa8a5f6bb1d7abf739c7149012099b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Jun 2012 22:35:38 +0100 -Subject: [PATCH 017/174] sdhci-bcm2708: raise DMA sync timeout +Subject: [PATCH 017/196] sdhci-bcm2708: raise DMA sync timeout Commit d64b84c by accident reduced the maximum overall DMA sync timeout. The maximum overall timeout was reduced from 100ms to 30ms, @@ -14,9 +14,11 @@ enough for most cards. drivers/mmc/host/sdhci-bcm2708.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 0ee983c..b0cdd7d 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -830,7 +830,7 @@ static void sdhci_bcm2708_dma_complete_i +@@ -830,7 +830,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, We get CRC and DEND errors unless we wait for the SD controller to finish reading/writing to the card. */ u32 state_mask; @@ -25,3 +27,6 @@ enough for most cards. DBG("PDMA over - sync card\n"); if (data->flags & MMC_DATA_READ) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0018-Use-ndelay-rather-than-udelay.-Thanks-lb.patch b/target/linux/brcm2708/patches-3.10/0018-Use-ndelay-rather-than-udelay.-Thanks-lb.patch index 00f04d816ec..63714cfa427 100644 --- a/target/linux/brcm2708/patches-3.10/0018-Use-ndelay-rather-than-udelay.-Thanks-lb.patch +++ b/target/linux/brcm2708/patches-3.10/0018-Use-ndelay-rather-than-udelay.-Thanks-lb.patch @@ -1,15 +1,17 @@ -From a56370b5a103f3949c5ed2997a971e1949a15132 Mon Sep 17 00:00:00 2001 +From 3755210aaea18a4531069911f36a4771339565c4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 22 Jun 2012 12:57:42 +0100 -Subject: [PATCH 018/174] Use ndelay rather than udelay. Thanks lb +Subject: [PATCH 018/196] Use ndelay rather than udelay. Thanks lb --- drivers/mmc/host/sdhci-bcm2708.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index b0cdd7d..7bba950 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -249,14 +249,14 @@ static void sdhci_bcm2708_raw_writel(str +@@ -249,14 +249,14 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) if (now == last_write_hpt || now == last_write_hpt+1) { /* we can't guarantee any significant time has * passed - we'll have to wait anyway ! */ @@ -26,7 +28,7 @@ Subject: [PATCH 018/174] Use ndelay rather than udelay. Thanks lb } last_write_hpt = now; } -@@ -272,13 +272,13 @@ static void sdhci_bcm2708_raw_writel(str +@@ -272,13 +272,13 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) ier &= ~SDHCI_INT_DATA_TIMEOUT; writel(ier, host->ioaddr + SDHCI_SIGNAL_ENABLE); timeout_disabled = true; @@ -42,3 +44,6 @@ Subject: [PATCH 018/174] Use ndelay rather than udelay. Thanks lb } #endif writel(val, host->ioaddr + reg); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0019-Backport-of-Chris-Boot-s-i2c-and-spi-drivers.patch b/target/linux/brcm2708/patches-3.10/0019-Backport-of-Chris-Boot-s-i2c-and-spi-drivers.patch index f19aafb17e1..59cf718f149 100644 --- a/target/linux/brcm2708/patches-3.10/0019-Backport-of-Chris-Boot-s-i2c-and-spi-drivers.patch +++ b/target/linux/brcm2708/patches-3.10/0019-Backport-of-Chris-Boot-s-i2c-and-spi-drivers.patch @@ -1,7 +1,7 @@ -From 5a3b6667524d9164140077cfadf61b165f0950ec Mon Sep 17 00:00:00 2001 +From eb8655fe20ef40189e9cda1441d488c5a23c89f2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:41:10 +0100 -Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. +Subject: [PATCH 019/196] Backport of Chris Boot's i2c and spi drivers. --- arch/arm/configs/bcmrpi_cutdown_defconfig | 10 + @@ -19,6 +19,8 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. create mode 100644 drivers/i2c/busses/i2c-bcm2708.c create mode 100644 drivers/spi/spi-bcm2708.c +diff --git a/arch/arm/configs/bcmrpi_cutdown_defconfig b/arch/arm/configs/bcmrpi_cutdown_defconfig +index e519412..a61a915 100644 --- a/arch/arm/configs/bcmrpi_cutdown_defconfig +++ b/arch/arm/configs/bcmrpi_cutdown_defconfig @@ -492,3 +492,13 @@ CONFIG_CRYPTO_DEFLATE=m @@ -35,6 +37,8 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. +CONFIG_SPI_MASTER=y +CONFIG_SPI_BCM2708=m + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index df947e5..6219df3 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -214,6 +214,11 @@ CONFIG_SERIAL_AMBA_PL011=y @@ -49,6 +53,8 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. CONFIG_GPIO_SYSFS=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y +diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig +index 63bb76c..a35ff89 100644 --- a/arch/arm/mach-bcm2708/Kconfig +++ b/arch/arm/mach-bcm2708/Kconfig @@ -31,4 +31,11 @@ config BCM2708_NOL2CACHE @@ -63,6 +69,8 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. + help + Binds spidev driver to the SPI0 master endmenu +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 67f3608..03b8ec5 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -31,6 +31,7 @@ @@ -105,7 +113,7 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. } }; -@@ -434,6 +442,89 @@ static struct platform_device bcm2708_al +@@ -434,6 +442,89 @@ static struct platform_device bcm2708_alsa_devices[] = { }, }; @@ -217,6 +225,8 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. } static void timer_set_mode(enum clock_event_mode mode, +diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h +index 110ce07..4d3c15d 100644 --- a/arch/arm/mach-bcm2708/include/mach/platform.h +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -63,9 +63,12 @@ @@ -232,9 +242,11 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. #define USB_BASE (BCM2708_PERI_BASE + 0x980000) /* DTC_OTG USB controller */ #define MCORE_BASE (BCM2708_PERI_BASE + 0x0000) /* Fake frame buffer device (actually the multicore sync block*/ +diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig +index d4fe13e..290aee4 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -345,6 +345,14 @@ config I2C_BCM2835 +@@ -347,6 +347,14 @@ config I2C_BCM2835 This support is also available as a module. If so, the module will be called i2c-bcm2835. @@ -249,9 +261,11 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. config I2C_BLACKFIN_TWI tristate "Blackfin TWI I2C support" depends on BLACKFIN +diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile +index 8f4fc23..ef26c38 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile -@@ -32,6 +32,7 @@ obj-$(CONFIG_I2C_POWERMAC) += i2c-powerm +@@ -32,6 +32,7 @@ obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o obj-$(CONFIG_I2C_AT91) += i2c-at91.o obj-$(CONFIG_I2C_AU1550) += i2c-au1550.o obj-$(CONFIG_I2C_BCM2835) += i2c-bcm2835.o @@ -259,6 +273,9 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. obj-$(CONFIG_I2C_BLACKFIN_TWI) += i2c-bfin-twi.o obj-$(CONFIG_I2C_CBUS_GPIO) += i2c-cbus-gpio.o obj-$(CONFIG_I2C_CPM) += i2c-cpm.o +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +new file mode 100644 +index 0000000..7cae615 --- /dev/null +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -0,0 +1,396 @@ @@ -658,6 +675,8 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. +MODULE_AUTHOR("Chris Boot "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); +diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig +index 92a9345..f0a2a9f 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -86,6 +86,14 @@ config SPI_BCM2835 @@ -675,9 +694,11 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. config SPI_BFIN5XX tristate "SPI controller driver for ADI Blackfin5xx" depends on BLACKFIN +diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile +index 33f9c09..17b4737 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile -@@ -17,6 +17,7 @@ obj-$(CONFIG_SPI_AU1550) += spi-au1550. +@@ -17,6 +17,7 @@ obj-$(CONFIG_SPI_AU1550) += spi-au1550.o obj-$(CONFIG_SPI_BCM2835) += spi-bcm2835.o obj-$(CONFIG_SPI_BCM63XX) += spi-bcm63xx.o obj-$(CONFIG_SPI_BFIN5XX) += spi-bfin5xx.o @@ -685,6 +706,9 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. obj-$(CONFIG_SPI_BFIN_SPORT) += spi-bfin-sport.o obj-$(CONFIG_SPI_BITBANG) += spi-bitbang.o obj-$(CONFIG_SPI_BUTTERFLY) += spi-butterfly.o +diff --git a/drivers/spi/spi-bcm2708.c b/drivers/spi/spi-bcm2708.c +new file mode 100644 +index 0000000..9f1580e --- /dev/null +++ b/drivers/spi/spi-bcm2708.c @@ -0,0 +1,594 @@ @@ -1282,3 +1306,6 @@ Subject: [PATCH 019/174] Backport of Chris Boot's i2c and spi drivers. +MODULE_AUTHOR("Chris Boot "); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRV_NAME); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0020-Add-sync_after_dma-module-parameter.patch b/target/linux/brcm2708/patches-3.10/0020-Add-sync_after_dma-module-parameter.patch index 544d94978f4..1e82fab4cea 100644 --- a/target/linux/brcm2708/patches-3.10/0020-Add-sync_after_dma-module-parameter.patch +++ b/target/linux/brcm2708/patches-3.10/0020-Add-sync_after_dma-module-parameter.patch @@ -1,12 +1,14 @@ -From 9e42f33f4f80999a2c65a50b2a7ac6562ca194f5 Mon Sep 17 00:00:00 2001 +From a30b981976f90774867ec2a60bac86ebe7244d9a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 17 Jul 2012 00:48:27 +0100 -Subject: [PATCH 020/174] Add sync_after_dma module parameter +Subject: [PATCH 020/196] Add sync_after_dma module parameter --- drivers/mmc/host/sdhci-bcm2708.c | 60 +++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 28 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 7bba950..3792b9f 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -51,7 +51,6 @@ @@ -17,7 +19,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter #ifdef CONFIG_MMC_SDHCI_BCM2708_DMA /* #define CHECK_DMA_USE */ #endif -@@ -131,6 +130,7 @@ static inline unsigned long int since_ns +@@ -131,6 +130,7 @@ static inline unsigned long int since_ns(hptime_t t) static bool allow_highspeed = 1; static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ; @@ -25,7 +27,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter #if 0 static void hptime_test(void) -@@ -822,34 +822,34 @@ static void sdhci_bcm2708_dma_complete_i +@@ -822,34 +822,34 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, SDHCI_INT_SPACE_AVAIL); } } else { @@ -38,6 +40,12 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter - the SD controller to finish reading/writing to the card. */ - u32 state_mask; - int timeout=5000; +- +- DBG("PDMA over - sync card\n"); +- if (data->flags & MMC_DATA_READ) +- state_mask = SDHCI_DOING_READ; +- else +- state_mask = SDHCI_DOING_WRITE; + if (sync_after_dma) { + /* On the Arasan controller the stop command (which will be + scheduled after this completes) does not seem to work @@ -47,12 +55,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter + the SD controller to finish reading/writing to the card. */ + u32 state_mask; + int timeout=30*5000; - -- DBG("PDMA over - sync card\n"); -- if (data->flags & MMC_DATA_READ) -- state_mask = SDHCI_DOING_READ; -- else -- state_mask = SDHCI_DOING_WRITE; ++ + DBG("PDMA over - sync card\n"); + if (data->flags & MMC_DATA_READ) + state_mask = SDHCI_DOING_READ; @@ -85,7 +88,7 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter if (host_priv->complete) { (*host_priv->complete)(host); DBG("PDMA %s complete\n", -@@ -1193,7 +1193,9 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1193,7 +1193,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | SDHCI_QUIRK_MISSING_CAPS | @@ -111,3 +114,6 @@ Subject: [PATCH 020/174] Add sync_after_dma module parameter +MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch b/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch index ad7103ef712..35c26cdc9b5 100644 --- a/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch +++ b/target/linux/brcm2708/patches-3.10/0021-sdhci-bcm2708-use-extension-FIFO-to-buffer-DMA-trans.patch @@ -1,7 +1,7 @@ -From 3e9891e91d7dda096ab1cc2518830938ad69880d Mon Sep 17 00:00:00 2001 +From b802bfd3bb337e92226bd521f8ebbbcfc6642333 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:25:52 +0100 -Subject: [PATCH 021/174] sdhci-bcm2708: use extension FIFO to buffer DMA +Subject: [PATCH 021/196] sdhci-bcm2708: use extension FIFO to buffer DMA transfers The additional FIFO might speed up transfers in some cases. @@ -9,6 +9,8 @@ The additional FIFO might speed up transfers in some cases. drivers/mmc/host/sdhci-bcm2708.c | 11 +++++++++++ 1 file changed, 11 insertions(+) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 3792b9f..326b962 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -74,6 +74,9 @@ @@ -21,7 +23,7 @@ The additional FIFO might speed up transfers in some cases. /*****************************************************************************\ * * * Debug * -@@ -957,10 +960,12 @@ static ssize_t attr_dma_store(struct dev +@@ -957,10 +960,12 @@ static ssize_t attr_dma_store(struct device *_dev, int on = simple_strtol(buf, NULL, 0); if (on) { host->flags |= SDHCI_USE_PLATDMA; @@ -34,7 +36,7 @@ The additional FIFO might speed up transfers in some cases. printk(KERN_INFO "%s: DMA disabled\n", mmc_hostname(host->mmc)); } -@@ -1272,6 +1277,12 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1272,6 +1277,12 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) ret = device_create_file(&pdev->dev, &dev_attr_dma_wait); ret = device_create_file(&pdev->dev, &dev_attr_status); @@ -47,3 +49,6 @@ The additional FIFO might speed up transfers in some cases. printk(KERN_INFO "%s: BCM2708 SDHC host at 0x%08llx DMA %d IRQ %d\n", mmc_hostname(host->mmc), (unsigned long long)iomem->start, host_priv->dma_chan, host_priv->dma_irq); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch b/target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch index f7abfadd6ce..b5f8754432d 100644 --- a/target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch +++ b/target/linux/brcm2708/patches-3.10/0022-sdhci-bcm2708-use-multiblock-type-transfers-for-sing.patch @@ -1,7 +1,7 @@ -From 9f5c2a77277b99949398e97cc753074d1b8e9521 Mon Sep 17 00:00:00 2001 +From d91049bd18e847ba86d661889b92a25cd7ce53cc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:42:49 +0100 -Subject: [PATCH 022/174] sdhci-bcm2708: use multiblock-type transfers for +Subject: [PATCH 022/196] sdhci-bcm2708: use multiblock-type transfers for single blocks There are issues with both single block reads (missed completion) @@ -14,9 +14,11 @@ adds a quirk for this and uses it. include/linux/mmc/host.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) +diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c +index 9aca946..0d0c4ad 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c -@@ -1333,7 +1333,7 @@ static void mmc_blk_rw_rq_prep(struct mm +@@ -1333,7 +1333,7 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq, brq->data.blocks = 1; } @@ -25,9 +27,11 @@ adds a quirk for this and uses it. /* SPI multiblock writes terminate using a special * token, not a STOP_TRANSMISSION request. */ +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 326b962..c6d6bb0 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1266,6 +1266,9 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1266,6 +1266,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) if (allow_highspeed) host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; @@ -37,6 +41,8 @@ adds a quirk for this and uses it. #endif ret = sdhci_add_host(host); +diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h +index e326ae2..70020e3 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -281,6 +281,7 @@ struct mmc_host { @@ -47,3 +53,6 @@ adds a quirk for this and uses it. mmc_pm_flag_t pm_caps; /* supported pm features */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0023-Add-module-parameter-for-missing_status-quirk.-sdhci.patch b/target/linux/brcm2708/patches-3.10/0023-Add-module-parameter-for-missing_status-quirk.-sdhci.patch index 8097f6d1032..a64677cd773 100644 --- a/target/linux/brcm2708/patches-3.10/0023-Add-module-parameter-for-missing_status-quirk.-sdhci.patch +++ b/target/linux/brcm2708/patches-3.10/0023-Add-module-parameter-for-missing_status-quirk.-sdhci.patch @@ -1,16 +1,18 @@ -From 4548721c4c1b160a8b5702b6226c5b6403b3df8b Mon Sep 17 00:00:00 2001 +From 9572b1f23fb60dc2c55bde196a7070f57fc20a92 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 Aug 2012 19:02:14 +0100 -Subject: [PATCH 023/174] Add module parameter for missing_status quirk. +Subject: [PATCH 023/196] Add module parameter for missing_status quirk. sdhci-bcm2708.missing_status=0 may improve interrupt latency --- drivers/mmc/host/sdhci-bcm2708.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index c6d6bb0..8243593 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -134,6 +134,7 @@ static inline unsigned long int since_ns +@@ -134,6 +134,7 @@ static inline unsigned long int since_ns(hptime_t t) static bool allow_highspeed = 1; static int emmc_clock_freq = BCM2708_EMMC_CLOCK_FREQ; static bool sync_after_dma = 1; @@ -18,7 +20,7 @@ Subject: [PATCH 023/174] Add module parameter for missing_status quirk. #if 0 static void hptime_test(void) -@@ -1150,7 +1151,6 @@ static struct sdhci_ops sdhci_bcm2708_op +@@ -1150,7 +1151,6 @@ static struct sdhci_ops sdhci_bcm2708_ops = { .spurious_crc_acmd51 = sdhci_bcm2708_quirk_spurious_crc, .voltage_broken = sdhci_bcm2708_quirk_voltage_broken, .uhs_broken = sdhci_bcm2708_uhs_broken, @@ -26,7 +28,7 @@ Subject: [PATCH 023/174] Add module parameter for missing_status quirk. }; /*****************************************************************************\ -@@ -1189,6 +1189,9 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1189,6 +1189,9 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) ret = PTR_ERR(host); goto err; } @@ -51,3 +53,6 @@ Subject: [PATCH 023/174] Add module parameter for missing_status quirk. +MODULE_PARM_DESC(missing_status, "Use the missing status quirk"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0024-Fix-spinlock-recursion-in-sdhci-bcm2708.c.patch b/target/linux/brcm2708/patches-3.10/0024-Fix-spinlock-recursion-in-sdhci-bcm2708.c.patch index de036c3bc3f..eb1762ded53 100644 --- a/target/linux/brcm2708/patches-3.10/0024-Fix-spinlock-recursion-in-sdhci-bcm2708.c.patch +++ b/target/linux/brcm2708/patches-3.10/0024-Fix-spinlock-recursion-in-sdhci-bcm2708.c.patch @@ -1,12 +1,14 @@ -From bd9a95701602937c6e402a4fc6786d1675431117 Mon Sep 17 00:00:00 2001 +From 24ecdf1266c6dd4213f7fc5e2a01c3b661877c81 Mon Sep 17 00:00:00 2001 From: ddv2005 Date: Sun, 5 Aug 2012 10:42:12 -0400 -Subject: [PATCH 024/174] Fix spinlock recursion in sdhci-bcm2708.c +Subject: [PATCH 024/196] Fix spinlock recursion in sdhci-bcm2708.c --- drivers/mmc/host/sdhci-bcm2708.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 8243593..7a703c2 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -643,11 +643,11 @@ void @@ -23,7 +25,7 @@ Subject: [PATCH 024/174] Fix spinlock recursion in sdhci-bcm2708.c if (host_priv->dma_wanted) { if (NULL == data) { -@@ -727,7 +727,7 @@ sdhci_bcm2708_platdma_reset(struct sdhci +@@ -727,7 +727,7 @@ sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data) #endif } @@ -32,7 +34,7 @@ Subject: [PATCH 024/174] Fix spinlock recursion in sdhci-bcm2708.c } -@@ -740,11 +740,11 @@ static void sdhci_bcm2708_dma_complete_i +@@ -740,11 +740,11 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, int sg_len; int sg_ix; int sg_todo; @@ -46,7 +48,7 @@ Subject: [PATCH 024/174] Fix spinlock recursion in sdhci-bcm2708.c data = host->data; #ifdef CHECK_DMA_USE -@@ -769,7 +769,7 @@ static void sdhci_bcm2708_dma_complete_i +@@ -769,7 +769,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, if (NULL == data) { DBG("PDMA unused completion - status 0x%X\n", dma_cs); @@ -55,7 +57,7 @@ Subject: [PATCH 024/174] Fix spinlock recursion in sdhci-bcm2708.c return; } sg = data->sg; -@@ -862,7 +862,7 @@ static void sdhci_bcm2708_dma_complete_i +@@ -862,7 +862,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, SDHCI_INT_SPACE_AVAIL); } } @@ -64,3 +66,6 @@ Subject: [PATCH 024/174] Fix spinlock recursion in sdhci-bcm2708.c } static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch b/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch index dd4f7dbb39e..b61af35ec22 100644 --- a/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch +++ b/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch @@ -1,13 +1,15 @@ -From d3ea04a7506cca51d1e154cde5bcc7063595c98c Mon Sep 17 00:00:00 2001 +From b0ffe239799004245e53a998216d361f6ab67f96 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 8 May 2013 11:46:50 +0100 -Subject: [PATCH 025/174] enabling the realtime clock 1-wire chip DS1307 and +Subject: [PATCH 025/196] enabling the realtime clock 1-wire chip DS1307 and 1-wire on GPIO4 (as a module) --- arch/arm/mach-bcm2708/bcm2708.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 03b8ec5..18f7ede 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -32,6 +32,7 @@ @@ -28,7 +30,7 @@ Subject: [PATCH 025/174] enabling the realtime clock 1-wire chip DS1307 and /* command line parameters */ static unsigned boardrev, serial; static unsigned uart_clock; -@@ -251,6 +255,19 @@ static struct platform_device bcm2708_dm +@@ -251,6 +255,19 @@ static struct platform_device bcm2708_dmaman_device = { .num_resources = ARRAY_SIZE(bcm2708_dmaman_resources), }; @@ -58,3 +60,6 @@ Subject: [PATCH 025/174] enabling the realtime clock 1-wire chip DS1307 and bcm_register_device(&bcm2708_systemtimer_device); bcm_register_device(&bcm2708_fb_device); bcm_register_device(&bcm2708_usb_device); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0026-Add-low-latency-mode-to-sdcard-driver.-Disable-with-.patch b/target/linux/brcm2708/patches-3.10/0026-Add-low-latency-mode-to-sdcard-driver.-Disable-with-.patch index dfb61a6cdb6..3f1188aac75 100644 --- a/target/linux/brcm2708/patches-3.10/0026-Add-low-latency-mode-to-sdcard-driver.-Disable-with-.patch +++ b/target/linux/brcm2708/patches-3.10/0026-Add-low-latency-mode-to-sdcard-driver.-Disable-with-.patch @@ -1,7 +1,7 @@ -From fc153c5cb49f20f5e9644d92b8be064ed9159a16 Mon Sep 17 00:00:00 2001 +From 4ec6de1f59d1f0b5ed9cfebf3c1b4080d7215dc2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 12 May 2013 12:27:48 +0100 -Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with +Subject: [PATCH 026/196] Add low-latency mode to sdcard driver. Disable with sdhci-bcm2708.enable_llm=0. Thanks ddv2005. --- @@ -11,6 +11,8 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with include/linux/mmc/sdhci.h | 1 + 4 files changed, 145 insertions(+), 44 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 7a703c2..7ce2829 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -135,6 +135,7 @@ static bool allow_highspeed = 1; @@ -21,7 +23,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with #if 0 static void hptime_test(void) -@@ -871,12 +872,11 @@ static irqreturn_t sdhci_bcm2708_dma_irq +@@ -871,12 +872,11 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) struct sdhci_host *host = dev_id; struct sdhci_bcm2708_priv *host_priv = SDHCI_HOST_PRIV(host); u32 dma_cs; /* control and status register */ @@ -35,7 +37,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with dma_cs = readl(host_priv->dma_chan_base + BCM2708_DMA_CS); -@@ -917,8 +917,7 @@ static irqreturn_t sdhci_bcm2708_dma_irq +@@ -917,8 +917,7 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) result = IRQ_HANDLED; } @@ -45,7 +47,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with return result; } -@@ -1193,9 +1192,12 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1193,9 +1192,12 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) sdhci_bcm2708_ops.missing_status = sdhci_bcm2708_missing_status; } @@ -58,7 +60,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with host->quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION | SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | -@@ -1256,12 +1258,13 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1256,12 +1258,13 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) } host_priv->dma_chan = ret; @@ -74,7 +76,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with DBG("DMA CBs %p handle %08X DMA%d %p DMA IRQ %d\n", host_priv->cb_base, (unsigned)host_priv->cb_handle, host_priv->dma_chan, host_priv->dma_chan_base, -@@ -1384,6 +1387,7 @@ module_param(allow_highspeed, bool, 0444 +@@ -1384,6 +1387,7 @@ module_param(allow_highspeed, bool, 0444); module_param(emmc_clock_freq, int, 0444); module_param(sync_after_dma, bool, 0444); module_param(missing_status, bool, 0444); @@ -82,16 +84,18 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1394,5 +1398,6 @@ MODULE_PARM_DESC(allow_highspeed, "Allow +@@ -1394,5 +1398,6 @@ MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); MODULE_PARM_DESC(missing_status, "Use the missing status quirk"); +MODULE_PARM_DESC(enable_llm, "Enable low-latency mode"); +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c +index 179e83e..470860b 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -124,6 +124,91 @@ static void sdhci_dumpregs(struct sdhci_ +@@ -124,6 +124,91 @@ static void sdhci_dumpregs(struct sdhci_host *host) * Low level functions * * * \*****************************************************************************/ @@ -183,7 +187,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with static void sdhci_clear_set_irqs(struct sdhci_host *host, u32 clear, u32 set) { -@@ -289,7 +374,7 @@ static void sdhci_led_control(struct led +@@ -289,7 +374,7 @@ static void sdhci_led_control(struct led_classdev *led, struct sdhci_host *host = container_of(led, struct sdhci_host, led); unsigned long flags; @@ -192,7 +196,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with if (host->runtime_suspended) goto out; -@@ -299,7 +384,7 @@ static void sdhci_led_control(struct led +@@ -299,7 +384,7 @@ static void sdhci_led_control(struct led_classdev *led, else sdhci_activate_led(host); out: @@ -201,7 +205,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } #endif -@@ -1007,7 +1092,9 @@ static void sdhci_send_command(struct sd +@@ -1007,7 +1092,9 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) return; } timeout--; @@ -221,7 +225,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } clk |= SDHCI_CLOCK_CARD_EN; -@@ -1330,7 +1419,7 @@ static void sdhci_request(struct mmc_hos +@@ -1330,7 +1419,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) sdhci_runtime_pm_get(host); @@ -230,7 +234,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with WARN_ON(host->mrq != NULL); -@@ -1388,9 +1477,9 @@ static void sdhci_request(struct mmc_hos +@@ -1388,9 +1477,9 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) mmc->card->type == MMC_TYPE_MMC ? MMC_SEND_TUNING_BLOCK_HS200 : MMC_SEND_TUNING_BLOCK; @@ -242,7 +246,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with /* Restore original mmc_request structure */ host->mrq = mrq; -@@ -1404,7 +1493,7 @@ static void sdhci_request(struct mmc_hos +@@ -1404,7 +1493,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) } mmiowb(); @@ -251,7 +255,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) -@@ -1413,10 +1502,10 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1413,10 +1502,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) int vdd_bit = -1; u8 ctrl; @@ -264,7 +268,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with if (host->vmmc && ios->power_mode == MMC_POWER_OFF) mmc_regulator_set_ocr(host->mmc, host->vmmc, 0); return; -@@ -1443,9 +1532,9 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1443,9 +1532,9 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) vdd_bit = sdhci_set_power(host, ios->vdd); if (host->vmmc && vdd_bit != -1) { @@ -276,7 +280,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } if (host->ops->platform_send_init_74_clocks) -@@ -1583,7 +1672,7 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1583,7 +1672,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); mmiowb(); @@ -285,7 +289,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) -@@ -1631,7 +1720,7 @@ static int sdhci_check_ro(struct sdhci_h +@@ -1631,7 +1720,7 @@ static int sdhci_check_ro(struct sdhci_host *host) unsigned long flags; int is_readonly; @@ -294,7 +298,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with if (host->flags & SDHCI_DEVICE_DEAD) is_readonly = 0; -@@ -1641,7 +1730,7 @@ static int sdhci_check_ro(struct sdhci_h +@@ -1641,7 +1730,7 @@ static int sdhci_check_ro(struct sdhci_host *host) is_readonly = !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_WRITE_PROTECT); @@ -303,7 +307,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with /* This quirk needs to be replaced by a callback-function later */ return host->quirks & SDHCI_QUIRK_INVERTED_WRITE_PROTECT ? -@@ -1714,9 +1803,9 @@ static void sdhci_enable_sdio_irq(struct +@@ -1714,9 +1803,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; @@ -315,7 +319,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, -@@ -2060,7 +2149,7 @@ static void sdhci_card_event(struct mmc_ +@@ -2060,7 +2149,7 @@ static void sdhci_card_event(struct mmc_host *mmc) struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; @@ -324,7 +328,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with /* Check host->mrq first in case we are runtime suspended */ if (host->mrq && -@@ -2077,7 +2166,7 @@ static void sdhci_card_event(struct mmc_ +@@ -2077,7 +2166,7 @@ static void sdhci_card_event(struct mmc_host *mmc) tasklet_schedule(&host->finish_tasklet); } @@ -333,7 +337,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } static const struct mmc_host_ops sdhci_ops = { -@@ -2116,14 +2205,14 @@ static void sdhci_tasklet_finish(unsigne +@@ -2116,14 +2205,14 @@ static void sdhci_tasklet_finish(unsigned long param) host = (struct sdhci_host*)param; @@ -350,7 +354,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with return; } -@@ -2161,7 +2250,7 @@ static void sdhci_tasklet_finish(unsigne +@@ -2161,7 +2250,7 @@ static void sdhci_tasklet_finish(unsigned long param) #endif mmiowb(); @@ -359,7 +363,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with mmc_request_done(host->mmc, mrq); sdhci_runtime_pm_put(host); -@@ -2174,7 +2263,7 @@ static void sdhci_timeout_timer(unsigned +@@ -2174,7 +2263,7 @@ static void sdhci_timeout_timer(unsigned long data) host = (struct sdhci_host*)data; @@ -368,7 +372,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with if (host->mrq) { pr_err("%s: Timeout waiting for hardware " -@@ -2195,7 +2284,7 @@ static void sdhci_timeout_timer(unsigned +@@ -2195,7 +2284,7 @@ static void sdhci_timeout_timer(unsigned long data) } mmiowb(); @@ -377,7 +381,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } static void sdhci_tuning_timer(unsigned long data) -@@ -2205,11 +2294,11 @@ static void sdhci_tuning_timer(unsigned +@@ -2205,11 +2294,11 @@ static void sdhci_tuning_timer(unsigned long data) host = (struct sdhci_host *)data; @@ -391,7 +395,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } /*****************************************************************************\ -@@ -2433,10 +2522,10 @@ static irqreturn_t sdhci_irq(int irq, vo +@@ -2433,10 +2522,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) u32 intmask, unexpected = 0; int cardint = 0, max_loops = 16; @@ -413,7 +417,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with if (unexpected) { pr_err("%s: Unexpected interrupt 0x%08x.\n", -@@ -2702,15 +2791,15 @@ int sdhci_runtime_suspend_host(struct sd +@@ -2702,15 +2791,15 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host) host->flags &= ~SDHCI_NEEDS_RETUNING; } @@ -433,7 +437,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with return ret; } -@@ -2736,16 +2825,16 @@ int sdhci_runtime_resume_host(struct sdh +@@ -2736,16 +2825,16 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) sdhci_do_start_signal_voltage_switch(host, &host->mmc->ios); if ((host_flags & SDHCI_PV_ENABLED) && !(host->quirks2 & SDHCI_QUIRK2_PRESET_VALUE_BROKEN)) { @@ -453,7 +457,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with host->runtime_suspended = false; -@@ -2756,7 +2845,7 @@ int sdhci_runtime_resume_host(struct sdh +@@ -2756,7 +2845,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) /* Enable Card Detection */ sdhci_enable_card_detection(host); @@ -462,7 +466,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with return ret; } -@@ -3248,7 +3337,7 @@ int sdhci_add_host(struct sdhci_host *ho +@@ -3248,7 +3337,7 @@ int sdhci_add_host(struct sdhci_host *host) host->tuning_timer.function = sdhci_tuning_timer; } @@ -471,7 +475,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with mmc_hostname(mmc), host); if (ret) { pr_err("%s: Failed to request IRQ %d: %d\n", -@@ -3312,7 +3401,7 @@ void sdhci_remove_host(struct sdhci_host +@@ -3312,7 +3401,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) unsigned long flags; if (dead) { @@ -480,7 +484,7 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with host->flags |= SDHCI_DEVICE_DEAD; -@@ -3324,7 +3413,7 @@ void sdhci_remove_host(struct sdhci_host +@@ -3324,7 +3413,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) tasklet_schedule(&host->finish_tasklet); } @@ -489,9 +493,11 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with } sdhci_disable_card_detection(host); +diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h +index f90574e..cc393af 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h -@@ -441,4 +441,10 @@ extern int sdhci_runtime_suspend_host(st +@@ -441,4 +441,10 @@ extern int sdhci_runtime_suspend_host(struct sdhci_host *host); extern int sdhci_runtime_resume_host(struct sdhci_host *host); #endif @@ -502,6 +508,8 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with + + #endif /* __SDHCI_HW_H */ +diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h +index f3a39c1..58bfab0 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -97,6 +97,7 @@ struct sdhci_host { @@ -512,3 +520,6 @@ Subject: [PATCH 026/174] Add low-latency mode to sdcard driver. Disable with void __iomem *ioaddr; /* Mapped address */ const struct sdhci_ops *ops; /* Low level hw interface */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0027-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch b/target/linux/brcm2708/patches-3.10/0027-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch index 8fe0f6756be..dd819f28a39 100644 --- a/target/linux/brcm2708/patches-3.10/0027-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch +++ b/target/linux/brcm2708/patches-3.10/0027-Add-FIQ-patch-to-dwc_otg-driver.-Enable-with-dwc_otg.patch @@ -1,7 +1,7 @@ -From c80392fbbb9a09f035f66a7d2a9fed2469373210 Mon Sep 17 00:00:00 2001 +From 5e4c6e64d0c5fd6adc6c68cc1366f0f7c0ad84ba Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:46:42 +0100 -Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with +Subject: [PATCH 027/196] Add FIQ patch to dwc_otg driver. Enable with dwc_otg.fiq_fix_enable=1. Should give about 10% more ARM performance. Thanks to Gordon and Costas @@ -31,6 +31,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with create mode 100755 drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c create mode 100755 drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index eb291c7..5468f1f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -373,6 +373,7 @@ config ARCH_BCM2708 @@ -41,6 +43,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with help This enables support for Broadcom BCM2708 boards. +diff --git a/arch/arm/include/asm/fiq.h b/arch/arm/include/asm/fiq.h +index d493d0b..f1a131b 100644 --- a/arch/arm/include/asm/fiq.h +++ b/arch/arm/include/asm/fiq.h @@ -42,6 +42,7 @@ extern void disable_fiq(int fiq); @@ -51,9 +55,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with static inline void set_fiq_regs(struct pt_regs const *regs) { +diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c +index 25442f4..74ff4ba 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c -@@ -141,6 +141,7 @@ void disable_fiq(int fiq) +@@ -145,6 +145,7 @@ void disable_fiq(int fiq) EXPORT_SYMBOL(set_fiq_handler); EXPORT_SYMBOL(__set_fiq_regs); /* defined in fiqasm.S */ EXPORT_SYMBOL(__get_fiq_regs); /* defined in fiqasm.S */ @@ -61,6 +67,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with EXPORT_SYMBOL(claim_fiq); EXPORT_SYMBOL(release_fiq); EXPORT_SYMBOL(enable_fiq); +diff --git a/arch/arm/kernel/fiqasm.S b/arch/arm/kernel/fiqasm.S +index 207f9d6..93eddfe 100644 --- a/arch/arm/kernel/fiqasm.S +++ b/arch/arm/kernel/fiqasm.S @@ -25,6 +25,9 @@ @@ -81,9 +89,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with +ENTRY(__FIQ_Branch) + mov pc, r8 +ENDPROC(__FIQ_Branch) +diff --git a/arch/arm/mach-bcm2708/armctrl.c b/arch/arm/mach-bcm2708/armctrl.c +index da18725..274aa30 100644 --- a/arch/arm/mach-bcm2708/armctrl.c +++ b/arch/arm/mach-bcm2708/armctrl.c -@@ -52,8 +52,12 @@ static void armctrl_mask_irq(struct irq_ +@@ -52,8 +52,12 @@ static void armctrl_mask_irq(struct irq_data *d) 0 }; @@ -98,7 +108,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with } static void armctrl_unmask_irq(struct irq_data *d) -@@ -65,8 +69,14 @@ static void armctrl_unmask_irq(struct ir +@@ -65,8 +69,14 @@ static void armctrl_unmask_irq(struct irq_data *d) 0 }; @@ -115,16 +125,18 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with } #if defined(CONFIG_PM) -@@ -204,5 +214,6 @@ int __init armctrl_init(void __iomem * b +@@ -204,5 +214,6 @@ int __init armctrl_init(void __iomem * base, unsigned int irq_start, } armctrl_pm_register(base, irq_start, resume_sources); + init_FIQ(FIQ_START); return 0; } +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 18f7ede..b9aa2de 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -309,12 +309,32 @@ static struct resource bcm2708_usb_resou +@@ -309,12 +309,32 @@ static struct resource bcm2708_usb_resources[] = { .flags = IORESOURCE_MEM, }, [1] = { @@ -171,6 +183,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with bcm_register_device(&bcm2708_usb_device); bcm_register_device(&bcm2708_uart1_device); bcm_register_device(&bcm2708_powerman_device); +diff --git a/arch/arm/mach-bcm2708/include/mach/irqs.h b/arch/arm/mach-bcm2708/include/mach/irqs.h +index e8bb068..9aaedf1 100644 --- a/arch/arm/mach-bcm2708/include/mach/irqs.h +++ b/arch/arm/mach-bcm2708/include/mach/irqs.h @@ -106,91 +106,94 @@ @@ -246,17 +260,6 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with -#define FIQ_RNG INT_RNG -#define FIQ_ARASANSDIO INT_ARASANSDIO -#define FIQ_AVSPMON INT_AVSPMON -- --#define FIQ_ARM_TIMER INT_ARM_TIMER --#define FIQ_ARM_MAILBOX INT_ARM_MAILBOX --#define FIQ_ARM_DOORBELL_0 INT_ARM_DOORBELL_0 --#define FIQ_ARM_DOORBELL_1 INT_ARM_DOORBELL_1 --#define FIQ_VPU0_HALTED INT_VPU0_HALTED --#define FIQ_VPU1_HALTED INT_VPU1_HALTED --#define FIQ_ILLEGAL_TYPE0 INT_ILLEGAL_TYPE0 --#define FIQ_ILLEGAL_TYPE1 INT_ILLEGAL_TYPE1 --#define FIQ_PENDING1 INT_PENDING1 --#define FIQ_PENDING2 INT_PENDING2 +#define FIQ_TIMER0 (FIQ_START+INTERRUPT_TIMER0) +#define FIQ_TIMER1 (FIQ_START+INTERRUPT_TIMER1) +#define FIQ_TIMER2 (FIQ_START+INTERRUPT_TIMER2) @@ -321,7 +324,17 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with +#define FIQ_RNG (FIQ_START+INTERRUPT_RNG) +#define FIQ_ARASANSDIO (FIQ_START+INTERRUPT_ARASANSDIO) +#define FIQ_AVSPMON (FIQ_START+INTERRUPT_AVSPMON) -+ + +-#define FIQ_ARM_TIMER INT_ARM_TIMER +-#define FIQ_ARM_MAILBOX INT_ARM_MAILBOX +-#define FIQ_ARM_DOORBELL_0 INT_ARM_DOORBELL_0 +-#define FIQ_ARM_DOORBELL_1 INT_ARM_DOORBELL_1 +-#define FIQ_VPU0_HALTED INT_VPU0_HALTED +-#define FIQ_VPU1_HALTED INT_VPU1_HALTED +-#define FIQ_ILLEGAL_TYPE0 INT_ILLEGAL_TYPE0 +-#define FIQ_ILLEGAL_TYPE1 INT_ILLEGAL_TYPE1 +-#define FIQ_PENDING1 INT_PENDING1 +-#define FIQ_PENDING2 INT_PENDING2 +#define FIQ_ARM_TIMER (FIQ_START+INTERRUPT_ARM_TIMER) +#define FIQ_ARM_MAILBOX (FIQ_START+INTERRUPT_ARM_MAILBOX) +#define FIQ_ARM_DOORBELL_0 (FIQ_START+INTERRUPT_ARM_DOORBELL_0) @@ -347,6 +360,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with #endif /* _BCM2708_IRQS_H_ */ +diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h +index 4d3c15d..89e72d1 100644 --- a/arch/arm/mach-bcm2708/include/mach/platform.h +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -56,7 +56,9 @@ @@ -359,9 +374,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with #define DMA_BASE (BCM2708_PERI_BASE + 0x7000) /* DMA controller */ #define ARM_BASE (BCM2708_PERI_BASE + 0xB000) /* BCM2708 ARM control block */ #define PM_BASE (BCM2708_PERI_BASE + 0x100000) /* Power Management, Reset controller and Watchdog registers */ +diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile +index c4c6e4e..6bd6a2e 100644 --- a/drivers/usb/host/dwc_otg/Makefile +++ b/drivers/usb/host/dwc_otg/Makefile -@@ -36,6 +36,7 @@ dwc_otg-objs += dwc_otg_cil.o dwc_otg_ci +@@ -36,6 +36,7 @@ dwc_otg-objs += dwc_otg_cil.o dwc_otg_cil_intr.o dwc_otg-objs += dwc_otg_pcd_linux.o dwc_otg_pcd.o dwc_otg_pcd_intr.o dwc_otg-objs += dwc_otg_hcd.o dwc_otg_hcd_linux.o dwc_otg_hcd_intr.o dwc_otg_hcd_queue.o dwc_otg_hcd_ddma.o dwc_otg-objs += dwc_otg_adp.o @@ -369,6 +386,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with ifneq ($(CFI),) dwc_otg-objs += dwc_otg_cfi.o endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +index 21804c4..b861b55 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -45,6 +45,9 @@ @@ -381,7 +400,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with #ifdef DEBUG inline const char *op_state_str(dwc_otg_core_if_t * core_if) -@@ -1351,10 +1354,15 @@ static inline uint32_t dwc_otg_read_comm +@@ -1351,10 +1354,15 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if) gintsts.d32, gintmsk.d32); } #endif @@ -400,9 +419,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with } +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h +index 8681aa9..2ff1532 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_dbg.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_dbg.h -@@ -49,6 +49,7 @@ static inline uint32_t SET_DEBUG_LEVEL(c +@@ -49,6 +49,7 @@ static inline uint32_t SET_DEBUG_LEVEL(const uint32_t new) return old; } @@ -410,6 +431,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /** When debug level has the DBG_CIL bit set, display CIL Debug messages. */ #define DBG_CIL (0x2) /** When debug level has the DBG_CILV bit set, display CIL Verbose debug +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c +index e7f99e1..3ac720b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c @@ -64,6 +64,8 @@ bool microframe_schedule=true; @@ -421,7 +444,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with extern int pcd_init( #ifdef LM_INTERFACE struct lm_device *_dev -@@ -238,6 +240,10 @@ static struct dwc_otg_driver_module_para +@@ -238,6 +240,10 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { .adp_enable = -1, }; @@ -471,7 +494,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with #else { struct map_desc desc = { -@@ -1063,6 +1085,7 @@ static int __init dwc_otg_driver_init(vo +@@ -1063,6 +1085,7 @@ static int __init dwc_otg_driver_init(void) printk(KERN_ERR "%s retval=%d\n", __func__, retval); return retval; } @@ -479,7 +502,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1343,6 +1366,10 @@ MODULE_PARM_DESC(otg_ver, "OTG revision +@@ -1343,6 +1366,10 @@ MODULE_PARM_DESC(otg_ver, "OTG revision supported 0=OTG 1.3 1=OTG 2.0"); module_param(microframe_schedule, bool, 0444); MODULE_PARM_DESC(microframe_schedule, "Enable the microframe scheduler"); @@ -490,9 +513,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /** @page "Module Parameters" * * The following parameters may be specified when starting the module. +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 434d0c4..20f989e 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -53,6 +53,8 @@ static int last_sel_trans_num_avail_hc_a +@@ -53,6 +53,8 @@ static int last_sel_trans_num_avail_hc_at_start = 0; static int last_sel_trans_num_avail_hc_at_end = 0; #endif /* DEBUG_HOST_CHANNELS */ @@ -509,7 +534,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /** * HCD Callback function for Remote Wakeup. * -@@ -1330,6 +1333,8 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1330,6 +1333,8 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) &qh->qh_list_entry); DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); @@ -518,9 +543,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with if (ret_val == DWC_OTG_TRANSACTION_NONE) { ret_val = DWC_OTG_TRANSACTION_NON_PERIODIC; } else { +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +index 8075595..dd30f47 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h -@@ -594,7 +594,7 @@ extern void dwc_otg_hcd_queue_transactio +@@ -594,7 +594,7 @@ extern void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, /** @name Interrupt Handler Functions */ /** @{ */ extern int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd); @@ -529,9 +556,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with extern int32_t dwc_otg_hcd_handle_rx_status_q_level_intr(dwc_otg_hcd_t * dwc_otg_hcd); extern int32_t dwc_otg_hcd_handle_np_tx_fifo_empty_intr(dwc_otg_hcd_t * +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h +index b3dc806..04ca4c2 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_if.h -@@ -113,6 +113,11 @@ extern void dwc_otg_hcd_remove(dwc_otg_h +@@ -113,6 +113,11 @@ extern void dwc_otg_hcd_remove(dwc_otg_hcd_t * hcd); */ extern int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd); @@ -543,6 +572,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /** * Returns private data set by * dwc_otg_hcd_set_priv_data function. +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 63c1b55..f1658fa 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -34,6 +34,11 @@ @@ -673,7 +704,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with } #ifdef DEBUG /* Don't print debug message in the interrupt handler on SOF */ -@@ -88,9 +162,14 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ +@@ -88,9 +162,14 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) "DWC OTG HCD Interrupt Detected gintsts&gintmsk=0x%08x core_if=%p\n", gintsts.d32, core_if); #endif @@ -691,7 +722,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with } if (gintsts.b.rxstsqlvl) { retval |= -@@ -138,11 +217,37 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ +@@ -138,11 +217,37 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) #endif } @@ -729,7 +760,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with #warning Compiling code to track missed SOFs #define FRAME_NUM_ARRAY_SIZE 1000 /** -@@ -182,13 +287,15 @@ static inline void track_missed_sofs(uin +@@ -182,13 +287,15 @@ static inline void track_missed_sofs(uint16_t curr_frame_number) * (micro)frame. Periodic transactions may be queued to the controller for the * next (micro)frame. */ @@ -746,7 +777,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with hfnum.d32 = DWC_READ_REG32(&hcd->core_if->host_if->host_global_regs->hfnum); -@@ -218,12 +325,30 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_ +@@ -218,12 +325,30 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) */ DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_ready, &qh->qh_list_entry); @@ -777,12 +808,14 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /* Clear interrupt */ gintsts.b.sofintr = 1; -@@ -2102,5 +2227,4 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc +@@ -2102,5 +2227,4 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) return retval; } - #endif /* DWC_DEVICE_ONLY */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 4a985a6..9702f81 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c @@ -1,3 +1,4 @@ @@ -816,7 +849,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /** @name Linux HC Driver API Functions */ /** @{ */ /* manage i/o requests, device state */ -@@ -366,6 +372,12 @@ static struct dwc_otg_hcd_function_ops h +@@ -366,6 +372,12 @@ static struct dwc_otg_hcd_function_ops hcd_fops = { .get_b_hnp_enable = _get_b_hnp_enable, }; @@ -883,9 +916,11 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /* Initialize the DWC OTG HCD. */ dwc_otg_hcd = dwc_otg_hcd_alloc_hcd(); if (!dwc_otg_hcd) { +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +index 08c1669..ac10323 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -572,6 +572,9 @@ static int check_max_xfer_size(dwc_otg_h +@@ -572,6 +572,9 @@ static int check_max_xfer_size(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) return status; } @@ -895,7 +930,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /** * Schedules an interrupt or isochronous transfer in the periodic schedule. * -@@ -630,8 +633,13 @@ static int schedule_periodic(dwc_otg_hcd +@@ -630,8 +633,13 @@ static int schedule_periodic(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) DWC_LIST_INSERT_TAIL(&hcd->periodic_sched_ready, &qh->qh_list_entry); } else { @@ -911,7 +946,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with } if (!microframe_schedule) { -@@ -645,6 +653,7 @@ static int schedule_periodic(dwc_otg_hcd +@@ -645,6 +653,7 @@ static int schedule_periodic(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) return status; } @@ -919,7 +954,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with /** * This function adds a QH to either the non periodic or periodic schedule if * it is not already in the schedule. If the QH is already in the schedule, no -@@ -667,6 +676,7 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * h +@@ -667,6 +676,7 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) /* Always start in the inactive schedule. */ DWC_LIST_INSERT_TAIL(&hcd->non_periodic_sched_inactive, &qh->qh_list_entry); @@ -927,7 +962,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with } else { status = schedule_periodic(hcd, qh); if ( !hcd->periodic_qh_count ) { -@@ -767,6 +777,7 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_h +@@ -767,6 +777,7 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, if (sched_next_periodic_split) { qh->sched_frame = frame_number; @@ -935,7 +970,7 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with if (dwc_frame_num_le(frame_number, dwc_frame_num_inc (qh->start_split_frame, -@@ -815,6 +826,11 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_h +@@ -815,6 +826,11 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_ready, &qh->qh_list_entry); } else { @@ -947,6 +982,9 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with DWC_LIST_MOVE_HEAD (&hcd->periodic_sched_inactive, &qh->qh_list_entry); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c +new file mode 100755 +index 0000000..b70ca68 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.c @@ -0,0 +1,113 @@ @@ -1063,6 +1101,9 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with + + return; +} +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h +new file mode 100755 +index 0000000..22f28e1 --- /dev/null +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h @@ -0,0 +1,36 @@ @@ -1102,6 +1143,8 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with +#endif + +#endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h +index a7e9076..bb1c42d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h @@ -97,6 +97,9 @@ typedef struct os_dependent { @@ -1114,3 +1157,6 @@ Subject: [PATCH 027/174] Add FIQ patch to dwc_otg driver. Enable with #ifdef LM_INTERFACE struct lm_device *lmdev; #elif defined(PCI_INTERFACE) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0028-Add-non-mainline-source-for-rtl8192cu-wireless-drive.patch b/target/linux/brcm2708/patches-3.10/0028-Add-non-mainline-source-for-rtl8192cu-wireless-drive.patch index ba204bd444a..9d74e0221cf 100644 --- a/target/linux/brcm2708/patches-3.10/0028-Add-non-mainline-source-for-rtl8192cu-wireless-drive.patch +++ b/target/linux/brcm2708/patches-3.10/0028-Add-non-mainline-source-for-rtl8192cu-wireless-drive.patch @@ -1,7 +1,7 @@ -From b2b341339cb835d6024b9878af2e8c548aa586e1 Mon Sep 17 00:00:00 2001 +From 622cb7769a5a3fb071ed920688bd5271f69f980e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 3 Sep 2012 17:10:23 +0100 -Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +Subject: [PATCH 028/196] Add non-mainline source for rtl8192cu wireless driver version 3.4.4_4749 as this is widely used. Disabled older rtlwifi driver --- @@ -335,9 +335,11 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver create mode 100644 drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c create mode 100644 drivers/net/wireless/rtl8192cu/wlan0dhcp +diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig +index f8f0156..739e577 100644 --- a/drivers/net/wireless/Kconfig +++ b/drivers/net/wireless/Kconfig -@@ -276,9 +276,10 @@ source "drivers/net/wireless/libertas/Kc +@@ -276,9 +276,10 @@ source "drivers/net/wireless/libertas/Kconfig" source "drivers/net/wireless/orinoco/Kconfig" source "drivers/net/wireless/p54/Kconfig" source "drivers/net/wireless/rt2x00/Kconfig" @@ -349,6 +351,8 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +source "drivers/net/wireless/rtl8192cu/Kconfig" endif # WLAN +diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile +index 67156ef..0027788 100644 --- a/drivers/net/wireless/Makefile +++ b/drivers/net/wireless/Makefile @@ -24,7 +24,7 @@ obj-$(CONFIG_B43LEGACY) += b43legacy/ @@ -365,6 +369,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver obj-$(CONFIG_BRCMFMAC) += brcm80211/ obj-$(CONFIG_BRCMSMAC) += brcm80211/ +obj-$(CONFIG_RTL8192CU) += rtl8192cu/ +diff --git a/drivers/net/wireless/rtl8192cu/Kconfig b/drivers/net/wireless/rtl8192cu/Kconfig +new file mode 100644 +index 0000000..bee5ed6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/Kconfig @@ -0,0 +1,6 @@ @@ -374,6 +381,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + ---help--- + Help message of RTL8192CU + +diff --git a/drivers/net/wireless/rtl8192cu/Makefile b/drivers/net/wireless/rtl8192cu/Makefile +new file mode 100644 +index 0000000..b52cace --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/Makefile @@ -0,0 +1,545 @@ @@ -922,6 +932,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko +endif + +diff --git a/drivers/net/wireless/rtl8192cu/clean b/drivers/net/wireless/rtl8192cu/clean +new file mode 100644 +index 0000000..34686a0 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/clean @@ -0,0 +1,9 @@ @@ -935,6 +948,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +rmmod rtl8192c_common +rmmod rtlwifi \ No newline at end of file +diff --git a/drivers/net/wireless/rtl8192cu/core/efuse/rtw_efuse.c b/drivers/net/wireless/rtl8192cu/core/efuse/rtw_efuse.c +new file mode 100644 +index 0000000..4908d6e --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/efuse/rtw_efuse.c @@ -0,0 +1,1097 @@ @@ -2035,6 +2051,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif //PLATFORM_LINUX + + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_br_ext.c b/drivers/net/wireless/rtl8192cu/core/rtw_br_ext.c +new file mode 100644 +index 0000000..1fcdf1e --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_br_ext.c @@ -0,0 +1,1694 @@ @@ -3732,6 +3751,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} + +#endif // CONFIG_BR_EXT +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_cmd.c b/drivers/net/wireless/rtl8192cu/core/rtw_cmd.c +new file mode 100644 +index 0000000..bdfec5d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_cmd.c @@ -0,0 +1,2574 @@ @@ -6309,6 +6331,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_debug.c b/drivers/net/wireless/rtl8192cu/core/rtw_debug.c +new file mode 100644 +index 0000000..04e472d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_debug.c @@ -0,0 +1,709 @@ @@ -7021,6 +7046,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_eeprom.c b/drivers/net/wireless/rtl8192cu/core/rtw_eeprom.c +new file mode 100644 +index 0000000..4a0832b --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_eeprom.c @@ -0,0 +1,424 @@ @@ -7448,6 +7476,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +_func_exit_; +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c b/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c +new file mode 100644 +index 0000000..2b85af9 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c @@ -0,0 +1,1486 @@ @@ -8937,6 +8968,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif // CONFIG_WFD +#endif // CONFIG_P2P + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_io.c b/drivers/net/wireless/rtl8192cu/core/rtw_io.c +new file mode 100644 +index 0000000..2efe719 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_io.c @@ -0,0 +1,490 @@ @@ -9430,6 +9464,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif + + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_query.c b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_query.c +new file mode 100644 +index 0000000..156640c --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_query.c @@ -0,0 +1,197 @@ @@ -9630,6 +9667,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_rtl.c b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_rtl.c +new file mode 100644 +index 0000000..87348a2 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_rtl.c @@ -0,0 +1,1032 @@ @@ -10665,6 +10705,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + return status; +} +//************** oid_rtl_seg_03_00 section end ************** +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_set.c b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_set.c +new file mode 100644 +index 0000000..946d875 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_set.c @@ -0,0 +1,1426 @@ @@ -12094,6 +12137,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + return rtw_set_channel_plan(adapter, channel_plan); +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_iol.c b/drivers/net/wireless/rtl8192cu/core/rtw_iol.c +new file mode 100644 +index 0000000..f725ad4 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_iol.c @@ -0,0 +1,266 @@ @@ -12363,6 +12409,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //CONFIG_IOL + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mlme.c b/drivers/net/wireless/rtl8192cu/core/rtw_mlme.c +new file mode 100644 +index 0000000..2e11d9d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mlme.c @@ -0,0 +1,3555 @@ @@ -15921,6 +15970,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mlme_ext.c b/drivers/net/wireless/rtl8192cu/core/rtw_mlme_ext.c +new file mode 100644 +index 0000000..e1e496d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mlme_ext.c @@ -0,0 +1,12270 @@ @@ -28194,6 +28246,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif //CONFIG_TDLS + +} +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mp.c b/drivers/net/wireless/rtl8192cu/core/rtw_mp.c +new file mode 100644 +index 0000000..bb76dae --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mp.c @@ -0,0 +1,1317 @@ @@ -29514,6 +29569,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mp_ioctl.c b/drivers/net/wireless/rtl8192cu/core/rtw_mp_ioctl.c +new file mode 100644 +index 0000000..a851568 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mp_ioctl.c @@ -0,0 +1,2841 @@ @@ -32358,6 +32416,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_p2p.c b/drivers/net/wireless/rtl8192cu/core/rtw_p2p.c +new file mode 100644 +index 0000000..1df9d62 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_p2p.c @@ -0,0 +1,3498 @@ @@ -35859,6 +35920,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //CONFIG_P2P + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_pwrctrl.c b/drivers/net/wireless/rtl8192cu/core/rtw_pwrctrl.c +new file mode 100644 +index 0000000..92b3cb8 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_pwrctrl.c @@ -0,0 +1,1227 @@ @@ -37089,6 +37153,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} + + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_recv.c b/drivers/net/wireless/rtl8192cu/core/rtw_recv.c +new file mode 100644 +index 0000000..0d5143b --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_recv.c @@ -0,0 +1,4597 @@ @@ -41689,6 +41756,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + + + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_rf.c b/drivers/net/wireless/rtl8192cu/core/rtw_rf.c +new file mode 100644 +index 0000000..665c7e5 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_rf.c @@ -0,0 +1,96 @@ @@ -41788,6 +41858,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + return ch; +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_security.c b/drivers/net/wireless/rtl8192cu/core/rtw_security.c +new file mode 100644 +index 0000000..58601b6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_security.c @@ -0,0 +1,2831 @@ @@ -44622,6 +44695,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_sta_mgt.c b/drivers/net/wireless/rtl8192cu/core/rtw_sta_mgt.c +new file mode 100644 +index 0000000..70b25c9 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_sta_mgt.c @@ -0,0 +1,720 @@ @@ -45345,6 +45421,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + return _TRUE; +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_wlan_util.c b/drivers/net/wireless/rtl8192cu/core/rtw_wlan_util.c +new file mode 100644 +index 0000000..539b74f --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_wlan_util.c @@ -0,0 +1,1848 @@ @@ -47196,6 +47275,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_xmit.c b/drivers/net/wireless/rtl8192cu/core/rtw_xmit.c +new file mode 100644 +index 0000000..178a5b7 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_xmit.c @@ -0,0 +1,4277 @@ @@ -51476,6 +51558,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/hal/hal_init.c b/drivers/net/wireless/rtl8192cu/hal/hal_init.c +new file mode 100644 +index 0000000..edef678 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/hal_init.c @@ -0,0 +1,120 @@ @@ -51599,6 +51684,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + padapter->HalFunc.sreset_init_value(padapter); +} +#endif +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_cmd.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_cmd.c +new file mode 100644 +index 0000000..971ef6c --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_cmd.c @@ -0,0 +1,1361 @@ @@ -52963,6 +53051,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + + + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_dm.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_dm.c +new file mode 100644 +index 0000000..be1e800 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_dm.c @@ -0,0 +1,4794 @@ @@ -57760,6 +57851,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_hal_init.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_hal_init.c +new file mode 100644 +index 0000000..e3e2ae9 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_hal_init.c @@ -0,0 +1,3642 @@ @@ -61405,6 +61499,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_mp.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_mp.c +new file mode 100644 +index 0000000..a3021a9 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_mp.c @@ -0,0 +1,1230 @@ @@ -62638,6 +62735,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} + +#endif // CONFIG_MP_INCLUDE +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c +new file mode 100644 +index 0000000..e527028 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c @@ -0,0 +1,5583 @@ @@ -68224,6 +68324,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c +new file mode 100644 +index 0000000..593ea09 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c @@ -0,0 +1,1047 @@ @@ -69274,6 +69377,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +/* End of HalRf6052.c */ + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rxdesc.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rxdesc.c +new file mode 100644 +index 0000000..5aa6e61 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rxdesc.c @@ -0,0 +1,767 @@ @@ -70044,6 +70150,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} + + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.c +new file mode 100644 +index 0000000..e2817f3 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.c @@ -0,0 +1,293 @@ @@ -70340,6 +70449,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.c +new file mode 100644 +index 0000000..1615b5d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.c @@ -0,0 +1,9662 @@ @@ -80005,6 +80117,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +0xc78,0x621f001e, +}; + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg_wowlan.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg_wowlan.c +new file mode 100644 +index 0000000..66970f1 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg_wowlan.c @@ -0,0 +1,2564 @@ @@ -82572,6 +82687,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + + + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.c +new file mode 100644 +index 0000000..f39b4cb --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.c @@ -0,0 +1,2668 @@ @@ -85243,6 +85361,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + DeInitLed871x( &(ledpriv->SwLed1) ); +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.c +new file mode 100644 +index 0000000..4285d60 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.c @@ -0,0 +1,380 @@ @@ -85626,6 +85747,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.c +new file mode 100644 +index 0000000..c276b51 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.c @@ -0,0 +1,1322 @@ @@ -86951,6 +87075,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c +new file mode 100644 +index 0000000..eb5ea29 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c @@ -0,0 +1,6039 @@ @@ -92993,6 +93120,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_ce.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_ce.c +new file mode 100644 +index 0000000..4d01b3c --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_ce.c @@ -0,0 +1,1208 @@ @@ -94204,6 +94334,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} + + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_linux.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_linux.c +new file mode 100644 +index 0000000..d6f3376 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_linux.c @@ -0,0 +1,2045 @@ @@ -96252,6 +96385,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_xp.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_xp.c +new file mode 100644 +index 0000000..82adeff --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_xp.c @@ -0,0 +1,1266 @@ @@ -97521,6 +97657,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/ifcfg-wlan0 b/drivers/net/wireless/rtl8192cu/ifcfg-wlan0 +new file mode 100644 +index 0000000..7ecb7ae --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/ifcfg-wlan0 @@ -0,0 +1,4 @@ @@ -97529,6 +97668,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +BOOTPROTO=dhcp +ONBOOT=yes \ No newline at end of file +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CEHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CEHWImg.h +new file mode 100644 +index 0000000..2ecb65d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CEHWImg.h @@ -0,0 +1,81 @@ @@ -97613,6 +97755,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern u32 Rtl8192CEAGCTAB_1TArray[AGCTAB_1TArrayLength]; + +#endif //__INC_HAL8192CE_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyCfg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyCfg.h +new file mode 100644 +index 0000000..6ecb754 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyCfg.h @@ -0,0 +1,451 @@ @@ -98067,6 +98212,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // __INC_HAL8192CPHYCFG_H + +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyReg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyReg.h +new file mode 100644 +index 0000000..1f9f330 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyReg.h @@ -0,0 +1,1102 @@ @@ -99172,6 +99320,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__INC_HAL8192SPHYREG_H + +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg.h +new file mode 100644 +index 0000000..254a060 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg.h @@ -0,0 +1,99 @@ @@ -99274,6 +99425,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern u32 Rtl8192CUAGCTAB_1T_HPArray[AGCTAB_1T_HPArrayLength]; + +#endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg_wowlan.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg_wowlan.h +new file mode 100644 +index 0000000..47d4d2f --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg_wowlan.h @@ -0,0 +1,34 @@ @@ -99311,6 +99465,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__INC_HAL8192CU_FW_IMG_WOWLAN_H + +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DEHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DEHWImg.h +new file mode 100644 +index 0000000..dc2bc17 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DEHWImg.h @@ -0,0 +1,66 @@ @@ -99380,6 +99537,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern u32 Rtl8192DEAGCTAB_1TArray[AGCTAB_1TArrayLength]; + +#endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DETestHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DETestHWImg.h +new file mode 100644 +index 0000000..2432bcd --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DETestHWImg.h @@ -0,0 +1,54 @@ @@ -99437,6 +99597,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern u32 Rtl8192DTestAGCTAB_2GArray[Rtl8192DTestAGCTAB_2GArrayLength]; + +#endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyCfg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyCfg.h +new file mode 100644 +index 0000000..475cf36 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyCfg.h @@ -0,0 +1,528 @@ @@ -99968,6 +100131,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // __INC_HAL8192SPHYCFG_H + +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyReg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyReg.h +new file mode 100644 +index 0000000..f28aa03 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyReg.h @@ -0,0 +1,1171 @@ @@ -101142,6 +101308,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__INC_HAL8192SPHYREG_H + +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg.h +new file mode 100644 +index 0000000..d931001 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg.h @@ -0,0 +1,66 @@ @@ -101211,6 +101380,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern const u32 Rtl8192DUAGCTAB_1TArray[Rtl8192DUAGCTAB_1TArrayLength]; + +#endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg_wowlan.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg_wowlan.h +new file mode 100644 +index 0000000..a297e76 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg_wowlan.h @@ -0,0 +1,30 @@ @@ -101244,6 +101416,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__INC_HAL8192DU_FW_IMG_WOWLAN_H + +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DUTestHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DUTestHWImg.h +new file mode 100644 +index 0000000..e0491ff --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DUTestHWImg.h @@ -0,0 +1,54 @@ @@ -101301,6 +101476,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern u32 Rtl8192DTestAGCTAB_2GArray[Rtl8192DTestAGCTAB_2GArrayLength]; + +#endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/autoconf.h b/drivers/net/wireless/rtl8192cu/include/autoconf.h +new file mode 100644 +index 0000000..7d6db40 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/autoconf.h @@ -0,0 +1,288 @@ @@ -101592,6 +101770,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#define DBG_CONFIG_ERROR_DETECT +//#define DBG_CONFIG_ERROR_RESET + +diff --git a/drivers/net/wireless/rtl8192cu/include/basic_types.h b/drivers/net/wireless/rtl8192cu/include/basic_types.h +new file mode 100644 +index 0000000..f880224 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/basic_types.h @@ -0,0 +1,276 @@ @@ -101871,6 +102052,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__BASIC_TYPES_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/big_endian.h b/drivers/net/wireless/rtl8192cu/include/byteorder/big_endian.h +new file mode 100644 +index 0000000..eca68a6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/big_endian.h @@ -0,0 +1,87 @@ @@ -101961,6 +102145,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#include + +#endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/generic.h b/drivers/net/wireless/rtl8192cu/include/byteorder/generic.h +new file mode 100644 +index 0000000..246ba89 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/generic.h @@ -0,0 +1,209 @@ @@ -102173,6 +102360,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif + +#endif /* _LINUX_BYTEORDER_GENERIC_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/little_endian.h b/drivers/net/wireless/rtl8192cu/include/byteorder/little_endian.h +new file mode 100644 +index 0000000..433045e --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/little_endian.h @@ -0,0 +1,89 @@ @@ -102265,6 +102455,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#include + +#endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/swab.h b/drivers/net/wireless/rtl8192cu/include/byteorder/swab.h +new file mode 100644 +index 0000000..117c84d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/swab.h @@ -0,0 +1,133 @@ @@ -102401,6 +102594,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif + +#endif /* _LINUX_BYTEORDER_SWAB_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/swabb.h b/drivers/net/wireless/rtl8192cu/include/byteorder/swabb.h +new file mode 100644 +index 0000000..1735349 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/swabb.h @@ -0,0 +1,157 @@ @@ -102561,6 +102757,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif + +#endif /* _LINUX_BYTEORDER_SWABB_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/circ_buf.h b/drivers/net/wireless/rtl8192cu/include/circ_buf.h +new file mode 100644 +index 0000000..1bd4704 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/circ_buf.h @@ -0,0 +1,27 @@ @@ -102591,6 +102790,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size)) + +#endif //_CIRC_BUF_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/cmd_osdep.h b/drivers/net/wireless/rtl8192cu/include/cmd_osdep.h +new file mode 100644 +index 0000000..077efa7 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/cmd_osdep.h @@ -0,0 +1,36 @@ @@ -102630,6 +102832,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_conf.h b/drivers/net/wireless/rtl8192cu/include/drv_conf.h +new file mode 100644 +index 0000000..a2b6cc4 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/drv_conf.h @@ -0,0 +1,78 @@ @@ -102711,6 +102916,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // __DRV_CONF_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_types.h b/drivers/net/wireless/rtl8192cu/include/drv_types.h +new file mode 100644 +index 0000000..95e20cc --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/drv_types.h @@ -0,0 +1,555 @@ @@ -103269,6 +103477,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__DRV_TYPES_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_types_ce.h b/drivers/net/wireless/rtl8192cu/include/drv_types_ce.h +new file mode 100644 +index 0000000..be0459d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/drv_types_ce.h @@ -0,0 +1,92 @@ @@ -103364,6 +103575,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_types_linux.h b/drivers/net/wireless/rtl8192cu/include/drv_types_linux.h +new file mode 100644 +index 0000000..db1c585 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/drv_types_linux.h @@ -0,0 +1,25 @@ @@ -103392,6 +103606,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_types_xp.h b/drivers/net/wireless/rtl8192cu/include/drv_types_xp.h +new file mode 100644 +index 0000000..2d51b1d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/drv_types_xp.h @@ -0,0 +1,95 @@ @@ -103490,6 +103707,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/ethernet.h b/drivers/net/wireless/rtl8192cu/include/ethernet.h +new file mode 100644 +index 0000000..36e29c0 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/ethernet.h @@ -0,0 +1,41 @@ @@ -103534,6 +103754,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + + +#endif // #ifndef __INC_ETHERNET_H +diff --git a/drivers/net/wireless/rtl8192cu/include/farray.h b/drivers/net/wireless/rtl8192cu/include/farray.h +new file mode 100644 +index 0000000..79d2a42 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/farray.h @@ -0,0 +1,31480 @@ @@ -135017,6 +135240,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +0x08,0xFB,0x90,0xB8, +0xFF,0xFF,0xFF,0xFF, +}; +diff --git a/drivers/net/wireless/rtl8192cu/include/h2clbk.h b/drivers/net/wireless/rtl8192cu/include/h2clbk.h +new file mode 100644 +index 0000000..359c9e7 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/h2clbk.h @@ -0,0 +1,35 @@ @@ -135055,6 +135281,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +void _lbk_evt(IN PADAPTER Adapter); + +void h2c_event_callback(unsigned char *dev, unsigned char *pbuf); +diff --git a/drivers/net/wireless/rtl8192cu/include/hal_init.h b/drivers/net/wireless/rtl8192cu/include/hal_init.h +new file mode 100644 +index 0000000..ec48f83 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/hal_init.h @@ -0,0 +1,305 @@ @@ -135363,6 +135592,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__HAL_INIT_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/ieee80211.h b/drivers/net/wireless/rtl8192cu/include/ieee80211.h +new file mode 100644 +index 0000000..5c17a28 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/ieee80211.h @@ -0,0 +1,1461 @@ @@ -136827,6 +137059,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +void rtw_macaddr_cfg(u8 *mac_addr); +#endif /* IEEE80211_H */ + +diff --git a/drivers/net/wireless/rtl8192cu/include/ieee80211_ext.h b/drivers/net/wireless/rtl8192cu/include/ieee80211_ext.h +new file mode 100644 +index 0000000..3e55305 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/ieee80211_ext.h @@ -0,0 +1,477 @@ @@ -137307,6 +137542,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/if_ether.h b/drivers/net/wireless/rtl8192cu/include/if_ether.h +new file mode 100644 +index 0000000..045c067 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/if_ether.h @@ -0,0 +1,112 @@ @@ -137422,6 +137660,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + + +#endif /* _LINUX_IF_ETHER_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/ioctl_cfg80211.h b/drivers/net/wireless/rtl8192cu/include/ioctl_cfg80211.h +new file mode 100644 +index 0000000..7846927 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/ioctl_cfg80211.h @@ -0,0 +1,81 @@ @@ -137506,6 +137747,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__IOCTL_CFG80211_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/ip.h b/drivers/net/wireless/rtl8192cu/include/ip.h +new file mode 100644 +index 0000000..5846347 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/ip.h @@ -0,0 +1,138 @@ @@ -137647,6 +137891,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +}; + +#endif /* _LINUX_IP_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/mlme_osdep.h b/drivers/net/wireless/rtl8192cu/include/mlme_osdep.h +new file mode 100644 +index 0000000..1583053 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/mlme_osdep.h @@ -0,0 +1,44 @@ @@ -137694,6 +137941,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //_MLME_OSDEP_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/mp_custom_oid.h b/drivers/net/wireless/rtl8192cu/include/mp_custom_oid.h +new file mode 100644 +index 0000000..5f86738 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/mp_custom_oid.h @@ -0,0 +1,353 @@ @@ -138050,6 +138300,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#define OID_RT_PRO_EFUSE_MAP 0xFF871217 //Q, S + +#endif //#ifndef __CUSTOM_OID_H +diff --git a/drivers/net/wireless/rtl8192cu/include/nic_spec.h b/drivers/net/wireless/rtl8192cu/include/nic_spec.h +new file mode 100644 +index 0000000..18e7b2c --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/nic_spec.h @@ -0,0 +1,47 @@ @@ -138100,6 +138353,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // __RTL8711_SPEC_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/osdep_ce_service.h b/drivers/net/wireless/rtl8192cu/include/osdep_ce_service.h +new file mode 100644 +index 0000000..e374077 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/osdep_ce_service.h @@ -0,0 +1,171 @@ @@ -138274,6 +138530,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/osdep_intf.h b/drivers/net/wireless/rtl8192cu/include/osdep_intf.h +new file mode 100644 +index 0000000..86b3f1f --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/osdep_intf.h @@ -0,0 +1,128 @@ @@ -138405,6 +138664,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //_OSDEP_INTF_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/osdep_service.h b/drivers/net/wireless/rtl8192cu/include/osdep_service.h +new file mode 100644 +index 0000000..6fedff4 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/osdep_service.h @@ -0,0 +1,841 @@ @@ -139249,6 +139511,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + void *data, const char *name); +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/pci_hal.h b/drivers/net/wireless/rtl8192cu/include/pci_hal.h +new file mode 100644 +index 0000000..1ee0ee2 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/pci_hal.h @@ -0,0 +1,168 @@ @@ -139420,6 +139685,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__PCIE_HAL_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/pci_ops.h b/drivers/net/wireless/rtl8192cu/include/pci_ops.h +new file mode 100644 +index 0000000..dd63f5f --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/pci_ops.h @@ -0,0 +1,58 @@ @@ -139481,6 +139749,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/pci_osintf.h b/drivers/net/wireless/rtl8192cu/include/pci_osintf.h +new file mode 100644 +index 0000000..09715af --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/pci_osintf.h @@ -0,0 +1,33 @@ @@ -139517,6 +139788,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/recv_osdep.h b/drivers/net/wireless/rtl8192cu/include/recv_osdep.h +new file mode 100644 +index 0000000..536ed31 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/recv_osdep.h @@ -0,0 +1,58 @@ @@ -139578,6 +139852,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_cmd.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_cmd.h +new file mode 100644 +index 0000000..1689c54 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_cmd.h @@ -0,0 +1,153 @@ @@ -139734,6 +140011,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +void rtl8192c_set_wowlan_cmd(_adapter* padapter); +void SetFwRelatedForWoWLAN8192CU(_adapter* padapter,u8 bHostIsGoingtoSleep); +#endif // CONFIG_WOWLAN +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_dm.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_dm.h +new file mode 100644 +index 0000000..80b4a67 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_dm.h @@ -0,0 +1,616 @@ @@ -140353,6 +140633,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__HAL8190PCIDM_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_event.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_event.h +new file mode 100644 +index 0000000..131b658 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_event.h @@ -0,0 +1,29 @@ @@ -140385,6 +140668,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif + + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_hal.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_hal.h +new file mode 100644 +index 0000000..cddd998 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_hal.h @@ -0,0 +1,887 @@ @@ -141275,6 +141561,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +void rtl8192c_set_hal_ops(struct hal_ops *pHalFunc); + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_led.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_led.h +new file mode 100644 +index 0000000..b361ba5 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_led.h @@ -0,0 +1,43 @@ @@ -141321,6 +141610,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_recv.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_recv.h +new file mode 100644 +index 0000000..b532a59 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_recv.h @@ -0,0 +1,183 @@ @@ -141507,6 +141799,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_rf.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_rf.h +new file mode 100644 +index 0000000..d3c4b67 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_rf.h @@ -0,0 +1,93 @@ @@ -141603,6 +141898,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif/* End of HalRf.h */ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_spec.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_spec.h +new file mode 100644 +index 0000000..27e0f0e --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_spec.h @@ -0,0 +1,1899 @@ @@ -143505,6 +143803,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_sreset.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_sreset.h +new file mode 100644 +index 0000000..dace413 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_sreset.h @@ -0,0 +1,54 @@ @@ -143562,6 +143863,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern u8 rtl8192c_sreset_get_wifi_status(_adapter *padapter); +#endif +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_xmit.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_xmit.h +new file mode 100644 +index 0000000..efb5f99 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_xmit.h @@ -0,0 +1,91 @@ @@ -143656,6 +143960,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_cmd.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_cmd.h +new file mode 100644 +index 0000000..cb414a1 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_cmd.h @@ -0,0 +1,133 @@ @@ -143792,6 +144099,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif // CONFIG_WOWLAN + + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_dm.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_dm.h +new file mode 100644 +index 0000000..ce674f8 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_dm.h @@ -0,0 +1,414 @@ @@ -144209,6 +144519,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +VOID rtl8192d_dm_CheckTXPowerTracking(IN PADAPTER Adapter); + +#endif //__HAL8190PCIDM_H__ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_hal.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_hal.h +new file mode 100644 +index 0000000..30f2955 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_hal.h @@ -0,0 +1,983 @@ @@ -145195,6 +145508,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //end CONFIG_MP_INCLUDED + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_led.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_led.h +new file mode 100644 +index 0000000..454a1b8 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_led.h @@ -0,0 +1,44 @@ @@ -145242,6 +145558,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_recv.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_recv.h +new file mode 100644 +index 0000000..3ffc646 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_recv.h @@ -0,0 +1,183 @@ @@ -145428,6 +145747,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_rf.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_rf.h +new file mode 100644 +index 0000000..6995464 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_rf.h @@ -0,0 +1,98 @@ @@ -145529,6 +145851,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif/* End of HalRf.h */ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_spec.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_spec.h +new file mode 100644 +index 0000000..9bba78a --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_spec.h @@ -0,0 +1,1879 @@ @@ -147411,6 +147736,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_xmit.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_xmit.h +new file mode 100644 +index 0000000..0babb27 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_xmit.h @@ -0,0 +1,106 @@ @@ -147520,6 +147848,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_android.h b/drivers/net/wireless/rtl8192cu/include/rtw_android.h +new file mode 100644 +index 0000000..e1a0432 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_android.h @@ -0,0 +1,80 @@ @@ -147603,6 +147934,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__RTW_ANDROID_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_br_ext.h b/drivers/net/wireless/rtl8192cu/include/rtw_br_ext.h +new file mode 100644 +index 0000000..9da3fdd --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_br_ext.h @@ -0,0 +1,76 @@ @@ -147682,6 +148016,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // _RTW_BR_EXT_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h b/drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h +new file mode 100644 +index 0000000..1313a25 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h @@ -0,0 +1,41 @@ @@ -147726,6 +148063,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif /* _RTL871X_BYTEORDER_H_ */ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_cmd.h b/drivers/net/wireless/rtl8192cu/include/rtw_cmd.h +new file mode 100644 +index 0000000..0556d0b --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_cmd.h @@ -0,0 +1,1132 @@ @@ -148861,6 +149201,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // _CMD_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_debug.h b/drivers/net/wireless/rtl8192cu/include/rtw_debug.h +new file mode 100644 +index 0000000..eca6692 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_debug.h @@ -0,0 +1,389 @@ @@ -149253,6 +149596,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__RTW_DEBUG_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_eeprom.h b/drivers/net/wireless/rtl8192cu/include/rtw_eeprom.h +new file mode 100644 +index 0000000..9d31998 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_eeprom.h @@ -0,0 +1,153 @@ @@ -149409,6 +149755,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif //PLATFORM_LINUX + +#endif //__RTL871X_EEPROM_H__ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_efuse.h b/drivers/net/wireless/rtl8192cu/include/rtw_efuse.h +new file mode 100644 +index 0000000..66be910 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_efuse.h @@ -0,0 +1,123 @@ @@ -149535,6 +149884,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +void EFUSE_ShadowRead(PADAPTER pAdapter, u8 Type, u16 Offset, u32 *Value); + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_event.h b/drivers/net/wireless/rtl8192cu/include/rtw_event.h +new file mode 100644 +index 0000000..dd9f097 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_event.h @@ -0,0 +1,154 @@ @@ -149692,6 +150044,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // _WLANEVENT_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ht.h b/drivers/net/wireless/rtl8192cu/include/rtw_ht.h +new file mode 100644 +index 0000000..4dcad2b --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ht.h @@ -0,0 +1,51 @@ @@ -149746,6 +150101,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //_RTL871X_HT_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_io.h b/drivers/net/wireless/rtl8192cu/include/rtw_io.h +new file mode 100644 +index 0000000..b1f57c1 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_io.h @@ -0,0 +1,543 @@ @@ -150292,6 +150650,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +*/ + +#endif //_RTL8711_IO_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl.h +new file mode 100644 +index 0000000..e6d34f0 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl.h @@ -0,0 +1,271 @@ @@ -150566,6 +150927,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // #ifndef __INC_CEINFO_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_query.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_query.h +new file mode 100644 +index 0000000..e9ad16f1 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_query.h @@ -0,0 +1,37 @@ @@ -150606,6 +150970,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_rtl.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_rtl.h +new file mode 100644 +index 0000000..1ea8f21 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_rtl.h @@ -0,0 +1,84 @@ @@ -150693,6 +151060,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_set.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_set.h +new file mode 100644 +index 0000000..577af51 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_set.h @@ -0,0 +1,78 @@ @@ -150774,6 +151144,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_iol.h b/drivers/net/wireless/rtl8192cu/include/rtw_iol.h +new file mode 100644 +index 0000000..45fa5a2 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_iol.h @@ -0,0 +1,89 @@ @@ -150866,6 +151239,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +bool rtw_IOL_applied(ADAPTER *adapter); + +#endif //__RTW_IOL_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_led.h b/drivers/net/wireless/rtl8192cu/include/rtw_led.h +new file mode 100644 +index 0000000..72634f8 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_led.h @@ -0,0 +1,214 @@ @@ -151083,6 +151459,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__RTW_LED_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mlme.h b/drivers/net/wireless/rtl8192cu/include/rtw_mlme.h +new file mode 100644 +index 0000000..0beca93 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mlme.h @@ -0,0 +1,665 @@ @@ -151751,6 +152130,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif //CONFIG_INTEL_PROXIM +#endif //__RTL871X_MLME_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h b/drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h +new file mode 100644 +index 0000000..d9a203f --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h @@ -0,0 +1,878 @@ @@ -152632,6 +153014,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mp.h b/drivers/net/wireless/rtl8192cu/include/rtw_mp.h +new file mode 100644 +index 0000000..a468714 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mp.h @@ -0,0 +1,708 @@ @@ -153343,6 +153728,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //_RTW_MP_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mp_ioctl.h b/drivers/net/wireless/rtl8192cu/include/rtw_mp_ioctl.h +new file mode 100644 +index 0000000..e16df40 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mp_ioctl.h @@ -0,0 +1,596 @@ @@ -153942,6 +154330,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mp_phy_regdef.h b/drivers/net/wireless/rtl8192cu/include/rtw_mp_phy_regdef.h +new file mode 100644 +index 0000000..4906005 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mp_phy_regdef.h @@ -0,0 +1,1098 @@ @@ -155043,6 +155434,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__INC_HAL8192SPHYREG_H + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_p2p.h b/drivers/net/wireless/rtl8192cu/include/rtw_p2p.h +new file mode 100644 +index 0000000..a29ceaa --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_p2p.h @@ -0,0 +1,151 @@ @@ -155197,6 +155591,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_pwrctrl.h b/drivers/net/wireless/rtl8192cu/include/rtw_pwrctrl.h +new file mode 100644 +index 0000000..2b00beb --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_pwrctrl.h @@ -0,0 +1,343 @@ @@ -155543,6 +155940,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#define rtw_pwr_wakeup(adapter) _rtw_pwr_wakeup(adapter, __FUNCTION__) + +#endif //__RTL871X_PWRCTRL_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_qos.h b/drivers/net/wireless/rtl8192cu/include/rtw_qos.h +new file mode 100644 +index 0000000..e35b77f --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_qos.h @@ -0,0 +1,41 @@ @@ -155587,6 +155987,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //_RTL871X_QOS_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_recv.h b/drivers/net/wireless/rtl8192cu/include/rtw_recv.h +new file mode 100644 +index 0000000..e204ef3 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_recv.h @@ -0,0 +1,708 @@ @@ -156298,6 +156701,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_rf.h b/drivers/net/wireless/rtl8192cu/include/rtw_rf.h +new file mode 100644 +index 0000000..7414c1b6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_rf.h @@ -0,0 +1,152 @@ @@ -156453,6 +156859,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //_RTL8711_RF_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_security.h b/drivers/net/wireless/rtl8192cu/include/rtw_security.h +new file mode 100644 +index 0000000..02ef9b0 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_security.h @@ -0,0 +1,423 @@ @@ -156879,10 +157288,16 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif +#endif //__RTL871X_SECURITY_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_version.h b/drivers/net/wireless/rtl8192cu/include/rtw_version.h +new file mode 100644 +index 0000000..f88ea77 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_version.h @@ -0,0 +1 @@ +#define DRIVERVERSION "v3.4.4_4749.20121105" +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_xmit.h b/drivers/net/wireless/rtl8192cu/include/rtw_xmit.h +new file mode 100644 +index 0000000..54e0b2d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_xmit.h @@ -0,0 +1,674 @@ @@ -157560,6 +157975,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //_RTL871X_XMIT_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_hal.h b/drivers/net/wireless/rtl8192cu/include/sdio_hal.h +new file mode 100644 +index 0000000..51139bb --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/sdio_hal.h @@ -0,0 +1,34 @@ @@ -157597,6 +158015,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //__SDIO_HAL_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops.h +new file mode 100644 +index 0000000..b1e9b63 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/sdio_ops.h @@ -0,0 +1,80 @@ @@ -157680,6 +158101,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops_ce.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops_ce.h +new file mode 100644 +index 0000000..81687c9 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/sdio_ops_ce.h @@ -0,0 +1,56 @@ @@ -157739,6 +158163,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops_linux.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops_linux.h +new file mode 100644 +index 0000000..c58ab08 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/sdio_ops_linux.h @@ -0,0 +1,55 @@ @@ -157797,6 +158224,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops_xp.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops_xp.h +new file mode 100644 +index 0000000..3569611 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/sdio_ops_xp.h @@ -0,0 +1,56 @@ @@ -157856,6 +158286,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_osintf.h b/drivers/net/wireless/rtl8192cu/include/sdio_osintf.h +new file mode 100644 +index 0000000..099262b --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/sdio_osintf.h @@ -0,0 +1,48 @@ @@ -157907,6 +158340,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/sta_info.h b/drivers/net/wireless/rtl8192cu/include/sta_info.h +new file mode 100644 +index 0000000..8f01f21 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/sta_info.h @@ -0,0 +1,353 @@ @@ -158263,6 +158699,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +extern u8 rtw_access_ctrl(struct wlan_acl_pool* pacl_list, u8 * mac_addr); + +#endif //_STA_INFO_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_hal.h b/drivers/net/wireless/rtl8192cu/include/usb_hal.h +new file mode 100644 +index 0000000..9cd21f3 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/usb_hal.h @@ -0,0 +1,32 @@ @@ -158298,6 +158737,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif //CONFIG_INTEL_PROXIM +#endif //__USB_HAL_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_ops.h b/drivers/net/wireless/rtl8192cu/include/usb_ops.h +new file mode 100644 +index 0000000..3868bc0 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/usb_ops.h @@ -0,0 +1,100 @@ @@ -158401,6 +158843,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} + +#endif //__USB_OPS_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_osintf.h b/drivers/net/wireless/rtl8192cu/include/usb_osintf.h +new file mode 100644 +index 0000000..8642aa2 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/usb_osintf.h @@ -0,0 +1,39 @@ @@ -158443,6 +158888,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_vendor_req.h b/drivers/net/wireless/rtl8192cu/include/usb_vendor_req.h +new file mode 100644 +index 0000000..72864de --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/usb_vendor_req.h @@ -0,0 +1,60 @@ @@ -158506,6 +158954,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +//BOOLEAN CEusbGetDescriptorRequest(PCE_USB_DEVICE CEdevice, IN short urbLength, IN UCHAR DescriptorType, IN UCHAR Index, IN USHORT LanguageId, IN PVOID TransferBuffer, IN ULONG TransferBufferLength); + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/wifi.h b/drivers/net/wireless/rtl8192cu/include/wifi.h +new file mode 100644 +index 0000000..a80a805 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/wifi.h @@ -0,0 +1,1190 @@ @@ -159699,6 +160150,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // _WIFI_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/wlan_bssdef.h b/drivers/net/wireless/rtl8192cu/include/wlan_bssdef.h +new file mode 100644 +index 0000000..fe555c6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/wlan_bssdef.h @@ -0,0 +1,453 @@ @@ -160155,6 +160609,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //#ifndef WLAN_BSSDEF_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/xmit_osdep.h b/drivers/net/wireless/rtl8192cu/include/xmit_osdep.h +new file mode 100644 +index 0000000..7d28d43 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/xmit_osdep.h @@ -0,0 +1,90 @@ @@ -160248,6 +160705,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif // + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_cfg80211.c +new file mode 100644 +index 0000000..b592e27 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_cfg80211.c @@ -0,0 +1,4618 @@ @@ -164869,6 +165329,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +#endif //CONFIG_IOCTL_CFG80211 + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c +new file mode 100644 +index 0000000..f999502 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c @@ -0,0 +1,9325 @@ @@ -174197,6 +174660,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif +}; + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/mlme_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/mlme_linux.c +new file mode 100644 +index 0000000..0175ea2 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/mlme_linux.c @@ -0,0 +1,740 @@ @@ -174940,6 +175406,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +#endif +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c +new file mode 100644 +index 0000000..8feb780 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c @@ -0,0 +1,1555 @@ @@ -176498,6 +176967,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_intf.c +new file mode 100644 +index 0000000..0848297 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_intf.c @@ -0,0 +1,1889 @@ @@ -178390,6 +178862,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +module_init(rtw_drv_entry); +module_exit(rtw_drv_halt); + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/recv_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/recv_linux.c +new file mode 100644 +index 0000000..4a76c3f --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/recv_linux.c @@ -0,0 +1,462 @@ @@ -178855,6 +179330,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +} + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/rtw_android.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/rtw_android.c +new file mode 100644 +index 0000000..aceaaa7 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/rtw_android.c @@ -0,0 +1,713 @@ @@ -179571,6 +180049,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif /* defined(CONFIG_WIFI_CONTROL_FUNC) */ + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/sdio_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/sdio_intf.c +new file mode 100644 +index 0000000..52faefc --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/sdio_intf.c @@ -0,0 +1,922 @@ @@ -180496,6 +180977,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +module_init(r8712s_drv_entry); +module_exit(r8712s_drv_halt); +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +new file mode 100644 +index 0000000..134acdc --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c @@ -0,0 +1,1523 @@ @@ -182022,6 +182506,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +EXPORT_SYMBOL(rtw_usb_get_sw_pointer); +#endif //CONFIG_INTEL_PROXIM + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/xmit_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/xmit_linux.c +new file mode 100644 +index 0000000..02eec93 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/xmit_linux.c @@ -0,0 +1,367 @@ @@ -182392,6 +182879,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + return 0; +} + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c b/drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c +new file mode 100644 +index 0000000..343cd82 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c @@ -0,0 +1,1571 @@ @@ -183966,6 +184456,9 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver +} +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/wlan0dhcp b/drivers/net/wireless/rtl8192cu/wlan0dhcp +new file mode 100644 +index 0000000..6043382 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/wlan0dhcp @@ -0,0 +1,16 @@ @@ -183985,3 +184478,6 @@ Subject: [PATCH 028/174] Add non-mainline source for rtl8192cu wireless driver + +echo "get ip: $var1" + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0029-Add-device-ID-330d.patch b/target/linux/brcm2708/patches-3.10/0029-Add-device-ID-330d.patch index e061a58398b..0df42b60bf7 100644 --- a/target/linux/brcm2708/patches-3.10/0029-Add-device-ID-330d.patch +++ b/target/linux/brcm2708/patches-3.10/0029-Add-device-ID-330d.patch @@ -1,13 +1,15 @@ -From dae7c3832370e9a807907128ce37070f40fbb882 Mon Sep 17 00:00:00 2001 +From 74275981ae08b9a054457568070c1f9aef2dc594 Mon Sep 17 00:00:00 2001 From: Jo Are By Date: Sun, 17 Mar 2013 17:45:41 +0100 -Subject: [PATCH 029/174] Add device ID (330d) +Subject: [PATCH 029/196] Add device ID (330d) --- drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c | 2 ++ drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c | 1 + 2 files changed, 3 insertions(+) +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c +index eb5ea29..6cac2d5 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c @@ -3786,6 +3786,8 @@ _ReadIDs( @@ -19,9 +21,11 @@ Subject: [PATCH 029/174] Add device ID (330d) break; case EEPROM_CID_WHQL: /* +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +index 134acdc..9d303f4 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c -@@ -137,6 +137,7 @@ static struct usb_device_id rtw_usb_id_t +@@ -137,6 +137,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={ {USB_DEVICE(0x2001, 0x3307)},//D-Link - Cameo {USB_DEVICE(0x2001, 0x330A)},//D-Link - Alpha {USB_DEVICE(0x2001, 0x3309)},//D-Link - Alpha @@ -29,3 +33,6 @@ Subject: [PATCH 029/174] Add device ID (330d) {USB_DEVICE(0x0586, 0x341F)},//Zyxel - Abocom {USB_DEVICE(0x7392, 0x7822)},//Edimax - Edimax {USB_DEVICE(0x2019, 0xAB2B)},//Planex - Abocom +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0030-Avoid-dynamic-memory-allocation-for-channel-lock-in-.patch b/target/linux/brcm2708/patches-3.10/0030-Avoid-dynamic-memory-allocation-for-channel-lock-in-.patch index 2aa67df4a96..e798b4afec0 100644 --- a/target/linux/brcm2708/patches-3.10/0030-Avoid-dynamic-memory-allocation-for-channel-lock-in-.patch +++ b/target/linux/brcm2708/patches-3.10/0030-Avoid-dynamic-memory-allocation-for-channel-lock-in-.patch @@ -1,7 +1,7 @@ -From f56b0b76fdd4b17bd359536ae926c4cb04706e54 Mon Sep 17 00:00:00 2001 +From f97cc1b1a4c868500cee6b016f54d78bdd3cdc26 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Sep 2012 15:17:53 +0100 -Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in +Subject: [PATCH 030/196] Avoid dynamic memory allocation for channel lock in USB driver. Thanks ddv2005. --- @@ -11,9 +11,11 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 20f989e..0ce7e46 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -822,6 +822,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd +@@ -822,6 +822,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) } else if (dwc_otg_hcd->status_buf != NULL) { DWC_FREE(dwc_otg_hcd->status_buf); } @@ -21,7 +23,7 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in DWC_SPINLOCK_FREE(dwc_otg_hcd->lock); /* Set core_if's lock pointer to NULL */ dwc_otg_hcd->core_if->lock = NULL; -@@ -848,6 +849,7 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd +@@ -848,6 +849,7 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) dwc_hc_t *channel; hcd->lock = DWC_SPINLOCK_ALLOC(); @@ -29,7 +31,7 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in DWC_DEBUGPL(DBG_HCDV, "init of HCD %p given core_if %p\n", hcd, core_if); if (!hcd->lock) { -@@ -1248,7 +1250,7 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1248,7 +1250,7 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) dwc_otg_qh_t *qh; int num_channels; dwc_irqflags_t flags; @@ -38,7 +40,7 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in dwc_otg_transaction_type_e ret_val = DWC_OTG_TRANSACTION_NONE; #ifdef DEBUG_SOF -@@ -1348,8 +1350,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1348,8 +1350,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) #ifdef DEBUG_HOST_CHANNELS last_sel_trans_num_avail_hc_at_end = hcd->available_host_channels; #endif /* DEBUG_HOST_CHANNELS */ @@ -47,6 +49,8 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in return ret_val; } +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +index dd30f47..6d82127 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -548,7 +548,7 @@ struct dwc_otg_hcd { @@ -58,9 +62,11 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in /** * Private data that could be used by OS wrapper. */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +index d0d5fa1..a2ceb77 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_ddma.c -@@ -276,7 +276,7 @@ void dump_frame_list(dwc_otg_hcd_t * hcd +@@ -276,7 +276,7 @@ void dump_frame_list(dwc_otg_hcd_t * hcd) static void release_channel_ddma(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) { dwc_irqflags_t flags; @@ -69,7 +75,7 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in dwc_hc_t *hc = qh->channel; if (dwc_qh_is_non_per(qh)) { -@@ -306,7 +306,6 @@ static void release_channel_ddma(dwc_otg +@@ -306,7 +306,6 @@ static void release_channel_ddma(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) dwc_memset(qh->desc_list, 0x00, sizeof(dwc_otg_host_dma_desc_t) * max_desc_num(qh)); } @@ -77,9 +83,11 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in } /** +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index f1658fa..21e8f09 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -922,7 +922,7 @@ static void release_channel(dwc_otg_hcd_ +@@ -922,7 +922,7 @@ static void release_channel(dwc_otg_hcd_t * hcd, dwc_otg_transaction_type_e tr_type; int free_qtd; dwc_irqflags_t flags; @@ -96,3 +104,6 @@ Subject: [PATCH 030/174] Avoid dynamic memory allocation for channel lock in } /** +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0031-Add-cpufreq-driver.patch b/target/linux/brcm2708/patches-3.10/0031-Add-cpufreq-driver.patch index 204b3dc8fc9..0481490a704 100644 --- a/target/linux/brcm2708/patches-3.10/0031-Add-cpufreq-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0031-Add-cpufreq-driver.patch @@ -1,7 +1,7 @@ -From d19db6057337b577baab7766718781d55c402fbb Mon Sep 17 00:00:00 2001 +From 083183f7770ae4fb6f23c99a64a3c5058b9b3b40 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 2 Nov 2013 22:44:41 +0000 -Subject: [PATCH 031/174] Add cpufreq driver +Subject: [PATCH 031/196] Add cpufreq driver --- arch/arm/Kconfig | 1 + @@ -11,6 +11,8 @@ Subject: [PATCH 031/174] Add cpufreq driver 4 files changed, 249 insertions(+) create mode 100755 drivers/cpufreq/bcm2835-cpufreq.c +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 5468f1f..4e36ccd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -369,6 +369,7 @@ config ARCH_BCM2708 @@ -21,6 +23,8 @@ Subject: [PATCH 031/174] Add cpufreq driver select GENERIC_CLOCKEVENTS select ARM_ERRATA_411920 select MACH_BCM2708 +diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm +index 6e57543..bf40783 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -150,3 +150,11 @@ config ARM_SPEAR_CPUFREQ @@ -35,9 +39,11 @@ Subject: [PATCH 031/174] Add cpufreq driver + This adds the CPUFreq driver for BCM2835 + + If in doubt, say N. +diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile +index 3b95322..3a30bab 100644 --- a/drivers/cpufreq/Makefile +++ b/drivers/cpufreq/Makefile -@@ -72,6 +72,7 @@ obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa11 +@@ -72,6 +72,7 @@ obj-$(CONFIG_ARM_SA1100_CPUFREQ) += sa1100-cpufreq.o obj-$(CONFIG_ARM_SA1110_CPUFREQ) += sa1110-cpufreq.o obj-$(CONFIG_ARM_SPEAR_CPUFREQ) += spear-cpufreq.o obj-$(CONFIG_ARCH_TEGRA) += tegra-cpufreq.o @@ -45,6 +51,9 @@ Subject: [PATCH 031/174] Add cpufreq driver ################################################################################## # PowerPC platform drivers +diff --git a/drivers/cpufreq/bcm2835-cpufreq.c b/drivers/cpufreq/bcm2835-cpufreq.c +new file mode 100755 +index 0000000..822139a --- /dev/null +++ b/drivers/cpufreq/bcm2835-cpufreq.c @@ -0,0 +1,239 @@ @@ -287,3 +296,6 @@ Subject: [PATCH 031/174] Add cpufreq driver +module_init(bcm2835_cpufreq_module_init); +module_exit(bcm2835_cpufreq_module_exit); + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0032-Add-NAK-holdoff-scheme.-Enabled-by-default-disable-w.patch b/target/linux/brcm2708/patches-3.10/0032-Add-NAK-holdoff-scheme.-Enabled-by-default-disable-w.patch index e8ddb7cf1b1..41448295032 100644 --- a/target/linux/brcm2708/patches-3.10/0032-Add-NAK-holdoff-scheme.-Enabled-by-default-disable-w.patch +++ b/target/linux/brcm2708/patches-3.10/0032-Add-NAK-holdoff-scheme.-Enabled-by-default-disable-w.patch @@ -1,7 +1,7 @@ -From 99e6d36a5f752bb0237a61143bea29c93e6da22c Mon Sep 17 00:00:00 2001 +From 56822de577325e209a9ecfcf3e62d8bb70c2f2cc Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 8 Apr 2013 21:12:48 +0100 -Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable +Subject: [PATCH 032/196] Add NAK holdoff scheme. Enabled by default, disable with dwc_otg.nak_holdoff_enable=0. Thanks gsh --- @@ -12,9 +12,11 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 19 +++++++++++++++++++ 5 files changed, 70 insertions(+), 4 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c +index 3ac720b..d353a9a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -243,6 +243,9 @@ static struct dwc_otg_driver_module_para +@@ -243,6 +243,9 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { //Global variable to switch the fiq fix on or off (declared in bcm2708.c) extern bool fiq_fix_enable; @@ -24,7 +26,7 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable /** * This function shows the Driver Version. -@@ -1086,6 +1089,7 @@ static int __init dwc_otg_driver_init(vo +@@ -1086,6 +1089,7 @@ static int __init dwc_otg_driver_init(void) return retval; } printk(KERN_DEBUG "dwc_otg: FIQ %s\n", fiq_fix_enable ? "enabled":"disabled"); @@ -32,7 +34,7 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1366,9 +1370,10 @@ MODULE_PARM_DESC(otg_ver, "OTG revision +@@ -1366,9 +1370,10 @@ MODULE_PARM_DESC(otg_ver, "OTG revision supported 0=OTG 1.3 1=OTG 2.0"); module_param(microframe_schedule, bool, 0444); MODULE_PARM_DESC(microframe_schedule, "Enable the microframe scheduler"); @@ -44,9 +46,11 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable /** @page "Module Parameters" * +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 0ce7e46..2b7945a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -527,6 +527,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_ +@@ -527,6 +527,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, { dwc_otg_qh_t *qh; dwc_otg_qtd_t *urb_qtd; @@ -55,7 +59,7 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable #ifdef DEBUG /* integrity checks (Broadcom) */ -@@ -543,14 +545,17 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_ +@@ -543,14 +545,17 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, return -DWC_E_INVALID; } urb_qtd = dwc_otg_urb->qtd; @@ -73,7 +77,7 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable if (CHK_DEBUG_LEVEL(DBG_HCDV | DBG_HCD_URB)) { if (urb_qtd->in_process) { dump_channel_info(hcd, qh); -@@ -1309,6 +1314,22 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1309,6 +1314,22 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) num_channels - hcd->periodic_channels) && !DWC_CIRCLEQ_EMPTY(&hcd->free_hc_list)) { @@ -96,7 +100,7 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable if (microframe_schedule) { DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); if (hcd->available_host_channels < 1) { -@@ -1321,7 +1342,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1321,7 +1342,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) last_sel_trans_num_nonper_scheduled++; #endif /* DEBUG_HOST_CHANNELS */ } @@ -104,6 +108,8 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable assign_and_init_hc(hcd, qh); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +index 6d82127..45e44ea 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -321,6 +321,11 @@ typedef struct dwc_otg_qh { @@ -118,6 +124,8 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable /** (micro)frame at which last start split was initialized. */ uint16_t start_split_frame; +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 21e8f09..3e762e2 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -56,7 +56,12 @@ int fiq_done, int_done; @@ -143,7 +151,7 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable if((jiffies / HZ) > last_time) { /* Once a second output the fiq and irq numbers, useful for debug */ -@@ -1419,6 +1424,18 @@ static int32_t handle_hc_nak_intr(dwc_ot +@@ -1419,6 +1424,18 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, "NAK Received--\n", hc->hc_num); /* @@ -162,9 +170,11 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable * Handle NAK for IN/OUT SSPLIT/CSPLIT transfers, bulk, control, and * interrupt. Re-start the SSPLIT transfer. */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +index ac10323..e6b2a7b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -181,6 +181,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_ot +@@ -181,6 +181,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, dwc_otg_hcd_urb_t * urb) if (microframe_schedule) qh->speed = dev_speed; @@ -172,7 +182,7 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable if (((dev_speed == USB_SPEED_LOW) || (dev_speed == USB_SPEED_FULL)) && -@@ -764,6 +765,24 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_h +@@ -764,6 +765,24 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, int sched_next_periodic_split) { if (dwc_qh_is_non_per(qh)) { @@ -197,3 +207,6 @@ Subject: [PATCH 032/174] Add NAK holdoff scheme. Enabled by default, disable dwc_otg_hcd_qh_remove(hcd, qh); if (!DWC_CIRCLEQ_EMPTY(&qh->qtd_list)) { /* Add back to inactive non-periodic schedule. */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0033-Added-hwmon-thermal-driver-for-reporting-core-temper.patch b/target/linux/brcm2708/patches-3.10/0033-Added-hwmon-thermal-driver-for-reporting-core-temper.patch index 82578e07149..c32faebc185 100644 --- a/target/linux/brcm2708/patches-3.10/0033-Added-hwmon-thermal-driver-for-reporting-core-temper.patch +++ b/target/linux/brcm2708/patches-3.10/0033-Added-hwmon-thermal-driver-for-reporting-core-temper.patch @@ -1,7 +1,7 @@ -From 40934fa5ae748fab27146883be929d4190b35c16 Mon Sep 17 00:00:00 2001 +From 4c7d4bffe1986d856b37460f87950dabe29c616e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 26 Mar 2013 19:24:24 +0000 -Subject: [PATCH 033/174] Added hwmon/thermal driver for reporting core +Subject: [PATCH 033/196] Added hwmon/thermal driver for reporting core temperature. Thanks Dorian --- @@ -16,9 +16,11 @@ Subject: [PATCH 033/174] Added hwmon/thermal driver for reporting core create mode 100644 drivers/hwmon/bcm2835-hwmon.c create mode 100644 drivers/thermal/bcm2835-thermal.c ---- a/arch/arm/mach-bcm2708/bcm2708.c -+++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -562,6 +562,14 @@ static struct platform_device bcm2708_bs +Index: linux-3.10.49/arch/arm/mach-bcm2708/bcm2708.c +=================================================================== +--- linux-3.10.49.orig/arch/arm/mach-bcm2708/bcm2708.c 2014-09-27 11:40:40.999449257 -0700 ++++ linux-3.10.49/arch/arm/mach-bcm2708/bcm2708.c 2014-09-27 11:40:40.979449258 -0700 +@@ -562,6 +562,14 @@ .resource = bcm2708_bsc1_resources, }; @@ -33,7 +35,7 @@ Subject: [PATCH 033/174] Added hwmon/thermal driver for reporting core int __init bcm_register_device(struct platform_device *pdev) { int ret; -@@ -682,6 +690,9 @@ void __init bcm2708_init(void) +@@ -682,6 +690,9 @@ bcm_register_device(&bcm2708_bsc0_device); bcm_register_device(&bcm2708_bsc1_device); @@ -43,9 +45,11 @@ Subject: [PATCH 033/174] Added hwmon/thermal driver for reporting core for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); ---- a/drivers/hwmon/Kconfig -+++ b/drivers/hwmon/Kconfig -@@ -1537,6 +1537,16 @@ config SENSORS_MC13783_ADC +Index: linux-3.10.49/drivers/hwmon/Kconfig +=================================================================== +--- linux-3.10.49.orig/drivers/hwmon/Kconfig 2014-09-27 11:40:40.999449257 -0700 ++++ linux-3.10.49/drivers/hwmon/Kconfig 2014-09-27 11:40:40.979449258 -0700 +@@ -1537,6 +1537,16 @@ help Support for the A/D converter on MC13783 and MC13892 PMIC. @@ -62,8 +66,10 @@ Subject: [PATCH 033/174] Added hwmon/thermal driver for reporting core if ACPI comment "ACPI drivers" ---- /dev/null -+++ b/drivers/hwmon/bcm2835-hwmon.c +Index: linux-3.10.49/drivers/hwmon/bcm2835-hwmon.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.10.49/drivers/hwmon/bcm2835-hwmon.c 2014-09-27 11:40:40.979449258 -0700 @@ -0,0 +1,219 @@ +/***************************************************************************** +* Copyright 2011 Broadcom Corporation. All rights reserved. @@ -284,9 +290,11 @@ Subject: [PATCH 033/174] Added hwmon/thermal driver for reporting core +MODULE_DESCRIPTION("HW Monitor driver for bcm2835 chip"); + +module_platform_driver(bcm2835_hwmon_driver); ---- a/drivers/thermal/Kconfig -+++ b/drivers/thermal/Kconfig -@@ -169,4 +169,11 @@ config INTEL_POWERCLAMP +Index: linux-3.10.49/drivers/thermal/Kconfig +=================================================================== +--- linux-3.10.49.orig/drivers/thermal/Kconfig 2014-09-27 11:40:40.999449257 -0700 ++++ linux-3.10.49/drivers/thermal/Kconfig 2014-09-27 11:40:40.983449258 -0700 +@@ -169,4 +169,11 @@ enforce idle time which results in more package C-state residency. The user interface is exposed via generic thermal framework. @@ -298,16 +306,20 @@ Subject: [PATCH 033/174] Added hwmon/thermal driver for reporting core + endif + ---- a/drivers/thermal/Makefile -+++ b/drivers/thermal/Makefile -@@ -23,4 +23,5 @@ obj-$(CONFIG_DB8500_THERMAL) += db8500_t +Index: linux-3.10.49/drivers/thermal/Makefile +=================================================================== +--- linux-3.10.49.orig/drivers/thermal/Makefile 2014-09-27 11:40:40.999449257 -0700 ++++ linux-3.10.49/drivers/thermal/Makefile 2014-09-27 11:40:40.983449258 -0700 +@@ -23,4 +23,5 @@ obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o obj-$(CONFIG_DB8500_CPUFREQ_COOLING) += db8500_cpufreq_cooling.o obj-$(CONFIG_INTEL_POWERCLAMP) += intel_powerclamp.o +obj-$(CONFIG_THERMAL_BCM2835) += bcm2835-thermal.o ---- /dev/null -+++ b/drivers/thermal/bcm2835-thermal.c +Index: linux-3.10.49/drivers/thermal/bcm2835-thermal.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-3.10.49/drivers/thermal/bcm2835-thermal.c 2014-09-27 11:40:40.983449258 -0700 @@ -0,0 +1,208 @@ +/***************************************************************************** +* Copyright 2011 Broadcom Corporation. All rights reserved. diff --git a/target/linux/brcm2708/patches-3.10/0034-config-add-missing-options-from-3.6.y-kernel.patch b/target/linux/brcm2708/patches-3.10/0034-config-add-missing-options-from-3.6.y-kernel.patch index 50c75802711..920a193ede0 100644 --- a/target/linux/brcm2708/patches-3.10/0034-config-add-missing-options-from-3.6.y-kernel.patch +++ b/target/linux/brcm2708/patches-3.10/0034-config-add-missing-options-from-3.6.y-kernel.patch @@ -1,13 +1,15 @@ -From dc54a9801e33f0e7c0685f0535b90237ab3d4837 Mon Sep 17 00:00:00 2001 +From f9fb4aaaf959dc36b36a7ee1734fada2d68da15f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 19 Jul 2012 16:00:28 +0100 -Subject: [PATCH 034/174] config: add missing options from 3.6.y kernel +Subject: [PATCH 034/196] config: add missing options from 3.6.y kernel --- arch/arm/configs/bcmrpi_defconfig | 653 ++++++++++++++++++++++++++----- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 + 2 files changed, 564 insertions(+), 91 deletions(-) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 6219df3..36fcd49 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -1,11 +1,17 @@ @@ -927,9 +929,11 @@ Subject: [PATCH 034/174] config: add missing options from 3.6.y kernel # CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_HW is not set CONFIG_CRC_ITU_T=y +diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c +index 75a6376..8cb8d8d 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c -@@ -37,9 +37,11 @@ static struct usb_device_id ath9k_hif_us +@@ -37,9 +37,11 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { { USB_DEVICE(0x13D3, 0x3350) }, /* Azurewave */ { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ @@ -941,3 +945,6 @@ Subject: [PATCH 034/174] config: add missing options from 3.6.y kernel { USB_DEVICE(0x0cf3, 0x7015), .driver_info = AR9287_USB }, /* Atheros */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0035-Enable-multiple-ALSA-channels.patch b/target/linux/brcm2708/patches-3.10/0035-Enable-multiple-ALSA-channels.patch index 48584eff40b..c0c7169b90a 100644 --- a/target/linux/brcm2708/patches-3.10/0035-Enable-multiple-ALSA-channels.patch +++ b/target/linux/brcm2708/patches-3.10/0035-Enable-multiple-ALSA-channels.patch @@ -1,15 +1,17 @@ -From 10a2ded6cbf58da71121f0c7a35462f52f49dfae Mon Sep 17 00:00:00 2001 +From 2be2a87be13a5e4df2e3afb13a6089fcd7073906 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 17 Apr 2013 12:16:36 +0100 -Subject: [PATCH 035/174] Enable multiple ALSA channels +Subject: [PATCH 035/196] Enable multiple ALSA channels --- arch/arm/mach-bcm2708/bcm2708.c | 54 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index ab8bac6..5a7437b 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -471,12 +471,54 @@ struct platform_device bcm2708_powerman_ +@@ -471,12 +471,54 @@ struct platform_device bcm2708_powerman_device = { static struct platform_device bcm2708_alsa_devices[] = { @@ -70,3 +72,6 @@ Subject: [PATCH 035/174] Enable multiple ALSA channels }; static struct resource bcm2708_spi_resources[] = { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0036-set-i2c-speed-via-module-parameter-or-menuconfig.-Th.patch b/target/linux/brcm2708/patches-3.10/0036-set-i2c-speed-via-module-parameter-or-menuconfig.-Th.patch index 05045f11315..34d866fb37f 100644 --- a/target/linux/brcm2708/patches-3.10/0036-set-i2c-speed-via-module-parameter-or-menuconfig.-Th.patch +++ b/target/linux/brcm2708/patches-3.10/0036-set-i2c-speed-via-module-parameter-or-menuconfig.-Th.patch @@ -1,7 +1,7 @@ -From 17bb1be5d09fe58cd14084c5eac0052f03d6d71f Mon Sep 17 00:00:00 2001 +From ec78c7da4fe9f7289cdc3e948b70a43c900f2be4 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Oct 2012 20:08:19 +0100 -Subject: [PATCH 036/174] set i2c speed via module-parameter or menuconfig. +Subject: [PATCH 036/196] set i2c speed via module-parameter or menuconfig. Thanks FrankBoesing --- @@ -9,9 +9,11 @@ Subject: [PATCH 036/174] set i2c speed via module-parameter or menuconfig. drivers/i2c/busses/i2c-bcm2708.c | 12 ++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) +diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig +index 290aee4..abaff1a 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig -@@ -353,6 +353,17 @@ config I2C_BCM2708 +@@ -355,6 +355,17 @@ config I2C_BCM2708 support for the BCM2708. BSC is a Broadcom proprietary bus compatible with I2C/TWI/SMBus. @@ -29,6 +31,8 @@ Subject: [PATCH 036/174] set i2c speed via module-parameter or menuconfig. config I2C_BLACKFIN_TWI tristate "Blackfin TWI I2C support" depends on BLACKFIN +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +index 7cae615..3391889 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -66,11 +66,15 @@ @@ -48,7 +52,7 @@ Subject: [PATCH 036/174] set i2c speed via module-parameter or menuconfig. struct bcm2708_i2c { struct i2c_adapter adapter; -@@ -148,7 +152,7 @@ static inline void bcm2708_bsc_setup(str +@@ -148,7 +152,7 @@ static inline void bcm2708_bsc_setup(struct bcm2708_i2c *bi) u32 c = BSC_C_I2CEN | BSC_C_INTD | BSC_C_ST | BSC_C_CLEAR_1; bus_hz = clk_get_rate(bi->clk); @@ -57,7 +61,7 @@ Subject: [PATCH 036/174] set i2c speed via module-parameter or menuconfig. if (bi->msg->flags & I2C_M_RD) c |= BSC_C_INTR | BSC_C_READ; -@@ -331,8 +335,8 @@ static int bcm2708_i2c_probe(struct plat +@@ -331,8 +335,8 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) goto out_free_irq; } @@ -68,3 +72,6 @@ Subject: [PATCH 036/174] set i2c speed via module-parameter or menuconfig. return 0; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0037-Allow-the-number-of-cycles-delay-between-sdcard-peri.patch b/target/linux/brcm2708/patches-3.10/0037-Allow-the-number-of-cycles-delay-between-sdcard-peri.patch index 8961a230838..d128d8ca4da 100644 --- a/target/linux/brcm2708/patches-3.10/0037-Allow-the-number-of-cycles-delay-between-sdcard-peri.patch +++ b/target/linux/brcm2708/patches-3.10/0037-Allow-the-number-of-cycles-delay-between-sdcard-peri.patch @@ -1,7 +1,7 @@ -From addefb978a42b1699979ef8ecef08a01977dfd7d Mon Sep 17 00:00:00 2001 +From 674d82a3db9b47a7772ac732a560979ea22d5c3d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Oct 2012 21:31:48 +0100 -Subject: [PATCH 037/174] Allow the number of cycles delay between sdcard +Subject: [PATCH 037/196] Allow the number of cycles delay between sdcard peripheral writes to be specified on command line with sdhci-bcm2708.cycle_delay @@ -9,6 +9,8 @@ Subject: [PATCH 037/174] Allow the number of cycles delay between sdcard drivers/mmc/host/sdhci-bcm2708.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 7ce2829..ffd7310 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -77,6 +77,8 @@ @@ -20,7 +22,7 @@ Subject: [PATCH 037/174] Allow the number of cycles delay between sdcard /*****************************************************************************\ * * * Debug * -@@ -249,7 +251,7 @@ static void sdhci_bcm2708_raw_writel(str +@@ -249,7 +251,7 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) /* host->clock is the clock freq in Hz */ static hptime_t last_write_hpt; hptime_t now = hptime(); @@ -29,7 +31,7 @@ Subject: [PATCH 037/174] Allow the number of cycles delay between sdcard if (now == last_write_hpt || now == last_write_hpt+1) { /* we can't guarantee any significant time has -@@ -1388,6 +1390,7 @@ module_param(emmc_clock_freq, int, 0444) +@@ -1388,6 +1390,7 @@ module_param(emmc_clock_freq, int, 0444); module_param(sync_after_dma, bool, 0444); module_param(missing_status, bool, 0444); module_param(enable_llm, bool, 0444); @@ -37,3 +39,6 @@ Subject: [PATCH 037/174] Allow the number of cycles delay between sdcard MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0038-Lazy-CRC-quirk-Implemented-retrying-mechanisms-for-S.patch b/target/linux/brcm2708/patches-3.10/0038-Lazy-CRC-quirk-Implemented-retrying-mechanisms-for-S.patch index b21e62bcba1..7f660f42758 100644 --- a/target/linux/brcm2708/patches-3.10/0038-Lazy-CRC-quirk-Implemented-retrying-mechanisms-for-S.patch +++ b/target/linux/brcm2708/patches-3.10/0038-Lazy-CRC-quirk-Implemented-retrying-mechanisms-for-S.patch @@ -1,7 +1,7 @@ -From d6442f505a7bf1bebe9bd4689d021f007a269cd6 Mon Sep 17 00:00:00 2001 +From d94e2bd60b27f2ff7d6e9ff7ee43848bb2090c06 Mon Sep 17 00:00:00 2001 From: dero Date: Mon, 19 Nov 2012 12:46:06 +0100 -Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for +Subject: [PATCH 038/196] Lazy CRC quirk: Implemented retrying mechanisms for SD SSR and SCR, disabled missing_status and spurious CRC ACMD51 quirks by default (should be fixed by the retrying-mechanishm) @@ -10,6 +10,8 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for drivers/mmc/host/sdhci-bcm2708.c | 11 +++- 2 files changed, 108 insertions(+), 18 deletions(-) +diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c +index 9e645e1..1ee6cf3 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -13,6 +13,8 @@ @@ -21,7 +23,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for #include #include -@@ -58,6 +60,15 @@ static const unsigned int tacc_mant[] = +@@ -58,6 +60,15 @@ static const unsigned int tacc_mant[] = { __res & __mask; \ }) @@ -37,7 +39,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for /* * Given the decoded CSD structure, decode the raw CID to our CID structure. */ -@@ -210,12 +221,62 @@ static int mmc_decode_scr(struct mmc_car +@@ -210,12 +221,62 @@ static int mmc_decode_scr(struct mmc_card *card) } /* @@ -102,7 +104,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for u32 *ssr; if (!(card->csd.cmdclass & CCC_APP_SPEC)) { -@@ -227,15 +288,41 @@ static int mmc_read_ssr(struct mmc_card +@@ -227,15 +288,41 @@ static int mmc_read_ssr(struct mmc_card *card) ssr = kmalloc(64, GFP_KERNEL); if (!ssr) return -ENOMEM; @@ -150,7 +152,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for for (i = 0; i < 16; i++) ssr[i] = be32_to_cpu(ssr[i]); -@@ -808,15 +895,11 @@ int mmc_sd_setup_card(struct mmc_host *h +@@ -808,15 +895,11 @@ int mmc_sd_setup_card(struct mmc_host *host, struct mmc_card *card, if (!reinit) { /* @@ -170,6 +172,8 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for /* * Fetch and process SD Status register. +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index ffd7310..3556ed3 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -137,6 +137,7 @@ static bool allow_highspeed = 1; @@ -180,7 +184,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for bool enable_llm = 1; #if 0 -@@ -1103,7 +1104,7 @@ static unsigned int sdhci_bcm2708_quirk_ +@@ -1103,7 +1104,7 @@ static unsigned int sdhci_bcm2708_quirk_extra_ints(struct sdhci_host *host) return 1; } @@ -189,7 +193,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for { return 1; } -@@ -1149,7 +1150,6 @@ static struct sdhci_ops sdhci_bcm2708_op +@@ -1149,7 +1150,6 @@ static struct sdhci_ops sdhci_bcm2708_ops = { .pdma_reset = sdhci_bcm2708_platdma_reset, #endif .extra_ints = sdhci_bcm2708_quirk_extra_ints, @@ -197,7 +201,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for .voltage_broken = sdhci_bcm2708_quirk_voltage_broken, .uhs_broken = sdhci_bcm2708_uhs_broken, }; -@@ -1194,6 +1194,11 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1194,6 +1194,11 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) sdhci_bcm2708_ops.missing_status = sdhci_bcm2708_missing_status; } @@ -209,7 +213,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for printk("sdhci: %s low-latency mode\n",enable_llm?"Enable":"Disable"); host->hw_name = "BCM2708_Arasan"; -@@ -1389,6 +1394,7 @@ module_param(allow_highspeed, bool, 0444 +@@ -1389,6 +1394,7 @@ module_param(allow_highspeed, bool, 0444); module_param(emmc_clock_freq, int, 0444); module_param(sync_after_dma, bool, 0444); module_param(missing_status, bool, 0444); @@ -217,7 +221,7 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for module_param(enable_llm, bool, 0444); module_param(cycle_delay, int, 0444); -@@ -1401,6 +1407,7 @@ MODULE_PARM_DESC(allow_highspeed, "Allow +@@ -1401,6 +1407,7 @@ MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes"); MODULE_PARM_DESC(emmc_clock_freq, "Specify the speed of emmc clock"); MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); MODULE_PARM_DESC(missing_status, "Use the missing status quirk"); @@ -225,3 +229,6 @@ Subject: [PATCH 038/174] Lazy CRC quirk: Implemented retrying mechanisms for MODULE_PARM_DESC(enable_llm, "Enable low-latency mode"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0039-bcm2708-Add-vc_cma-driver-to-enable-use-of-CMA.patch b/target/linux/brcm2708/patches-3.10/0039-bcm2708-Add-vc_cma-driver-to-enable-use-of-CMA.patch index 82f25b76240..0a5bb32b7d4 100644 --- a/target/linux/brcm2708/patches-3.10/0039-bcm2708-Add-vc_cma-driver-to-enable-use-of-CMA.patch +++ b/target/linux/brcm2708/patches-3.10/0039-bcm2708-Add-vc_cma-driver-to-enable-use-of-CMA.patch @@ -1,12 +1,14 @@ -From bf571a571b090c16cd49458126e996243d8a2626 Mon Sep 17 00:00:00 2001 +From 4998fad71d9539a6f6e28c7ad54142950c85cbe5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 28 Mar 2013 00:10:32 +0000 -Subject: [PATCH 039/174] bcm2708: Add vc_cma driver to enable use of CMA +Subject: [PATCH 039/196] bcm2708: Add vc_cma driver to enable use of CMA --- arch/arm/mach-bcm2708/bcm2708.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 5a7437b..13b91de 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -60,6 +60,11 @@ @@ -53,3 +55,6 @@ Subject: [PATCH 039/174] bcm2708: Add vc_cma driver to enable use of CMA MACHINE_END module_param(boardrev, uint, 0644); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0040-Make-sure-we-wait-for-the-reset-to-finish.patch b/target/linux/brcm2708/patches-3.10/0040-Make-sure-we-wait-for-the-reset-to-finish.patch index 5ac1327441d..91d38f8d392 100644 --- a/target/linux/brcm2708/patches-3.10/0040-Make-sure-we-wait-for-the-reset-to-finish.patch +++ b/target/linux/brcm2708/patches-3.10/0040-Make-sure-we-wait-for-the-reset-to-finish.patch @@ -1,12 +1,14 @@ -From c7502584abba164c1cda1378c86e95cd879e1e1a Mon Sep 17 00:00:00 2001 +From 6b194b997f5deb970901d3aaabd9effe4a5d5071 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Sun, 4 Nov 2012 15:55:01 +0000 -Subject: [PATCH 040/174] Make sure we wait for the reset to finish +Subject: [PATCH 040/196] Make sure we wait for the reset to finish --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 3e762e2..e8c91e7 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -232,6 +232,8 @@ exit_handler_routine: @@ -18,3 +20,6 @@ Subject: [PATCH 040/174] Make sure we wait for the reset to finish DWC_WRITE_REG32(c_mphi_regs.ctrl, (1<<31)); mphi_int_count = 0; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0041-Add-Simon-Hall-s-dma-helper-module-useful-in-future-.patch b/target/linux/brcm2708/patches-3.10/0041-Add-Simon-Hall-s-dma-helper-module-useful-in-future-.patch index fa4184810e4..297ec16d421 100644 --- a/target/linux/brcm2708/patches-3.10/0041-Add-Simon-Hall-s-dma-helper-module-useful-in-future-.patch +++ b/target/linux/brcm2708/patches-3.10/0041-Add-Simon-Hall-s-dma-helper-module-useful-in-future-.patch @@ -1,7 +1,7 @@ -From 87b48ac64b6b2aeb97b53eee080e74cb83ff25fe Mon Sep 17 00:00:00 2001 +From ed83da894caf28e267eab3a01ef037a7198391a1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 19 Nov 2012 18:27:05 +0000 -Subject: [PATCH 041/174] Add Simon Hall's dma helper module, useful in future +Subject: [PATCH 041/196] Add Simon Hall's dma helper module, useful in future for X acceleration --- @@ -15,6 +15,8 @@ Subject: [PATCH 041/174] Add Simon Hall's dma helper module, useful in future create mode 100755 arch/arm/mach-bcm2708/include/mach/vc_support.h create mode 100755 arch/arm/mach-bcm2708/vc_support.c +diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig +index a35ff89..b85bb8d 100644 --- a/arch/arm/mach-bcm2708/Kconfig +++ b/arch/arm/mach-bcm2708/Kconfig @@ -38,4 +38,12 @@ config BCM2708_SPIDEV @@ -30,15 +32,20 @@ Subject: [PATCH 041/174] Add Simon Hall's dma helper module, useful in future + Enable DMA helper for accelerating X composition + endmenu +diff --git a/arch/arm/mach-bcm2708/Makefile b/arch/arm/mach-bcm2708/Makefile +index 164ecb2..0da162c 100644 --- a/arch/arm/mach-bcm2708/Makefile +++ b/arch/arm/mach-bcm2708/Makefile -@@ -6,3 +6,6 @@ obj-$(CONFIG_MACH_BCM2708) += clock.o b +@@ -6,3 +6,6 @@ obj-$(CONFIG_MACH_BCM2708) += clock.o bcm2708.o armctrl.o vcio.o power.o dma.o obj-$(CONFIG_BCM2708_GPIO) += bcm2708_gpio.o obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o +obj-$(CONFIG_BCM2708_DMAER) += dmaer_master.o +dmaer_master-objs := dmaer.o vc_support.o + +diff --git a/arch/arm/mach-bcm2708/dmaer.c b/arch/arm/mach-bcm2708/dmaer.c +new file mode 100755 +index 0000000..d1bc0fa --- /dev/null +++ b/arch/arm/mach-bcm2708/dmaer.c @@ -0,0 +1,887 @@ @@ -929,6 +936,9 @@ Subject: [PATCH 041/174] Add Simon Hall's dma helper module, useful in future +module_init(dmaer_init); +module_exit(dmaer_exit); + +diff --git a/arch/arm/mach-bcm2708/include/mach/vc_support.h b/arch/arm/mach-bcm2708/include/mach/vc_support.h +new file mode 100755 +index 0000000..70e809f --- /dev/null +++ b/arch/arm/mach-bcm2708/include/mach/vc_support.h @@ -0,0 +1,69 @@ @@ -1001,6 +1011,9 @@ Subject: [PATCH 041/174] Add Simon Hall's dma helper module, useful in future + unsigned int r0, unsigned int r1, unsigned int r2, unsigned int r3, unsigned int r4, unsigned int r5); + +#endif +diff --git a/arch/arm/mach-bcm2708/vc_support.c b/arch/arm/mach-bcm2708/vc_support.c +new file mode 100755 +index 0000000..5cb1335 --- /dev/null +++ b/arch/arm/mach-bcm2708/vc_support.c @@ -0,0 +1,319 @@ @@ -1323,3 +1336,6 @@ Subject: [PATCH 041/174] Add Simon Hall's dma helper module, useful in future + } +} + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0042-lirc-added-support-for-RaspberryPi-GPIO.patch b/target/linux/brcm2708/patches-3.10/0042-lirc-added-support-for-RaspberryPi-GPIO.patch index 27bab99d8d2..e21957f4e0c 100644 --- a/target/linux/brcm2708/patches-3.10/0042-lirc-added-support-for-RaspberryPi-GPIO.patch +++ b/target/linux/brcm2708/patches-3.10/0042-lirc-added-support-for-RaspberryPi-GPIO.patch @@ -1,7 +1,7 @@ -From b7496d2df33f324ee6854c600944b50a011d95e0 Mon Sep 17 00:00:00 2001 +From d00af9c32e369be7d5f270cc18cbc10950213727 Mon Sep 17 00:00:00 2001 From: Aron Szabo Date: Sat, 16 Jun 2012 12:15:55 +0200 -Subject: [PATCH 042/174] lirc: added support for RaspberryPi GPIO +Subject: [PATCH 042/196] lirc: added support for RaspberryPi GPIO --- drivers/staging/media/lirc/Kconfig | 6 + @@ -10,6 +10,8 @@ Subject: [PATCH 042/174] lirc: added support for RaspberryPi GPIO 3 files changed, 694 insertions(+) create mode 100644 drivers/staging/media/lirc/lirc_rpi.c +diff --git a/drivers/staging/media/lirc/Kconfig b/drivers/staging/media/lirc/Kconfig +index e60a59f..6b7ff70 100644 --- a/drivers/staging/media/lirc/Kconfig +++ b/drivers/staging/media/lirc/Kconfig @@ -38,6 +38,12 @@ config LIRC_PARALLEL @@ -25,6 +27,8 @@ Subject: [PATCH 042/174] lirc: added support for RaspberryPi GPIO config LIRC_SASEM tristate "Sasem USB IR Remote" depends on LIRC && USB +diff --git a/drivers/staging/media/lirc/Makefile b/drivers/staging/media/lirc/Makefile +index b90fcab..2b227fd 100644 --- a/drivers/staging/media/lirc/Makefile +++ b/drivers/staging/media/lirc/Makefile @@ -7,6 +7,7 @@ obj-$(CONFIG_LIRC_BT829) += lirc_bt829.o @@ -35,6 +39,9 @@ Subject: [PATCH 042/174] lirc: added support for RaspberryPi GPIO obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o obj-$(CONFIG_LIRC_SIR) += lirc_sir.o +diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c +new file mode 100644 +index 0000000..96acab0 --- /dev/null +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -0,0 +1,687 @@ @@ -725,3 +732,6 @@ Subject: [PATCH 042/174] lirc: added support for RaspberryPi GPIO + +module_param(debug, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Enable debugging messages"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0043-Default-to-dwc_otp.lpm_enable-0.patch b/target/linux/brcm2708/patches-3.10/0043-Default-to-dwc_otp.lpm_enable-0.patch index 362824cfb19..1bf16d8f25c 100644 --- a/target/linux/brcm2708/patches-3.10/0043-Default-to-dwc_otp.lpm_enable-0.patch +++ b/target/linux/brcm2708/patches-3.10/0043-Default-to-dwc_otp.lpm_enable-0.patch @@ -1,15 +1,17 @@ -From 2a720d265e89fc6145b87420c4cefec1582afa80 Mon Sep 17 00:00:00 2001 +From c634eb696026a3e9d36f2604d6d117ba6af9ceeb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Dec 2012 18:23:03 +0000 -Subject: [PATCH 043/174] Default to dwc_otp.lpm_enable=0 +Subject: [PATCH 043/196] Default to dwc_otp.lpm_enable=0 --- drivers/usb/host/dwc_otg/dwc_otg_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c +index d353a9a..cea8fcb 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -228,7 +228,7 @@ static struct dwc_otg_driver_module_para +@@ -228,7 +228,7 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { .rx_thr_length = -1, .pti_enable = -1, .mpi_enable = -1, @@ -18,3 +20,6 @@ Subject: [PATCH 043/174] Default to dwc_otp.lpm_enable=0 .ic_usb_cap = -1, .ahb_thr_ratio = -1, .power_down = -1, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0044-dwc_otg-fix-bug-in-dwc_otg_hcd.c-resulting-in-silent.patch b/target/linux/brcm2708/patches-3.10/0044-dwc_otg-fix-bug-in-dwc_otg_hcd.c-resulting-in-silent.patch index 16d16de202f..81b10146602 100644 --- a/target/linux/brcm2708/patches-3.10/0044-dwc_otg-fix-bug-in-dwc_otg_hcd.c-resulting-in-silent.patch +++ b/target/linux/brcm2708/patches-3.10/0044-dwc_otg-fix-bug-in-dwc_otg_hcd.c-resulting-in-silent.patch @@ -1,7 +1,7 @@ -From 17b1eb8e7fdbca81bc6d74c003b02ca3b08f1fa4 Mon Sep 17 00:00:00 2001 +From 9ffc237e5d245d9eda21b10b82dab448ec920620 Mon Sep 17 00:00:00 2001 From: P33M Date: Wed, 9 Jan 2013 16:12:04 +0000 -Subject: [PATCH 044/174] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent +Subject: [PATCH 044/196] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent kernel memory corruption, escalating to OOPS under high USB load. --- @@ -9,9 +9,11 @@ Subject: [PATCH 044/174] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 2b7945a..d5c94f4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -500,8 +500,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -500,8 +500,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, DWC_ERROR("DWC OTG HCD URB Enqueue failed adding QTD. " "Error status %d\n", retval); dwc_otg_hcd_qtd_free(qtd); @@ -20,9 +22,11 @@ Subject: [PATCH 044/174] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent } intr_mask.d32 = DWC_READ_REG32(&hcd->core_if->core_global_regs->gintmsk); if (!intr_mask.b.sofintr && retval == 0) { +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +index e6b2a7b..b337e1b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -946,6 +946,7 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * +@@ -946,6 +946,7 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, if (retval == 0) { DWC_CIRCLEQ_INSERT_TAIL(&((*qh)->qtd_list), qtd, qtd_list_entry); @@ -30,3 +34,6 @@ Subject: [PATCH 044/174] dwc_otg: fix bug in dwc_otg_hcd.c resulting in silent } DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0045-Return-error-value-from-bcm2708_setup_state.-Thanks-.patch b/target/linux/brcm2708/patches-3.10/0045-Return-error-value-from-bcm2708_setup_state.-Thanks-.patch index c985a92ca45..2053cc5c894 100644 --- a/target/linux/brcm2708/patches-3.10/0045-Return-error-value-from-bcm2708_setup_state.-Thanks-.patch +++ b/target/linux/brcm2708/patches-3.10/0045-Return-error-value-from-bcm2708_setup_state.-Thanks-.patch @@ -1,16 +1,18 @@ -From 96bf154aade59a5527611b93bdc3ff5faf8ecc10 Mon Sep 17 00:00:00 2001 +From 3edf2fdaaf5c1b126e3e93519dcc1fea2e7954c5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 21 Jan 2013 23:03:53 +0000 -Subject: [PATCH 045/174] Return error value from bcm2708_setup_state. Thanks +Subject: [PATCH 045/196] Return error value from bcm2708_setup_state. Thanks notro --- drivers/spi/spi-bcm2708.c | 1 + 1 file changed, 1 insertion(+) +diff --git a/drivers/spi/spi-bcm2708.c b/drivers/spi/spi-bcm2708.c +index 9f1580e..8513704 100644 --- a/drivers/spi/spi-bcm2708.c +++ b/drivers/spi/spi-bcm2708.c -@@ -378,6 +378,7 @@ static int bcm2708_spi_setup(struct spi_ +@@ -378,6 +378,7 @@ static int bcm2708_spi_setup(struct spi_device *spi) if (ret < 0) { kfree(state); spi->controller_state = NULL; @@ -18,3 +20,6 @@ Subject: [PATCH 045/174] Return error value from bcm2708_setup_state. Thanks } dev_dbg(&spi->dev, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch b/target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch index 0baa6cbf6c4..3f634dc5030 100644 --- a/target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch +++ b/target/linux/brcm2708/patches-3.10/0046-spi-spi-bcm2708-respect-per-transfer-SPI-clock-speed.patch @@ -1,7 +1,7 @@ -From 444149f35455bfe551ce9dfa21d00b5b34ffb04f Mon Sep 17 00:00:00 2001 +From 78948302252dcffa18716390f784ba03e4320c67 Mon Sep 17 00:00:00 2001 From: Kamal Mostafa Date: Mon, 22 Oct 2012 15:52:44 -0700 -Subject: [PATCH 046/174] spi/spi-bcm2708: respect per-transfer SPI clock +Subject: [PATCH 046/196] spi/spi-bcm2708: respect per-transfer SPI clock speed_hz value The bcm2708 SPI driver's bcm2708_process_transfer() was ignoring the @@ -17,9 +17,11 @@ Signed-off-by: Kamal Mostafa drivers/spi/spi-bcm2708.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) +diff --git a/drivers/spi/spi-bcm2708.c b/drivers/spi/spi-bcm2708.c +index 8513704..b74aa32 100644 --- a/drivers/spi/spi-bcm2708.c +++ b/drivers/spi/spi-bcm2708.c -@@ -259,6 +259,10 @@ static int bcm2708_setup_state(struct sp +@@ -259,6 +259,10 @@ static int bcm2708_setup_state(struct spi_master *master, if (state) { state->cs = cs; state->cdiv = cdiv; @@ -30,7 +32,7 @@ Signed-off-by: Kamal Mostafa } return 0; -@@ -277,7 +281,8 @@ static int bcm2708_process_transfer(stru +@@ -277,7 +281,8 @@ static int bcm2708_process_transfer(struct bcm2708_spi *bs, if (xfer->bits_per_word || xfer->speed_hz) { ret = bcm2708_setup_state(spi->master, &spi->dev, &state, @@ -40,3 +42,6 @@ Signed-off-by: Kamal Mostafa spi->bits_per_word); if (ret) return ret; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0047-Add-hwrng-hardware-random-number-generator-driver.patch b/target/linux/brcm2708/patches-3.10/0047-Add-hwrng-hardware-random-number-generator-driver.patch index f90f218f319..0c378bc20f6 100644 --- a/target/linux/brcm2708/patches-3.10/0047-Add-hwrng-hardware-random-number-generator-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0047-Add-hwrng-hardware-random-number-generator-driver.patch @@ -1,7 +1,7 @@ -From 8a467ffd4cdce4f87c363c24be193b99b2688126 Mon Sep 17 00:00:00 2001 +From 1ecfdf8a7a08d52d238dc132c85d37966ca58737 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:51:55 +0100 -Subject: [PATCH 047/174] Add hwrng (hardware random number generator) driver +Subject: [PATCH 047/196] Add hwrng (hardware random number generator) driver --- arch/arm/mach-bcm2708/include/mach/platform.h | 1 + @@ -11,6 +11,8 @@ Subject: [PATCH 047/174] Add hwrng (hardware random number generator) driver 4 files changed, 131 insertions(+) create mode 100755 drivers/char/hw_random/bcm2708-rng.c +diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h +index 89e72d1..992a630 100644 --- a/arch/arm/mach-bcm2708/include/mach/platform.h +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -62,6 +62,7 @@ @@ -21,6 +23,8 @@ Subject: [PATCH 047/174] Add hwrng (hardware random number generator) driver #define GPIO_BASE (BCM2708_PERI_BASE + 0x200000) /* GPIO */ #define UART0_BASE (BCM2708_PERI_BASE + 0x201000) /* Uart 0 */ #define MMCI0_BASE (BCM2708_PERI_BASE + 0x202000) /* MMC interface */ +diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig +index 2f9dbf7..d725a53 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig @@ -314,3 +314,15 @@ config HW_RANDOM_TPM @@ -39,13 +43,18 @@ Subject: [PATCH 047/174] Add hwrng (hardware random number generator) driver + + If unsure, say N. + +diff --git a/drivers/char/hw_random/Makefile b/drivers/char/hw_random/Makefile +index bed467c..18fc4d4 100644 --- a/drivers/char/hw_random/Makefile +++ b/drivers/char/hw_random/Makefile -@@ -27,3 +27,4 @@ obj-$(CONFIG_HW_RANDOM_PSERIES) += pseri +@@ -27,3 +27,4 @@ obj-$(CONFIG_HW_RANDOM_PSERIES) += pseries-rng.o obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-rng.o obj-$(CONFIG_HW_RANDOM_TPM) += tpm-rng.o obj-$(CONFIG_HW_RANDOM_BCM2835) += bcm2835-rng.o +obj-$(CONFIG_HW_RANDOM_BCM2708) += bcm2708-rng.o +diff --git a/drivers/char/hw_random/bcm2708-rng.c b/drivers/char/hw_random/bcm2708-rng.c +new file mode 100755 +index 0000000..1ffa7d7 --- /dev/null +++ b/drivers/char/hw_random/bcm2708-rng.c @@ -0,0 +1,117 @@ @@ -166,3 +175,6 @@ Subject: [PATCH 047/174] Add hwrng (hardware random number generator) driver + +MODULE_DESCRIPTION("BCM2708 H/W Random Number Generator (RNG) driver"); +MODULE_LICENSE("GPL and additional rights"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0048-Changed-wording-on-logging.-Previously-we-received-e.patch b/target/linux/brcm2708/patches-3.10/0048-Changed-wording-on-logging.-Previously-we-received-e.patch index 5d99f8be8d0..5f7aa4d39e8 100644 --- a/target/linux/brcm2708/patches-3.10/0048-Changed-wording-on-logging.-Previously-we-received-e.patch +++ b/target/linux/brcm2708/patches-3.10/0048-Changed-wording-on-logging.-Previously-we-received-e.patch @@ -1,7 +1,7 @@ -From 2d37b2d242b41270a7ae1aeccfe06fc253e8d180 Mon Sep 17 00:00:00 2001 +From 054157625ec6b69ba0f66d4337986122ce9e8d82 Mon Sep 17 00:00:00 2001 From: Technion Date: Mon, 11 Feb 2013 22:08:53 +1100 -Subject: [PATCH 048/174] Changed wording on logging. Previously, we received +Subject: [PATCH 048/196] Changed wording on logging. Previously, we received errors like this: mmc0: could read SD Status register (SSR) at the 3th attempt A more sensible response is now returned. A typo also fixed in comments. @@ -10,9 +10,11 @@ Subject: [PATCH 048/174] Changed wording on logging. Previously, we received drivers/mmc/core/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c +index 1ee6cf3..90228f9 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c -@@ -238,7 +238,7 @@ static int mmc_read_scr(struct mmc_card +@@ -238,7 +238,7 @@ static int mmc_read_scr(struct mmc_card *card) err = mmc_app_send_scr(card, card->raw_scr); if( !err ) @@ -21,7 +23,7 @@ Subject: [PATCH 048/174] Changed wording on logging. Previously, we received touch_nmi_watchdog(); // we are still alive! -@@ -320,7 +320,7 @@ static int mmc_read_ssr(struct mmc_card +@@ -320,7 +320,7 @@ static int mmc_read_ssr(struct mmc_card *card) if( tries > 1 ) { @@ -30,3 +32,6 @@ Subject: [PATCH 048/174] Changed wording on logging. Previously, we received } for (i = 0; i < 16; i++) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0049-dwc_otg-Fix-unsafe-access-of-QTD-during-URB-enqueue.patch b/target/linux/brcm2708/patches-3.10/0049-dwc_otg-Fix-unsafe-access-of-QTD-during-URB-enqueue.patch index 089165341af..1eff3b1dbec 100644 --- a/target/linux/brcm2708/patches-3.10/0049-dwc_otg-Fix-unsafe-access-of-QTD-during-URB-enqueue.patch +++ b/target/linux/brcm2708/patches-3.10/0049-dwc_otg-Fix-unsafe-access-of-QTD-during-URB-enqueue.patch @@ -1,7 +1,7 @@ -From 08e3e98d28e32852e43bf25fb3e64bb3f5e6af4d Mon Sep 17 00:00:00 2001 +From 1ef8aaf1ef348a22b72ba4367c5e2e5727542f59 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:36:47 +0000 -Subject: [PATCH 049/174] dwc_otg: Fix unsafe access of QTD during URB enqueue +Subject: [PATCH 049/196] dwc_otg: Fix unsafe access of QTD during URB enqueue In dwc_otg_hcd_urb_enqueue during qtd creation, it was possible that the transaction could complete almost immediately after the qtd was assigned @@ -17,9 +17,11 @@ that had no periodic endpoints (e.g. USB pendrive or some wlan devices). drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index d5c94f4..e653d84 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -462,6 +462,8 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -462,6 +462,8 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, { dwc_irqflags_t flags; int retval = 0; @@ -28,7 +30,7 @@ that had no periodic endpoints (e.g. USB pendrive or some wlan devices). dwc_otg_qtd_t *qtd; gintmsk_data_t intr_mask = {.d32 = 0 }; -@@ -493,22 +495,22 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -493,22 +495,22 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, return -DWC_E_NO_MEMORY; } #endif @@ -61,7 +63,7 @@ that had no periodic endpoints (e.g. USB pendrive or some wlan devices). DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); tr_type = dwc_otg_hcd_select_transactions(hcd); if (tr_type != DWC_OTG_TRANSACTION_NONE) { -@@ -516,7 +518,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -516,7 +518,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, } DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags); } @@ -69,9 +71,11 @@ that had no periodic endpoints (e.g. USB pendrive or some wlan devices). return retval; } +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +index b337e1b..b3e6e52 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -937,7 +937,7 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * +@@ -937,7 +937,7 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, if (*qh == NULL) { *qh = dwc_otg_hcd_qh_create(hcd, urb, atomic_alloc); if (*qh == NULL) { @@ -80,3 +84,6 @@ that had no periodic endpoints (e.g. USB pendrive or some wlan devices). goto done; } } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0050-dwc_otg-Fix-incorrect-URB-allocation-error-handling.patch b/target/linux/brcm2708/patches-3.10/0050-dwc_otg-Fix-incorrect-URB-allocation-error-handling.patch index 828d9804c23..34bb2ab34f1 100644 --- a/target/linux/brcm2708/patches-3.10/0050-dwc_otg-Fix-incorrect-URB-allocation-error-handling.patch +++ b/target/linux/brcm2708/patches-3.10/0050-dwc_otg-Fix-incorrect-URB-allocation-error-handling.patch @@ -1,7 +1,7 @@ -From e3e9b6dbd5507ea5e571acae3ef6ed2e2d5dadcf Mon Sep 17 00:00:00 2001 +From 65eba02bb428a4c572b5d3109e939a5e84a54747 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 15 Feb 2013 22:38:40 +0000 -Subject: [PATCH 050/174] dwc_otg: Fix incorrect URB allocation error handling +Subject: [PATCH 050/196] dwc_otg: Fix incorrect URB allocation error handling If the memory allocation for a dwc_otg_urb failed, the kernel would OOPS because for some reason a member of the *unallocated* struct was set to @@ -10,9 +10,11 @@ zero. Error handling changed to fail correctly. drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index e653d84..fcec97f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -3136,17 +3136,13 @@ dwc_otg_hcd_urb_t *dwc_otg_hcd_urb_alloc +@@ -3136,17 +3136,13 @@ dwc_otg_hcd_urb_t *dwc_otg_hcd_urb_alloc(dwc_otg_hcd_t * hcd, else dwc_otg_urb = DWC_ALLOC(size); @@ -36,3 +38,6 @@ zero. Error handling changed to fail correctly. return dwc_otg_urb; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch b/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch index 893e9d6c8e5..62826251b90 100644 --- a/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch +++ b/target/linux/brcm2708/patches-3.10/0051-Added-inverted-transmitter-support.patch @@ -1,12 +1,14 @@ -From f1f13a6b3798161ccc3852320bd2184b85c9209b Mon Sep 17 00:00:00 2001 +From 09eb4e8210da3acb95f874f3ed2292f13e1f6ad3 Mon Sep 17 00:00:00 2001 From: pjennings Date: Wed, 20 Feb 2013 17:51:43 -0600 -Subject: [PATCH 051/174] Added inverted transmitter support +Subject: [PATCH 051/196] Added inverted transmitter support --- drivers/staging/media/lirc/lirc_rpi.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) +diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c +index 96acab0..5bb0dfe 100644 --- a/drivers/staging/media/lirc/lirc_rpi.c +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -68,6 +68,8 @@ static int debug; @@ -18,7 +20,7 @@ Subject: [PATCH 051/174] Added inverted transmitter support struct gpio_chip *gpiochip; struct irq_chip *irqchip; -@@ -135,10 +137,10 @@ static long send_pulse_softcarrier(unsig +@@ -135,10 +137,10 @@ static long send_pulse_softcarrier(unsigned long length) actual = 0; target = 0; flag = 0; while (actual < length) { if (flag) { @@ -31,7 +33,7 @@ Subject: [PATCH 051/174] Added inverted transmitter support target += pulse_width; } d = (target - actual - -@@ -162,7 +164,7 @@ static long send_pulse(unsigned long len +@@ -162,7 +164,7 @@ static long send_pulse(unsigned long length) if (softcarrier) { return send_pulse_softcarrier(length); } else { @@ -40,7 +42,7 @@ Subject: [PATCH 051/174] Added inverted transmitter support safe_udelay(length); return 0; } -@@ -170,7 +172,7 @@ static long send_pulse(unsigned long len +@@ -170,7 +172,7 @@ static long send_pulse(unsigned long length) static void send_space(long length) { @@ -58,7 +60,7 @@ Subject: [PATCH 051/174] Added inverted transmitter support irq = gpiochip->to_irq(gpiochip, gpio_in_pin); dprintk("to_irq %d\n", irq); -@@ -457,7 +459,7 @@ static ssize_t lirc_write(struct file *f +@@ -457,7 +459,7 @@ static ssize_t lirc_write(struct file *file, const char *buf, else delta = send_pulse(wbuf[i]); } @@ -67,7 +69,7 @@ Subject: [PATCH 051/174] Added inverted transmitter support spin_unlock_irqrestore(&lock, flags); kfree(wbuf); -@@ -683,5 +685,8 @@ MODULE_PARM_DESC(sense, "Override autode +@@ -683,5 +685,8 @@ MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit" module_param(softcarrier, bool, S_IRUGO); MODULE_PARM_DESC(softcarrier, "Software carrier (0 = off, 1 = on, default on)"); @@ -76,3 +78,6 @@ Subject: [PATCH 051/174] Added inverted transmitter support + module_param(debug, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(debug, "Enable debugging messages"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0052-Add-retry-on-error-and-tidy-of-temperature-driver.patch b/target/linux/brcm2708/patches-3.10/0052-Add-retry-on-error-and-tidy-of-temperature-driver.patch index 6789241fe63..18d61012f7c 100644 --- a/target/linux/brcm2708/patches-3.10/0052-Add-retry-on-error-and-tidy-of-temperature-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0052-Add-retry-on-error-and-tidy-of-temperature-driver.patch @@ -1,12 +1,14 @@ -From 2e7a6ee154b800b1e749e99d20a29673eea70aa1 Mon Sep 17 00:00:00 2001 +From 1234701636ab3dca340a336aa9ddfadd64914e58 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sun, 24 Feb 2013 16:30:57 +0000 -Subject: [PATCH 052/174] Add retry on error and tidy of temperature driver +Subject: [PATCH 052/196] Add retry on error and tidy of temperature driver --- drivers/thermal/bcm2835-thermal.c | 78 ++++++++++++++------------------------- 1 file changed, 27 insertions(+), 51 deletions(-) +diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c +index 3f9a733..85fceb5 100644 --- a/drivers/thermal/bcm2835-thermal.c +++ b/drivers/thermal/bcm2835-thermal.c @@ -33,7 +33,6 @@ @@ -30,7 +32,7 @@ Subject: [PATCH 052/174] Add retry on error and tidy of temperature driver /* --- GLOBALS --- */ static struct bcm2835_thermal_data bcm2835_data; -@@ -79,64 +72,47 @@ static struct bcm2835_thermal_data bcm28 +@@ -79,64 +72,47 @@ static struct bcm2835_thermal_data bcm2835_data; static struct thermal_zone_device_ops ops; /* --- FUNCTIONS --- */ @@ -122,3 +124,6 @@ Subject: [PATCH 052/174] Add retry on error and tidy of temperature driver static int bcm2835_get_trip_type(struct thermal_zone_device * thermal_dev, int trip_num, enum thermal_trip_type *trip_type) { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0053-dwc_otg-fix-potential-use-after-free-case-in-interru.patch b/target/linux/brcm2708/patches-3.10/0053-dwc_otg-fix-potential-use-after-free-case-in-interru.patch index fb4a53d22f0..e446e0c83c7 100644 --- a/target/linux/brcm2708/patches-3.10/0053-dwc_otg-fix-potential-use-after-free-case-in-interru.patch +++ b/target/linux/brcm2708/patches-3.10/0053-dwc_otg-fix-potential-use-after-free-case-in-interru.patch @@ -1,7 +1,7 @@ -From 51d7ae6f936ea32dedbe423fab97e3281994fe82 Mon Sep 17 00:00:00 2001 +From 898039471876ec67191d7afcabea38ac5e90285a Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 28 Feb 2013 16:52:51 +0000 -Subject: [PATCH 053/174] dwc_otg: fix potential use-after-free case in +Subject: [PATCH 053/196] dwc_otg: fix potential use-after-free case in interrupt handler If a transaction had previously aborted, certain interrupts are @@ -15,9 +15,11 @@ the QTD memory space with a 1-byte length being overwritten to drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index e8c91e7..0c81a64 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -2223,7 +2223,8 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc +@@ -2223,7 +2223,8 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) retval |= handle_hc_nak_intr(dwc_otg_hcd, hc, hc_regs, qtd); } if (hcint.b.ack) { @@ -27,3 +29,6 @@ the QTD memory space with a 1-byte length being overwritten to } if (hcint.b.nyet) { retval |= handle_hc_nyet_intr(dwc_otg_hcd, hc, hc_regs, qtd); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0054-dwc_otg-add-handling-of-SPLIT-transaction-data-toggl.patch b/target/linux/brcm2708/patches-3.10/0054-dwc_otg-add-handling-of-SPLIT-transaction-data-toggl.patch index b7854770a52..d00bbe1df7e 100644 --- a/target/linux/brcm2708/patches-3.10/0054-dwc_otg-add-handling-of-SPLIT-transaction-data-toggl.patch +++ b/target/linux/brcm2708/patches-3.10/0054-dwc_otg-add-handling-of-SPLIT-transaction-data-toggl.patch @@ -1,7 +1,7 @@ -From f90755cd13b722cd3ea79bee92c29d2828b3905f Mon Sep 17 00:00:00 2001 +From 70303c1e07d940f6f0b2b8b9359930be1c0f566e Mon Sep 17 00:00:00 2001 From: P33M Date: Sun, 3 Mar 2013 14:45:53 +0000 -Subject: [PATCH 054/174] dwc_otg: add handling of SPLIT transaction data +Subject: [PATCH 054/196] dwc_otg: add handling of SPLIT transaction data toggle errors Previously a data toggle error on packets from a USB1.1 device behind @@ -13,9 +13,11 @@ for devices that have a broken initial toggle state (FT8U232/FT232BM). drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 0c81a64..16e8c6c 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -1921,13 +1921,20 @@ static int32_t handle_hc_datatglerr_intr +@@ -1921,13 +1921,20 @@ static int32_t handle_hc_datatglerr_intr(dwc_otg_hcd_t * hcd, dwc_otg_qtd_t * qtd) { DWC_DEBUGPL(DBG_HCDI, "--Host Channel %d Interrupt: " @@ -41,7 +43,7 @@ for devices that have a broken initial toggle state (FT8U232/FT232BM). } disable_hc_int(hc_regs, datatglerr); -@@ -2080,6 +2087,8 @@ static void handle_hc_chhltd_intr_dma(dw +@@ -2080,6 +2087,8 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, handle_hc_babble_intr(hcd, hc, hc_regs, qtd); } else if (hcint.b.frmovrun) { handle_hc_frmovrun_intr(hcd, hc, hc_regs, qtd); @@ -50,3 +52,6 @@ for devices that have a broken initial toggle state (FT8U232/FT232BM). } else if (!out_nak_enh) { if (hcint.b.nyet) { /* +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0055-Add-bitbanging-pullups-use-them-for-w1-gpio.patch b/target/linux/brcm2708/patches-3.10/0055-Add-bitbanging-pullups-use-them-for-w1-gpio.patch index f71bc9ffe0f..cd5fbc755ce 100644 --- a/target/linux/brcm2708/patches-3.10/0055-Add-bitbanging-pullups-use-them-for-w1-gpio.patch +++ b/target/linux/brcm2708/patches-3.10/0055-Add-bitbanging-pullups-use-them-for-w1-gpio.patch @@ -1,7 +1,7 @@ -From 28ca85a46bbdae4152b48a669872ac205d053856 Mon Sep 17 00:00:00 2001 +From 0a2fa5a85c2ed9599acb2215f24e06db0379a133 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 1 May 2013 21:14:28 +0100 -Subject: [PATCH 055/174] Add bitbanging pullups, use them for w1-gpio +Subject: [PATCH 055/196] Add bitbanging pullups, use them for w1-gpio Allows parasite power to work, uses module option pullup=1 --- @@ -11,6 +11,8 @@ Allows parasite power to work, uses module option pullup=1 drivers/w1/w1_io.c | 18 +++++++++++++++--- 4 files changed, 50 insertions(+), 10 deletions(-) +diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c +index 46d9701..f615f80 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -23,6 +23,9 @@ @@ -40,7 +42,7 @@ Allows parasite power to work, uses module option pullup=1 #if defined(CONFIG_OF) static struct of_device_id w1_gpio_dt_ids[] = { { .compatible = "w1-gpio" }, -@@ -133,6 +146,13 @@ static int w1_gpio_probe(struct platform +@@ -133,6 +146,13 @@ static int w1_gpio_probe(struct platform_device *pdev) master->write_bit = w1_gpio_write_bit_dir; } @@ -54,6 +56,8 @@ Allows parasite power to work, uses module option pullup=1 err = w1_add_master_device(master); if (err) { dev_err(&pdev->dev, "w1_add_master device failed\n"); +diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h +index 45908e5..0ba75f6 100644 --- a/drivers/w1/w1.h +++ b/drivers/w1/w1.h @@ -148,6 +148,12 @@ struct w1_bus_master @@ -69,9 +73,11 @@ Allows parasite power to work, uses module option pullup=1 /** Really nice hardware can handles the different types of ROM search * w1_master* is passed to the slave found callback. */ +diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c +index 5a98649..a4d69b6 100644 --- a/drivers/w1/w1_int.c +++ b/drivers/w1/w1_int.c -@@ -117,19 +117,21 @@ int w1_add_master_device(struct w1_bus_m +@@ -117,19 +117,21 @@ int w1_add_master_device(struct w1_bus_master *master) printk(KERN_ERR "w1_add_master_device: invalid function set\n"); return(-EINVAL); } @@ -100,9 +106,11 @@ Allows parasite power to work, uses module option pullup=1 /* Lock until the device is added (or not) to w1_masters. */ mutex_lock(&w1_mlock); /* Search for the first available id (starting at 1). */ +diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c +index e10acc2..667fdd5 100644 --- a/drivers/w1/w1_io.c +++ b/drivers/w1/w1_io.c -@@ -127,10 +127,22 @@ static void w1_pre_write(struct w1_maste +@@ -127,10 +127,22 @@ static void w1_pre_write(struct w1_master *dev) static void w1_post_write(struct w1_master *dev) { if (dev->pullup_duration) { @@ -117,14 +125,17 @@ Allows parasite power to work, uses module option pullup=1 + } else if (dev->bus_master->bitbang_pullup) { + dev->bus_master-> + bitbang_pullup(dev->bus_master->data, 1); - msleep(dev->pullup_duration); ++ msleep(dev->pullup_duration); + dev->bus_master-> + bitbang_pullup(dev->bus_master->data, 0); + } + } else { -+ msleep(dev->pullup_duration); + msleep(dev->pullup_duration); + } + dev->pullup_duration = 0; } } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0056-spi-bcm2708-add-9-bit-support-using-LoSSI-mode.patch b/target/linux/brcm2708/patches-3.10/0056-spi-bcm2708-add-9-bit-support-using-LoSSI-mode.patch index d7ad5a293c6..36aaf2f89bc 100644 --- a/target/linux/brcm2708/patches-3.10/0056-spi-bcm2708-add-9-bit-support-using-LoSSI-mode.patch +++ b/target/linux/brcm2708/patches-3.10/0056-spi-bcm2708-add-9-bit-support-using-LoSSI-mode.patch @@ -1,15 +1,17 @@ -From 75c9b03f90ca974cb072d96f423884b773ca5425 Mon Sep 17 00:00:00 2001 +From 4b64ce34aaf88c2869c74efad7cbe5167920625b Mon Sep 17 00:00:00 2001 From: notro Date: Sat, 26 Jan 2013 20:38:03 +0100 -Subject: [PATCH 056/174] spi-bcm2708: add 9-bit support using LoSSI mode +Subject: [PATCH 056/196] spi-bcm2708: add 9-bit support using LoSSI mode --- drivers/spi/spi-bcm2708.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) +diff --git a/drivers/spi/spi-bcm2708.c b/drivers/spi/spi-bcm2708.c +index b74aa32..abaa5a6 100644 --- a/drivers/spi/spi-bcm2708.c +++ b/drivers/spi/spi-bcm2708.c -@@ -146,10 +146,31 @@ static inline void bcm2708_rd_fifo(struc +@@ -146,10 +146,31 @@ static inline void bcm2708_rd_fifo(struct bcm2708_spi *bs, int len) static inline void bcm2708_wr_fifo(struct bcm2708_spi *bs, int len) { u8 byte; @@ -41,7 +43,7 @@ Subject: [PATCH 056/174] spi-bcm2708: add 9-bit support using LoSSI mode while (len--) { byte = bs->tx_buf ? *bs->tx_buf++ : 0; bcm2708_wr(bs, SPI_FIFO, byte); -@@ -234,8 +255,12 @@ static int bcm2708_setup_state(struct sp +@@ -234,8 +255,12 @@ static int bcm2708_setup_state(struct spi_master *master, switch (bpw) { case 8: break; @@ -55,7 +57,7 @@ Subject: [PATCH 056/174] spi-bcm2708: add 9-bit support using LoSSI mode bpw); return -EINVAL; } -@@ -283,7 +308,8 @@ static int bcm2708_process_transfer(stru +@@ -283,7 +308,8 @@ static int bcm2708_process_transfer(struct bcm2708_spi *bs, ret = bcm2708_setup_state(spi->master, &spi->dev, &state, xfer->speed_hz ? xfer->speed_hz : spi->max_speed_hz, spi->chip_select, spi->mode, @@ -65,3 +67,6 @@ Subject: [PATCH 056/174] spi-bcm2708: add 9-bit support using LoSSI mode if (ret) return ret; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0057-dwc_otg-implement-tasklet-for-returning-URBs-to-usbc.patch b/target/linux/brcm2708/patches-3.10/0057-dwc_otg-implement-tasklet-for-returning-URBs-to-usbc.patch index 758755df9fd..b39634cf0fe 100644 --- a/target/linux/brcm2708/patches-3.10/0057-dwc_otg-implement-tasklet-for-returning-URBs-to-usbc.patch +++ b/target/linux/brcm2708/patches-3.10/0057-dwc_otg-implement-tasklet-for-returning-URBs-to-usbc.patch @@ -1,7 +1,7 @@ -From 71109f7d314b6205259d5cecf8314708f84fb9e6 Mon Sep 17 00:00:00 2001 +From f5908d1de6a9231622ebe7ae174749305a69878f Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 21 Mar 2013 19:36:17 +0000 -Subject: [PATCH 057/174] dwc_otg: implement tasklet for returning URBs to +Subject: [PATCH 057/196] dwc_otg: implement tasklet for returning URBs to usbcore hcd layer The dwc_otg driver interrupt handler for transfer completion will spend @@ -25,9 +25,11 @@ devices are active at once. drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 25 ++++++++++------ 6 files changed, 73 insertions(+), 17 deletions(-) +diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c +index f00a9ff..6814e51 100644 --- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c -@@ -991,6 +991,11 @@ void DWC_TASK_SCHEDULE(dwc_tasklet_t *ta +@@ -991,6 +991,11 @@ void DWC_TASK_SCHEDULE(dwc_tasklet_t *task) tasklet_schedule(&task->t); } @@ -39,6 +41,8 @@ devices are active at once. /* workqueues - run in process context (can sleep) +diff --git a/drivers/usb/host/dwc_common_port/dwc_list.h b/drivers/usb/host/dwc_common_port/dwc_list.h +index 89cc325..4ce560d 100644 --- a/drivers/usb/host/dwc_common_port/dwc_list.h +++ b/drivers/usb/host/dwc_common_port/dwc_list.h @@ -384,17 +384,17 @@ struct { \ @@ -66,9 +70,11 @@ devices are active at once. /* * Tail queue functions. +diff --git a/drivers/usb/host/dwc_common_port/dwc_os.h b/drivers/usb/host/dwc_common_port/dwc_os.h +index 308ddd5..8eb24ea 100644 --- a/drivers/usb/host/dwc_common_port/dwc_os.h +++ b/drivers/usb/host/dwc_common_port/dwc_os.h -@@ -981,6 +981,8 @@ extern void DWC_TASK_FREE(dwc_tasklet_t +@@ -981,6 +981,8 @@ extern void DWC_TASK_FREE(dwc_tasklet_t *task); extern void DWC_TASK_SCHEDULE(dwc_tasklet_t *task); #define dwc_task_schedule DWC_TASK_SCHEDULE @@ -77,6 +83,8 @@ devices are active at once. /** @name Timer * +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index fcec97f..91eefec 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -40,6 +40,9 @@ @@ -89,7 +97,7 @@ devices are active at once. #include "dwc_otg_hcd.h" #include "dwc_otg_regs.h" -@@ -694,6 +697,31 @@ static void reset_tasklet_func(void *dat +@@ -694,6 +697,31 @@ static void reset_tasklet_func(void *data) dwc_otg_hcd->flags.b.port_reset_change = 1; } @@ -121,7 +129,7 @@ devices are active at once. static void qh_list_free(dwc_otg_hcd_t * hcd, dwc_list_link_t * qh_list) { dwc_list_link_t *item; -@@ -833,6 +861,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd +@@ -833,6 +861,7 @@ static void dwc_otg_hcd_free(dwc_otg_hcd_t * dwc_otg_hcd) DWC_TIMER_FREE(dwc_otg_hcd->conn_timer); DWC_TASK_FREE(dwc_otg_hcd->reset_tasklet); @@ -129,7 +137,7 @@ devices are active at once. #ifdef DWC_DEV_SRPCAP if (dwc_otg_hcd->core_if->power_down == 2 && -@@ -877,7 +906,7 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd +@@ -877,7 +906,7 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) DWC_LIST_INIT(&hcd->periodic_sched_ready); DWC_LIST_INIT(&hcd->periodic_sched_assigned); DWC_LIST_INIT(&hcd->periodic_sched_queued); @@ -138,7 +146,7 @@ devices are active at once. /* * Create a host channel descriptor for each host channel implemented * in the controller. Initialize the channel descriptor array. -@@ -915,6 +944,9 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd +@@ -915,6 +944,9 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) /* Initialize reset tasklet. */ hcd->reset_tasklet = DWC_TASK_ALLOC("reset_tasklet", reset_tasklet_func, hcd); @@ -148,6 +156,8 @@ devices are active at once. #ifdef DWC_DEV_SRPCAP if (hcd->core_if->power_down == 2) { /* Initialize Power on timer for Host power up in case hibernation */ +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +index 45e44ea..0493dbf 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -374,6 +374,13 @@ typedef struct dwc_otg_qh { @@ -174,9 +184,11 @@ devices are active at once. /* */ dwc_spinlock_t *lock; dwc_spinlock_t *channel_lock; +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 9702f81..7bb133a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -271,7 +271,7 @@ static int _complete(dwc_otg_hcd_t * hcd +@@ -271,7 +271,7 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, dwc_otg_hcd_urb_t * dwc_otg_urb, int32_t status) { struct urb *urb = (struct urb *)urb_handle; @@ -185,7 +197,7 @@ devices are active at once. if (CHK_DEBUG_LEVEL(DBG_HCDV | DBG_HCD_URB)) { DWC_PRINTF("%s: urb %p, device %d, ep %d %s, status=%d\n", __func__, urb, usb_pipedevice(urb->pipe), -@@ -285,7 +285,7 @@ static int _complete(dwc_otg_hcd_t * hcd +@@ -285,7 +285,7 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, } } } @@ -194,7 +206,7 @@ devices are active at once. urb->actual_length = dwc_otg_hcd_urb_get_actual_length(dwc_otg_urb); /* Convert status value. */ switch (status) { -@@ -348,18 +348,25 @@ static int _complete(dwc_otg_hcd_t * hcd +@@ -348,18 +348,25 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, } DWC_FREE(dwc_otg_urb); @@ -227,3 +239,6 @@ devices are active at once. return 0; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0058-Added-Device-IDs-for-August-DVB-T-205.patch b/target/linux/brcm2708/patches-3.10/0058-Added-Device-IDs-for-August-DVB-T-205.patch index 69f39f1f2f1..a04a84fe6e9 100644 --- a/target/linux/brcm2708/patches-3.10/0058-Added-Device-IDs-for-August-DVB-T-205.patch +++ b/target/linux/brcm2708/patches-3.10/0058-Added-Device-IDs-for-August-DVB-T-205.patch @@ -1,15 +1,17 @@ -From 4013559fb9dca2beff1fa59a87ac1d1578408ad0 Mon Sep 17 00:00:00 2001 +From a7f5e84afb763c30050797fb4cd01d536dbb7c11 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 00:54:08 +0100 -Subject: [PATCH 058/174] Added Device IDs for August DVB-T 205 +Subject: [PATCH 058/196] Added Device IDs for August DVB-T 205 --- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 4 ++++ 1 file changed, 4 insertions(+) +diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +index 2cc8ec7..25e8553 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c -@@ -1408,6 +1408,10 @@ static const struct usb_device_id rtl28x +@@ -1408,6 +1408,10 @@ static const struct usb_device_id rtl28xxu_id_table[] = { &rtl2832u_props, "Compro VideoMate U620F", NULL) }, { DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd394, &rtl2832u_props, "MaxMedia HU394-T", NULL) }, @@ -20,3 +22,6 @@ Subject: [PATCH 058/174] Added Device IDs for August DVB-T 205 { } }; MODULE_DEVICE_TABLE(usb, rtl28xxu_id_table); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0059-Add-v6wbi_flush_kern_tlb_range-to-allow-zsmalloc-to-.patch b/target/linux/brcm2708/patches-3.10/0059-Add-v6wbi_flush_kern_tlb_range-to-allow-zsmalloc-to-.patch index a987dd3e05c..01e338cf11d 100644 --- a/target/linux/brcm2708/patches-3.10/0059-Add-v6wbi_flush_kern_tlb_range-to-allow-zsmalloc-to-.patch +++ b/target/linux/brcm2708/patches-3.10/0059-Add-v6wbi_flush_kern_tlb_range-to-allow-zsmalloc-to-.patch @@ -1,13 +1,15 @@ -From f7d501dfb97c2af4dd1f60f85e94bf110f69834c Mon Sep 17 00:00:00 2001 +From b9155aba8ba7b46ee8cc96c6479adf01b1e0e849 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 16 Apr 2013 15:36:01 +0100 -Subject: [PATCH 059/174] Add v6wbi_flush_kern_tlb_range to allow zsmalloc to +Subject: [PATCH 059/196] Add v6wbi_flush_kern_tlb_range to allow zsmalloc to be built as a module --- arch/arm/kernel/armksyms.c | 4 ++++ 1 file changed, 4 insertions(+) +diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c +index 60d3b73..cba4d28 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c @@ -156,3 +156,7 @@ EXPORT_SYMBOL(__gnu_mcount_nc); @@ -18,3 +20,6 @@ Subject: [PATCH 059/174] Add v6wbi_flush_kern_tlb_range to allow zsmalloc to +extern void v6wbi_flush_kern_tlb_range(void); +EXPORT_SYMBOL(v6wbi_flush_kern_tlb_range); + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0060-dwc_otg-fix-NAK-holdoff-and-allow-on-split-transacti.patch b/target/linux/brcm2708/patches-3.10/0060-dwc_otg-fix-NAK-holdoff-and-allow-on-split-transacti.patch index ae5bfe9b269..94bec178612 100644 --- a/target/linux/brcm2708/patches-3.10/0060-dwc_otg-fix-NAK-holdoff-and-allow-on-split-transacti.patch +++ b/target/linux/brcm2708/patches-3.10/0060-dwc_otg-fix-NAK-holdoff-and-allow-on-split-transacti.patch @@ -1,7 +1,7 @@ -From 370cbdb4a5ec521d9312b02bbaf269ed520b1451 Mon Sep 17 00:00:00 2001 +From 3cb2c23c6dba5ae74976e85329b880876fadd787 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Apr 2013 00:08:36 +0100 -Subject: [PATCH 060/174] dwc_otg: fix NAK holdoff and allow on split +Subject: [PATCH 060/196] dwc_otg: fix NAK holdoff and allow on split transactions only This corrects a bug where if a single active non-periodic endpoint @@ -18,6 +18,8 @@ only split transactions get held off. drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 91eefec..eaa8f38 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -46,7 +46,7 @@ @@ -29,7 +31,7 @@ only split transactions get held off. //#define DEBUG_HOST_CHANNELS #ifdef DEBUG_HOST_CHANNELS -@@ -1349,18 +1349,26 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1349,18 +1349,26 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) /* * Check to see if this is a NAK'd retransmit, in which case ignore for retransmission @@ -65,3 +67,6 @@ only split transactions get held off. if (microframe_schedule) { DWC_SPINLOCK_IRQSAVE(channel_lock, &flags); if (hcd->available_host_channels < 1) { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch b/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch index 9d8786a6eed..84b2af30418 100644 --- a/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch +++ b/target/linux/brcm2708/patches-3.10/0061-Merge-pull-request-286-from-martinezjavier-rpi-3.6.y.patch @@ -1,7 +1,7 @@ -From 5d42dfcf42ba987a03d8b5f2dfa30e9cb2dc4721 Mon Sep 17 00:00:00 2001 +From 46b48162ae7d5323a73eea61c29f3f1e18e12b0c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 26 Apr 2013 10:08:31 -0700 -Subject: [PATCH 061/174] Merge pull request #286 from +Subject: [PATCH 061/196] Merge pull request #286 from martinezjavier/rpi-3.6.y-dev add mmap support and some cleanups to bcm2835 ALSA driver @@ -12,6 +12,8 @@ add mmap support and some cleanups to bcm2835 ALSA driver sound/arm/bcm2835.h | 2 ++ 4 files changed, 124 insertions(+), 70 deletions(-) +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index 4206b7e..21e435b 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c @@ -19,7 +19,8 @@ @@ -24,7 +26,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, .rate_min = 8000, -@@ -251,6 +252,12 @@ static int snd_bcm2835_pcm_prepare(struc +@@ -251,6 +252,12 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) audio_info(" .. IN\n"); @@ -37,7 +39,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver alsa_stream->buffer_size = snd_pcm_lib_buffer_bytes(substream); alsa_stream->period_size = snd_pcm_lib_period_bytes(substream); alsa_stream->pos = 0; -@@ -263,6 +270,32 @@ static int snd_bcm2835_pcm_prepare(struc +@@ -263,6 +270,32 @@ static int snd_bcm2835_pcm_prepare(struct snd_pcm_substream *substream) return 0; } @@ -70,7 +72,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* trigger callback */ static int snd_bcm2835_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { -@@ -279,6 +312,11 @@ static int snd_bcm2835_pcm_trigger(struc +@@ -279,6 +312,11 @@ static int snd_bcm2835_pcm_trigger(struct snd_pcm_substream *substream, int cmd) if (!alsa_stream->running) { err = bcm2835_audio_start(alsa_stream); if (err == 0) { @@ -82,7 +84,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver alsa_stream->running = 1; alsa_stream->draining = 1; } else { -@@ -327,30 +365,9 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_s +@@ -327,30 +365,9 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_substream *substream) alsa_stream->pos); audio_info(" .. OUT\n"); @@ -116,7 +118,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver } static int snd_bcm2835_pcm_lib_ioctl(struct snd_pcm_substream *substream, -@@ -372,7 +389,7 @@ static struct snd_pcm_ops snd_bcm2835_pl +@@ -372,7 +389,7 @@ static struct snd_pcm_ops snd_bcm2835_playback_ops = { .prepare = snd_bcm2835_pcm_prepare, .trigger = snd_bcm2835_pcm_trigger, .pointer = snd_bcm2835_pcm_pointer, @@ -125,6 +127,8 @@ add mmap support and some cleanups to bcm2835 ALSA driver }; /* create a pcm device */ +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 9ecb2d6..169d899 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c @@ -27,6 +27,7 @@ @@ -197,7 +201,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver break; } kfree((void *)work); -@@ -107,7 +120,7 @@ int bcm2835_audio_start(bcm2835_alsa_str +@@ -107,7 +120,7 @@ int bcm2835_audio_start(bcm2835_alsa_stream_t * alsa_stream) if (work) { INIT_WORK((struct work_struct *)work, my_wq_function); work->alsa_stream = alsa_stream; @@ -206,7 +210,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver if (queue_work (alsa_stream->my_wq, (struct work_struct *)work)) ret = 0; -@@ -128,7 +141,31 @@ int bcm2835_audio_stop(bcm2835_alsa_stre +@@ -128,7 +141,31 @@ int bcm2835_audio_stop(bcm2835_alsa_stream_t * alsa_stream) if (work) { INIT_WORK((struct work_struct *)work, my_wq_function); work->alsa_stream = alsa_stream; @@ -239,7 +243,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver if (queue_work (alsa_stream->my_wq, (struct work_struct *)work)) ret = 0; -@@ -178,7 +215,7 @@ static void audio_vchi_callback(void *pa +@@ -178,7 +215,7 @@ static void audio_vchi_callback(void *param, (" .. instance=%p, m.type=VC_AUDIO_MSG_TYPE_RESULT, success=%d\n", instance, m.u.result.success); instance->result = m.u.result.success; @@ -248,7 +252,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { irq_handler_t callback = (irq_handler_t) m.u.complete.callback; LOG_DBG -@@ -435,8 +472,8 @@ static int bcm2835_audio_set_ctls_chan(b +@@ -435,8 +472,8 @@ static int bcm2835_audio_set_ctls_chan(bcm2835_alsa_stream_t * alsa_stream, m.u.control.dest = chip->dest; m.u.control.volume = chip->volume; @@ -259,7 +263,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* Send the message to the videocore */ success = vchi_msg_queue(instance->vchi_handle[0], -@@ -452,11 +489,10 @@ static int bcm2835_audio_set_ctls_chan(b +@@ -452,11 +489,10 @@ static int bcm2835_audio_set_ctls_chan(bcm2835_alsa_stream_t * alsa_stream, } /* We are expecting a reply from the videocore */ @@ -273,7 +277,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver goto unlock; } -@@ -539,8 +575,8 @@ int bcm2835_audio_set_params(bcm2835_als +@@ -539,8 +575,8 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, m.u.config.samplerate = samplerate; m.u.config.bps = bps; @@ -284,7 +288,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* Send the message to the videocore */ success = vchi_msg_queue(instance->vchi_handle[0], -@@ -556,11 +592,10 @@ int bcm2835_audio_set_params(bcm2835_als +@@ -556,11 +592,10 @@ int bcm2835_audio_set_params(bcm2835_alsa_stream_t * alsa_stream, } /* We are expecting a reply from the videocore */ @@ -298,7 +302,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver goto unlock; } -@@ -688,8 +723,8 @@ int bcm2835_audio_close(bcm2835_alsa_str +@@ -688,8 +723,8 @@ int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream) m.type = VC_AUDIO_MSG_TYPE_CLOSE; @@ -309,7 +313,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver /* Send the message to the videocore */ success = vchi_msg_queue(instance->vchi_handle[0], -@@ -702,11 +737,11 @@ int bcm2835_audio_close(bcm2835_alsa_str +@@ -702,11 +737,11 @@ int bcm2835_audio_close(bcm2835_alsa_stream_t * alsa_stream) ret = -1; goto unlock; } @@ -335,9 +339,11 @@ add mmap support and some cleanups to bcm2835 ALSA driver { VC_AUDIO_MSG_T m; AUDIO_INSTANCE_T *instance = alsa_stream->instance; +diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c +index e5ac894..d5ad830 100755 --- a/sound/arm/bcm2835.c +++ b/sound/arm/bcm2835.c -@@ -110,20 +110,20 @@ static int snd_bcm2835_alsa_probe(struct +@@ -110,20 +110,20 @@ static int snd_bcm2835_alsa_probe(struct platform_device *pdev) err = snd_bcm2835_create(g_card, pdev, &chip); if (err < 0) { @@ -394,7 +400,7 @@ add mmap support and some cleanups to bcm2835 ALSA driver return err; } -@@ -326,49 +326,49 @@ static int bcm2835_alsa_device_init(void +@@ -326,49 +326,49 @@ static int bcm2835_alsa_device_init(void) int err; err = platform_driver_register(&bcm2835_alsa0_driver); if (err) { @@ -452,6 +458,8 @@ add mmap support and some cleanups to bcm2835 ALSA driver goto unregister_6; } +diff --git a/sound/arm/bcm2835.h b/sound/arm/bcm2835.h +index b966e28..08c763d 100755 --- a/sound/arm/bcm2835.h +++ b/sound/arm/bcm2835.h @@ -23,6 +23,7 @@ @@ -470,3 +478,6 @@ add mmap support and some cleanups to bcm2835 ALSA driver struct semaphore buffers_update_sem; struct semaphore control_sem; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0062-Add-quick-config.patch b/target/linux/brcm2708/patches-3.10/0062-Add-quick-config.patch index fcc4272b43d..0c0721aaa4a 100644 --- a/target/linux/brcm2708/patches-3.10/0062-Add-quick-config.patch +++ b/target/linux/brcm2708/patches-3.10/0062-Add-quick-config.patch @@ -1,7 +1,7 @@ -From 353d37b0b26870a4bfd3e0cac6e535895ba4a01e Mon Sep 17 00:00:00 2001 +From b339e078538e1470dc5d88a34f927ec1dd44151f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 7 May 2013 22:20:24 +0100 -Subject: [PATCH 062/174] Add quick config. +Subject: [PATCH 062/196] Add quick config. This is designed for quick compiling when developing. No modules are needed and it includes all Pi specific drivers @@ -10,6 +10,9 @@ No modules are needed and it includes all Pi specific drivers 1 file changed, 197 insertions(+) create mode 100644 arch/arm/configs/bcmrpi_quick_defconfig +diff --git a/arch/arm/configs/bcmrpi_quick_defconfig b/arch/arm/configs/bcmrpi_quick_defconfig +new file mode 100644 +index 0000000..e5efe75 --- /dev/null +++ b/arch/arm/configs/bcmrpi_quick_defconfig @@ -0,0 +1,197 @@ @@ -210,3 +213,6 @@ No modules are needed and it includes all Pi specific drivers +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0063-mmc-suppress-sdcard-warnings-we-are-happy-about-by-d.patch b/target/linux/brcm2708/patches-3.10/0063-mmc-suppress-sdcard-warnings-we-are-happy-about-by-d.patch index 89cb7256cfb..0ae762acbe5 100644 --- a/target/linux/brcm2708/patches-3.10/0063-mmc-suppress-sdcard-warnings-we-are-happy-about-by-d.patch +++ b/target/linux/brcm2708/patches-3.10/0063-mmc-suppress-sdcard-warnings-we-are-happy-about-by-d.patch @@ -1,13 +1,15 @@ -From dfe5d158300e7500873f1f81d89a05842460befc Mon Sep 17 00:00:00 2001 +From c20b5189fa65427d6a9f2e70f7f8f2c485d21296 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 10 May 2013 19:42:38 +0100 -Subject: [PATCH 063/174] mmc: suppress sdcard warnings we are happy about by +Subject: [PATCH 063/196] mmc: suppress sdcard warnings we are happy about by default --- drivers/mmc/host/sdhci-bcm2708.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 3556ed3..c2409b9 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c @@ -139,6 +139,7 @@ static bool sync_after_dma = 1; @@ -18,7 +20,7 @@ Subject: [PATCH 063/174] mmc: suppress sdcard warnings we are happy about by #if 0 static void hptime_test(void) -@@ -672,13 +673,16 @@ sdhci_bcm2708_platdma_reset(struct sdhci +@@ -672,13 +673,16 @@ sdhci_bcm2708_platdma_reset(struct sdhci_host *host, struct mmc_data *data) cs = readl(host_priv->dma_chan_base + BCM2708_DMA_CS); if (!(BCM2708_DMA_ACTIVE & cs)) @@ -36,7 +38,7 @@ Subject: [PATCH 063/174] mmc: suppress sdcard warnings we are happy about by else printk(KERN_INFO "%s: resetting ongoing cmd %d" "DMA before %d/%d [%d]/[%d] complete\n", -@@ -903,7 +907,8 @@ static irqreturn_t sdhci_bcm2708_dma_irq +@@ -903,7 +907,8 @@ static irqreturn_t sdhci_bcm2708_dma_irq(int irq, void *dev_id) if (!host_priv->dma_wanted) { /* ignore this interrupt - it was reset */ @@ -46,7 +48,7 @@ Subject: [PATCH 063/174] mmc: suppress sdcard warnings we are happy about by "results were reset\n", mmc_hostname(host->mmc), dma_cs); #ifdef CHECK_DMA_USE -@@ -1397,6 +1402,7 @@ module_param(missing_status, bool, 0444) +@@ -1397,6 +1402,7 @@ module_param(missing_status, bool, 0444); module_param(spurious_crc_acmd51, bool, 0444); module_param(enable_llm, bool, 0444); module_param(cycle_delay, int, 0444); @@ -54,10 +56,13 @@ Subject: [PATCH 063/174] mmc: suppress sdcard warnings we are happy about by MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); MODULE_AUTHOR("Broadcom "); -@@ -1409,5 +1415,6 @@ MODULE_PARM_DESC(sync_after_dma, "Block +@@ -1409,5 +1415,6 @@ MODULE_PARM_DESC(sync_after_dma, "Block in driver until dma complete"); MODULE_PARM_DESC(missing_status, "Use the missing status quirk"); MODULE_PARM_DESC(spurious_crc_acmd51, "Use the spurious crc quirk for reading SCR (ACMD51)"); MODULE_PARM_DESC(enable_llm, "Enable low-latency mode"); +MODULE_PARM_DESC(extra_messages, "Enable more sdcard warning messages"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0064-Add-missing-ids-for-Netgear-WNA1000N-and-D-Link-Alph.patch b/target/linux/brcm2708/patches-3.10/0064-Add-missing-ids-for-Netgear-WNA1000N-and-D-Link-Alph.patch index a1391566fb9..513fd1e97d3 100644 --- a/target/linux/brcm2708/patches-3.10/0064-Add-missing-ids-for-Netgear-WNA1000N-and-D-Link-Alph.patch +++ b/target/linux/brcm2708/patches-3.10/0064-Add-missing-ids-for-Netgear-WNA1000N-and-D-Link-Alph.patch @@ -1,15 +1,17 @@ -From b74d345f074c12d21e8dda2807750e8559588822 Mon Sep 17 00:00:00 2001 +From c8b4c6968c3a8c1b195de2dc522268e0ce81b6c7 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 17 May 2013 15:19:49 +0100 -Subject: [PATCH 064/174] Add missing ids for Netgear WNA1000N and D-Link Alpha +Subject: [PATCH 064/196] Add missing ids for Netgear WNA1000N and D-Link Alpha --- drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c | 1 + 1 file changed, 1 insertion(+) +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +index 9d303f4..2e54e74 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c -@@ -114,6 +114,7 @@ static struct usb_device_id rtw_usb_id_t +@@ -114,6 +114,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={ {USB_DEVICE(0x4856, 0x0091)},//NetweeN - Feixun {USB_DEVICE(0x2019, 0x4902)},//Planex - Etop {USB_DEVICE(0x2019, 0xAB2E)},//SW-WF02-AD15 -Abocom @@ -17,3 +19,6 @@ Subject: [PATCH 064/174] Add missing ids for Netgear WNA1000N and D-Link Alpha /****** 8188 RU ********/ {USB_DEVICE(0x0BDA, 0x317F)},//Netcore,Netcore +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0065-rtl8192cu-select-required-config-options-to-allow-bu.patch b/target/linux/brcm2708/patches-3.10/0065-rtl8192cu-select-required-config-options-to-allow-bu.patch index 7842882961c..5e6aa8fe277 100644 --- a/target/linux/brcm2708/patches-3.10/0065-rtl8192cu-select-required-config-options-to-allow-bu.patch +++ b/target/linux/brcm2708/patches-3.10/0065-rtl8192cu-select-required-config-options-to-allow-bu.patch @@ -1,13 +1,15 @@ -From 2d491bef93b86787eb5b5e83c46d1f4d87edf84f Mon Sep 17 00:00:00 2001 +From 0ff0d5f9c59d1d9cde9bcc56f6bfa163fd1b15a3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 31 May 2013 14:50:09 +0100 -Subject: [PATCH 065/174] rtl8192cu: select required config options to allow +Subject: [PATCH 065/196] rtl8192cu: select required config options to allow builds without other wifi modules. Thanks UrsusArctos --- drivers/net/wireless/rtl8192cu/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) +diff --git a/drivers/net/wireless/rtl8192cu/Kconfig b/drivers/net/wireless/rtl8192cu/Kconfig +index bee5ed6..ef46361 100644 --- a/drivers/net/wireless/rtl8192cu/Kconfig +++ b/drivers/net/wireless/rtl8192cu/Kconfig @@ -1,6 +1,8 @@ @@ -20,3 +22,6 @@ Subject: [PATCH 065/174] rtl8192cu: select required config options to allow - Help message of RTL8192CU + Enable wireless network adapters based on Realtek RTL8192C chipset family, such as EDUP nano series +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch b/target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch index 10eaf2e27e1..4482fc48349 100644 --- a/target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch +++ b/target/linux/brcm2708/patches-3.10/0066-Only-init-gpio-pins-of-selected-i2c-bus.patch @@ -1,12 +1,14 @@ -From 7776b6ebf1063d2f9fac33313c8d049b424fce46 Mon Sep 17 00:00:00 2001 +From f038d0681b072b929bb026bbb539cc8575d30c4f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 8 Jun 2013 22:14:13 +0100 -Subject: [PATCH 066/174] Only init gpio pins of selected i2c bus +Subject: [PATCH 066/196] Only init gpio pins of selected i2c bus --- drivers/i2c/busses/i2c-bcm2708.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +index 3391889..edc90c0 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c @@ -97,7 +97,7 @@ struct bcm2708_i2c { @@ -18,7 +20,7 @@ Subject: [PATCH 066/174] Only init gpio pins of selected i2c bus { #define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3)) #define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3)) -@@ -105,8 +105,10 @@ static void bcm2708_i2c_init_pinmode(voi +@@ -105,8 +105,10 @@ static void bcm2708_i2c_init_pinmode(void) int pin; u32 *gpio = ioremap(0x20200000, SZ_16K); @@ -30,7 +32,7 @@ Subject: [PATCH 066/174] Only init gpio pins of selected i2c bus INP_GPIO(pin); /* set mode to GPIO input first */ SET_GPIO_ALT(pin, 0); /* set mode to ALT 0 */ } -@@ -279,7 +281,7 @@ static int bcm2708_i2c_probe(struct plat +@@ -279,7 +281,7 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) return PTR_ERR(clk); } @@ -39,3 +41,6 @@ Subject: [PATCH 066/174] Only init gpio pins of selected i2c bus bi = kzalloc(sizeof(*bi), GFP_KERNEL); if (!bi) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0067-Avoid-responding-to-unexpected-I2C-interrupts.patch b/target/linux/brcm2708/patches-3.10/0067-Avoid-responding-to-unexpected-I2C-interrupts.patch index 4d620462300..2f3e77743fb 100644 --- a/target/linux/brcm2708/patches-3.10/0067-Avoid-responding-to-unexpected-I2C-interrupts.patch +++ b/target/linux/brcm2708/patches-3.10/0067-Avoid-responding-to-unexpected-I2C-interrupts.patch @@ -1,15 +1,17 @@ -From 03f44ba654e40b60ffcec14030abf35152d0b639 Mon Sep 17 00:00:00 2001 +From ed5a728f2593fbd3950c5c17ab7143bafc295e57 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 13 Jun 2013 16:46:54 +0100 -Subject: [PATCH 067/174] Avoid responding to unexpected I2C interrupts +Subject: [PATCH 067/196] Avoid responding to unexpected I2C interrupts --- drivers/i2c/busses/i2c-bcm2708.c | 6 ++++++ 1 file changed, 6 insertions(+) +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +index edc90c0..33f4e7d 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c -@@ -175,6 +175,11 @@ static irqreturn_t bcm2708_i2c_interrupt +@@ -175,6 +175,11 @@ static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id) spin_lock(&bi->lock); @@ -21,7 +23,7 @@ Subject: [PATCH 067/174] Avoid responding to unexpected I2C interrupts s = bcm2708_rd(bi, BSC_S); if (s & (BSC_S_CLKT | BSC_S_ERR)) { -@@ -208,6 +213,7 @@ static irqreturn_t bcm2708_i2c_interrupt +@@ -208,6 +213,7 @@ static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id) handled = false; } @@ -29,3 +31,6 @@ Subject: [PATCH 067/174] Avoid responding to unexpected I2C interrupts spin_unlock(&bi->lock); return handled ? IRQ_HANDLED : IRQ_NONE; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0068-Speed-up-console-framebuffer-imageblit-function.patch b/target/linux/brcm2708/patches-3.10/0068-Speed-up-console-framebuffer-imageblit-function.patch index 2c56a3dd4ca..1b1789d99a4 100644 --- a/target/linux/brcm2708/patches-3.10/0068-Speed-up-console-framebuffer-imageblit-function.patch +++ b/target/linux/brcm2708/patches-3.10/0068-Speed-up-console-framebuffer-imageblit-function.patch @@ -1,7 +1,7 @@ -From 42b4a831d77ee33f67142882b2b68e4138cbf13e Mon Sep 17 00:00:00 2001 +From aad790d20f7b2f9a90716b33181e8554de10b6a0 Mon Sep 17 00:00:00 2001 From: Harm Hanemaaijer Date: Thu, 20 Jun 2013 20:21:39 +0200 -Subject: [PATCH 068/174] Speed up console framebuffer imageblit function +Subject: [PATCH 068/196] Speed up console framebuffer imageblit function Especially on platforms with a slower CPU but a relatively high framebuffer fill bandwidth, like current ARM devices, the existing @@ -32,6 +32,8 @@ Signed-off-by: Harm Hanemaaijer drivers/video/cfbimgblt.c | 152 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 147 insertions(+), 5 deletions(-) +diff --git a/drivers/video/cfbimgblt.c b/drivers/video/cfbimgblt.c +index baed57d..ce91bf2 100644 --- a/drivers/video/cfbimgblt.c +++ b/drivers/video/cfbimgblt.c @@ -28,6 +28,11 @@ @@ -46,7 +48,7 @@ Signed-off-by: Harm Hanemaaijer */ #include #include -@@ -262,6 +267,133 @@ static inline void fast_imageblit(const +@@ -262,6 +267,133 @@ static inline void fast_imageblit(const struct fb_image *image, struct fb_info * } } @@ -180,7 +182,7 @@ Signed-off-by: Harm Hanemaaijer void cfb_imageblit(struct fb_info *p, const struct fb_image *image) { u32 fgcolor, bgcolor, start_index, bitstart, pitch_index = 0; -@@ -294,11 +426,21 @@ void cfb_imageblit(struct fb_info *p, co +@@ -294,11 +426,21 @@ void cfb_imageblit(struct fb_info *p, const struct fb_image *image) bgcolor = image->bg_color; } @@ -207,3 +209,6 @@ Signed-off-by: Harm Hanemaaijer slow_imageblit(image, p, dst1, fgcolor, bgcolor, start_index, pitch_index); } else +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0069-fbdev-add-FBIOCOPYAREA-ioctl.patch b/target/linux/brcm2708/patches-3.10/0069-fbdev-add-FBIOCOPYAREA-ioctl.patch index 3a86a511836..e6671b674c7 100644 --- a/target/linux/brcm2708/patches-3.10/0069-fbdev-add-FBIOCOPYAREA-ioctl.patch +++ b/target/linux/brcm2708/patches-3.10/0069-fbdev-add-FBIOCOPYAREA-ioctl.patch @@ -1,7 +1,7 @@ -From bae48dcebc8f847977f6077910afb93f754708d6 Mon Sep 17 00:00:00 2001 +From 422d5162d6b4e5cd8f7a9470b128577d1b826bdd Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 13:32:11 +0300 -Subject: [PATCH 069/174] fbdev: add FBIOCOPYAREA ioctl +Subject: [PATCH 069/196] fbdev: add FBIOCOPYAREA ioctl Based on the patch authored by Ali Gholami Rudi at https://lkml.org/lkml/2009/7/13/153 @@ -15,9 +15,11 @@ Signed-off-by: Siarhei Siamashka include/uapi/linux/fb.h | 5 +++++ 2 files changed, 35 insertions(+) +diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c +index 098bfc6..da8e53b 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c -@@ -1074,6 +1074,25 @@ fb_blank(struct fb_info *info, int blank +@@ -1074,6 +1074,25 @@ fb_blank(struct fb_info *info, int blank) return ret; } @@ -43,7 +45,7 @@ Signed-off-by: Siarhei Siamashka static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { -@@ -1084,6 +1103,7 @@ static long do_fb_ioctl(struct fb_info * +@@ -1084,6 +1103,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, struct fb_cmap cmap_from; struct fb_cmap_user cmap; struct fb_event event; @@ -51,7 +53,7 @@ Signed-off-by: Siarhei Siamashka void __user *argp = (void __user *)arg; long ret = 0; -@@ -1193,6 +1213,15 @@ static long do_fb_ioctl(struct fb_info * +@@ -1193,6 +1213,15 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd, console_unlock(); unlock_fb_info(info); break; @@ -67,7 +69,7 @@ Signed-off-by: Siarhei Siamashka default: if (!lock_fb_info(info)) return -ENODEV; -@@ -1345,6 +1374,7 @@ static long fb_compat_ioctl(struct file +@@ -1345,6 +1374,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd, case FBIOPAN_DISPLAY: case FBIOGET_CON2FBMAP: case FBIOPUT_CON2FBMAP: @@ -75,6 +77,8 @@ Signed-off-by: Siarhei Siamashka arg = (unsigned long) compat_ptr(arg); case FBIOBLANK: ret = do_fb_ioctl(info, cmd, arg); +diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h +index fb795c3..fa72af0 100644 --- a/include/uapi/linux/fb.h +++ b/include/uapi/linux/fb.h @@ -34,6 +34,11 @@ @@ -89,3 +93,6 @@ Signed-off-by: Siarhei Siamashka #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0070-bcm2708_fb-DMA-acceleration-for-fb_copyarea.patch b/target/linux/brcm2708/patches-3.10/0070-bcm2708_fb-DMA-acceleration-for-fb_copyarea.patch index f7a3051b2c6..4f6a857562b 100644 --- a/target/linux/brcm2708/patches-3.10/0070-bcm2708_fb-DMA-acceleration-for-fb_copyarea.patch +++ b/target/linux/brcm2708/patches-3.10/0070-bcm2708_fb-DMA-acceleration-for-fb_copyarea.patch @@ -1,7 +1,7 @@ -From ba65074e39e6aee492bd3c077f640b29a0a89c05 Mon Sep 17 00:00:00 2001 +From 370c8243ec8e7f3abd8171b7d2dde170f4c5e63a Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 17 Jun 2013 16:00:25 +0300 -Subject: [PATCH 070/174] bcm2708_fb: DMA acceleration for fb_copyarea +Subject: [PATCH 070/196] bcm2708_fb: DMA acceleration for fb_copyarea Based on http://www.raspberrypi.org/phpBB3/viewtopic.php?p=62425#p62425 Also used Simon's dmaer_master module as a reference for tweaking DMA @@ -23,6 +23,8 @@ Signed-off-by: Siarhei Siamashka drivers/video/bcm2708_fb.c | 162 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 159 insertions(+), 3 deletions(-) +diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c +index 08d9238..c10c5ee 100644 --- a/drivers/video/bcm2708_fb.c +++ b/drivers/video/bcm2708_fb.c @@ -28,6 +28,7 @@ @@ -45,7 +47,7 @@ Signed-off-by: Siarhei Siamashka }; #define to_bcm2708(info) container_of(info, struct bcm2708_fb, fb) -@@ -312,11 +318,133 @@ static void bcm2708_fb_fillrect(struct f +@@ -312,11 +318,133 @@ static void bcm2708_fb_fillrect(struct fb_info *info, cfb_fillrect(info, rect); } @@ -181,7 +183,7 @@ Signed-off-by: Siarhei Siamashka } static void bcm2708_fb_imageblit(struct fb_info *info, -@@ -359,7 +487,7 @@ static int bcm2708_fb_register(struct bc +@@ -359,7 +487,7 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb) fb->dma = dma; } fb->fb.fbops = &bcm2708_fb_ops; @@ -190,7 +192,7 @@ Signed-off-by: Siarhei Siamashka fb->fb.pseudo_palette = fb->cmap; strncpy(fb->fb.fix.id, bcm2708_name, sizeof(fb->fb.fix.id)); -@@ -424,6 +552,28 @@ static int bcm2708_fb_probe(struct platf +@@ -424,6 +552,28 @@ static int bcm2708_fb_probe(struct platform_device *dev) } memset(fb, 0, sizeof(struct bcm2708_fb)); @@ -219,7 +221,7 @@ Signed-off-by: Siarhei Siamashka fb->dev = dev; ret = bcm2708_fb_register(fb); -@@ -432,6 +582,9 @@ static int bcm2708_fb_probe(struct platf +@@ -432,6 +582,9 @@ static int bcm2708_fb_probe(struct platform_device *dev) goto out; } @@ -229,7 +231,7 @@ Signed-off-by: Siarhei Siamashka kfree(fb); free_region: dev_err(&dev->dev, "probe failed, err %d\n", ret); -@@ -449,6 +602,9 @@ static int bcm2708_fb_remove(struct plat +@@ -449,6 +602,9 @@ static int bcm2708_fb_remove(struct platform_device *dev) iounmap(fb->fb.screen_base); unregister_framebuffer(&fb->fb); @@ -239,3 +241,6 @@ Signed-off-by: Siarhei Siamashka dma_free_coherent(NULL, PAGE_ALIGN(sizeof(*fb->info)), (void *)fb->info, fb->dma); kfree(fb); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0071-dwc_otg-Call-usb_hcd_unlink_urb_from_ep-with-lock-he.patch b/target/linux/brcm2708/patches-3.10/0071-dwc_otg-Call-usb_hcd_unlink_urb_from_ep-with-lock-he.patch index e37bdd6e271..7cb2abab335 100644 --- a/target/linux/brcm2708/patches-3.10/0071-dwc_otg-Call-usb_hcd_unlink_urb_from_ep-with-lock-he.patch +++ b/target/linux/brcm2708/patches-3.10/0071-dwc_otg-Call-usb_hcd_unlink_urb_from_ep-with-lock-he.patch @@ -1,7 +1,7 @@ -From 9b8c30f46a381533c92a6424ff25f9014d8802b0 Mon Sep 17 00:00:00 2001 +From f017dca7748948138205b11490d0b345602ce4db Mon Sep 17 00:00:00 2001 From: Mike Bradley Date: Mon, 17 Jun 2013 11:31:42 -0700 -Subject: [PATCH 071/174] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock +Subject: [PATCH 071/196] dwc_otg: Call usb_hcd_unlink_urb_from_ep with lock held in completion handler usb_hcd_unlink_urb_from_ep must be called with the HCD lock held. Calling it @@ -22,9 +22,11 @@ eliminated. drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index eaa8f38..9c2e71a 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -704,6 +704,7 @@ static void completion_tasklet_func(void +@@ -704,6 +704,7 @@ static void completion_tasklet_func(void *ptr) urb_tq_entry_t *item; dwc_irqflags_t flags; @@ -32,7 +34,7 @@ eliminated. DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); while (!DWC_TAILQ_EMPTY(&hcd->completed_urb_list)) { item = DWC_TAILQ_FIRST(&hcd->completed_urb_list); -@@ -713,7 +714,6 @@ static void completion_tasklet_func(void +@@ -713,7 +714,6 @@ static void completion_tasklet_func(void *ptr) DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags); DWC_FREE(item); @@ -40,9 +42,11 @@ eliminated. usb_hcd_giveback_urb(hcd->priv, urb, urb->status); DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 7bb133a..fef557d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -265,13 +265,15 @@ static void free_bus_bandwidth(struct us +@@ -265,13 +265,15 @@ static void free_bus_bandwidth(struct usb_hcd *hcd, uint32_t bw, /** * Sets the final status of an URB and returns it to the device driver. Any @@ -59,7 +63,7 @@ eliminated. if (CHK_DEBUG_LEVEL(DBG_HCDV | DBG_HCD_URB)) { DWC_PRINTF("%s: urb %p, device %d, ep %d %s, status=%d\n", __func__, urb, usb_pipedevice(urb->pipe), -@@ -363,9 +365,17 @@ static int _complete(dwc_otg_hcd_t * hcd +@@ -363,9 +365,17 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, #endif } else { new_entry->urb = urb; @@ -80,3 +84,6 @@ eliminated. } return 0; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0072-USB-fix-using-a-FIQ-to-implement-split-transactions.patch b/target/linux/brcm2708/patches-3.10/0072-USB-fix-using-a-FIQ-to-implement-split-transactions.patch index aa379c8dce5..e986525a323 100644 --- a/target/linux/brcm2708/patches-3.10/0072-USB-fix-using-a-FIQ-to-implement-split-transactions.patch +++ b/target/linux/brcm2708/patches-3.10/0072-USB-fix-using-a-FIQ-to-implement-split-transactions.patch @@ -1,7 +1,7 @@ -From d0f04f1be88d3ad42f3c875f9ab45a1cdb2129bd Mon Sep 17 00:00:00 2001 +From 0b8275da8346466af37b50d5ba687a386df9b0f4 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Thu, 4 Apr 2013 11:05:21 +0100 -Subject: [PATCH 072/174] USB fix using a FIQ to implement split transactions +Subject: [PATCH 072/196] USB fix using a FIQ to implement split transactions This commit adds a FIQ implementaion that schedules the split transactions using a FIQ so we don't get @@ -19,9 +19,11 @@ held off by the interrupt latency of Linux drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c | 2 +- 10 files changed, 696 insertions(+), 114 deletions(-) +diff --git a/drivers/usb/host/dwc_common_port/dwc_common_linux.c b/drivers/usb/host/dwc_common_port/dwc_common_linux.c +index 6814e51..0812d3a 100644 --- a/drivers/usb/host/dwc_common_port/dwc_common_linux.c +++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c -@@ -580,7 +580,12 @@ void DWC_WRITE_REG64(uint64_t volatile * +@@ -580,7 +580,12 @@ void DWC_WRITE_REG64(uint64_t volatile *reg, uint64_t value) void DWC_MODIFY_REG32(uint32_t volatile *reg, uint32_t clear_mask, uint32_t set_mask) { @@ -43,6 +45,8 @@ held off by the interrupt latency of Linux EXPORT_SYMBOL(__DWC_DMA_ALLOC_ATOMIC); EXPORT_SYMBOL(__DWC_DMA_FREE); EXPORT_SYMBOL(__DWC_ALLOC); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +index b861b55..b5a007d 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -47,8 +47,6 @@ @@ -54,7 +58,7 @@ held off by the interrupt latency of Linux #ifdef DEBUG inline const char *op_state_str(dwc_otg_core_if_t * core_if) { -@@ -1321,7 +1319,7 @@ static int32_t dwc_otg_handle_lpm_intr(d +@@ -1321,7 +1319,7 @@ static int32_t dwc_otg_handle_lpm_intr(dwc_otg_core_if_t * core_if) /** * This function returns the Core Interrupt register. */ @@ -63,7 +67,7 @@ held off by the interrupt latency of Linux { gahbcfg_data_t gahbcfg = {.d32 = 0 }; gintsts_data_t gintsts; -@@ -1338,19 +1336,33 @@ static inline uint32_t dwc_otg_read_comm +@@ -1338,19 +1336,33 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if) gintmsk_common.b.lpmtranrcvd = 1; #endif gintmsk_common.b.restoredone = 1; @@ -103,7 +107,7 @@ held off by the interrupt latency of Linux gintsts.d32, gintmsk.d32); } #endif -@@ -1394,6 +1406,7 @@ int32_t dwc_otg_handle_common_intr(void +@@ -1394,6 +1406,7 @@ int32_t dwc_otg_handle_common_intr(void *dev) { int retval = 0; gintsts_data_t gintsts; @@ -111,7 +115,7 @@ held off by the interrupt latency of Linux gpwrdn_data_t gpwrdn = {.d32 = 0 }; dwc_otg_device_t *otg_dev = dev; dwc_otg_core_if_t *core_if = otg_dev->core_if; -@@ -1415,7 +1428,7 @@ int32_t dwc_otg_handle_common_intr(void +@@ -1415,7 +1428,7 @@ int32_t dwc_otg_handle_common_intr(void *dev) } if (core_if->hibernation_suspend <= 0) { @@ -120,7 +124,7 @@ held off by the interrupt latency of Linux if (gintsts.b.modemismatch) { retval |= dwc_otg_handle_mode_mismatch_intr(core_if); -@@ -1512,8 +1525,12 @@ int32_t dwc_otg_handle_common_intr(void +@@ -1512,8 +1525,12 @@ int32_t dwc_otg_handle_common_intr(void *dev) gintsts.b.portintr = 1; DWC_WRITE_REG32(&core_if->core_global_regs->gintsts,gintsts.d32); retval |= 1; @@ -133,9 +137,11 @@ held off by the interrupt latency of Linux } else { DWC_DEBUGPL(DBG_ANY, "gpwrdn=%08x\n", gpwrdn.d32); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c +index cea8fcb..6c89a69 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -242,7 +242,8 @@ static struct dwc_otg_driver_module_para +@@ -242,7 +242,8 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { //Global variable to switch the fiq fix on or off (declared in bcm2708.c) extern bool fiq_fix_enable; @@ -145,7 +151,7 @@ held off by the interrupt latency of Linux //Global variable to switch the nak holdoff on or off bool nak_holdoff_enable = true; -@@ -1090,6 +1091,7 @@ static int __init dwc_otg_driver_init(vo +@@ -1090,6 +1091,7 @@ static int __init dwc_otg_driver_init(void) } printk(KERN_DEBUG "dwc_otg: FIQ %s\n", fiq_fix_enable ? "enabled":"disabled"); printk(KERN_DEBUG "dwc_otg: NAK holdoff %s\n", nak_holdoff_enable ? "enabled":"disabled"); @@ -153,7 +159,7 @@ held off by the interrupt latency of Linux error = driver_create_file(drv, &driver_attr_version); #ifdef DEBUG -@@ -1374,6 +1376,8 @@ module_param(fiq_fix_enable, bool, 0444) +@@ -1374,6 +1376,8 @@ module_param(fiq_fix_enable, bool, 0444); MODULE_PARM_DESC(fiq_fix_enable, "Enable the fiq fix"); module_param(nak_holdoff_enable, bool, 0444); MODULE_PARM_DESC(nak_holdoff_enable, "Enable the NAK holdoff"); @@ -162,6 +168,8 @@ held off by the interrupt latency of Linux /** @page "Module Parameters" * +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 9c2e71a..af9108c 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -45,6 +45,7 @@ @@ -172,7 +180,7 @@ held off by the interrupt latency of Linux extern bool microframe_schedule, nak_holdoff_enable; -@@ -581,6 +582,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_ +@@ -581,6 +582,8 @@ int dwc_otg_hcd_urb_dequeue(dwc_otg_hcd_t * hcd, */ dwc_otg_hc_halt(hcd->core_if, qh->channel, DWC_OTG_HC_XFER_URB_DEQUEUE); @@ -181,7 +189,7 @@ held off by the interrupt latency of Linux } } -@@ -716,6 +719,8 @@ static void completion_tasklet_func(void +@@ -716,6 +719,8 @@ static void completion_tasklet_func(void *ptr) usb_hcd_giveback_urb(hcd->priv, urb, urb->status); @@ -190,7 +198,7 @@ held off by the interrupt latency of Linux DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags); } DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags); -@@ -979,6 +984,10 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd +@@ -979,6 +984,10 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) hcd->frame_list = NULL; hcd->frame_list_dma = 0; hcd->periodic_qh_count = 0; @@ -201,7 +209,7 @@ held off by the interrupt latency of Linux out: return retval; } -@@ -1124,7 +1133,12 @@ static void assign_and_init_hc(dwc_otg_h +@@ -1124,7 +1133,12 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) uint32_t hub_addr, port_addr; hc->do_split = 1; hc->xact_pos = qtd->isoc_split_pos; @@ -215,7 +223,7 @@ held off by the interrupt latency of Linux hcd->fops->hub_info(hcd, urb->priv, &hub_addr, &port_addr); hc->hub_addr = (uint8_t) hub_addr; hc->port_addr = (uint8_t) port_addr; -@@ -1271,6 +1285,62 @@ static void assign_and_init_hc(dwc_otg_h +@@ -1271,6 +1285,62 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) hc->qh = qh; } @@ -278,7 +286,7 @@ held off by the interrupt latency of Linux /** * This function selects transactions from the HCD transfer schedule and * assigns them to available host channels. It is called from HCD interrupt -@@ -1304,11 +1374,22 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1304,11 +1374,22 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) while (qh_ptr != &hcd->periodic_sched_ready && !DWC_CIRCLEQ_EMPTY(&hcd->free_hc_list)) { @@ -301,7 +309,7 @@ held off by the interrupt latency of Linux break; } hcd->available_host_channels--; -@@ -1329,8 +1410,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1329,8 +1410,6 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_assigned, &qh->qh_list_entry); DWC_SPINUNLOCK_IRQRESTORE(channel_lock, flags); @@ -310,7 +318,7 @@ held off by the interrupt latency of Linux } /* -@@ -1369,10 +1448,19 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1369,10 +1448,19 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) qh->nak_frame = 0xffff; } } @@ -330,7 +338,7 @@ held off by the interrupt latency of Linux break; } hcd->available_host_channels--; -@@ -1396,16 +1484,17 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1396,16 +1484,17 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) g_np_sent++; @@ -354,7 +362,7 @@ held off by the interrupt latency of Linux #ifdef DEBUG_HOST_CHANNELS last_sel_trans_num_avail_hc_at_end = hcd->available_host_channels; #endif /* DEBUG_HOST_CHANNELS */ -@@ -1522,6 +1611,15 @@ static void process_periodic_channels(dw +@@ -1522,6 +1611,15 @@ static void process_periodic_channels(dwc_otg_hcd_t * hcd) qh = DWC_LIST_ENTRY(qh_ptr, dwc_otg_qh_t, qh_list_entry); @@ -370,7 +378,7 @@ held off by the interrupt latency of Linux /* * Set a flag if we're queuing high-bandwidth in slave mode. * The flag prevents any halts to get into the request queue in -@@ -1651,6 +1749,15 @@ static void process_non_periodic_channel +@@ -1651,6 +1749,15 @@ static void process_non_periodic_channels(dwc_otg_hcd_t * hcd) qh = DWC_LIST_ENTRY(hcd->non_periodic_qh_ptr, dwc_otg_qh_t, qh_list_entry); @@ -386,6 +394,8 @@ held off by the interrupt latency of Linux status = queue_transaction(hcd, qh->channel, tx_status.b.nptxfspcavail); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +index 0493dbf..d3d6e997 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -168,10 +168,10 @@ typedef enum dwc_otg_control_phase { @@ -423,7 +433,7 @@ held off by the interrupt latency of Linux /** Frame List DMA address */ dma_addr_t frame_list_dma; -@@ -604,12 +610,16 @@ extern dwc_otg_transaction_type_e dwc_ot +@@ -604,12 +610,16 @@ extern dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t extern void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, dwc_otg_transaction_type_e tr_type); @@ -441,6 +451,8 @@ held off by the interrupt latency of Linux extern int32_t dwc_otg_hcd_handle_rx_status_q_level_intr(dwc_otg_hcd_t * dwc_otg_hcd); extern int32_t dwc_otg_hcd_handle_np_tx_fifo_empty_intr(dwc_otg_hcd_t * +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 16e8c6c..e8b4d35 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -38,6 +38,7 @@ @@ -752,7 +764,7 @@ held off by the interrupt latency of Linux /* entry takes care to store registers we will be treading on here */ asm __volatile__ ( -@@ -74,43 +349,112 @@ void __attribute__ ((naked)) dwc_otg_hcd +@@ -74,43 +349,112 @@ void __attribute__ ((naked)) dwc_otg_hcd_handle_fiq(void) /* stash FIQ and normal regs */ "stmdb sp!, {r0-r12, lr};" /* !! THIS SETS THE FRAME, adjust to > sizeof locals */ @@ -888,7 +900,7 @@ held off by the interrupt latency of Linux mb(); /* exit back to normal mode restoring everything */ -@@ -133,6 +477,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ +@@ -133,6 +477,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) dwc_otg_core_if_t *core_if = dwc_otg_hcd->core_if; gintsts_data_t gintsts; @@ -896,7 +908,7 @@ held off by the interrupt latency of Linux hfnum_data_t hfnum; #ifdef DEBUG -@@ -140,6 +485,9 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ +@@ -140,6 +485,9 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) #endif @@ -906,7 +918,7 @@ held off by the interrupt latency of Linux /* Exit from ISR if core is hibernated */ if (core_if->hibernation_suspend == 1) { goto exit_handler_routine; -@@ -147,11 +495,18 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ +@@ -147,11 +495,18 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) DWC_SPINLOCK(dwc_otg_hcd->lock); /* Check if HOST Mode */ if (dwc_otg_is_host_mode(core_if)) { @@ -926,7 +938,7 @@ held off by the interrupt latency of Linux /* Don't print debug message in the interrupt handler on SOF */ #ifndef DEBUG_SOF if (gintsts.d32 != DWC_SOF_INTR_MASK) -@@ -171,11 +526,12 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ +@@ -171,11 +526,12 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) if (gintsts.b.sofintr && g_np_count == g_np_sent && dwc_frame_num_gt(g_next_sched_frame, hfnum.b.frnum)) { /* Note, we should never get here if the FIQ is doing it's job properly*/ @@ -941,7 +953,7 @@ held off by the interrupt latency of Linux if (gintsts.b.rxstsqlvl) { retval |= dwc_otg_hcd_handle_rx_status_q_level_intr -@@ -190,7 +546,10 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_ +@@ -190,7 +546,10 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) /** @todo Implement i2cintr handler. */ } if (gintsts.b.portintr) { @@ -1000,7 +1012,7 @@ held off by the interrupt latency of Linux } DWC_SPINUNLOCK(dwc_otg_hcd->lock); -@@ -294,13 +662,12 @@ static inline void track_missed_sofs(uin +@@ -294,13 +662,12 @@ static inline void track_missed_sofs(uint16_t curr_frame_number) * (micro)frame. Periodic transactions may be queued to the controller for the * next (micro)frame. */ @@ -1015,7 +1027,7 @@ held off by the interrupt latency of Linux int did_something = 0; int32_t next_sched_frame = -1; -@@ -326,6 +693,7 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_ +@@ -326,6 +693,7 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd, int32_t work_expected) qh = DWC_LIST_ENTRY(qh_entry, dwc_otg_qh_t, qh_list_entry); qh_entry = qh_entry->next; if (dwc_frame_num_le(qh->sched_frame, hcd->frame_number)) { @@ -1023,7 +1035,7 @@ held off by the interrupt latency of Linux /* * Move QH to the ready list to be executed next * (micro)frame. -@@ -351,15 +719,10 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_ +@@ -351,15 +719,10 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd, int32_t work_expected) dwc_otg_hcd_queue_transactions(hcd, tr_type); did_something = 1; } @@ -1041,7 +1053,7 @@ held off by the interrupt latency of Linux return 1; } -@@ -643,6 +1006,15 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_o +@@ -643,6 +1006,15 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_otg_hcd_t * dwc_otg_hcd) haint.d32 = dwc_otg_read_host_all_channels_intr(dwc_otg_hcd->core_if); @@ -1057,7 +1069,7 @@ held off by the interrupt latency of Linux for (i = 0; i < dwc_otg_hcd->core_if->core_params->host_channels; i++) { if (haint.b2.chint & (1 << i)) { retval |= dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd, i); -@@ -683,7 +1055,10 @@ static uint32_t get_actual_xfer_length(d +@@ -683,7 +1055,10 @@ static uint32_t get_actual_xfer_length(dwc_hc_t * hc, *short_read = (hctsiz.b.xfersize != 0); } } else if (hc->qh->do_split) { @@ -1069,7 +1081,7 @@ held off by the interrupt latency of Linux } else { length = hc->xfer_len; } -@@ -727,7 +1102,6 @@ static int update_urb_state_xfer_comp(dw +@@ -727,7 +1102,6 @@ static int update_urb_state_xfer_comp(dwc_hc_t * hc, DWC_OTG_HC_XFER_COMPLETE, &short_read); @@ -1077,7 +1089,7 @@ held off by the interrupt latency of Linux /* non DWORD-aligned buffer case handling. */ if (hc->align_buff && xfer_length && hc->ep_is_in) { dwc_memcpy(urb->buf + urb->actual_length, hc->qh->dw_align_buf, -@@ -930,6 +1304,9 @@ static void release_channel(dwc_otg_hcd_ +@@ -930,6 +1304,9 @@ static void release_channel(dwc_otg_hcd_t * hcd, int free_qtd; dwc_irqflags_t flags; dwc_spinlock_t *channel_lock = hcd->channel_lock; @@ -1112,7 +1124,7 @@ held off by the interrupt latency of Linux /* Try to queue more transfers now that there's a free channel. */ tr_type = dwc_otg_hcd_select_transactions(hcd); if (tr_type != DWC_OTG_TRANSACTION_NONE) { -@@ -1633,8 +2025,10 @@ static int32_t handle_hc_nyet_intr(dwc_o +@@ -1633,8 +2025,10 @@ static int32_t handle_hc_nyet_intr(dwc_otg_hcd_t * hcd, hc->ep_type == DWC_OTG_EP_TYPE_ISOC) { int frnum = dwc_otg_hcd_get_frame_number(hcd); @@ -1124,7 +1136,7 @@ held off by the interrupt latency of Linux /* * No longer in the same full speed frame. * Treat this as a transaction error. -@@ -2012,10 +2406,10 @@ static inline int halt_status_ok(dwc_otg +@@ -2012,10 +2406,10 @@ static inline int halt_status_ok(dwc_otg_hcd_t * hcd, static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, dwc_hc_t * hc, dwc_otg_hc_regs_t * hc_regs, @@ -1138,7 +1150,7 @@ held off by the interrupt latency of Linux int out_nak_enh = 0; /* For core with OUT NAK enhancement, the flow for high- -@@ -2047,8 +2441,11 @@ static void handle_hc_chhltd_intr_dma(dw +@@ -2047,8 +2441,11 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, } /* Read the HCINTn register to determine the cause for the halt. */ @@ -1152,7 +1164,7 @@ held off by the interrupt latency of Linux if (hcint.b.xfercomp) { /** @todo This is here because of a possible hardware bug. Spec -@@ -2161,13 +2558,15 @@ static void handle_hc_chhltd_intr_dma(dw +@@ -2161,13 +2558,15 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, static int32_t handle_hc_chhltd_intr(dwc_otg_hcd_t * hcd, dwc_hc_t * hc, dwc_otg_hc_regs_t * hc_regs, @@ -1170,7 +1182,7 @@ held off by the interrupt latency of Linux } else { #ifdef DEBUG if (!halt_status_ok(hcd, hc, hc_regs, qtd)) { -@@ -2184,7 +2583,7 @@ static int32_t handle_hc_chhltd_intr(dwc +@@ -2184,7 +2583,7 @@ static int32_t handle_hc_chhltd_intr(dwc_otg_hcd_t * hcd, int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) { int retval = 0; @@ -1179,7 +1191,7 @@ held off by the interrupt latency of Linux hcintmsk_data_t hcintmsk; dwc_hc_t *hc; dwc_otg_hc_regs_t *hc_regs; -@@ -2197,12 +2596,23 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc +@@ -2197,12 +2596,23 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); hcint.d32 = DWC_READ_REG32(&hc_regs->hcint); @@ -1203,7 +1215,7 @@ held off by the interrupt latency of Linux if (!dwc_otg_hcd->core_if->dma_enable) { if (hcint.b.chhltd && hcint.d32 != 0x2) { hcint.b.chhltd = 0; -@@ -2220,7 +2630,7 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc +@@ -2220,7 +2630,7 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) hcint.b.nyet = 0; } if (hcint.b.chhltd) { @@ -1212,9 +1224,11 @@ held off by the interrupt latency of Linux } if (hcint.b.ahberr) { retval |= handle_hc_ahberr_intr(dwc_otg_hcd, hc, hc_regs, qtd); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index fef557d..0d6f5f4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -392,7 +392,11 @@ static struct dwc_otg_hcd_function_ops h +@@ -392,7 +392,11 @@ static struct dwc_otg_hcd_function_ops hcd_fops = { static struct fiq_handler fh = { .name = "usb_fiq", }; @@ -1259,7 +1273,7 @@ held off by the interrupt latency of Linux //Enable mphi peripheral writel((1<<31),c_mphi_regs.ctrl); #ifdef DEBUG -@@ -839,6 +849,8 @@ static int dwc_otg_urb_dequeue(struct us +@@ -839,6 +849,8 @@ static int dwc_otg_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) usb_hcd_unlink_urb_from_ep(hcd, urb); #endif DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags); @@ -1268,6 +1282,8 @@ held off by the interrupt latency of Linux #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) usb_hcd_giveback_urb(hcd, urb); #else +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +index b3e6e52..8125307 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -41,6 +41,7 @@ @@ -1278,7 +1294,7 @@ held off by the interrupt latency of Linux extern bool microframe_schedule; -@@ -191,6 +192,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_ot +@@ -191,6 +192,7 @@ void qh_init(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, dwc_otg_hcd_urb_t * urb) dwc_otg_hcd_get_ep_num(&urb->pipe_info), hub_addr, hub_port); qh->do_split = 1; @@ -1286,7 +1302,7 @@ held off by the interrupt latency of Linux } if (qh->ep_type == UE_INTERRUPT || qh->ep_type == UE_ISOCHRONOUS) { -@@ -737,6 +739,9 @@ void dwc_otg_hcd_qh_remove(dwc_otg_hcd_t +@@ -737,6 +739,9 @@ void dwc_otg_hcd_qh_remove(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) hcd->non_periodic_qh_ptr->next; } DWC_LIST_REMOVE_INIT(&qh->qh_list_entry); @@ -1296,7 +1312,7 @@ held off by the interrupt latency of Linux } else { deschedule_periodic(hcd, qh); hcd->periodic_qh_count--; -@@ -766,21 +771,21 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_h +@@ -766,21 +771,21 @@ void dwc_otg_hcd_qh_deactivate(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh, { if (dwc_qh_is_non_per(qh)) { @@ -1331,6 +1347,8 @@ held off by the interrupt latency of Linux dwc_otg_hcd_qh_remove(hcd, qh); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h +index 22f28e1..ca17379 100755 --- a/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_mphi_fix.h @@ -1,10 +1,7 @@ @@ -1362,19 +1380,19 @@ held off by the interrupt latency of Linux #ifdef DEBUG #define DWC_DBG_PRINT_CORE_INT(_arg_) dwc_debug_print_core_int_reg(_arg_,__func__) -@@ -30,7 +27,22 @@ void dwc_debug_otg_int(gotgint_data_t go +@@ -30,7 +27,22 @@ void dwc_debug_otg_int(gotgint_data_t gotgint, const char* function_name); #define DWC_DBG_PRINT_CORE_INT_MASK(_arg_) #define DWC_DBG_PRINT_OTG_INT(_arg_) +#endif - ++ +typedef enum { + FIQDBG_SCHED = (1 << 0), + FIQDBG_INT = (1 << 1), + FIQDBG_ERR = (1 << 2), + FIQDBG_PORTHUB = (1 << 3), +} FIQDBG_T; -+ + +void _fiq_print(FIQDBG_T dbg_lvl, char *fmt, ...); +#ifdef FIQ_DEBUG +#define fiq_print _fiq_print @@ -1385,6 +1403,8 @@ held off by the interrupt latency of Linux +extern bool fiq_fix_enable, nak_holdoff_enable, fiq_split_enable; + #endif +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +index 27061d3..9720937 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_intr.c @@ -4276,7 +4276,7 @@ do { \ @@ -1396,3 +1416,6 @@ held off by the interrupt latency of Linux out_desc_addr->status.d32; if (status.b.sr) { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0073-dwc_otg-fix-device-attributes-and-avoid-kernel-warni.patch b/target/linux/brcm2708/patches-3.10/0073-dwc_otg-fix-device-attributes-and-avoid-kernel-warni.patch index 4fbfe04bf64..066c702f893 100644 --- a/target/linux/brcm2708/patches-3.10/0073-dwc_otg-fix-device-attributes-and-avoid-kernel-warni.patch +++ b/target/linux/brcm2708/patches-3.10/0073-dwc_otg-fix-device-attributes-and-avoid-kernel-warni.patch @@ -1,16 +1,18 @@ -From 7653ccf871836bc9a49f55df82d7f14596115146 Mon Sep 17 00:00:00 2001 +From 7f68345942e44b3ff6b922d00d9650abae485eac Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 11:39:46 +0100 -Subject: [PATCH 073/174] dwc_otg: fix device attributes and avoid kernel +Subject: [PATCH 073/196] dwc_otg: fix device attributes and avoid kernel warnings on boot --- drivers/usb/host/dwc_otg/dwc_otg_attr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c +index 95eb7f8..9602fda 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_attr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -@@ -909,7 +909,7 @@ static ssize_t regdump_show(struct devic +@@ -909,7 +909,7 @@ static ssize_t regdump_show(struct device *_dev, return sprintf(buf, "Register Dump\n"); } @@ -19,7 +21,7 @@ Subject: [PATCH 073/174] dwc_otg: fix device attributes and avoid kernel /** * Dump global registers and either host or device registers (depending on the -@@ -925,7 +925,7 @@ static ssize_t spramdump_show(struct dev +@@ -925,7 +925,7 @@ static ssize_t spramdump_show(struct device *_dev, return sprintf(buf, "SPRAM Dump\n"); } @@ -28,7 +30,7 @@ Subject: [PATCH 073/174] dwc_otg: fix device attributes and avoid kernel /** * Dump the current hcd state. -@@ -940,7 +940,7 @@ static ssize_t hcddump_show(struct devic +@@ -940,7 +940,7 @@ static ssize_t hcddump_show(struct device *_dev, return sprintf(buf, "HCD Dump\n"); } @@ -37,7 +39,7 @@ Subject: [PATCH 073/174] dwc_otg: fix device attributes and avoid kernel /** * Dump the average frame remaining at SOF. This can be used to -@@ -958,7 +958,7 @@ static ssize_t hcd_frrem_show(struct dev +@@ -958,7 +958,7 @@ static ssize_t hcd_frrem_show(struct device *_dev, return sprintf(buf, "HCD Dump Frame Remaining\n"); } @@ -46,7 +48,7 @@ Subject: [PATCH 073/174] dwc_otg: fix device attributes and avoid kernel /** * Displays the time required to read the GNPTXFSIZ register many times (the -@@ -986,7 +986,7 @@ static ssize_t rd_reg_test_show(struct d +@@ -986,7 +986,7 @@ static ssize_t rd_reg_test_show(struct device *_dev, RW_REG_COUNT, time * MSEC_PER_JIFFIE, time); } @@ -55,7 +57,7 @@ Subject: [PATCH 073/174] dwc_otg: fix device attributes and avoid kernel /** * Displays the time required to write the GNPTXFSIZ register many times (the -@@ -1014,7 +1014,7 @@ static ssize_t wr_reg_test_show(struct d +@@ -1014,7 +1014,7 @@ static ssize_t wr_reg_test_show(struct device *_dev, RW_REG_COUNT, time * MSEC_PER_JIFFIE, time); } @@ -64,3 +66,6 @@ Subject: [PATCH 073/174] dwc_otg: fix device attributes and avoid kernel #ifdef CONFIG_USB_DWC_OTG_LPM +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0074-hack-fix-for-incorrect-uart-fifo-size-detection.patch b/target/linux/brcm2708/patches-3.10/0074-hack-fix-for-incorrect-uart-fifo-size-detection.patch index 52892de417a..240c74d0124 100644 --- a/target/linux/brcm2708/patches-3.10/0074-hack-fix-for-incorrect-uart-fifo-size-detection.patch +++ b/target/linux/brcm2708/patches-3.10/0074-hack-fix-for-incorrect-uart-fifo-size-detection.patch @@ -1,12 +1,14 @@ -From a720faa00a378b304c7a24cbbde6d9bc98fb5c70 Mon Sep 17 00:00:00 2001 +From 164e83a7e4182fb669437b456f173b7dfe0465a0 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 3 Jul 2013 13:55:00 +0100 -Subject: [PATCH 074/174] hack: fix for incorrect uart fifo size detection +Subject: [PATCH 074/196] hack: fix for incorrect uart fifo size detection --- drivers/tty/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c +index 7a55fe7..a1da63c 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -84,7 +84,7 @@ struct vendor_data { @@ -18,3 +20,6 @@ Subject: [PATCH 074/174] hack: fix for incorrect uart fifo size detection return rev < 3 ? 16 : 32; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0075-Fix-for-deprecated-undefined-create_proc_entry-in-RT.patch b/target/linux/brcm2708/patches-3.10/0075-Fix-for-deprecated-undefined-create_proc_entry-in-RT.patch index ab2b8964bad..1df3a1bdb87 100644 --- a/target/linux/brcm2708/patches-3.10/0075-Fix-for-deprecated-undefined-create_proc_entry-in-RT.patch +++ b/target/linux/brcm2708/patches-3.10/0075-Fix-for-deprecated-undefined-create_proc_entry-in-RT.patch @@ -1,13 +1,15 @@ -From 9fc9389ab723f75d183813ca8012b89a01a70a1a Mon Sep 17 00:00:00 2001 +From 581798214a3fc7e7cd983e7b4f1bfa353ec3b9a3 Mon Sep 17 00:00:00 2001 From: Jonathan Bensen Date: Mon, 8 Jul 2013 09:49:56 -0700 -Subject: [PATCH 075/174] Fix for deprecated/undefined create_proc_entry in +Subject: [PATCH 075/196] Fix for deprecated/undefined create_proc_entry in RTL8192cu driver --- drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c +index 8feb780..b88a5eb 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c @@ -255,6 +255,18 @@ static char rtw_proc_name[IFNAMSIZ]; @@ -29,7 +31,7 @@ Subject: [PATCH 075/174] Fix for deprecated/undefined create_proc_entry in void rtw_proc_init_one(struct net_device *dev) { struct proc_dir_entry *dir_dev = NULL; -@@ -525,6 +537,7 @@ void rtw_proc_remove_one(struct net_devi +@@ -525,6 +537,7 @@ void rtw_proc_remove_one(struct net_device *dev) } } #endif @@ -37,3 +39,6 @@ Subject: [PATCH 075/174] Fix for deprecated/undefined create_proc_entry in uint loadparam( _adapter *padapter, _nic_hdl pnetdev) { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0076-sdhci-bcm2807-Increase-sync_after_dma-timeout.patch b/target/linux/brcm2708/patches-3.10/0076-sdhci-bcm2807-Increase-sync_after_dma-timeout.patch index 41dce9d265d..6e586812f87 100644 --- a/target/linux/brcm2708/patches-3.10/0076-sdhci-bcm2807-Increase-sync_after_dma-timeout.patch +++ b/target/linux/brcm2708/patches-3.10/0076-sdhci-bcm2807-Increase-sync_after_dma-timeout.patch @@ -1,7 +1,7 @@ -From a1cd8994c1f5d01f8932ad5d047677d6a264f711 Mon Sep 17 00:00:00 2001 +From 702b7652ec63948bb7acc7c86641599b5b69404a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 10 Jul 2013 23:53:31 +0100 -Subject: [PATCH 076/174] sdhci-bcm2807: Increase sync_after_dma timeout +Subject: [PATCH 076/196] sdhci-bcm2807: Increase sync_after_dma timeout The current timeout is being hit with some cards that complete successfully with a longer timeout. The timeout is not handled well, and is believed to be a code path that causes corruption. @@ -10,9 +10,11 @@ The timeout is not handled well, and is believed to be a code path that causes c drivers/mmc/host/sdhci-bcm2708.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index c2409b9..4770680 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -842,7 +842,7 @@ static void sdhci_bcm2708_dma_complete_i +@@ -842,7 +842,7 @@ static void sdhci_bcm2708_dma_complete_irq(struct sdhci_host *host, We get CRC and DEND errors unless we wait for the SD controller to finish reading/writing to the card. */ u32 state_mask; @@ -21,3 +23,6 @@ The timeout is not handled well, and is believed to be a code path that causes c DBG("PDMA over - sync card\n"); if (data->flags & MMC_DATA_READ) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0077-dcw_otg-avoid-logging-function-that-can-cause-panics.patch b/target/linux/brcm2708/patches-3.10/0077-dcw_otg-avoid-logging-function-that-can-cause-panics.patch index baec4b4acfe..de4604069c4 100644 --- a/target/linux/brcm2708/patches-3.10/0077-dcw_otg-avoid-logging-function-that-can-cause-panics.patch +++ b/target/linux/brcm2708/patches-3.10/0077-dcw_otg-avoid-logging-function-that-can-cause-panics.patch @@ -1,7 +1,7 @@ -From 9112b4c659edaf09792f1af02fe9e9c4753fb411 Mon Sep 17 00:00:00 2001 +From 0b4709bfe4dc73b8e2923b7d8a6c29db8a5ce47f Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 15 Jul 2013 23:55:52 +0100 -Subject: [PATCH 077/174] dcw_otg: avoid logging function that can cause panics +Subject: [PATCH 077/196] dcw_otg: avoid logging function that can cause panics See: https://github.com/raspberrypi/firmware/issues/21 Thanks to cleverca22 for fix @@ -9,9 +9,11 @@ Thanks to cleverca22 for fix drivers/usb/host/dwc_otg/dwc_otg_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_attr.c b/drivers/usb/host/dwc_otg/dwc_otg_attr.c +index 9602fda..c6966af 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_attr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_attr.c -@@ -920,7 +920,7 @@ static ssize_t spramdump_show(struct dev +@@ -920,7 +920,7 @@ static ssize_t spramdump_show(struct device *_dev, { dwc_otg_device_t *otg_dev = dwc_otg_drvdev(_dev); @@ -20,3 +22,6 @@ Thanks to cleverca22 for fix return sprintf(buf, "SPRAM Dump\n"); } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0078-dwc_otg-mask-correct-interrupts-after-transaction-er.patch b/target/linux/brcm2708/patches-3.10/0078-dwc_otg-mask-correct-interrupts-after-transaction-er.patch index c6814e29582..c36f92c3f9b 100644 --- a/target/linux/brcm2708/patches-3.10/0078-dwc_otg-mask-correct-interrupts-after-transaction-er.patch +++ b/target/linux/brcm2708/patches-3.10/0078-dwc_otg-mask-correct-interrupts-after-transaction-er.patch @@ -1,7 +1,7 @@ -From cb902630ae7ef709c8f40ca3f506cf5052077701 Mon Sep 17 00:00:00 2001 +From 5608eaff0f301e9bf73998da020644f1673b66e4 Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 20:41:26 +0100 -Subject: [PATCH 078/174] dwc_otg: mask correct interrupts after transaction +Subject: [PATCH 078/196] dwc_otg: mask correct interrupts after transaction error recovery The dwc_otg driver will unmask certain interrupts on a transaction @@ -17,9 +17,11 @@ from being generated if the FIQ is enabled. drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index e8b4d35..27b673f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -1851,7 +1851,11 @@ static int32_t handle_hc_nak_intr(dwc_ot +@@ -1851,7 +1851,11 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, * transfers in DMA mode for the sole purpose of * resetting the error count after a transaction error * occurs. The core will continue transferring data. @@ -31,7 +33,7 @@ from being generated if the FIQ is enabled. qtd->error_count = 0; goto handle_nak_done; } -@@ -1963,6 +1967,15 @@ static int32_t handle_hc_ack_intr(dwc_ot +@@ -1963,6 +1967,15 @@ static int32_t handle_hc_ack_intr(dwc_otg_hcd_t * hcd, halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_ACK); } } else { @@ -47,7 +49,7 @@ from being generated if the FIQ is enabled. qtd->error_count = 0; if (hc->qh->ping_state) { -@@ -2328,6 +2341,14 @@ static int32_t handle_hc_datatglerr_intr +@@ -2328,6 +2341,14 @@ static int32_t handle_hc_datatglerr_intr(dwc_otg_hcd_t * hcd, qtd->urb, qtd, DWC_OTG_HC_XFER_XACT_ERR); halt_channel(hcd, hc, qtd, DWC_OTG_HC_XFER_XACT_ERR); } else if (hc->ep_is_in) { @@ -62,3 +64,6 @@ from being generated if the FIQ is enabled. qtd->error_count = 0; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0079-dwc_otg-fiq-prevent-FIQ-thrash-and-incorrect-state-p.patch b/target/linux/brcm2708/patches-3.10/0079-dwc_otg-fiq-prevent-FIQ-thrash-and-incorrect-state-p.patch index f8e7378b743..d869941e5a9 100644 --- a/target/linux/brcm2708/patches-3.10/0079-dwc_otg-fiq-prevent-FIQ-thrash-and-incorrect-state-p.patch +++ b/target/linux/brcm2708/patches-3.10/0079-dwc_otg-fiq-prevent-FIQ-thrash-and-incorrect-state-p.patch @@ -1,7 +1,7 @@ -From 4d44d8447b13ded9c6931583938183c76b1846ed Mon Sep 17 00:00:00 2001 +From 6a276a4e4878b5b3e92c8975a87eb641d57669c4 Mon Sep 17 00:00:00 2001 From: P33M Date: Sat, 13 Jul 2013 21:48:41 +0100 -Subject: [PATCH 079/174] dwc_otg: fiq: prevent FIQ thrash and incorrect state +Subject: [PATCH 079/196] dwc_otg: fiq: prevent FIQ thrash and incorrect state passing to IRQ In the case of a transaction to a device that had previously aborted @@ -22,9 +22,11 @@ it was possible to confuse the IRQ handler. drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 27b673f..d655363 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -324,6 +324,27 @@ int fiq_hcintr_handle(int channel, hfnum +@@ -324,6 +324,27 @@ int fiq_hcintr_handle(int channel, hfnum_data_t hfnum) } } } @@ -52,3 +54,6 @@ it was possible to confuse the IRQ handler. // Clear the interrupt, this will also clear the HAINT bit FIQ_WRITE((dwc_regs_base + 0x500 + (channel * 0x20) + 0x8), hcint.d32); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0080-Fix-function-tracing.patch b/target/linux/brcm2708/patches-3.10/0080-Fix-function-tracing.patch index 93d17a3ef1e..4f8374f976f 100644 --- a/target/linux/brcm2708/patches-3.10/0080-Fix-function-tracing.patch +++ b/target/linux/brcm2708/patches-3.10/0080-Fix-function-tracing.patch @@ -1,12 +1,14 @@ -From f7785b067f07e444934fe0e6c31fff36f5863079 Mon Sep 17 00:00:00 2001 +From cf9f56af2d067396b32e65cf10b9d2b072d08033 Mon Sep 17 00:00:00 2001 From: Gordon Hollingworth Date: Mon, 8 Jul 2013 04:12:19 +0100 -Subject: [PATCH 080/174] Fix function tracing +Subject: [PATCH 080/196] Fix function tracing --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index d655363..765451b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -77,7 +77,7 @@ int queued_port[MAX_EPS_CHANNELS]; @@ -18,7 +20,7 @@ Subject: [PATCH 080/174] Fix function tracing { FIQDBG_T dbg_lvl_req = FIQDBG_PORTHUB; va_list args; -@@ -101,7 +101,7 @@ void _fiq_print(FIQDBG_T dbg_lvl, char * +@@ -101,7 +101,7 @@ void _fiq_print(FIQDBG_T dbg_lvl, char *fmt, ...) } #endif @@ -60,3 +62,6 @@ Subject: [PATCH 080/174] Fix function tracing { /* entry takes care to store registers we will be treading on here */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0081-dwc_otg-whitespace-cleanup-in-dwc_otg_urb_enqueue.patch b/target/linux/brcm2708/patches-3.10/0081-dwc_otg-whitespace-cleanup-in-dwc_otg_urb_enqueue.patch index 9ddb2fd92fc..c541bbc9cfa 100644 --- a/target/linux/brcm2708/patches-3.10/0081-dwc_otg-whitespace-cleanup-in-dwc_otg_urb_enqueue.patch +++ b/target/linux/brcm2708/patches-3.10/0081-dwc_otg-whitespace-cleanup-in-dwc_otg_urb_enqueue.patch @@ -1,15 +1,17 @@ -From a7ae411621bcf80fcb2f920084183d98adb6213b Mon Sep 17 00:00:00 2001 +From 2f244c31c0fdb6e02bd58dfbcca018d8e2366291 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 16:32:41 +0100 -Subject: [PATCH 081/174] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue +Subject: [PATCH 081/196] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue --- drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 59 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 30 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 0d6f5f4..0f72bd5 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct us +@@ -733,10 +733,10 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, if(dwc_otg_urb == NULL) return -ENOMEM; @@ -24,7 +26,7 @@ Subject: [PATCH 081/174] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue dwc_otg_hcd_urb_set_pipeinfo(dwc_otg_urb, usb_pipedevice(urb->pipe), usb_pipeendpoint(urb->pipe), ep_type, usb_pipein(urb->pipe), -@@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct us +@@ -776,36 +776,35 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, } #if USB_URB_EP_LINKING @@ -86,3 +88,6 @@ Subject: [PATCH 081/174] dwc_otg: whitespace cleanup in dwc_otg_urb_enqueue return retval; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0082-dwc_otg-prevent-OOPSes-during-device-disconnects.patch b/target/linux/brcm2708/patches-3.10/0082-dwc_otg-prevent-OOPSes-during-device-disconnects.patch index 5cfc9193449..129dc0894b4 100644 --- a/target/linux/brcm2708/patches-3.10/0082-dwc_otg-prevent-OOPSes-during-device-disconnects.patch +++ b/target/linux/brcm2708/patches-3.10/0082-dwc_otg-prevent-OOPSes-during-device-disconnects.patch @@ -1,7 +1,7 @@ -From dc570a70493daf0ec548ff57f1a1a9fb31caccb7 Mon Sep 17 00:00:00 2001 +From 2e2f1ef719a2fa55fd1d95d9536fa8cca94459a4 Mon Sep 17 00:00:00 2001 From: P33M Date: Thu, 18 Jul 2013 17:07:26 +0100 -Subject: [PATCH 082/174] dwc_otg: prevent OOPSes during device disconnects +Subject: [PATCH 082/196] dwc_otg: prevent OOPSes during device disconnects The dwc_otg_urb_enqueue function is thread-unsafe. In particular the access of urb->hcpriv, usb_hcd_link_urb_to_ep, dwc_otg_urb->qtd and @@ -20,9 +20,11 @@ critical section. drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 6 +----- 3 files changed, 6 insertions(+), 17 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index af9108c..a1970dc 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -464,7 +464,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -464,7 +464,6 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, dwc_otg_hcd_urb_t * dwc_otg_urb, void **ep_handle, int atomic_alloc) { @@ -30,7 +32,7 @@ critical section. int retval = 0; uint8_t needs_scheduling = 0; dwc_otg_transaction_type_e tr_type; -@@ -515,12 +514,10 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -515,12 +514,10 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, } if(needs_scheduling) { @@ -43,9 +45,11 @@ critical section. } return retval; } +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 0f72bd5..ad03ff1 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -679,9 +679,7 @@ static int dwc_otg_urb_enqueue(struct us +@@ -679,9 +679,7 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) struct usb_host_endpoint *ep = urb->ep; #endif @@ -55,7 +59,7 @@ critical section. void **ref_ep_hcpriv = &ep->hcpriv; dwc_otg_hcd_t *dwc_otg_hcd = hcd_to_dwc_otg_hcd(hcd); dwc_otg_hcd_urb_t *dwc_otg_urb; -@@ -733,7 +731,6 @@ static int dwc_otg_urb_enqueue(struct us +@@ -733,7 +731,6 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, if(dwc_otg_urb == NULL) return -ENOMEM; @@ -63,7 +67,7 @@ critical section. if (!dwc_otg_urb && urb->number_of_packets) return -ENOMEM; -@@ -775,10 +772,10 @@ static int dwc_otg_urb_enqueue(struct us +@@ -775,10 +772,10 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, iso_frame_desc[i].length); } @@ -76,7 +80,7 @@ critical section. if (0 == retval) #endif { -@@ -794,17 +791,16 @@ static int dwc_otg_urb_enqueue(struct us +@@ -794,17 +791,16 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, urb); } } else { @@ -97,9 +101,11 @@ critical section. return retval; } +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +index 8125307..5aed416 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c -@@ -919,6 +919,7 @@ void dwc_otg_hcd_qtd_init(dwc_otg_qtd_t +@@ -919,6 +919,7 @@ void dwc_otg_hcd_qtd_init(dwc_otg_qtd_t * qtd, dwc_otg_hcd_urb_t * urb) * QH to place the QTD into. If it does not find a QH, then it will create a * new QH. If the QH to which the QTD is added is not currently scheduled, it * is placed into the proper schedule based on its EP type. @@ -107,7 +113,7 @@ critical section. * * @param[in] qtd The QTD to add * @param[in] hcd The DWC HCD structure -@@ -931,8 +932,6 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * +@@ -931,8 +932,6 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, dwc_otg_hcd_t * hcd, dwc_otg_qh_t ** qh, int atomic_alloc) { int retval = 0; @@ -116,7 +122,7 @@ critical section. dwc_otg_hcd_urb_t *urb = qtd->urb; /* -@@ -946,15 +945,12 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * +@@ -946,15 +945,12 @@ int dwc_otg_hcd_qtd_add(dwc_otg_qtd_t * qtd, goto done; } } @@ -132,3 +138,6 @@ critical section. done: return retval; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0083-dwc_otg-prevent-BUG-in-TT-allocation-if-hub-address-.patch b/target/linux/brcm2708/patches-3.10/0083-dwc_otg-prevent-BUG-in-TT-allocation-if-hub-address-.patch index 97b78ab3eb6..835ea17335c 100644 --- a/target/linux/brcm2708/patches-3.10/0083-dwc_otg-prevent-BUG-in-TT-allocation-if-hub-address-.patch +++ b/target/linux/brcm2708/patches-3.10/0083-dwc_otg-prevent-BUG-in-TT-allocation-if-hub-address-.patch @@ -1,7 +1,7 @@ -From 3c3c5a15a17649092ecf4c128478b267676c3353 Mon Sep 17 00:00:00 2001 +From 14d8b16453f653003fd7d124f221082c53d56cf2 Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 22 Jul 2013 14:08:26 +0100 -Subject: [PATCH 083/174] dwc_otg: prevent BUG() in TT allocation if hub +Subject: [PATCH 083/196] dwc_otg: prevent BUG() in TT allocation if hub address is > 16 A fixed-size array is used to track TT allocation. This was @@ -20,9 +20,11 @@ for debug only for tracking which frame an allocate happened in. drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 3 ++- 3 files changed, 12 insertions(+), 4 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index a1970dc..3c619b4 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -983,7 +983,9 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd +@@ -983,7 +983,9 @@ int dwc_otg_hcd_init(dwc_otg_hcd_t * hcd, dwc_otg_core_if_t * core_if) hcd->periodic_qh_count = 0; DWC_MEMSET(hcd->hub_port, 0, sizeof(hcd->hub_port)); @@ -32,7 +34,7 @@ for debug only for tracking which frame an allocate happened in. out: return retval; -@@ -1317,7 +1319,9 @@ int dwc_otg_hcd_allocate_port(dwc_otg_hc +@@ -1317,7 +1319,9 @@ int dwc_otg_hcd_allocate_port(dwc_otg_hcd_t * hcd, dwc_otg_qh_t *qh) qh->skip_count = 0; hcd->hub_port[hub_addr] |= 1 << port_addr; fiq_print(FIQDBG_PORTHUB, "H%dP%d:A %d", hub_addr, port_addr, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->pipe_info.ep_num); @@ -42,7 +44,7 @@ for debug only for tracking which frame an allocate happened in. return 0; } } -@@ -1331,8 +1335,9 @@ void dwc_otg_hcd_release_port(dwc_otg_hc +@@ -1331,8 +1335,9 @@ void dwc_otg_hcd_release_port(dwc_otg_hcd_t * hcd, dwc_otg_qh_t *qh) hcd->fops->hub_info(hcd, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->priv, &hub_addr, &port_addr); hcd->hub_port[hub_addr] &= ~(1 << port_addr); @@ -53,6 +55,8 @@ for debug only for tracking which frame an allocate happened in. fiq_print(FIQDBG_PORTHUB, "H%dP%d:RO%d", hub_addr, port_addr, DWC_CIRCLEQ_FIRST(&qh->qtd_list)->urb->pipe_info.ep_num); } +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +index d3d6e997..80a3af2 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.h @@ -577,8 +577,10 @@ struct dwc_otg_hcd { @@ -68,6 +72,8 @@ for debug only for tracking which frame an allocate happened in. /** Frame List DMA address */ dma_addr_t frame_list_dma; +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 765451b..dbff763 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -1419,8 +1419,9 @@ cleanup: @@ -81,3 +87,6 @@ for debug only for tracking which frame an allocate happened in. fiq_print(FIQDBG_PORTHUB, "H%dP%d:RR%d", hc->hub_addr, hc->port_addr, endp); } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0084-dwc_otg-make-channel-halts-with-unknown-state-less-d.patch b/target/linux/brcm2708/patches-3.10/0084-dwc_otg-make-channel-halts-with-unknown-state-less-d.patch index 02efbe6f443..251fa0725e1 100644 --- a/target/linux/brcm2708/patches-3.10/0084-dwc_otg-make-channel-halts-with-unknown-state-less-d.patch +++ b/target/linux/brcm2708/patches-3.10/0084-dwc_otg-make-channel-halts-with-unknown-state-less-d.patch @@ -1,7 +1,7 @@ -From e2c9f557c5bff8c839704d0627d5dd108a0e14f2 Mon Sep 17 00:00:00 2001 +From 6ecef9d4e6add518889432cc642a50e47ee3536b Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 23 Jul 2013 14:15:32 +0100 -Subject: [PATCH 084/174] dwc_otg: make channel halts with unknown state less +Subject: [PATCH 084/196] dwc_otg: make channel halts with unknown state less damaging If the IRQ received a channel halt interrupt through the FIQ @@ -13,9 +13,11 @@ Add catchall handling to treat as a transaction error and retry. drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index dbff763..488defb 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -2578,12 +2578,24 @@ static void handle_hc_chhltd_intr_dma(dw +@@ -2578,12 +2578,24 @@ static void handle_hc_chhltd_intr_dma(dwc_otg_hcd_t * hcd, DWC_READ_REG32(&hcd-> core_if->core_global_regs-> gintsts)); @@ -40,3 +42,6 @@ Add catchall handling to treat as a transaction error and retry. } } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0085-dwc_otg-fiq_split-use-TTs-with-more-granularity.patch b/target/linux/brcm2708/patches-3.10/0085-dwc_otg-fiq_split-use-TTs-with-more-granularity.patch index 6d3499dad36..b898c41d85b 100644 --- a/target/linux/brcm2708/patches-3.10/0085-dwc_otg-fiq_split-use-TTs-with-more-granularity.patch +++ b/target/linux/brcm2708/patches-3.10/0085-dwc_otg-fiq_split-use-TTs-with-more-granularity.patch @@ -1,7 +1,7 @@ -From 2b66f2f4f07ed87db0e241489d4e93881fe50a85 Mon Sep 17 00:00:00 2001 +From fa6cd2944967a33088bc4cb66d1dc0323665b7c6 Mon Sep 17 00:00:00 2001 From: P33M Date: Tue, 30 Jul 2013 09:58:48 +0100 -Subject: [PATCH 085/174] dwc_otg: fiq_split: use TTs with more granularity +Subject: [PATCH 085/196] dwc_otg: fiq_split: use TTs with more granularity This fixes certain issues with split transaction scheduling. @@ -18,9 +18,11 @@ This commit will mainly affect USB audio playback. drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 20 ++++++++++++++++---- 2 files changed, 29 insertions(+), 17 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index 3c619b4..c42172f 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -1356,6 +1356,7 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1356,6 +1356,7 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) { dwc_list_link_t *qh_ptr; dwc_otg_qh_t *qh; @@ -28,7 +30,7 @@ This commit will mainly affect USB audio playback. int num_channels; dwc_irqflags_t flags; dwc_spinlock_t *channel_lock = hcd->channel_lock; -@@ -1379,11 +1380,18 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1379,11 +1380,18 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) qh = DWC_LIST_ENTRY(qh_ptr, dwc_otg_qh_t, qh_list_entry); @@ -52,7 +54,7 @@ This commit will mainly affect USB audio playback. } if (microframe_schedule) { -@@ -1451,18 +1459,10 @@ dwc_otg_transaction_type_e dwc_otg_hcd_s +@@ -1451,18 +1459,10 @@ dwc_otg_transaction_type_e dwc_otg_hcd_select_transactions(dwc_otg_hcd_t * hcd) } } @@ -71,9 +73,11 @@ This commit will mainly affect USB audio playback. break; } hcd->available_host_channels--; +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 488defb..7d521d9 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -1328,10 +1328,20 @@ static void release_channel(dwc_otg_hcd_ +@@ -1328,10 +1328,20 @@ static void release_channel(dwc_otg_hcd_t * hcd, #ifdef FIQ_DEBUG int endp = qtd->urb ? qtd->urb->pipe_info.ep_num : 0; #endif @@ -113,3 +117,6 @@ This commit will mainly affect USB audio playback. } /* Try to queue more transfers now that there's a free channel. */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0086-dwc_otg-fix-potential-sleep-while-atomic-during-urb-.patch b/target/linux/brcm2708/patches-3.10/0086-dwc_otg-fix-potential-sleep-while-atomic-during-urb-.patch index 59b3190e39e..957e2ea7b84 100644 --- a/target/linux/brcm2708/patches-3.10/0086-dwc_otg-fix-potential-sleep-while-atomic-during-urb-.patch +++ b/target/linux/brcm2708/patches-3.10/0086-dwc_otg-fix-potential-sleep-while-atomic-during-urb-.patch @@ -1,7 +1,7 @@ -From 445255441aa03cca3d1318d1e7ff58872c91c645 Mon Sep 17 00:00:00 2001 +From ce5fb2face9a3974693b0f08ce226d7f0406541a Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 2 Aug 2013 10:04:18 +0100 -Subject: [PATCH 086/174] dwc_otg: fix potential sleep while atomic during urb +Subject: [PATCH 086/196] dwc_otg: fix potential sleep while atomic during urb enqueue Fixes a regression introduced with eb1b482a. Kmalloc called from @@ -12,9 +12,11 @@ critical section. drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index ad03ff1..80690f9 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -781,8 +781,7 @@ static int dwc_otg_urb_enqueue(struct us +@@ -781,8 +781,7 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, { retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb, /*(dwc_otg_qh_t **)*/ @@ -24,3 +26,6 @@ critical section. if (0 == retval) { if (alloc_bandwidth) { allocate_bus_bandwidth(hcd, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0087-dwc_otg-make-fiq_split_enable-imply-fiq_fix_enable.patch b/target/linux/brcm2708/patches-3.10/0087-dwc_otg-make-fiq_split_enable-imply-fiq_fix_enable.patch index c8ba58e4b06..355fc8ec162 100644 --- a/target/linux/brcm2708/patches-3.10/0087-dwc_otg-make-fiq_split_enable-imply-fiq_fix_enable.patch +++ b/target/linux/brcm2708/patches-3.10/0087-dwc_otg-make-fiq_split_enable-imply-fiq_fix_enable.patch @@ -1,7 +1,7 @@ -From 635578168de091d59e7d1a837286cff86fb9badb Mon Sep 17 00:00:00 2001 +From 53e5848c799c1fa6a7f6c3464d2bb2f5c85f555f Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:42:12 +0100 -Subject: [PATCH 087/174] dwc_otg: make fiq_split_enable imply fiq_fix_enable +Subject: [PATCH 087/196] dwc_otg: make fiq_split_enable imply fiq_fix_enable Failing to set up the FIQ correctly would result in "IRQ 32: nobody cared" errors in dmesg. @@ -9,9 +9,11 @@ Failing to set up the FIQ correctly would result in drivers/usb/host/dwc_otg/dwc_otg_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c +index 6c89a69..4735f51 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c -@@ -1070,6 +1070,12 @@ static int __init dwc_otg_driver_init(vo +@@ -1070,6 +1070,12 @@ static int __init dwc_otg_driver_init(void) int retval = 0; int error; struct device_driver *drv; @@ -24,3 +26,6 @@ Failing to set up the FIQ correctly would result in printk(KERN_INFO "%s: version %s (%s bus)\n", dwc_driver_name, DWC_DRIVER_VERSION, #ifdef LM_INTERFACE +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0088-dwc_otg-prevent-crashes-on-host-port-disconnects.patch b/target/linux/brcm2708/patches-3.10/0088-dwc_otg-prevent-crashes-on-host-port-disconnects.patch index 9c3e40868e3..217136a38e9 100644 --- a/target/linux/brcm2708/patches-3.10/0088-dwc_otg-prevent-crashes-on-host-port-disconnects.patch +++ b/target/linux/brcm2708/patches-3.10/0088-dwc_otg-prevent-crashes-on-host-port-disconnects.patch @@ -1,7 +1,7 @@ -From afde583fbb644cff07984f2b47f75c0410d72205 Mon Sep 17 00:00:00 2001 +From 53e5476701371e6f8b85cdeeb6099cdaea3872ce Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 11:47:12 +0100 -Subject: [PATCH 088/174] dwc_otg: prevent crashes on host port disconnects +Subject: [PATCH 088/196] dwc_otg: prevent crashes on host port disconnects Fix several issues resulting in crashes or inconsistent state if a Model A root port was disconnected. @@ -25,9 +25,11 @@ if a Model A root port was disconnected. drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 3 ++ 3 files changed, 48 insertions(+), 6 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index c42172f..be1d25b 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -59,6 +59,11 @@ static int last_sel_trans_num_avail_hc_a +@@ -59,6 +59,11 @@ static int last_sel_trans_num_avail_hc_at_end = 0; extern int g_next_sched_frame, g_np_count, g_np_sent; @@ -39,7 +41,7 @@ if a Model A root port was disconnected. dwc_otg_hcd_t *dwc_otg_hcd_alloc_hcd(void) { return DWC_ALLOC(sizeof(dwc_otg_hcd_t)); -@@ -168,31 +173,43 @@ static void del_timers(dwc_otg_hcd_t * h +@@ -168,31 +173,43 @@ static void del_timers(dwc_otg_hcd_t * hcd) /** * Processes all the URBs in a single list of QHs. Completes them with @@ -88,7 +90,7 @@ if a Model A root port was disconnected. * and periodic schedules. The QTD associated with each URB is removed from * the schedule and freed. This function may be called when a disconnect is * detected or when the HCD is being stopped. -@@ -278,7 +295,8 @@ static int32_t dwc_otg_hcd_disconnect_cb +@@ -278,7 +295,8 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) */ dwc_otg_hcd->flags.b.port_connect_status_change = 1; dwc_otg_hcd->flags.b.port_connect_status = 0; @@ -98,7 +100,7 @@ if a Model A root port was disconnected. /* * Shutdown any transfers in process by clearing the Tx FIFO Empty * interrupt mask and status bits and disabling subsequent host -@@ -374,8 +392,22 @@ static int32_t dwc_otg_hcd_disconnect_cb +@@ -374,8 +392,22 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) channel->qh = NULL; } } @@ -121,9 +123,11 @@ if a Model A root port was disconnected. if (dwc_otg_hcd->fops->disconnect) { dwc_otg_hcd->fops->disconnect(dwc_otg_hcd); } +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 7d521d9..19abea0 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -2660,6 +2660,13 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc +@@ -2660,6 +2660,13 @@ int32_t dwc_otg_hcd_handle_hc_n_intr(dwc_otg_hcd_t * dwc_otg_hcd, uint32_t num) hc = dwc_otg_hcd->hc_ptr_array[num]; hc_regs = dwc_otg_hcd->core_if->host_if->hc_regs[num]; @@ -137,9 +141,11 @@ if a Model A root port was disconnected. qtd = DWC_CIRCLEQ_FIRST(&hc->qh->qtd_list); hcint.d32 = DWC_READ_REG32(&hc_regs->hcint); +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 80690f9..0d49b50 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -309,6 +309,9 @@ static int _complete(dwc_otg_hcd_t * hcd +@@ -309,6 +309,9 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle, case -DWC_E_OVERFLOW: status = -EOVERFLOW; break; @@ -149,3 +155,6 @@ if a Model A root port was disconnected. default: if (status) { DWC_PRINTF("Uknown urb status %d\n", status); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0089-dwc_otg-prevent-leaking-URBs-during-enqueue.patch b/target/linux/brcm2708/patches-3.10/0089-dwc_otg-prevent-leaking-URBs-during-enqueue.patch index 833bf1b5a54..b8d987f68d6 100644 --- a/target/linux/brcm2708/patches-3.10/0089-dwc_otg-prevent-leaking-URBs-during-enqueue.patch +++ b/target/linux/brcm2708/patches-3.10/0089-dwc_otg-prevent-leaking-URBs-during-enqueue.patch @@ -1,7 +1,7 @@ -From 42ed35f8f9c76ff56afdda9b0d3add958936bea6 Mon Sep 17 00:00:00 2001 +From 53d7fd1afe9f150cbb97e6fe513aa2be32f30e1a Mon Sep 17 00:00:00 2001 From: P33M Date: Mon, 5 Aug 2013 13:17:58 +0100 -Subject: [PATCH 089/174] dwc_otg: prevent leaking URBs during enqueue +Subject: [PATCH 089/196] dwc_otg: prevent leaking URBs during enqueue A dwc_otg_urb would get leaked if the HCD enqueue function failed for any reason. Free the URB at the appropriate points. @@ -9,9 +9,11 @@ failed for any reason. Free the URB at the appropriate points. drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 8 ++++++++ 1 file changed, 8 insertions(+) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +index 0d49b50..d3949da 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c -@@ -797,11 +797,19 @@ static int dwc_otg_urb_enqueue(struct us +@@ -797,11 +797,19 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd, #if USB_URB_EP_LINKING usb_hcd_unlink_urb_from_ep(hcd, urb); #endif @@ -31,3 +33,6 @@ failed for any reason. Free the URB at the appropriate points. DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, irqflags); return retval; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0091-ARM-7819-1-fiq-Cast-the-first-argument-of-flush_icac.patch b/target/linux/brcm2708/patches-3.10/0091-ARM-7819-1-fiq-Cast-the-first-argument-of-flush_icac.patch index b7b80a7bda3..49c7bf6b22d 100644 --- a/target/linux/brcm2708/patches-3.10/0091-ARM-7819-1-fiq-Cast-the-first-argument-of-flush_icac.patch +++ b/target/linux/brcm2708/patches-3.10/0091-ARM-7819-1-fiq-Cast-the-first-argument-of-flush_icac.patch @@ -1,7 +1,7 @@ -From 3c174c25ed6ef1108d0a0f8c106c074225d7194b Mon Sep 17 00:00:00 2001 +From cfd79481c07339df7d30fe15011dbfbf994c3503 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 16 Aug 2013 12:55:56 +0100 -Subject: [PATCH 091/174] ARM: 7819/1: fiq: Cast the first argument of +Subject: [PATCH 091/196] ARM: 7819/1: fiq: Cast the first argument of flush_icache_range() Commit 2ba85e7af4 (ARM: Fix FIQ code on VIVT CPUs) causes the following build warning: @@ -16,9 +16,11 @@ Signed-off-by: Russell King arch/arm/kernel/fiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) +diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c +index 9ac7935..aac11f8 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c -@@ -89,7 +89,8 @@ void set_fiq_handler(void *start, unsign +@@ -89,7 +89,8 @@ void set_fiq_handler(void *start, unsigned int length) memcpy(base + offset, start, length); if (!cache_is_vipt_nonaliasing()) @@ -28,3 +30,6 @@ Signed-off-by: Russell King flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length); } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0092-Support-for-cheap-Ralink-3070-WiFi-plug.patch b/target/linux/brcm2708/patches-3.10/0092-Support-for-cheap-Ralink-3070-WiFi-plug.patch index 1ead15d4e74..71fd5bcb231 100644 --- a/target/linux/brcm2708/patches-3.10/0092-Support-for-cheap-Ralink-3070-WiFi-plug.patch +++ b/target/linux/brcm2708/patches-3.10/0092-Support-for-cheap-Ralink-3070-WiFi-plug.patch @@ -1,7 +1,7 @@ -From b735e5ba3039bbd89651b881705a6cb8d62882d6 Mon Sep 17 00:00:00 2001 +From 813811ee8017fcb305e4296efa12fe8009d43278 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 7 Sep 2013 19:07:33 +0100 -Subject: [PATCH 092/174] Support for cheap Ralink 3070 WiFi plug +Subject: [PATCH 092/196] Support for cheap Ralink 3070 WiFi plug See: https://github.com/raspberrypi/linux/pull/321 --- @@ -9,6 +9,8 @@ See: https://github.com/raspberrypi/linux/pull/321 drivers/net/wireless/rt2x00/rt2800lib.c | 6 ++++++ 2 files changed, 7 insertions(+) +diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h +index a7630d5..cbbcd35 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h @@ -70,6 +70,7 @@ @@ -19,9 +21,11 @@ See: https://github.com/raspberrypi/linux/pull/321 #define RF3290 0x3290 #define RF5360 0x5360 #define RF5370 0x5370 +diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c +index 12652d2..c5df041 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c -@@ -2599,6 +2599,7 @@ static void rt2800_config_channel(struct +@@ -2599,6 +2599,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, break; case RF5360: case RF5370: @@ -29,7 +33,7 @@ See: https://github.com/raspberrypi/linux/pull/321 case RF5372: case RF5390: case RF5392: -@@ -2615,6 +2616,7 @@ static void rt2800_config_channel(struct +@@ -2615,6 +2616,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, rt2x00_rf(rt2x00dev, RF3322) || rt2x00_rf(rt2x00dev, RF5360) || rt2x00_rf(rt2x00dev, RF5370) || @@ -37,7 +41,7 @@ See: https://github.com/raspberrypi/linux/pull/321 rt2x00_rf(rt2x00dev, RF5372) || rt2x00_rf(rt2x00dev, RF5390) || rt2x00_rf(rt2x00dev, RF5392)) { -@@ -3206,6 +3208,7 @@ void rt2800_vco_calibration(struct rt2x0 +@@ -3206,6 +3208,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev) case RF3290: case RF5360: case RF5370: @@ -45,7 +49,7 @@ See: https://github.com/raspberrypi/linux/pull/321 case RF5372: case RF5390: case RF5392: -@@ -5524,6 +5527,7 @@ static int rt2800_init_eeprom(struct rt2 +@@ -5524,6 +5527,7 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) case RF3322: case RF5360: case RF5370: @@ -53,7 +57,7 @@ See: https://github.com/raspberrypi/linux/pull/321 case RF5372: case RF5390: case RF5392: -@@ -5979,6 +5983,7 @@ static int rt2800_probe_hw_mode(struct r +@@ -5979,6 +5983,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) rt2x00_rf(rt2x00dev, RF3322) || rt2x00_rf(rt2x00dev, RF5360) || rt2x00_rf(rt2x00dev, RF5370) || @@ -61,7 +65,7 @@ See: https://github.com/raspberrypi/linux/pull/321 rt2x00_rf(rt2x00dev, RF5372) || rt2x00_rf(rt2x00dev, RF5390) || rt2x00_rf(rt2x00dev, RF5392)) { -@@ -6081,6 +6086,7 @@ static int rt2800_probe_hw_mode(struct r +@@ -6081,6 +6086,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) case RF3290: case RF5360: case RF5370: @@ -69,3 +73,6 @@ See: https://github.com/raspberrypi/linux/pull/321 case RF5372: case RF5390: case RF5392: +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0093-dwc_otg-Enable-NAK-holdoff-for-control-split-transac.patch b/target/linux/brcm2708/patches-3.10/0093-dwc_otg-Enable-NAK-holdoff-for-control-split-transac.patch index 827917a024d..b0f3292b545 100644 --- a/target/linux/brcm2708/patches-3.10/0093-dwc_otg-Enable-NAK-holdoff-for-control-split-transac.patch +++ b/target/linux/brcm2708/patches-3.10/0093-dwc_otg-Enable-NAK-holdoff-for-control-split-transac.patch @@ -1,7 +1,7 @@ -From 3d8a3a5cbcd4d36768cf53e778d8165aefabd5b0 Mon Sep 17 00:00:00 2001 +From 2fb3834b3ce43c6320c8186795b86ffa2257bd21 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 20 Sep 2013 16:08:27 +0100 -Subject: [PATCH 093/174] dwc_otg: Enable NAK holdoff for control split +Subject: [PATCH 093/196] dwc_otg: Enable NAK holdoff for control split transactions Certain low-speed devices take a very long time to complete a @@ -16,9 +16,11 @@ storm could cause SD card timeouts. drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 19abea0..509b629 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -1857,8 +1857,7 @@ static int32_t handle_hc_nak_intr(dwc_ot +@@ -1857,8 +1857,7 @@ static int32_t handle_hc_nak_intr(dwc_otg_hcd_t * hcd, */ switch(dwc_otg_hcd_get_pipe_type(&qtd->urb->pipe_info)) { case UE_BULK: @@ -28,3 +30,6 @@ storm could cause SD card timeouts. if (nak_holdoff_enable) hc->qh->nak_frame = dwc_otg_hcd_get_frame_number(hcd); } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0094-dwc_otg-Fix-for-occasional-lockup-on-boot-when-doing.patch b/target/linux/brcm2708/patches-3.10/0094-dwc_otg-Fix-for-occasional-lockup-on-boot-when-doing.patch index 809a1f47970..7d53260a19b 100644 --- a/target/linux/brcm2708/patches-3.10/0094-dwc_otg-Fix-for-occasional-lockup-on-boot-when-doing.patch +++ b/target/linux/brcm2708/patches-3.10/0094-dwc_otg-Fix-for-occasional-lockup-on-boot-when-doing.patch @@ -1,16 +1,18 @@ -From 4de1c90013a4ee22aa8250f455b1a6417e0d90fb Mon Sep 17 00:00:00 2001 +From 33f352709fedc760be85adde5b834043a650f585 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 20 Sep 2013 19:07:56 +0100 -Subject: [PATCH 094/174] dwc_otg: Fix for occasional lockup on boot when doing +Subject: [PATCH 094/196] dwc_otg: Fix for occasional lockup on boot when doing a USB reset --- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +index 509b629..57092d2 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c -@@ -742,8 +742,8 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_ +@@ -742,8 +742,8 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd) } /* Clear interrupt */ @@ -21,3 +23,6 @@ Subject: [PATCH 094/174] dwc_otg: Fix for occasional lockup on boot when doing return 1; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0095-dwc_otg-Don-t-issue-traffic-to-LS-devices-in-FS-mode.patch b/target/linux/brcm2708/patches-3.10/0095-dwc_otg-Don-t-issue-traffic-to-LS-devices-in-FS-mode.patch index acfb6a1751e..1c7b2ed4083 100644 --- a/target/linux/brcm2708/patches-3.10/0095-dwc_otg-Don-t-issue-traffic-to-LS-devices-in-FS-mode.patch +++ b/target/linux/brcm2708/patches-3.10/0095-dwc_otg-Don-t-issue-traffic-to-LS-devices-in-FS-mode.patch @@ -1,7 +1,7 @@ -From 0dd387f3d3d1184fe45b57afbe73796e2ebe8d39 Mon Sep 17 00:00:00 2001 +From 503ed51d257784037165695334e7a3d03d85d674 Mon Sep 17 00:00:00 2001 From: P33M Date: Fri, 27 Sep 2013 14:42:24 +0100 -Subject: [PATCH 095/174] dwc_otg: Don't issue traffic to LS devices in FS mode +Subject: [PATCH 095/196] dwc_otg: Don't issue traffic to LS devices in FS mode Issuing low-speed packets when the root port is in full-speed mode causes the root port to stop responding. Explicitly fail when @@ -10,9 +10,11 @@ enqueuing URBs to a LS endpoint on a FS bus. drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) +diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +index be1d25b..b3e1944 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c -@@ -501,6 +501,7 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -501,6 +501,7 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, dwc_otg_transaction_type_e tr_type; dwc_otg_qtd_t *qtd; gintmsk_data_t intr_mask = {.d32 = 0 }; @@ -20,7 +22,7 @@ enqueuing URBs to a LS endpoint on a FS bus. #ifdef DEBUG /* integrity checks (Broadcom) */ if (NULL == hcd->core_if) { -@@ -515,6 +516,16 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_ +@@ -515,6 +516,16 @@ int dwc_otg_hcd_urb_enqueue(dwc_otg_hcd_t * hcd, return -DWC_E_NO_DEVICE; } @@ -37,3 +39,6 @@ enqueuing URBs to a LS endpoint on a FS bus. qtd = dwc_otg_hcd_qtd_create(dwc_otg_urb, atomic_alloc); if (qtd == NULL) { DWC_ERROR("DWC OTG HCD URB Enqueue failed creating QTD\n"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0096-config-enable-BLK_DEV_SD-statically.-Add-some-DM_MIR.patch b/target/linux/brcm2708/patches-3.10/0096-config-enable-BLK_DEV_SD-statically.-Add-some-DM_MIR.patch index cb5ed99d8c8..ea9d3b8b3b3 100644 --- a/target/linux/brcm2708/patches-3.10/0096-config-enable-BLK_DEV_SD-statically.-Add-some-DM_MIR.patch +++ b/target/linux/brcm2708/patches-3.10/0096-config-enable-BLK_DEV_SD-statically.-Add-some-DM_MIR.patch @@ -1,7 +1,7 @@ -From 062e7d1247624034c6b9ff1515245930baee8862 Mon Sep 17 00:00:00 2001 +From f4ae99bfa423d21fa311ca21c360e9800dc86fb5 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 6 Nov 2013 12:08:46 +0000 -Subject: [PATCH 096/174] config: enable BLK_DEV_SD statically. Add some +Subject: [PATCH 096/196] config: enable BLK_DEV_SD statically. Add some DM_MIRROR raid options. Add ISCSI_TCP. Add R8712U kernel: config: add missing PPP config options @@ -23,6 +23,8 @@ config: Set CONFIG_SPI_SPIDEV=y arch/arm/configs/bcmrpi_defconfig | 93 +++++++++++++++++++++++++++++++++------ 1 file changed, 80 insertions(+), 13 deletions(-) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 36fcd49..20c1c4f 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -33,18 +33,21 @@ CONFIG_MODULES=y @@ -301,3 +303,6 @@ config: Set CONFIG_SPI_SPIDEV=y CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_ANSI_CPRNG is not set +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0097-wifi-Update-to-newer-rtl8192cu-driver-release.patch b/target/linux/brcm2708/patches-3.10/0097-wifi-Update-to-newer-rtl8192cu-driver-release.patch index d390129de94..bf0b95f1f4b 100644 --- a/target/linux/brcm2708/patches-3.10/0097-wifi-Update-to-newer-rtl8192cu-driver-release.patch +++ b/target/linux/brcm2708/patches-3.10/0097-wifi-Update-to-newer-rtl8192cu-driver-release.patch @@ -1,7 +1,7 @@ -From f74f54da3639f0dc1fb203c7d5b987b9b9fb0bb4 Mon Sep 17 00:00:00 2001 +From 5aec58e64fb0ba4e582150d0506e9dddea6efbe3 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 9 Nov 2013 12:17:56 +0000 -Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +Subject: [PATCH 097/196] wifi: Update to newer rtl8192cu driver release --- drivers/net/wireless/rtl8192cu/Kconfig | 4 +- @@ -205,6 +205,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release create mode 100755 drivers/net/wireless/rtl8192cu/runwpa mode change 100644 => 100755 drivers/net/wireless/rtl8192cu/wlan0dhcp +diff --git a/drivers/net/wireless/rtl8192cu/Kconfig b/drivers/net/wireless/rtl8192cu/Kconfig +index ef46361..bee5ed6 100644 --- a/drivers/net/wireless/rtl8192cu/Kconfig +++ b/drivers/net/wireless/rtl8192cu/Kconfig @@ -1,8 +1,6 @@ @@ -217,6 +219,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - Enable wireless network adapters based on Realtek RTL8192C chipset family, such as EDUP nano series + Help message of RTL8192CU +diff --git a/drivers/net/wireless/rtl8192cu/Makefile b/drivers/net/wireless/rtl8192cu/Makefile +index b52cace..c399011 100644 --- a/drivers/net/wireless/rtl8192cu/Makefile +++ b/drivers/net/wireless/rtl8192cu/Makefile @@ -1,15 +1,15 @@ @@ -259,6 +263,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -CONFIG_BT_COEXISTENCE = n -CONFIG_RTL8192CU_REDEFINE_1X1 =n -CONFIG_WAKE_ON_WLAN = n +- +-CONFIG_PLATFORM_I386_PC = n +CONFIG_POWER_SAVING = y +CONFIG_USB_AUTOSUSPEND = n +CONFIG_HW_PWRP_DETECTION = n @@ -267,8 +273,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +CONFIG_RTL8192CU_REDEFINE_1X1 = n +CONFIG_INTEL_WIDI = n +CONFIG_WAKE_ON_WLAN = n - --CONFIG_PLATFORM_I386_PC = n ++ +CONFIG_PLATFORM_I386_PC = y CONFIG_PLATFORM_TI_AM3517 = n CONFIG_PLATFORM_ANDROID_X86 = n @@ -552,7 +557,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release endif ifeq ($(CONFIG_PLATFORM_ANDROID_X86), y) -@@ -291,6 +280,18 @@ KSRC := /media/DATA-2/android-x86/ics-x8 +@@ -291,6 +280,18 @@ KSRC := /media/DATA-2/android-x86/ics-x86_20120130/out/target/product/generic_x8 MODULE_NAME :=wlan endif @@ -600,7 +605,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release endif ifeq ($(CONFIG_PLATFORM_MT53XX), y) -@@ -385,7 +386,16 @@ CROSS_COMPILE := /opt/freescale/usr/loca +@@ -385,7 +386,16 @@ CROSS_COMPILE := /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-li KVER := 2.6.31 KSRC ?= /lib/modules/2.6.31-770-g0e46b52/source endif @@ -688,7 +693,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release MODULE_NAME := wlan endif -@@ -461,11 +501,39 @@ KSRC := /home/winuser/work/Plat_sLD2T_V3 +@@ -461,11 +501,39 @@ KSRC := /home/winuser/work/Plat_sLD2T_V3010/usr/src/linux-2.6.32.2 INSTALL_PREFIX := endif @@ -794,6 +799,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko endif +diff --git a/drivers/net/wireless/rtl8192cu/clean b/drivers/net/wireless/rtl8192cu/clean +old mode 100644 +new mode 100755 +index 34686a0..8766421 --- a/drivers/net/wireless/rtl8192cu/clean +++ b/drivers/net/wireless/rtl8192cu/clean @@ -3,7 +3,3 @@ rmmod 8192cu @@ -805,6 +814,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -rmmod rtl8192c_common -rmmod rtlwifi \ No newline at end of file +diff --git a/drivers/net/wireless/rtl8192cu/core/efuse/rtw_efuse.c b/drivers/net/wireless/rtl8192cu/core/efuse/rtw_efuse.c +index 4908d6e..3d341ac 100644 --- a/drivers/net/wireless/rtl8192cu/core/efuse/rtw_efuse.c +++ b/drivers/net/wireless/rtl8192cu/core/efuse/rtw_efuse.c @@ -1,7 +1,7 @@ @@ -889,7 +900,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void EFUSE_Write1Byte( IN PADAPTER Adapter, -@@ -709,12 +736,12 @@ u8 rtw_efuse_map_write(PADAPTER padapter +@@ -709,12 +736,12 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data) if (word_en != 0xF) { ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, _FALSE); @@ -958,7 +969,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ) { u8 i; -@@ -1056,7 +1106,7 @@ int storeAdaptorInfoFile(char *path, str +@@ -1056,7 +1106,7 @@ int storeAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv) else ret = _FAIL; } else { @@ -967,7 +978,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = _FAIL; } return ret; -@@ -1086,7 +1136,7 @@ int retriveAdaptorInfoFile(char *path, s +@@ -1086,7 +1136,7 @@ int retriveAdaptorInfoFile(char *path, struct eeprom_priv * eeprom_priv) #endif } else { @@ -976,6 +987,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = _FAIL; } return ret; +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ap.c b/drivers/net/wireless/rtl8192cu/core/rtw_ap.c +new file mode 100644 +index 0000000..405e7fe --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ap.c @@ -0,0 +1,2940 @@ @@ -3919,9 +3933,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif //CONFIG_NATIVEAP_MLME +#endif //CONFIG_AP_MODE + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_br_ext.c b/drivers/net/wireless/rtl8192cu/core/rtw_br_ext.c +index 1fcdf1e..6bb924e 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_br_ext.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_br_ext.c -@@ -126,10 +126,10 @@ static int skb_pull_and_merge(struct sk_ +@@ -126,10 +126,10 @@ static int skb_pull_and_merge(struct sk_buff *skb, unsigned char *src, int len) int tail_len; unsigned long end, tail; @@ -3934,7 +3950,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release end = (unsigned long)src+len; if (tail < end) return -1; -@@ -522,7 +522,7 @@ static void __nat25_db_network_insert(_a +@@ -522,7 +522,7 @@ static void __nat25_db_network_insert(_adapter *priv, db = db->next_hash; } @@ -3979,7 +3995,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } -@@ -848,6 +848,11 @@ int nat25_db_handle(_adapter *priv, stru +@@ -848,6 +848,11 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method) else { // forward unknow IP packet to upper TCP/IP DEBUG_INFO("NAT25: Replace DA with BR's MAC\n"); @@ -3991,7 +4007,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release memcpy(skb->data, priv->br_mac, ETH_ALEN); } } -@@ -1533,7 +1538,7 @@ int nat25_handle_frame(_adapter *priv, s +@@ -1533,7 +1538,7 @@ int nat25_handle_frame(_adapter *priv, struct sk_buff *skb) _exit_critical_bh(&priv->br_ext_lock, &irqL); retval = nat25_db_handle(priv, skb, NAT25_LOOKUP); @@ -4000,7 +4016,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { if (((*((unsigned short *)(skb->data+ETH_ALEN*2)) == __constant_htons(ETH_P_IP)) && -@@ -1633,13 +1638,13 @@ void dhcp_flag_bcast(_adapter *priv, str +@@ -1633,13 +1638,13 @@ void dhcp_flag_bcast(_adapter *priv, struct sk_buff *skb) if(iph->protocol == IPPROTO_UDP) // UDP { @@ -4016,6 +4032,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(dhcph->cookie == __constant_htonl(DHCP_MAGIC)) // match magic word { +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_cmd.c b/drivers/net/wireless/rtl8192cu/core/rtw_cmd.c +index bdfec5d..f906eb3 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_cmd.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_cmd.c @@ -16,7 +16,7 @@ @@ -4120,7 +4138,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("-_rtw_free_evt_priv \n")); _func_exit_; -@@ -229,8 +247,7 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue +@@ -229,8 +247,7 @@ struct cmd_obj *_rtw_dequeue_cmd(_queue *queue) _func_enter_; //_enter_critical_bh(&(queue->lock), &irqL); @@ -4147,7 +4165,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) { u8 bAllow = _FALSE; //set to _TRUE to allow enqueuing cmd when hw_init_completed is _FALSE -@@ -292,23 +310,23 @@ int rtw_cmd_filter(struct cmd_priv *pcmd +@@ -292,23 +310,23 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) ) { if(cmd_obj->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra) ) @@ -4176,7 +4194,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { //DBG_871X("%s:%s: drop cmdcode:%u, hw_init_completed:%u, cmdthd_running:%u\n", caller_func, __FUNCTION__, // cmd_obj->cmdcode, -@@ -326,6 +344,7 @@ int rtw_cmd_filter(struct cmd_priv *pcmd +@@ -326,6 +344,7 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) { int res = _FAIL; @@ -4216,7 +4234,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release thread_return rtw_cmd_thread(thread_context context) { -@@ -408,11 +445,12 @@ thread_return rtw_cmd_thread(thread_cont +@@ -408,11 +445,12 @@ thread_return rtw_cmd_thread(thread_context context) _func_enter_; @@ -4606,22 +4624,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 rtw_setrttbl_cmd(_adapter *padapter, struct setratable_parm *prate_table) { struct cmd_obj* ph2c; -@@ -1570,8 +1708,47 @@ _func_enter_; +@@ -1570,7 +1708,7 @@ _func_enter_; init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm, GEN_CMD_CODE(_AddBAReq)); - //DBG_8192C("rtw_addbareq_cmd, tid=%d\n", tid); + //DBG_871X("rtw_addbareq_cmd, tid=%d\n", tid); -+ -+ //rtw_enqueue_cmd(pcmdpriv, ph2c); -+ res = rtw_enqueue_cmd(pcmdpriv, ph2c); -+ -+exit: -+ -+_func_exit_; -+ -+ return res; -+} + + //rtw_enqueue_cmd(pcmdpriv, ph2c); + res = rtw_enqueue_cmd(pcmdpriv, ph2c); +@@ -1581,6 +1719,87 @@ _func_exit_; + + return res; + } +//add for CONFIG_IEEE80211W, none 11w can use it +u8 rtw_reset_securitypriv_cmd(_adapter*padapter) +{ @@ -4648,20 +4663,21 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + pdrvextra_cmd_parm->ec_id = RESET_SECURITYPRIV; + pdrvextra_cmd_parm->type_size = 0; + pdrvextra_cmd_parm->pbuf = (u8 *)padapter; - ++ + init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra)); + + - //rtw_enqueue_cmd(pcmdpriv, ph2c); - res = rtw_enqueue_cmd(pcmdpriv, ph2c); - -@@ -1580,8 +1757,50 @@ exit: - _func_exit_; - - return res; ++ //rtw_enqueue_cmd(pcmdpriv, ph2c); ++ res = rtw_enqueue_cmd(pcmdpriv, ph2c); ++ ++exit: ++ ++_func_exit_; ++ ++ return res; ++ ++} + - } - +u8 rtw_free_assoc_resources_cmd(_adapter*padapter) +{ + struct cmd_obj* ph2c; @@ -4702,11 +4718,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +} + -+ + u8 rtw_dynamic_chk_wk_cmd(_adapter*padapter) { - struct cmd_obj* ph2c; -@@ -1591,6 +1810,15 @@ u8 rtw_dynamic_chk_wk_cmd(_adapter*padap +@@ -1591,6 +1810,15 @@ u8 rtw_dynamic_chk_wk_cmd(_adapter*padapter) _func_enter_; @@ -4807,7 +4822,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(setChannelSwitch_param == NULL) { rtw_mfree((u8 *)pcmdobj, sizeof(struct cmd_obj)); res= _FAIL; -@@ -1806,9 +2088,8 @@ static void traffic_status_watchdog(_ada +@@ -1806,9 +2088,8 @@ static void traffic_status_watchdog(_adapter *padapter) { #ifdef CONFIG_LPS u8 bEnterPS; @@ -4818,7 +4833,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 bBusyTraffic = _FALSE, bTxBusyTraffic = _FALSE, bRxBusyTraffic = _FALSE; u8 bHigherBusyTraffic = _FALSE, bHigherBusyRxTraffic = _FALSE, bHigherBusyTxTraffic = _FALSE; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); -@@ -1816,6 +2097,8 @@ static void traffic_status_watchdog(_ada +@@ -1816,6 +2097,8 @@ static void traffic_status_watchdog(_adapter *padapter) struct tdls_info *ptdlsinfo = &(padapter->tdlsinfo); #endif //CONFIG_TDLS @@ -4827,7 +4842,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // // Determine if our traffic is busy now // -@@ -1823,15 +2106,18 @@ static void traffic_status_watchdog(_ada +@@ -1823,15 +2106,18 @@ static void traffic_status_watchdog(_adapter *padapter) /*&& !MgntInitAdapterInProgress(pMgntInfo)*/) { @@ -4850,7 +4865,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release bTxBusyTraffic = _TRUE; } -@@ -1849,29 +2135,39 @@ static void traffic_status_watchdog(_ada +@@ -1849,29 +2135,39 @@ static void traffic_status_watchdog(_adapter *padapter) if(pmlmepriv->LinkDetectInfo.NumTxOkInPeriod > 5000) bHigherBusyTxTraffic = _TRUE; } @@ -4904,7 +4919,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release bEnterPS= _FALSE; } else -@@ -1905,15 +2201,39 @@ static void traffic_status_watchdog(_ada +@@ -1905,15 +2201,39 @@ static void traffic_status_watchdog(_adapter *padapter) pmlmepriv->LinkDetectInfo.bRxBusyTraffic = bRxBusyTraffic; pmlmepriv->LinkDetectInfo.bHigherBusyTraffic = bHigherBusyTraffic; pmlmepriv->LinkDetectInfo.bHigherBusyRxTraffic = bHigherBusyRxTraffic; @@ -4948,7 +4963,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //if(check_fwstate(pmlmepriv, _FW_UNDER_LINKING|_FW_UNDER_SURVEY)==_FALSE) -@@ -1922,13 +2242,15 @@ void dynamic_chk_wk_hdl(_adapter *padapt +@@ -1922,13 +2242,15 @@ void dynamic_chk_wk_hdl(_adapter *padapter, u8 *pbuf, int sz) traffic_status_watchdog(padapter); } @@ -5001,7 +5016,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwrpriv->DelayLPSLastTimeStamp = rtw_get_current_time(); LPS_Leave(padapter); break; -@@ -1984,7 +2306,7 @@ u8 rtw_lps_ctrl_wk_cmd(_adapter*padapter +@@ -1984,7 +2306,7 @@ u8 rtw_lps_ctrl_wk_cmd(_adapter*padapter, u8 lps_ctrl_type, u8 enqueue) struct cmd_obj *ph2c; struct drvextra_cmd_parm *pdrvextra_cmd_parm; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; @@ -5031,7 +5046,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } u8 rtw_antenna_select_cmd(_adapter*padapter, u8 antenna,u8 enqueue) -@@ -2045,7 +2372,7 @@ u8 rtw_antenna_select_cmd(_adapter*padap +@@ -2045,7 +2372,7 @@ u8 rtw_antenna_select_cmd(_adapter*padapter, u8 antenna,u8 enqueue) u8 res = _SUCCESS; _func_enter_; @@ -5064,7 +5079,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_P2P u8 p2p_protocol_wk_cmd(_adapter*padapter, int intCmdType ) { -@@ -2098,7 +2437,7 @@ u8 p2p_protocol_wk_cmd(_adapter*padapter +@@ -2098,7 +2437,7 @@ u8 p2p_protocol_wk_cmd(_adapter*padapter, int intCmdType ) _func_enter_; @@ -5202,7 +5217,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf) { struct drvextra_cmd_parm *pdrvextra_cmd; -@@ -2268,24 +2713,39 @@ u8 rtw_drvextra_cmd_hdl(_adapter *padapt +@@ -2268,24 +2713,39 @@ u8 rtw_drvextra_cmd_hdl(_adapter *padapter, unsigned char *pbuf) antenna_select_wk_hdl(padapter, pdrvextra_cmd->type_size); break; #endif @@ -5264,6 +5279,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_getrttbl_cmd_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd) { _func_enter_; +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_debug.c b/drivers/net/wireless/rtl8192cu/core/rtw_debug.c +index 04e472d..f70fcb7 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_debug.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_debug.c @@ -1,7 +1,7 @@ @@ -5304,7 +5321,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_PROC_DEBUG #include -@@ -76,6 +77,65 @@ int proc_get_drv_version(char *page, cha +@@ -76,6 +77,65 @@ int proc_get_drv_version(char *page, char **start, return len; } @@ -5370,7 +5387,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int proc_get_write_reg(char *page, char **start, off_t offset, int count, int *eof, void *data) -@@ -94,7 +154,7 @@ int proc_set_write_reg(struct file *file +@@ -94,7 +154,7 @@ int proc_set_write_reg(struct file *file, const char *buffer, if (count < 3) { @@ -5379,7 +5396,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EFAULT; } -@@ -103,7 +163,7 @@ int proc_set_write_reg(struct file *file +@@ -103,7 +163,7 @@ int proc_set_write_reg(struct file *file, const char *buffer, int num = sscanf(tmp, "%x %x %x", &addr, &val, &len); if (num != 3) { @@ -5388,7 +5405,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return count; } -@@ -119,7 +179,7 @@ int proc_set_write_reg(struct file *file +@@ -119,7 +179,7 @@ int proc_set_write_reg(struct file *file, const char *buffer, rtw_write32(padapter, addr, val); break; default: @@ -5397,7 +5414,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; } -@@ -171,14 +231,12 @@ int proc_get_read_reg(char *page, char * +@@ -171,14 +231,12 @@ int proc_get_read_reg(char *page, char **start, int proc_set_read_reg(struct file *file, const char *buffer, unsigned long count, void *data) { @@ -5413,7 +5430,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EFAULT; } -@@ -187,7 +245,7 @@ int proc_set_read_reg(struct file *file, +@@ -187,7 +245,7 @@ int proc_set_read_reg(struct file *file, const char *buffer, int num = sscanf(tmp, "%x %x", &addr, &len); if (num != 2) { @@ -5422,7 +5439,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return count; } -@@ -289,17 +347,17 @@ int proc_get_rf_info(char *page, char ** +@@ -289,17 +347,17 @@ int proc_get_rf_info(char *page, char **start, int *eof, void *data) { struct net_device *dev = data; @@ -5447,7 +5464,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } int proc_get_ap_info(char *page, char **start, -@@ -371,23 +429,282 @@ int proc_get_trx_info(char *page, char * +@@ -371,23 +429,282 @@ int proc_get_trx_info(char *page, char **start, off_t offset, int count, int *eof, void *data) { @@ -5513,10 +5530,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if((j++)%4 == 0) len += snprintf(page + len, count - len,"\n"); + } + - *eof = 1; - return len; - - } ++ *eof = 1; ++ return len; ++ ++} + +int proc_get_mac_reg_dump2(char *page, char **start, + off_t offset, int count, @@ -5536,10 +5553,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if((j++)%4 == 0) len += snprintf(page + len, count - len,"\n"); + } + -+ *eof = 1; -+ return len; -+ -+} + *eof = 1; + return len; + + } + +int proc_get_mac_reg_dump3(char *page, char **start, + off_t offset, int count, @@ -5733,7 +5750,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int proc_get_rx_signal(char *page, char **start, off_t offset, int count, -@@ -453,6 +770,101 @@ int proc_set_rx_signal(struct file *file +@@ -453,6 +770,101 @@ int proc_set_rx_signal(struct file *file, const char *buffer, } @@ -5835,7 +5852,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int proc_get_ampdu_enable(char *page, char **start, off_t offset, int count, int *eof, void *data) -@@ -500,6 +912,112 @@ int proc_set_ampdu_enable(struct file *f +@@ -500,6 +912,112 @@ int proc_set_ampdu_enable(struct file *file, const char *buffer, } @@ -5948,7 +5965,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int proc_get_rssi_disp(char *page, char **start, off_t offset, int count, int *eof, void *data) -@@ -703,7 +1221,117 @@ int proc_get_best_channel(char *page, ch +@@ -703,7 +1221,117 @@ int proc_get_best_channel(char *page, char **start, return len; } @@ -6066,6 +6083,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #endif +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_eeprom.c b/drivers/net/wireless/rtl8192cu/core/rtw_eeprom.c +index 4a0832b..fd07d64 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_eeprom.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_eeprom.c @@ -16,8 +16,7 @@ @@ -6078,6 +6097,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTW_EEPROM_C_ #include +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c b/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c +index 2b85af9..6305ba3 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c @@ -25,7 +25,27 @@ @@ -6132,7 +6153,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return HAL_PRIME_CHNL_OFFSET_UPPER; + else if(ch_offset == SCB) + return HAL_PRIME_CHNL_OFFSET_LOWER; - ++ + return HAL_PRIME_CHNL_OFFSET_DONT_CARE; +} + @@ -6162,7 +6183,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + ie_data[1] = flags; + RTW_PUT_LE16((u8*)&ie_data[2], reason); + RTW_PUT_LE16((u8*)&ie_data[4], precedence); -+ + + return rtw_set_ie(buf, 0x118, 6, ie_data, buf_len); +} @@ -6286,7 +6307,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 *pbuf = pie; while(1) -@@ -351,34 +520,31 @@ unsigned char *rtw_get_wpa_ie(unsigned c +@@ -351,34 +520,31 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) val16 = le16_to_cpu(val16); if (val16 != 0x0001) @@ -6326,7 +6347,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } unsigned char *rtw_get_wpa2_ie(unsigned char *pie, int *rsn_ie_len, int limit) -@@ -434,7 +600,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa +@@ -434,7 +600,7 @@ int rtw_parse_wpa_ie(u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie+1) != (u8)(wpa_ie_len - 2)) || @@ -6335,7 +6356,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { return _FAIL; } -@@ -787,7 +953,7 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, +@@ -787,7 +953,7 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 } static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen, @@ -6344,7 +6365,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int show_errors) { unsigned int oui; -@@ -892,7 +1058,7 @@ static int rtw_ieee802_11_parse_vendor_s +@@ -892,7 +1058,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen, * Returns: Parsing result */ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, @@ -6353,7 +6374,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int show_errors) { uint left = len; -@@ -1018,7 +1184,8 @@ ParseRes rtw_ieee802_11_parse_elems(u8 * +@@ -1018,7 +1184,8 @@ ParseRes rtw_ieee802_11_parse_elems(u8 *start, uint len, } @@ -6487,7 +6508,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { uint cnt = 0; u8 *p2p_ie_ptr; -@@ -1166,7 +1411,12 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, uint in_le +@@ -1166,7 +1411,12 @@ u8 *rtw_get_p2p_ie(u8 *in_ie, uint in_len, u8 *p2p_ie, uint *p2p_ielen) while(cntio_ops._write16; @@ -6807,7 +6830,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = _write16(pintfhdl, addr, val); _func_exit_; -@@ -174,7 +173,7 @@ int _rtw_writeN(_adapter *adapter, u32 a +@@ -174,7 +173,7 @@ int _rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *pdata) _func_enter_; _writeN = pintfhdl->io_ops._writeN; @@ -6816,7 +6839,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; return RTW_STATUS_CODE(ret); -@@ -188,8 +187,8 @@ int _rtw_write8_async(_adapter *adapter, +@@ -188,8 +187,8 @@ int _rtw_write8_async(_adapter *adapter, u32 addr, u8 val) int ret; _func_enter_; _write8_async = pintfhdl->io_ops._write8_async; @@ -6827,7 +6850,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; return RTW_STATUS_CODE(ret); -@@ -203,8 +202,8 @@ int _rtw_write16_async(_adapter *adapter +@@ -203,8 +202,8 @@ int _rtw_write16_async(_adapter *adapter, u32 addr, u16 val) int ret; _func_enter_; _write16_async = pintfhdl->io_ops._write16_async; @@ -6838,7 +6861,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; return RTW_STATUS_CODE(ret); -@@ -218,71 +217,71 @@ int _rtw_write32_async(_adapter *adapter +@@ -218,71 +217,71 @@ int _rtw_write32_async(_adapter *adapter, u32 addr, u32 val) int ret; _func_enter_; _write32_async = pintfhdl->io_ops._write32_async; @@ -6933,7 +6956,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; } -@@ -292,51 +291,48 @@ void _rtw_read_port_cancel(_adapter *ada +@@ -292,51 +291,48 @@ void _rtw_read_port_cancel(_adapter *adapter) void (*_read_port_cancel)(struct intf_hdl *pintfhdl); struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); @@ -7007,7 +7030,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } void _rtw_write_port_cancel(_adapter *adapter) -@@ -344,143 +340,121 @@ void _rtw_write_port_cancel(_adapter *ad +@@ -344,143 +340,121 @@ void _rtw_write_port_cancel(_adapter *adapter) void (*_write_port_cancel)(struct intf_hdl *pintfhdl); struct io_priv *pio_priv = &adapter->iopriv; struct intf_hdl *pintfhdl = &(pio_priv->intf); @@ -7092,15 +7115,39 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#ifdef CONFIG_RTL8192C - set_intf_ops = &rtl8192cu_set_intf_ops; -#endif +- } +- else if(padapter->chip_type == RTL8192D) +- { +-#ifdef CONFIG_RTL8192D +- set_intf_ops = &rtl8192du_set_intf_ops; +-#endif +- } +- else +- { +- set_intf_ops = NULL; +- } +-#endif //END OF CONFIG_USB_HCI +u16 read_sniff_ranges[][2] = { + //{0x550, 0x551}, +}; -+ + +-#ifdef CONFIG_PCI_HCI +u16 write_sniff_ranges[][2] = { + //{0x550, 0x551}, + //{0x4c, 0x4c}, +}; -+ + +- if(padapter->chip_type == RTL8188C_8192C) +- { +-#ifdef CONFIG_RTL8192C +- set_intf_ops = &rtl8192ce_set_intf_ops; +-#endif +- } +- else if(padapter->chip_type == RTL8192D) +- { +-#ifdef CONFIG_RTL8192D +- set_intf_ops = &rtl8192de_set_intf_ops; +-#endif +int read_sniff_num = sizeof(read_sniff_ranges)/sizeof(u16)/2; +int write_sniff_num = sizeof(write_sniff_ranges)/sizeof(u16)/2; + @@ -7111,12 +7158,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if (addr + len > read_sniff_ranges[i][0] && addr <= read_sniff_ranges[i][1]) + return _TRUE; } -- else if(padapter->chip_type == RTL8192D) -- { --#ifdef CONFIG_RTL8192D -- set_intf_ops = &rtl8192du_set_intf_ops; --#endif -- } - else - { - set_intf_ops = NULL; @@ -7131,41 +7172,25 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if (addr + len > write_sniff_ranges[i][0] && addr <= write_sniff_ranges[i][1]) + return _TRUE; } --#endif //END OF CONFIG_USB_HCI +-#endif //END OF CONFIG_PCI_HCI + + return _FALSE; +} --#ifdef CONFIG_PCI_HCI +u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line) +{ + u8 val = _rtw_read8(adapter, addr); -- if(padapter->chip_type == RTL8188C_8192C) -- { --#ifdef CONFIG_RTL8192C -- set_intf_ops = &rtl8192ce_set_intf_ops; --#endif -- } -- else if(padapter->chip_type == RTL8192D) -- { --#ifdef CONFIG_RTL8192D -- set_intf_ops = &rtl8192de_set_intf_ops; --#endif -- } -- else -- { -- set_intf_ops = NULL; -- } --#endif //END OF CONFIG_PCI_HCI +- if(set_intf_ops==NULL) +- return _FAIL; + if (match_read_sniff_ranges(addr, 1)) + DBG_871X("DBG_IO %s:%d rtw_read8(0x%04x) return 0x%02x\n", caller, line, addr, val); +- set_intf_ops(&pintf->io_ops); + return val; +} -- if(set_intf_ops==NULL) -- return _FAIL; +- return _SUCCESS; +u16 dbg_rtw_read16(_adapter *adapter, u32 addr, const char *caller, const int line) +{ + u16 val = _rtw_read16(adapter, addr); @@ -7173,18 +7198,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if (match_read_sniff_ranges(addr, 2)) + DBG_871X("DBG_IO %s:%d rtw_read16(0x%04x) return 0x%04x\n", caller, line, addr, val); -- set_intf_ops(&pintf->io_ops); + return val; +} - -- return _SUCCESS; ++ +u32 dbg_rtw_read32(_adapter *adapter, u32 addr, const char *caller, const int line) +{ + u32 val = _rtw_read32(adapter, addr); + + if (match_read_sniff_ranges(addr, 4)) + DBG_871X("DBG_IO %s:%d rtw_read32(0x%04x) return 0x%08x\n", caller, line, addr, val); - ++ + return val; } @@ -7220,6 +7243,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("DBG_IO %s:%d rtw_writeN(0x%04x, %u)\n", caller, line, addr, length); return _rtw_writeN(adapter, addr, length, data); +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_query.c b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_query.c +index 156640c..0601886 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_query.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_query.c @@ -16,8 +16,7 @@ @@ -7232,6 +7257,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTW_IOCTL_QUERY_C_ #include +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_rtl.c b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_rtl.c +index 87348a2..31b4704 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_rtl.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_rtl.c @@ -16,8 +16,7 @@ @@ -7244,6 +7271,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTW_IOCTL_RTL_C_ #include +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_set.c b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_set.c +index 946d875..e67f219 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_set.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_ioctl_set.c @@ -16,7 +16,7 @@ @@ -7264,7 +7293,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_USB_HCI #include -@@ -43,6 +43,20 @@ extern void indicate_wx_scan_complete_ev +@@ -43,6 +43,20 @@ extern void indicate_wx_scan_complete_event(_adapter *padapter); (addr[4] == 0xff) && (addr[5] == 0xff) ) ? _TRUE : _FALSE \ ) @@ -7372,7 +7401,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("do_join(): site survey return error\n.")); } } -@@ -317,8 +330,8 @@ u8 rtw_set_802_11_bssid(_adapter* padapt +@@ -317,8 +330,8 @@ u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid) _irqL irqL; u8 status=_SUCCESS; u32 cur_time = 0; @@ -7419,7 +7448,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN); pmlmepriv->assoc_by_bssid=_TRUE; -@@ -419,7 +418,6 @@ u8 rtw_set_802_11_ssid(_adapter* padapte +@@ -419,7 +418,6 @@ u8 rtw_set_802_11_ssid(_adapter* padapter, NDIS_802_11_SSID *ssid) struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *pnetwork = &pmlmepriv->cur_network; @@ -7820,7 +7849,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } return max_rate; -@@ -1408,19 +1453,42 @@ int rtw_set_channel_plan(_adapter *adapt +@@ -1408,19 +1453,42 @@ int rtw_set_channel_plan(_adapter *adapter, u8 channel_plan) */ int rtw_set_country(_adapter *adapter, const char *country_code) { @@ -7865,9 +7894,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return _FAIL; +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_iol.c b/drivers/net/wireless/rtl8192cu/core/rtw_iol.c +index f725ad4..872cc42 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_iol.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_iol.c -@@ -38,7 +38,7 @@ struct xmit_frame *rtw_IOL_accquire_xmit +@@ -38,7 +38,7 @@ struct xmit_frame *rtw_IOL_accquire_xmit_frame(ADAPTER *adapter) if ((xmitbuf = rtw_alloc_xmitbuf(pxmitpriv)) == NULL) { DBG_871X("%s rtw_alloc_xmitbuf return null\n", __FUNCTION__); @@ -7876,7 +7907,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release xmit_frame=NULL; goto exit; } -@@ -145,7 +145,7 @@ int _rtw_IOL_append_WD_cmd(struct xmit_f +@@ -145,7 +145,7 @@ int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value) #ifdef DBG_IO int dbg_rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, const char *caller, const int line) { @@ -7885,7 +7916,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("DBG_IO %s:%d IOL_WB(0x%04x, 0x%02x)\n", caller, line, addr, value); return _rtw_IOL_append_WB_cmd(xmit_frame, addr, value); -@@ -153,7 +153,7 @@ int dbg_rtw_IOL_append_WB_cmd(struct xmi +@@ -153,7 +153,7 @@ int dbg_rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr, u8 value, int dbg_rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, const char *caller, const int line) { @@ -7894,7 +7925,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("DBG_IO %s:%d IOL_WW(0x%04x, 0x%04x)\n", caller, line, addr, value); return _rtw_IOL_append_WW_cmd(xmit_frame, addr, value); -@@ -161,7 +161,7 @@ int dbg_rtw_IOL_append_WW_cmd(struct xmi +@@ -161,7 +161,7 @@ int dbg_rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value int dbg_rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, const char *caller, const int line) { @@ -7903,7 +7934,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("DBG_IO %s:%d IOL_WD(0x%04x, 0x%08x)\n", caller, line, addr, value); return _rtw_IOL_append_WD_cmd(xmit_frame, addr, value); -@@ -224,10 +224,7 @@ int rtw_IOL_append_END_cmd(struct xmit_f +@@ -224,10 +224,7 @@ int rtw_IOL_append_END_cmd(struct xmit_frame *xmit_frame) int rtw_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms) { @@ -7924,6 +7955,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _TRUE; #endif +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mlme.c b/drivers/net/wireless/rtl8192cu/core/rtw_mlme.c +index 2e11d9d..00edd9c 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_mlme.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mlme.c @@ -16,7 +16,7 @@ @@ -7987,7 +8020,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_mfree_mlme_priv_lock (struct mlme_priv *pmlmepriv) { _rtw_spinlock_free(&pmlmepriv->lock); -@@ -108,7 +115,7 @@ static void rtw_free_mlme_ie_data(u8 **p +@@ -108,7 +115,7 @@ static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen) { if(*ppie) { @@ -7996,7 +8029,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release *plen = 0; *ppie=NULL; } -@@ -117,6 +124,8 @@ static void rtw_free_mlme_ie_data(u8 **p +@@ -117,6 +124,8 @@ static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen) void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv) { #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) @@ -8005,7 +8038,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_free_mlme_ie_data(&pmlmepriv->wps_beacon_ie, &pmlmepriv->wps_beacon_ie_len); rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_req_ie, &pmlmepriv->wps_probe_req_ie_len); rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_resp_ie, &pmlmepriv->wps_probe_resp_ie_len); -@@ -128,6 +137,15 @@ void rtw_free_mlme_priv_ie_data(struct m +@@ -128,6 +137,15 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv) rtw_free_mlme_ie_data(&pmlmepriv->p2p_go_probe_resp_ie, &pmlmepriv->p2p_go_probe_resp_ie_len); rtw_free_mlme_ie_data(&pmlmepriv->p2p_assoc_req_ie, &pmlmepriv->p2p_assoc_req_ie_len); #endif @@ -8039,7 +8072,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _enter_critical_bh(&free_queue->lock, &irqL); -@@ -385,8 +414,6 @@ void _rtw_free_network_queue(_adapter *p +@@ -385,8 +414,6 @@ void _rtw_free_network_queue(_adapter *padapter, u8 isfreeall) struct wlan_network *pnetwork; struct mlme_priv* pmlmepriv = &padapter->mlmepriv; _queue *scanned_queue = &pmlmepriv->scanned_queue; @@ -8093,7 +8126,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork ) { _func_enter_; -@@ -585,6 +615,7 @@ int rtw_is_same_ibss(_adapter *adapter, +@@ -585,6 +615,7 @@ int rtw_is_same_ibss(_adapter *adapter, struct wlan_network *pnetwork) } @@ -8101,7 +8134,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b) { //RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("(%s,%d)(%s,%d)\n", -@@ -593,7 +624,7 @@ inline int is_same_ess(WLAN_BSSID_EX *a, +@@ -593,7 +624,7 @@ inline int is_same_ess(WLAN_BSSID_EX *a, WLAN_BSSID_EX *b) && _rtw_memcmp(a->Ssid.Ssid, b->Ssid.Ssid, a->Ssid.SsidLength)==_TRUE; } @@ -8122,7 +8155,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 ss_ori = dst->PhyInfo.SignalStrength; u8 sq_ori = dst->PhyInfo.SignalQuality; long rssi_ori = dst->Rssi; -@@ -678,16 +709,20 @@ static void update_network(WLAN_BSSID_EX +@@ -678,16 +709,20 @@ static void update_network(WLAN_BSSID_EX *dst, WLAN_BSSID_EX *src,_adapter * pad u8 sq_smp = src->PhyInfo.SignalQuality; long rssi_smp = src->Rssi; @@ -8265,7 +8298,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof (NDIS_802_11_FIXED_IEs), pmlmepriv->cur_network.network.IELength); } -@@ -824,6 +855,7 @@ void rtw_update_scanned_network(_adapter +@@ -824,6 +855,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target) struct wlan_network *oldest = NULL; _func_enter_; @@ -8356,7 +8389,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork) { struct security_priv *psecuritypriv = &adapter->securitypriv; -@@ -965,7 +1009,7 @@ int rtw_is_desired_network(_adapter *ada +@@ -965,7 +1009,7 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork) desired_encmode = psecuritypriv->ndisencryptstatus; privacy = pnetwork->network.Privacy; @@ -8365,7 +8398,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if(rtw_get_wps_ie(pnetwork->network.IEs+_FIXED_IE_LENGTH_, pnetwork->network.IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen)!=NULL) { -@@ -978,8 +1022,20 @@ int rtw_is_desired_network(_adapter *ada +@@ -978,8 +1022,20 @@ int rtw_is_desired_network(_adapter *adapter, struct wlan_network *pnetwork) } if (adapter->registrypriv.wifi_spec == 1) //for correct flow of 8021X to do.... { @@ -8394,7 +8427,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); #ifdef CONFIG_MLME_EXT -@@ -1108,7 +1165,6 @@ void rtw_surveydone_event_callback(_adap +@@ -1108,7 +1165,6 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) _func_enter_; _enter_critical_bh(&pmlmepriv->lock, &irqL); @@ -8519,7 +8552,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_IOCTL_CFG80211 rtw_cfg80211_surveydone_event_callback(adapter); -@@ -1297,19 +1374,15 @@ void rtw_free_assoc_resources(_adapter * +@@ -1297,19 +1374,15 @@ void rtw_free_assoc_resources(_adapter *adapter, int lock_scanned_queue) _irqL irqL; struct wlan_network* pwlan = NULL; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; @@ -8721,7 +8754,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; } -@@ -1468,16 +1590,45 @@ inline void rtw_indicate_scan_done( _ada +@@ -1468,16 +1590,45 @@ inline void rtw_indicate_scan_done( _adapter *padapter, bool aborted) rtw_os_indicate_scan_done(padapter, aborted); } @@ -8771,7 +8804,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psta = rtw_get_stainfo(pstapriv, pnetwork->network.MacAddress); if(psta==NULL) { -@@ -1490,16 +1641,16 @@ static struct sta_info *rtw_joinbss_upda +@@ -1490,16 +1641,16 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl psta->aid = pnetwork->join_res; #ifdef CONFIG_CONCURRENT_MODE @@ -8797,7 +8830,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //security related if(padapter->securitypriv.dot11AuthAlgrthm== dot11AuthAlgrthm_8021X) -@@ -1516,10 +1667,22 @@ static struct sta_info *rtw_joinbss_upda +@@ -1516,10 +1667,22 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl _rtw_memset((u8 *)&psta->dot11tkiprxmickey, 0, sizeof (union Keytype)); _rtw_memset((u8 *)&psta->dot11tkiptxmickey, 0, sizeof (union Keytype)); @@ -8821,7 +8854,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //for A-MPDU Rx reordering buffer control for bmc_sta & sta_info //if A-MPDU Rx is enabled, reseting rx_ordering_ctrl wstart_b(indicate_seq) to default value=0xffff -@@ -1582,7 +1745,6 @@ static void rtw_joinbss_update_network(_ +@@ -1582,7 +1745,6 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network * // why not use ptarget_wlan?? _rtw_memcpy(&cur_network->network, &pnetwork->network, pnetwork->network.Length); @@ -8829,7 +8862,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release cur_network->aid = pnetwork->join_res; -@@ -1594,15 +1756,29 @@ static void rtw_joinbss_update_network(_ +@@ -1594,15 +1756,29 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network * padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality; //the ptarget_wlan->network.Rssi is raw data, we use ptarget_wlan->network.PhyInfo.SignalStrength instead (has scaled) padapter->recvpriv.rssi = translate_percentage_to_dbm(ptarget_wlan->network.PhyInfo.SignalStrength); @@ -8861,7 +8894,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case Ndis802_11IBSS: pmlmepriv->fw_state = WIFI_ADHOC_STATE; -@@ -1617,7 +1793,7 @@ static void rtw_joinbss_update_network(_ +@@ -1617,7 +1793,7 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network * (cur_network->network.IELength)); #ifdef CONFIG_80211N_HT @@ -8870,7 +8903,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif -@@ -1634,7 +1810,6 @@ static void rtw_joinbss_update_network(_ +@@ -1634,7 +1810,6 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network * void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf) { _irqL irqL,irqL2; @@ -8954,7 +8987,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; } -@@ -1871,8 +2051,7 @@ void rtw_stassoc_event_callback(_adapter +@@ -1871,8 +2051,7 @@ void rtw_stassoc_event_callback(_adapter *adapter, u8 *pbuf) _func_enter_; @@ -9004,7 +9037,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } goto exit; -@@ -1992,15 +2173,19 @@ void rtw_stadel_event_callback(_adapter +@@ -1992,15 +2173,19 @@ void rtw_stadel_event_callback(_adapter *adapter, u8 *pbuf) _func_enter_; @@ -9098,7 +9131,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif _func_exit_; -@@ -2120,7 +2313,9 @@ void _rtw_join_timeout_handler (_adapter +@@ -2120,7 +2313,9 @@ void _rtw_join_timeout_handler (_adapter *adapter) { _irqL irqL; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; @@ -9108,7 +9141,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 0 if (adapter->bDriverStopped == _TRUE){ -@@ -2130,6 +2325,24 @@ void _rtw_join_timeout_handler (_adapter +@@ -2130,6 +2325,24 @@ void _rtw_join_timeout_handler (_adapter *adapter) #endif _func_enter_; @@ -9190,7 +9223,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* * rtw_scan_timeout_handler - Timeout/Faliure handler for CMD SiteSurvey * @adapter: pointer to _adapter structure -@@ -2185,18 +2414,16 @@ void rtw_scan_timeout_handler (_adapter +@@ -2185,18 +2414,16 @@ void rtw_scan_timeout_handler (_adapter *adapter) _irqL irqL; struct mlme_priv *pmlmepriv = &adapter->mlmepriv; @@ -9212,7 +9245,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void rtw_auto_scan_handler(_adapter *padapter) -@@ -2210,26 +2437,35 @@ static void rtw_auto_scan_handler(_adapt +@@ -2210,26 +2437,35 @@ static void rtw_auto_scan_handler(_adapter *padapter) pmlmepriv->scan_interval--; if(pmlmepriv->scan_interval==0) { @@ -9254,7 +9287,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pmlmepriv->scan_interval = SCAN_INTERVAL;// 30*2 sec = 60sec -@@ -2245,6 +2481,12 @@ void rtw_dynamic_check_timer_handlder(_a +@@ -2245,6 +2481,12 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter) struct mlme_priv *pmlmepriv = &adapter->mlmepriv; #endif //CONFIG_AP_MODE struct registry_priv *pregistrypriv = &adapter->registrypriv; @@ -9267,7 +9300,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(adapter->hw_init_completed == _FALSE) return; -@@ -2252,8 +2494,21 @@ void rtw_dynamic_check_timer_handlder(_a +@@ -2252,8 +2494,21 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter) if ((adapter->bDriverStopped == _TRUE)||(adapter->bSurpriseRemoved== _TRUE)) return; @@ -9289,7 +9322,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_dynamic_chk_wk_cmd(adapter); -@@ -2269,12 +2524,14 @@ void rtw_dynamic_check_timer_handlder(_a +@@ -2269,12 +2524,14 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter) } } @@ -9304,7 +9337,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_BR_EXT -@@ -2313,27 +2570,58 @@ void rtw_dynamic_check_timer_handlder(_a +@@ -2313,27 +2570,58 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter) #ifdef CONFIG_SET_SCAN_DENY_TIMER @@ -9367,7 +9400,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* * Select a new join candidate from the original @param candidate and @param competitor * @return _TRUE: candidate is updated -@@ -2364,7 +2652,7 @@ static int rtw_check_join_candidate(stru +@@ -2364,7 +2652,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv goto exit; #ifdef CONFIG_LAYER2_ROAMING @@ -9376,7 +9409,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if( rtw_get_passing_time_ms((u32)competitor->last_scanned) >= RTW_SCAN_RESULT_EXPIRE || is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) == _FALSE ) -@@ -2393,7 +2681,7 @@ static int rtw_check_join_candidate(stru +@@ -2393,7 +2681,7 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv } } else #ifdef CONFIG_LAYER2_ROAMING @@ -9385,7 +9418,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if( (*candidate == NULL ||(*candidate)->network.Rssinetwork.Rssi ) && is_same_ess(&competitor->network, &pmlmepriv->cur_network.network) //&&(!is_same_network(&competitor->network, &pmlmepriv->cur_network.network)) -@@ -2423,14 +2711,15 @@ static int rtw_check_join_candidate(stru +@@ -2423,14 +2711,15 @@ static int rtw_check_join_candidate(struct mlme_priv *pmlmepriv #ifdef CONFIG_LAYER2_ROAMING "[to_roaming:%u] " #endif @@ -9612,7 +9645,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release iEntry = SecIsInPMKIDList(adapter, pmlmepriv->assoc_bssid); if(iEntry<0) { -@@ -3097,7 +3384,7 @@ void rtw_update_registrypriv_dev_network +@@ -3097,7 +3384,7 @@ void rtw_update_registrypriv_dev_network(_adapter* adapter) WLAN_BSSID_EX *pdev_network = &pregistrypriv->dev_network; struct security_priv* psecuritypriv = &adapter->securitypriv; struct wlan_network *cur_network = &adapter->mlmepriv.cur_network; @@ -9631,7 +9664,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -3211,12 +3495,12 @@ void rtw_joinbss_reset(_adapter *padapte +@@ -3211,12 +3495,12 @@ void rtw_joinbss_reset(_adapter *padapter) threshold = 1; else threshold = 0; @@ -9646,7 +9679,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif -@@ -3228,7 +3512,7 @@ void rtw_joinbss_reset(_adapter *padapte +@@ -3228,7 +3512,7 @@ void rtw_joinbss_reset(_adapter *padapter) #ifdef CONFIG_80211N_HT //the fucntion is >= passive_level @@ -9655,7 +9688,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { u32 ielen, out_len; unsigned char *p, *pframe; -@@ -3237,7 +3521,8 @@ unsigned int rtw_restructure_ht_ie(_adap +@@ -3237,7 +3521,8 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct qos_priv *pqospriv= &pmlmepriv->qospriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv; @@ -9665,7 +9698,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release phtpriv->ht_option = _FALSE; -@@ -3258,19 +3543,31 @@ unsigned int rtw_restructure_ht_ie(_adap +@@ -3258,19 +3543,31 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui _rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap)); @@ -9705,7 +9738,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } ht_capie.ampdu_params_info = (IEEE80211_HT_CAP_AMPDU_FACTOR&0x03); -@@ -3305,7 +3602,7 @@ unsigned int rtw_restructure_ht_ie(_adap +@@ -3305,7 +3602,7 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui } //the fucntion is > passive_level (in critical_section) @@ -9714,7 +9747,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { u8 *p, max_ampdu_sz; int len; -@@ -3320,7 +3617,7 @@ void rtw_update_ht_cap(_adapter *padapte +@@ -3320,7 +3617,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len) //struct wlan_network *pcur_network = &(pmlmepriv->cur_network);; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -9723,7 +9756,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(!phtpriv->ht_option) return; -@@ -3333,11 +3630,12 @@ void rtw_update_ht_cap(_adapter *padapte +@@ -3333,11 +3630,12 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len) //maybe needs check if ap supports rx ampdu. if((phtpriv->ampdu_enable==_FALSE) &&(pregistrypriv->ampdu_enable==1)) { @@ -9738,7 +9771,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { phtpriv->ampdu_enable = _TRUE; } -@@ -3357,13 +3655,13 @@ void rtw_update_ht_cap(_adapter *padapte +@@ -3357,13 +3655,13 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len) max_ampdu_sz = (pht_capie->ampdu_params_info & IEEE80211_HT_CAP_AMPDU_FACTOR); max_ampdu_sz = 1 << (max_ampdu_sz+3); // max_ampdu_sz (kbytes); @@ -9755,7 +9788,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p = rtw_get_ie(pie+sizeof (NDIS_802_11_FIXED_IEs), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (NDIS_802_11_FIXED_IEs)); if(p && len>0) { -@@ -3371,12 +3669,56 @@ void rtw_update_ht_cap(_adapter *padapte +@@ -3371,12 +3669,56 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len) //todo: } @@ -9814,7 +9847,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //switch to the 40M Hz mode accoring to the AP pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40; switch ((pmlmeinfo->HT_info.infos[0] & 0x3)) -@@ -3392,13 +3734,13 @@ void rtw_update_ht_cap(_adapter *padapte +@@ -3392,13 +3734,13 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len) default: pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; break; @@ -9831,7 +9864,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC) { /*u8 i; -@@ -3467,7 +3809,6 @@ void rtw_issue_addbareq_cmd(_adapter *pa +@@ -3467,7 +3809,6 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe) struct sta_info *psta=NULL; struct ht_priv *phtpriv; struct pkt_attrib *pattrib =&pxmitframe->attrib; @@ -9839,7 +9872,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release s32 bmcst = IS_MCAST(pattrib->ra); if(bmcst || (padapter->mlmepriv.LinkDetectInfo.bTxBusyTraffic == _FALSE)) -@@ -3478,10 +3819,23 @@ void rtw_issue_addbareq_cmd(_adapter *pa +@@ -3478,10 +3819,23 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe) if (pattrib->psta) psta = pattrib->psta; else @@ -9863,7 +9896,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release phtpriv = &psta->htpriv; -@@ -3503,6 +3857,18 @@ void rtw_issue_addbareq_cmd(_adapter *pa +@@ -3503,6 +3857,18 @@ void rtw_issue_addbareq_cmd(_adapter *padapter, struct xmit_frame *pxmitframe) #endif #ifdef CONFIG_LAYER2_ROAMING @@ -9882,7 +9915,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) { _irqL irqL; -@@ -3524,7 +3890,7 @@ void _rtw_roaming(_adapter *padapter, st +@@ -3524,7 +3890,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) else pnetwork = &pmlmepriv->cur_network; @@ -9891,7 +9924,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("roaming from %s("MAC_FMT"), length:%d\n", pnetwork->network.Ssid.Ssid, MAC_ARG(pnetwork->network.MacAddress), pnetwork->network.Ssid.SsidLength); -@@ -3539,7 +3905,7 @@ void _rtw_roaming(_adapter *padapter, st +@@ -3539,7 +3905,7 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) DBG_871X("roaming do_join return %d\n", do_join_r); pmlmepriv->to_roaming--; @@ -9900,7 +9933,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release continue; } else { DBG_871X("%s(%d) -to roaming fail, indicate_disconnect\n", __FUNCTION__,__LINE__); -@@ -3553,3 +3919,49 @@ void _rtw_roaming(_adapter *padapter, st +@@ -3553,3 +3919,49 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network) } #endif @@ -9950,6 +9983,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +} +#endif //CONFIG_CONCURRENT_MODE + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mlme_ext.c b/drivers/net/wireless/rtl8192cu/core/rtw_mlme_ext.c +index e1e496d..d29a20c 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_mlme_ext.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mlme_ext.c @@ -1,6 +1,6 @@ @@ -10007,7 +10042,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #else //CONFIG_DISABLE_MCS13TO15 unsigned char MCS_rate_2R[16] = {0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; #endif //CONFIG_DISABLE_MCS13TO15 -@@ -147,6 +157,7 @@ static RT_CHANNEL_PLAN_2G RTW_ChannelPla +@@ -147,6 +157,7 @@ static RT_CHANNEL_PLAN_2G RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = { {{1,2,3,4,5,6,7,8,9,10,11},11}, // 0x02, RT_CHANNEL_DOMAIN_2G_FCC1 {{1,2,3,4,5,6,7,8,9,10,11,12,13,14},14}, // 0x03, RT_CHANNEL_DOMAIN_2G_MIKK1 {{10,11,12,13},4}, // 0x04, RT_CHANNEL_DOMAIN_2G_ETSI2 @@ -10015,7 +10050,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; static RT_CHANNEL_PLAN_5G RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = { -@@ -171,6 +182,7 @@ static RT_CHANNEL_PLAN_5G RTW_ChannelPla +@@ -171,6 +182,7 @@ static RT_CHANNEL_PLAN_5G RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = { //===== Driver self defined for old channel plan Compatible ,Remember to modify if have new channel plan definition ===== {{36,40,44,48,52,56,60,64,100,104,108,112,116,132,136,140,149,153,157,161,165},21}, // 0x11, RT_CHANNEL_DOMAIN_5G_FCC {{36,40,44,48},4}, // 0x12, RT_CHANNEL_DOMAIN_5G_JAPAN_NO_DFS @@ -10023,7 +10058,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; static RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { -@@ -180,8 +192,8 @@ static RT_CHANNEL_PLAN_MAP RTW_ChannelPl +@@ -180,8 +192,8 @@ static RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { {0x01,0x01}, //0x02, RT_CHANNEL_DOMAIN_ETSI {0x01,0x00}, //0x03, RT_CHANNEL_DOMAIN_SPAIN {0x01,0x00}, //0x04, RT_CHANNEL_DOMAIN_FRANCE @@ -10034,7 +10069,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release {0x01,0x09}, //0x07, RT_CHANNEL_DOMAIN_ISRAEL {0x03,0x09}, //0x08, RT_CHANNEL_DOMAIN_TELEC {0x03,0x00}, //0x09, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN -@@ -196,18 +208,17 @@ static RT_CHANNEL_PLAN_MAP RTW_ChannelPl +@@ -196,18 +208,17 @@ static RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { {0x01,0x12}, //0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS {0x00,0x04}, //0x13, RT_CHANNEL_DOMAIN_WORLD_WIDE_5G {0x02,0x10}, //0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS @@ -10059,7 +10094,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //===== 0x20 ~ 0x7F ,New Define ===== {0x00,0x00}, //0x20, RT_CHANNEL_DOMAIN_WORLD_NULL {0x01,0x00}, //0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL -@@ -244,24 +255,44 @@ static RT_CHANNEL_PLAN_MAP RTW_ChannelPl +@@ -244,24 +255,44 @@ static RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { {0x02,0x10}, //0x40, RT_CHANNEL_DOMAIN_FCC1_NCC2 }; @@ -10117,7 +10152,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } /**************************************************************************** -@@ -286,20 +317,21 @@ static void init_mlme_ext_priv_value(_ad +@@ -286,20 +317,21 @@ static void init_mlme_ext_priv_value(_adapter* padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -10145,7 +10180,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pmlmeext->retry = 0; pmlmeext->cur_wireless_mode = padapter->registrypriv.wireless_mode; -@@ -309,10 +341,14 @@ static void init_mlme_ext_priv_value(_ad +@@ -309,10 +341,14 @@ static void init_mlme_ext_priv_value(_adapter* padapter) _rtw_memcpy(pmlmeext->datarate, mixed_datarate, NumRates); _rtw_memcpy(pmlmeext->basicrate, mixed_basicrate, NumRates); @@ -10161,7 +10196,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pmlmeext->scan_abort = _FALSE; pmlmeinfo->state = WIFI_FW_NULL_STATE; -@@ -333,6 +369,79 @@ static void init_mlme_ext_priv_value(_ad +@@ -333,6 +369,79 @@ static void init_mlme_ext_priv_value(_adapter* padapter) pmlmeinfo->preamble_mode = PREAMBLE_AUTO; pmlmeinfo->dialogToken = 0; @@ -10241,7 +10276,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static u8 init_channel_set(_adapter* padapter, u8 ChannelPlan, RT_CHANNEL_INFO *channel_set) -@@ -407,7 +516,7 @@ static u8 init_channel_set(_adapter* pad +@@ -407,7 +516,7 @@ static u8 init_channel_set(_adapter* padapter, u8 ChannelPlan, RT_CHANNEL_INFO * if ( channel_set[chanset_size].ChannelNum <= 48 || channel_set[chanset_size].ChannelNum >= 149 ) { @@ -10250,7 +10285,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release channel_set[chanset_size].ScanType = SCAN_PASSIVE; else channel_set[chanset_size].ScanType = SCAN_ACTIVE; -@@ -421,7 +530,7 @@ static u8 init_channel_set(_adapter* pad +@@ -421,7 +530,7 @@ static u8 init_channel_set(_adapter* padapter, u8 ChannelPlan, RT_CHANNEL_INFO * if ( RTW_ChannelPlan5G[Index5G].Channel[index] <= 48 || RTW_ChannelPlan5G[Index5G].Channel[index] >= 149 ) { channel_set[chanset_size].ChannelNum = RTW_ChannelPlan5G[Index5G].Channel[index]; @@ -10259,7 +10294,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release channel_set[chanset_size].ScanType = SCAN_PASSIVE; else channel_set[chanset_size].ScanType = SCAN_ACTIVE; -@@ -460,10 +569,16 @@ int init_mlme_ext_priv(_adapter* padapte +@@ -460,10 +569,16 @@ int init_mlme_ext_priv(_adapter* padapter) #endif pmlmeext->max_chan_nums = init_channel_set(padapter, pmlmepriv->ChannelPlan,pmlmeext->channel_set); @@ -10277,7 +10312,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return res; } -@@ -483,69 +598,6 @@ void free_mlme_ext_priv (struct mlme_ext +@@ -483,69 +598,6 @@ void free_mlme_ext_priv (struct mlme_ext_priv *pmlmeext) } } @@ -10347,7 +10382,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static u8 cmp_pkt_chnl_diff(_adapter *padapter,u8* pframe,uint packet_len) { // if the channel is same, return 0. else return channel differential uint len; -@@ -569,11 +621,11 @@ static u8 cmp_pkt_chnl_diff(_adapter *pa +@@ -569,11 +621,11 @@ static u8 cmp_pkt_chnl_diff(_adapter *padapter,u8* pframe,uint packet_len) return 0; } } @@ -10360,7 +10395,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(ptable->func) { -@@ -593,10 +645,12 @@ void mgt_dispatcher(_adapter *padapter, +@@ -593,10 +645,12 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) { int index; struct mlme_handler *ptable; @@ -10374,7 +10409,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("+mgt_dispatcher: type(0x%x) subtype(0x%x)\n", -@@ -606,11 +660,11 @@ void mgt_dispatcher(_adapter *padapter, +@@ -606,11 +660,11 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) { u8 *pbuf; pbuf = GetAddr1Ptr(pframe); @@ -10389,7 +10424,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif -@@ -633,13 +687,15 @@ void mgt_dispatcher(_adapter *padapter, +@@ -633,13 +687,15 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_TDLS if((index << 4)==WIFI_ACTION){ @@ -10409,7 +10444,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (index > 13) { -@@ -648,18 +704,19 @@ void mgt_dispatcher(_adapter *padapter, +@@ -648,18 +704,19 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) } ptable += index; @@ -10438,7 +10473,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #else -@@ -723,7 +780,37 @@ void mgt_dispatcher(_adapter *padapter, +@@ -723,7 +780,37 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_P2P u32 p2p_listen_state_process(_adapter *padapter, unsigned char *da) { @@ -10477,7 +10512,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _SUCCESS; } #endif //CONFIG_P2P -@@ -750,6 +837,7 @@ unsigned int OnProbeReq(_adapter *padapt +@@ -750,6 +837,7 @@ unsigned int OnProbeReq(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo = &(padapter->wdinfo); struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; @@ -10485,7 +10520,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( !rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE) && -@@ -764,7 +852,17 @@ unsigned int OnProbeReq(_adapter *padapt +@@ -764,7 +852,17 @@ unsigned int OnProbeReq(_adapter *padapter, union recv_frame *precv_frame) // mcs_rate = 2 -> CCK 5.5M rate // mcs_rate = 3 -> CCK 11M rate // In the P2P mode, the driver should not support the CCK rate @@ -10645,7 +10680,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -857,7 +1080,6 @@ unsigned int OnProbeRsp(_adapter *padapt +@@ -857,7 +1080,6 @@ unsigned int OnProbeRsp(_adapter *padapter, union recv_frame *precv_frame) { pwdinfo->tx_prov_disc_info.benable = _FALSE; issue_p2p_provision_request( padapter, @@ -10653,7 +10688,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->tx_prov_disc_info.ssid.Ssid, pwdinfo->tx_prov_disc_info.ssid.SsidLength, pwdinfo->tx_prov_disc_info.peerDevAddr ); -@@ -866,7 +1088,6 @@ unsigned int OnProbeRsp(_adapter *padapt +@@ -866,7 +1088,6 @@ unsigned int OnProbeRsp(_adapter *padapter, union recv_frame *precv_frame) { pwdinfo->tx_prov_disc_info.benable = _FALSE; issue_p2p_provision_request( padapter, @@ -10661,7 +10696,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NULL, 0, pwdinfo->tx_prov_disc_info.peerDevAddr ); -@@ -887,12 +1108,30 @@ unsigned int OnProbeRsp(_adapter *padapt +@@ -887,12 +1108,30 @@ unsigned int OnProbeRsp(_adapter *padapter, union recv_frame *precv_frame) } } } @@ -10692,7 +10727,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _SUCCESS; } -@@ -922,10 +1161,33 @@ unsigned int OnBeacon(_adapter *padapter +@@ -922,10 +1161,33 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) struct sta_priv *pstapriv = &padapter->stapriv; u8 *pframe = precv_frame->u.hdr.rx_data; uint len = precv_frame->u.hdr.len; @@ -10726,7 +10761,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _SUCCESS; } -@@ -935,6 +1197,10 @@ unsigned int OnBeacon(_adapter *padapter +@@ -935,6 +1197,10 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) { //check the vendor of the assoc AP pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pframe+sizeof(struct rtw_ieee80211_hdr_3addr), len-sizeof(struct rtw_ieee80211_hdr_3addr)); @@ -10737,7 +10772,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //update TSF Value update_TSF(pmlmeext, pframe, len); -@@ -973,9 +1239,10 @@ unsigned int OnBeacon(_adapter *padapter +@@ -973,9 +1239,10 @@ unsigned int OnBeacon(_adapter *padapter, union recv_frame *precv_frame) process_csa_ie(padapter, pframe, len); //channel switch announcement #endif //CONFIG_DFS @@ -10750,7 +10785,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 0 //move to validate_recv_mgnt_frame psta->sta_stats.rx_mgnt_pkts++; -@@ -1045,6 +1312,16 @@ unsigned int OnAuth(_adapter *padapter, +@@ -1045,6 +1312,16 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) u8 *pframe = precv_frame->u.hdr.rx_data; uint len = precv_frame->u.hdr.len; @@ -10767,7 +10802,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) return _FAIL; -@@ -1053,8 +1330,8 @@ unsigned int OnAuth(_adapter *padapter, +@@ -1053,8 +1330,8 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) sa = GetAddr2Ptr(pframe); auth_mode = psecuritypriv->dot11AuthAlgrthm; @@ -10778,7 +10813,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (GetPrivacy(pframe)) { -@@ -1096,7 +1373,7 @@ unsigned int OnAuth(_adapter *padapter, +@@ -1096,7 +1373,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) goto auth_fail; } @@ -10787,7 +10822,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release phead = &priv->wlan_acl_list; plist = phead->next; //check sa -@@ -1125,13 +1402,19 @@ unsigned int OnAuth(_adapter *padapter, +@@ -1125,13 +1402,19 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,"auth abort because ACL!\n"); return FAIL; } @@ -10808,7 +10843,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pstat = rtw_alloc_stainfo(pstapriv, sa); if (pstat == NULL) { -@@ -1152,6 +1435,7 @@ unsigned int OnAuth(_adapter *padapter, +@@ -1152,6 +1435,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) if(rtw_is_list_empty(&pstat->asoc_list)==_FALSE) { rtw_list_delete(&pstat->asoc_list); @@ -10816,7 +10851,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (pstat->expire_to > 0) { //TODO: STA re_auth within expire_to -@@ -1168,6 +1452,7 @@ unsigned int OnAuth(_adapter *padapter, +@@ -1168,6 +1452,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) if (rtw_is_list_empty(&pstat->auth_list)) { rtw_list_insert_tail(&pstat->auth_list, &pstapriv->auth_list); @@ -10824,7 +10859,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _exit_critical_bh(&pstapriv->auth_list_lock, &irqL); -@@ -1266,13 +1551,13 @@ unsigned int OnAuth(_adapter *padapter, +@@ -1266,13 +1551,13 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) auth_fail: @@ -10845,7 +10880,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_NATIVEAP_MLME issue_auth(padapter, pstat, (unsigned short)status); -@@ -1334,7 +1619,7 @@ unsigned int OnAuthClient(_adapter *pada +@@ -1334,7 +1619,7 @@ unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame) if (p == NULL) { @@ -10854,7 +10889,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto authclnt_fail; } -@@ -1365,7 +1650,7 @@ unsigned int OnAuthClient(_adapter *pada +@@ -1365,7 +1650,7 @@ unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame) else { // this is also illegal @@ -10863,7 +10898,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto authclnt_fail; } -@@ -1388,13 +1673,11 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1388,13 +1673,11 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) #ifdef CONFIG_AP_MODE _irqL irqL; u16 capab_info, listen_interval; @@ -10878,7 +10913,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned char supportRate[16]; int supportRateNum; unsigned short status = _STATS_SUCCESSFUL_; -@@ -1418,6 +1701,15 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1418,6 +1701,15 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) #endif // CONFIG_WFD #endif //CONFIG_P2P @@ -10894,7 +10929,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) return _FAIL; -@@ -1668,7 +1960,7 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1668,7 +1960,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) { u8 selected_registrar = 0; @@ -10903,7 +10938,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(!selected_registrar) { -@@ -1709,7 +2001,7 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1709,7 +2001,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) copy_len = ((wpa_ie_len+2) > sizeof(pstat->wpa_ie)) ? (sizeof(pstat->wpa_ie)):(wpa_ie_len+2); } @@ -10912,7 +10947,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(copy_len>0) _rtw_memcpy(pstat->wpa_ie, wpa_ie-2, copy_len); -@@ -1859,12 +2151,12 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1859,12 +2151,12 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, attr_content, &attr_contentlen); if ( attr_contentlen ) { @@ -10928,7 +10963,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pstat->p2p_status_code = p2p_status_code; #endif //CONFIG_P2P -@@ -1910,6 +2202,7 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1910,6 +2202,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) if (!rtw_is_list_empty(&pstat->auth_list)) { rtw_list_delete(&pstat->auth_list); @@ -10936,7 +10971,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _exit_critical_bh(&pstapriv->auth_list_lock, &irqL); -@@ -1917,7 +2210,8 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1917,7 +2210,8 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) if (rtw_is_list_empty(&pstat->asoc_list)) { pstat->expire_to = pstapriv->expire_to; @@ -10946,7 +10981,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); -@@ -1926,53 +2220,54 @@ unsigned int OnAssocReq(_adapter *padapt +@@ -1926,53 +2220,54 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) { #ifdef CONFIG_NATIVEAP_MLME //.1 bss_cap_update & sta_info_update @@ -11034,7 +11069,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif } -@@ -2011,6 +2306,7 @@ unsigned int OnAssocRsp(_adapter *padapt +@@ -2011,6 +2306,7 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame) int res; unsigned short status; PNDIS_802_11_VARIABLE_IEs pIE; @@ -11042,7 +11077,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); //WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); -@@ -2063,13 +2359,13 @@ unsigned int OnAssocRsp(_adapter *padapt +@@ -2063,13 +2359,13 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame) { WMM_param_handler(padapter, pIE); } @@ -11059,7 +11094,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case _HT_CAPABILITY_IE_: //HT caps -@@ -2096,10 +2392,22 @@ unsigned int OnAssocRsp(_adapter *padapt +@@ -2096,10 +2392,22 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame) //Update Basic Rate Table for spec, 2010-12-28 , by thomas UpdateBrateTbl(padapter, pmlmeinfo->network.SupportedRates); @@ -11083,7 +11118,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _SUCCESS; } -@@ -2110,11 +2418,22 @@ unsigned int OnDeAuth(_adapter *padapter +@@ -2110,11 +2418,22 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u8 *pframe = precv_frame->u.hdr.rx_data; @@ -11106,7 +11141,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release reason = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN)); DBG_871X("%s Reason code(%d)\n", __FUNCTION__,reason); -@@ -2128,48 +2447,87 @@ unsigned int OnDeAuth(_adapter *padapter +@@ -2128,31 +2447,59 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame) //_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL); //rtw_free_stainfo(padapter, psta); @@ -11145,13 +11180,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - receive_disconnect(padapter, GetAddr3Ptr(pframe) ,reason); - } -- pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; -- return _SUCCESS; -- --} + int ignore_received_deauth = 0; - --unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame) ++ + // Commented by Albert 20130604 + // Before sending the auth frame to start the STA/GC mode connection with AP/GO, + // we will send the deauth first. @@ -11175,15 +11205,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + receive_disconnect(padapter, GetAddr3Ptr(pframe) ,reason); + } + } -+ pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; -+ return _SUCCESS; -+ -+} -+ -+unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame) - { - unsigned short reason; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + pmlmepriv->LinkDetectInfo.bBusyTraffic = _FALSE; + return _SUCCESS; + +@@ -2165,11 +2512,22 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u8 *pframe = precv_frame->u.hdr.rx_data; @@ -11206,7 +11231,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release reason = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN)); DBG_871X("%s Reason code(%d)\n", __FUNCTION__,reason); -@@ -2183,21 +2541,26 @@ unsigned int OnDisassoc(_adapter *padapt +@@ -2183,21 +2541,26 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame) //_enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL); //rtw_free_stainfo(padapter, psta); @@ -11236,7 +11261,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } return _SUCCESS; -@@ -2220,6 +2583,107 @@ unsigned int OnAtim(_adapter *padapter, +@@ -2220,6 +2583,107 @@ unsigned int OnAtim(_adapter *padapter, union recv_frame *precv_frame) return _SUCCESS; } @@ -11344,7 +11369,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned int OnAction_qos(_adapter *padapter, union recv_frame *precv_frame) { return _SUCCESS; -@@ -2242,8 +2706,6 @@ unsigned int OnAction_back(_adapter *pad +@@ -2242,8 +2706,6 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u8 *pframe = precv_frame->u.hdr.rx_data; struct sta_priv *pstapriv = &padapter->stapriv; @@ -11353,7 +11378,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //check RA matches or not if (!_rtw_memcmp(myid(&(padapter->eeprompriv)), GetAddr1Ptr(pframe), ETH_ALEN))//for if1, sta/ap mode -@@ -2271,6 +2733,15 @@ unsigned int OnAction_back(_adapter *pad +@@ -2271,6 +2733,15 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) category = frame_body[0]; if (category == RTW_WLAN_CATEGORY_BACK)// representing Block Ack { @@ -11369,7 +11394,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (!pmlmeinfo->HT_enable) { return _SUCCESS; -@@ -2314,7 +2785,7 @@ unsigned int OnAction_back(_adapter *pad +@@ -2314,7 +2785,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) psta->htpriv.agg_enable_bitmap &= ~BIT(tid); } @@ -11378,7 +11403,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case RTW_WLAN_ACTION_DELBA: //DELBA -@@ -2339,7 +2810,7 @@ unsigned int OnAction_back(_adapter *pad +@@ -2339,7 +2810,7 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) #endif } @@ -11387,7 +11412,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //todo: how to notify the host while receiving DELETE BA break; -@@ -2352,6 +2823,45 @@ unsigned int OnAction_back(_adapter *pad +@@ -2352,6 +2823,45 @@ unsigned int OnAction_back(_adapter *padapter, union recv_frame *precv_frame) } #ifdef CONFIG_P2P @@ -11433,7 +11458,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void issue_p2p_GO_request(_adapter *padapter, u8* raddr) { -@@ -2361,10 +2871,11 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2361,10 +2871,11 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) u8 oui_subtype = P2P_GO_NEGO_REQ; u8 wpsie[ 255 ] = { 0x00 }, p2pie[ 255 ] = { 0x00 }; u8 wpsielen = 0, p2pielen = 0, i; @@ -11447,7 +11472,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; -@@ -2382,7 +2893,7 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2382,7 +2893,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) return; } @@ -11456,7 +11481,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //update attribute pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); -@@ -2494,12 +3005,18 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2494,12 +3005,18 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) // Value: // Device Capability Bitmap, 1 byte @@ -11480,7 +11505,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Group Owner Intent // Type: -@@ -2536,8 +3053,8 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2536,8 +3053,8 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) // Value: // Country String @@ -11491,7 +11516,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // The third byte should be set to 0x04. // Described in the "Operating Channel Attribute" section. -@@ -2585,33 +3102,104 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2585,33 +3102,104 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) // Type: p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST; @@ -11609,7 +11634,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Device Info // Type: -@@ -2637,7 +3225,7 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2637,7 +3225,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) // Primary Device Type // Category ID @@ -11618,7 +11643,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // OUI -@@ -2645,7 +3233,7 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2645,7 +3233,7 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) p2pielen += 4; // Sub Category ID @@ -11627,7 +11652,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // Number of Secondary Device Types -@@ -2675,16 +3263,30 @@ void issue_p2p_GO_request(_adapter *pada +@@ -2675,16 +3263,30 @@ void issue_p2p_GO_request(_adapter *padapter, u8* raddr) // Value: // Country String @@ -11662,7 +11687,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Channel Number p2pie[ p2pielen++ ] = pwdinfo->operating_channel; // operating channel number -@@ -2717,10 +3319,8 @@ void issue_p2p_GO_response(_adapter *pad +@@ -2717,10 +3319,8 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le uint wpsielen = 0; u16 wps_devicepassword_id = 0x0000; uint wps_devicepassword_id_len = 0; @@ -11675,7 +11700,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; -@@ -2732,13 +3332,16 @@ void issue_p2p_GO_response(_adapter *pad +@@ -2732,13 +3332,16 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &( padapter->wdinfo); @@ -11693,7 +11718,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //update attribute pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); -@@ -2839,7 +3442,7 @@ void issue_p2p_GO_response(_adapter *pad +@@ -2839,7 +3442,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le _rtw_memcpy( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "pbc", 3 ); } } @@ -11702,7 +11727,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen ); -@@ -2899,13 +3502,18 @@ void issue_p2p_GO_response(_adapter *pad +@@ -2899,13 +3502,18 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le else { // Be group owner or meet the error case @@ -11725,7 +11750,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Group Owner Intent // Type: -@@ -2950,15 +3558,29 @@ void issue_p2p_GO_response(_adapter *pad +@@ -2950,15 +3558,29 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le // Value: // Country String @@ -11758,7 +11783,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Channel Number p2pie[ p2pielen++ ] = pwdinfo->operating_channel; // operating channel number -@@ -2979,33 +3601,103 @@ void issue_p2p_GO_response(_adapter *pad +@@ -2979,33 +3601,103 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le // Type: p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST; @@ -11839,7 +11864,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + p2pie[ p2pielen++ ] = pbuddy_mlmeext->cur_channel; + } + else -+ { + { +- p2pie[ p2pielen++ ] = pmlmeext->channel_set[ i ].ChannelNum; + int i, j; + for (j = 0; j < pmlmeext->channel_list.reg_classes; j++) { + // Operating Class @@ -11855,8 +11881,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + } +#else // CONFIG_CONCURRENT_MODE - { -- p2pie[ p2pielen++ ] = pmlmeext->channel_set[ i ].ChannelNum; ++ { + int i, j; + for (j = 0; j < pmlmeext->channel_list.reg_classes; j++) { + // Operating Class @@ -11875,7 +11900,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Device Info // Type: -@@ -3031,7 +3723,7 @@ void issue_p2p_GO_response(_adapter *pad +@@ -3031,7 +3723,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le // Primary Device Type // Category ID @@ -11884,7 +11909,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // OUI -@@ -3039,7 +3731,7 @@ void issue_p2p_GO_response(_adapter *pad +@@ -3039,7 +3731,7 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le p2pielen += 4; // Sub Category ID @@ -11893,7 +11918,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // Number of Secondary Device Types -@@ -3080,12 +3772,12 @@ void issue_p2p_GO_response(_adapter *pad +@@ -3080,12 +3772,12 @@ void issue_p2p_GO_response(_adapter *padapter, u8* raddr, u8* frame_body,uint le } pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen ); @@ -11908,7 +11933,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pattrib->last_txcmdsz = pattrib->pktlen; -@@ -3104,9 +3796,6 @@ void issue_p2p_GO_confirm(_adapter *pada +@@ -3104,9 +3796,6 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8* raddr, u8 result) u8 oui_subtype = P2P_GO_NEGO_CONF; u8 wpsie[ 255 ] = { 0x00 }, p2pie[ 255 ] = { 0x00 }; u8 wpsielen = 0, p2pielen = 0; @@ -11918,7 +11943,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; -@@ -3117,14 +3806,16 @@ void issue_p2p_GO_confirm(_adapter *pada +@@ -3117,14 +3806,16 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8* raddr, u8 result) struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wifidirect_info *pwdinfo = &( padapter->wdinfo); @@ -11937,7 +11962,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //update attribute pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); -@@ -3194,12 +3885,17 @@ void issue_p2p_GO_confirm(_adapter *pada +@@ -3194,12 +3885,17 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8* raddr, u8 result) // Value: // Device Capability Bitmap, 1 byte @@ -11959,7 +11984,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Operating Channel -@@ -3212,24 +3908,54 @@ void issue_p2p_GO_confirm(_adapter *pada +@@ -3212,22 +3908,52 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8* raddr, u8 result) // Value: // Country String @@ -11977,12 +12002,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT) ) { -- p2pie[ p2pielen++ ] = pwdinfo->peer_operating_ch; -- } -- else -- { -- // Channel Number -- p2pie[ p2pielen++ ] = pwdinfo->operating_channel; // Use the listen channel as the operating channel + if ( pwdinfo->peer_operating_ch <= 14 ) + { + // Operating Class @@ -11999,10 +12018,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + p2pie[ p2pielen++ ] = 0x7c; + } + -+ p2pie[ p2pielen++ ] = pwdinfo->peer_operating_ch; -+ } -+ else -+ { + p2pie[ p2pielen++ ] = pwdinfo->peer_operating_ch; + } + else + { + if ( pwdinfo->operating_channel <= 14 ) + { + // Operating Class @@ -12019,12 +12038,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + p2pie[ p2pielen++ ] = 0x7c; + } + -+ // Channel Number -+ p2pie[ p2pielen++ ] = pwdinfo->operating_channel; // Use the listen channel as the operating channel + // Channel Number + p2pie[ p2pielen++ ] = pwdinfo->operating_channel; // Use the listen channel as the operating channel } - - -@@ -3237,29 +3963,60 @@ void issue_p2p_GO_confirm(_adapter *pada +@@ -3237,29 +3963,60 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8* raddr, u8 result) // Type: p2pie[ p2pielen++ ] = P2P_ATTR_CH_LIST; @@ -12100,7 +12117,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) ) { -@@ -3282,12 +4039,12 @@ void issue_p2p_GO_confirm(_adapter *pada +@@ -3282,12 +4039,12 @@ void issue_p2p_GO_confirm(_adapter *padapter, u8* raddr, u8 result) } pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen ); @@ -12115,7 +12132,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pattrib->last_txcmdsz = pattrib->pktlen; -@@ -3305,9 +4062,20 @@ void issue_p2p_invitation_request(_adapt +@@ -3305,9 +4062,20 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_INVIT_REQ; u8 p2pie[ 255 ] = { 0x00 }; @@ -12138,7 +12155,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; unsigned char *pframe; -@@ -3367,7 +4135,7 @@ void issue_p2p_invitation_request(_adapt +@@ -3367,7 +4135,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) // 1. Configuration Timeout // 2. Invitation Flags // 3. Operating Channel ( Only GO ) @@ -12147,7 +12164,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // 5. Channel List // 6. P2P Group ID // 7. P2P Device Info -@@ -3396,42 +4164,153 @@ void issue_p2p_invitation_request(_adapt +@@ -3396,42 +4164,153 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) p2pie[ p2pielen++ ] = P2P_INVITATION_FLAGS_PERSISTENT; @@ -12185,15 +12202,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + // Channel Number + p2pie[ p2pielen++ ] = pwdinfo->invitereq_info.operating_ch; // operating channel number -+ + +- // Number of Channels +- p2pie[ p2pielen++ ] = 0x0B; // support channel 1 - 11 + if ( _rtw_memcmp( myid( &padapter->eeprompriv ), pwdinfo->invitereq_info.go_bssid, ETH_ALEN ) ) + { + // P2P Group BSSID + // Type: + p2pie[ p2pielen++ ] = P2P_ATTR_GROUP_BSSID; - -- // Number of Channels -- p2pie[ p2pielen++ ] = 0x0B; // support channel 1 - 11 ++ + // Length: + *(u16*) ( p2pie + p2pielen ) = cpu_to_le16( ETH_ALEN ); + p2pielen += 2; @@ -12320,7 +12337,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // P2P Group ID // Type: -@@ -3443,11 +4322,11 @@ void issue_p2p_invitation_request(_adapt +@@ -3443,11 +4322,11 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) // Value: // P2P Device Address for GO @@ -12334,7 +12351,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += pwdinfo->invitereq_info.ssidlen; -@@ -3473,7 +4352,7 @@ void issue_p2p_invitation_request(_adapt +@@ -3473,7 +4352,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) // Primary Device Type // Category ID @@ -12343,7 +12360,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // OUI -@@ -3481,7 +4360,7 @@ void issue_p2p_invitation_request(_adapt +@@ -3481,7 +4360,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) p2pielen += 4; // Sub Category ID @@ -12352,7 +12369,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // Number of Secondary Device Types -@@ -3501,7 +4380,12 @@ void issue_p2p_invitation_request(_adapt +@@ -3501,7 +4380,12 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) p2pielen += pwdinfo->device_name_len; pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &pattrib->pktlen ); @@ -12366,7 +12383,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pattrib->last_txcmdsz = pattrib->pktlen; -@@ -3511,7 +4395,7 @@ void issue_p2p_invitation_request(_adapt +@@ -3511,7 +4395,7 @@ void issue_p2p_invitation_request(_adapter *padapter, u8* raddr ) } @@ -12375,7 +12392,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; -@@ -3519,7 +4403,18 @@ void issue_p2p_invitation_response(_adap +@@ -3519,7 +4403,18 @@ void issue_p2p_invitation_response(_adapter *padapter, u8* raddr, u8 dialogToken u32 p2poui = cpu_to_be32(P2POUI); u8 oui_subtype = P2P_INVIT_RESP; u8 p2pie[ 255 ] = { 0x00 }; @@ -12395,7 +12412,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; -@@ -3592,19 +4487,13 @@ void issue_p2p_invitation_response(_adap +@@ -3592,19 +4487,13 @@ void issue_p2p_invitation_response(_adapter *padapter, u8* raddr, u8 dialogToken p2pielen += 2; // Value: @@ -12422,7 +12439,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Configuration Timeout // Type: -@@ -3618,49 +4507,164 @@ void issue_p2p_invitation_response(_adap +@@ -3618,49 +4507,164 @@ void issue_p2p_invitation_response(_adapter *padapter, u8* raddr, u8 dialogToken p2pie[ p2pielen++ ] = 200; // 2 seconds needed to be the P2P GO p2pie[ p2pielen++ ] = 200; // 2 seconds needed to be the P2P Client @@ -12609,7 +12626,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pattrib->last_txcmdsz = pattrib->pktlen; -@@ -3670,7 +4674,7 @@ void issue_p2p_invitation_response(_adap +@@ -3670,7 +4674,7 @@ void issue_p2p_invitation_response(_adapter *padapter, u8* raddr, u8 dialogToken } @@ -12618,7 +12635,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { unsigned char category = RTW_WLAN_CATEGORY_PUBLIC; u8 action = P2P_PUB_ACTION_ACTION; -@@ -3700,7 +4704,7 @@ void issue_p2p_provision_request(_adapte +@@ -3700,7 +4704,7 @@ void issue_p2p_provision_request(_adapter *padapter, u8* pinterface_raddr, u8* p return; } @@ -12627,7 +12644,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //update attribute pattrib = &pmgntframe->attrib; update_mgntframe_attrib(padapter, pattrib); -@@ -3713,10 +4717,9 @@ void issue_p2p_provision_request(_adapte +@@ -3713,10 +4717,9 @@ void issue_p2p_provision_request(_adapter *padapter, u8* pinterface_raddr, u8* p fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; @@ -12640,7 +12657,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; -@@ -3783,21 +4786,22 @@ void issue_p2p_provision_request(_adapte +@@ -3783,21 +4786,22 @@ void issue_p2p_provision_request(_adapter *padapter, u8* pinterface_raddr, u8* p } @@ -12666,7 +12683,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; } } -@@ -3816,6 +4820,7 @@ void issue_probersp_p2p(_adapter *padapt +@@ -3816,6 +4820,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -12674,7 +12691,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); u16 beacon_interval = 100; u16 capInfo = 0; -@@ -3825,13 +4830,10 @@ void issue_probersp_p2p(_adapter *padapt +@@ -3825,13 +4830,10 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) #ifdef CONFIG_WFD u32 wfdielen = 0; #endif //CONFIG_WFD @@ -12692,7 +12709,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //DBG_871X("%s\n", __FUNCTION__); if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -@@ -3893,20 +4895,10 @@ void issue_probersp_p2p(_adapter *padapt +@@ -3893,20 +4895,10 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pwdinfo->support_rate, &pattrib->pktlen); // DS parameter set @@ -12715,7 +12732,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if( pmlmepriv->wps_probe_resp_ie != NULL && pmlmepriv->p2p_probe_resp_ie != NULL ) { -@@ -3922,7 +4914,7 @@ void issue_probersp_p2p(_adapter *padapt +@@ -3922,7 +4914,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) } } else @@ -12724,10 +12741,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { // Todo: WPS IE -@@ -3946,6 +4938,41 @@ void issue_probersp_p2p(_adapter *padapt +@@ -3946,9 +4938,44 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) // Value: wpsie[wpsielen++] = WPS_VERSION_1; // Version 1.0 +- // WiFi Simple Config State +- // Type: +- *(u16*) ( wpsie + wpsielen ) = cpu_to_be16( WPS_ATTR_SIMPLE_CONF_STATE ); +#ifdef CONFIG_INTEL_WIDI + // Commented by Kurt + // Appended WiDi info. only if we did issued_probereq_widi(), and then we saved ven. ext. in pmlmepriv->sa_ext. @@ -12763,10 +12783,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +#endif //CONFIG_INTEL_WIDI + - // WiFi Simple Config State - // Type: - *(u16*) ( wpsie + wpsielen ) = cpu_to_be16( WPS_ATTR_SIMPLE_CONF_STATE ); -@@ -3980,7 +5007,12 @@ void issue_probersp_p2p(_adapter *padapt ++ // WiFi Simple Config State ++ // Type: ++ *(u16*) ( wpsie + wpsielen ) = cpu_to_be16( WPS_ATTR_SIMPLE_CONF_STATE ); + wpsielen += 2; + + // Length: +@@ -3980,7 +5007,12 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) wpsielen += 2; // Value: @@ -12780,7 +12803,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wpsielen += 0x10; // Manufacturer -@@ -4081,7 +5113,7 @@ void issue_probersp_p2p(_adapter *padapt +@@ -4081,7 +5113,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) // Value: *(u16*) ( wpsie + wpsielen ) = cpu_to_be16( pwdinfo->supported_wps_cm ); wpsielen += 2; @@ -12789,7 +12812,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen ); -@@ -4092,10 +5124,24 @@ void issue_probersp_p2p(_adapter *padapt +@@ -4092,10 +5124,24 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) } #ifdef CONFIG_WFD @@ -12818,7 +12841,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pattrib->last_txcmdsz = pattrib->pktlen; -@@ -4106,8 +5152,9 @@ void issue_probersp_p2p(_adapter *padapt +@@ -4106,8 +5152,9 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da) } @@ -12829,7 +12852,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; unsigned char *pframe; -@@ -4126,12 +5173,13 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4126,12 +5173,13 @@ void issue_probereq_p2p(_adapter *padapter) #ifdef CONFIG_WFD u32 wfdielen = 0; #endif //CONFIG_WFD @@ -12846,7 +12869,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //update attribute -@@ -4149,9 +5197,23 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4149,9 +5197,23 @@ void issue_probereq_p2p(_adapter *padapter) fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; @@ -12873,7 +12896,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); -@@ -4168,14 +5230,14 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4168,14 +5230,14 @@ void issue_probereq_p2p(_adapter *padapter) else { pframe = rtw_set_ie(pframe, _SSID_IE_, P2P_WILDCARD_SSID_LEN, pwdinfo->p2p_wildcard_ssid, &(pattrib->pktlen)); @@ -12891,7 +12914,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { //WPS IE _rtw_memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); -@@ -4213,6 +5275,40 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4213,6 +5275,40 @@ void issue_probereq_p2p(_adapter *padapter) // Value: wpsie[wpsielen++] = WPS_VERSION_1; // Version 1.0 @@ -12932,7 +12955,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Device Name // Type: *(u16*) ( wpsie + wpsielen ) = cpu_to_be16( WPS_ATTR_DEVICE_NAME ); -@@ -4237,7 +5333,7 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4237,7 +5333,7 @@ void issue_probereq_p2p(_adapter *padapter) // Value: // Category ID @@ -12941,7 +12964,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wpsielen += 2; // OUI -@@ -4245,7 +5341,20 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4245,7 +5341,20 @@ void issue_probereq_p2p(_adapter *padapter) wpsielen += 4; // Sub Category ID @@ -12963,7 +12986,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wpsielen += 2; pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen ); -@@ -4275,12 +5384,13 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4275,12 +5384,13 @@ void issue_probereq_p2p(_adapter *padapter) // Value: // Device Capability Bitmap, 1 byte @@ -12981,7 +13004,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Listen Channel // Type: -@@ -4292,8 +5402,8 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4292,8 +5402,8 @@ void issue_probereq_p2p(_adapter *padapter) // Value: // Country String @@ -12992,7 +13015,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // The third byte should be set to 0x04. // Described in the "Operating Channel Attribute" section. -@@ -4335,8 +5445,8 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4335,8 +5445,8 @@ void issue_probereq_p2p(_adapter *padapter) // Value: // Country String @@ -13003,7 +13026,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // The third byte should be set to 0x04. // Described in the "Operating Channel Attribute" section. -@@ -4349,283 +5459,702 @@ void issue_probereq_p2p(_adapter *padapt +@@ -4349,283 +5459,702 @@ void issue_probereq_p2p(_adapter *padapter) p2pie[ p2pielen++ ] = pwdinfo->operating_channel; // operating channel number } @@ -13455,6 +13478,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + // After having the peer interface address, the sigma can find the correct conf file for wpa_supplicant. + + if ( attr_contentlen ) ++ { ++ DBG_871X( "[%s] GO's BSSID = %.2X %.2X %.2X %.2X %.2X %.2X\n", __FUNCTION__, ++ pwdinfo->p2p_peer_interface_addr[0], pwdinfo->p2p_peer_interface_addr[1], ++ pwdinfo->p2p_peer_interface_addr[2], pwdinfo->p2p_peer_interface_addr[3], ++ pwdinfo->p2p_peer_interface_addr[4], pwdinfo->p2p_peer_interface_addr[5] ); ++ } ++ ++ if ( invitation_flag & P2P_INVITATION_FLAGS_PERSISTENT ) { - // Parse the necessary information from the P2P Invitation Request frame. - // For example: The MAC address of sending this P2P Invitation Request frame. @@ -13467,15 +13498,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtw_p2p_set_state(pwdinfo, P2P_STATE_RECV_INVITE_REQ); - DBG_871X( "[%s] peer address %.2X %.2X %.2X %.2X %.2X %.2X\n", __FUNCTION__, - groupid[0], groupid[1], groupid[2], groupid[3], groupid[4], groupid[5] ); -+ DBG_871X( "[%s] GO's BSSID = %.2X %.2X %.2X %.2X %.2X %.2X\n", __FUNCTION__, -+ pwdinfo->p2p_peer_interface_addr[0], pwdinfo->p2p_peer_interface_addr[1], -+ pwdinfo->p2p_peer_interface_addr[2], pwdinfo->p2p_peer_interface_addr[3], -+ pwdinfo->p2p_peer_interface_addr[4], pwdinfo->p2p_peer_interface_addr[5] ); -+ } - +- - if ( is_matched_in_profilelist( pwdinfo->p2p_peer_interface_addr, &pwdinfo->profileinfo[ 0 ] ) ) -+ if ( invitation_flag & P2P_INVITATION_FLAGS_PERSISTENT ) -+ { + // Re-invoke the persistent group. + + _rtw_memset( &group_id, 0x00, sizeof( struct group_id_info ) ); @@ -13618,9 +13642,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + DBG_871X( "[%s] P2P Invitation Flags Attribute NOT FOUND!\n", __FUNCTION__ ); + status_code = P2P_STATUS_FAIL_INFO_UNAVAILABLE; + } -+ + +- process_p2p_devdisc_req(pwdinfo, pframe, len); + DBG_871X( "[%s] status_code = %d\n", __FUNCTION__, status_code ); -+ + +- break; + pwdinfo->inviteresp_info.token = frame_body[ 7 ]; + issue_p2p_invitation_response( padapter, GetAddr2Ptr(pframe), pwdinfo->inviteresp_info.token, status_code ); + _set_timer( &pwdinfo->restore_p2p_state_timer, 3000 ); @@ -13650,8 +13676,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + DBG_871X( "[%s] Status = %d\n", __FUNCTION__, attr_content ); + pwdinfo->invitereq_info.benable = _FALSE; - -- process_p2p_devdisc_req(pwdinfo, pframe, len); ++ + if ( attr_content == P2P_STATUS_SUCCESS ) + { + if ( _rtw_memcmp( pwdinfo->invitereq_info.go_bssid, myid( &padapter->eeprompriv ), ETH_ALEN )) @@ -13682,7 +13707,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + rtw_p2p_set_state( pwdinfo, P2P_STATE_RX_INVITE_RESP_FAIL ); + } -- break; +- case P2P_DEVDISC_RESP: + if ( rtw_p2p_chk_state( pwdinfo, P2P_STATE_RX_INVITE_RESP_FAIL ) ) + { + _set_timer( &pwdinfo->restore_p2p_state_timer, 5000 ); @@ -13691,20 +13716,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + case P2P_DEVDISC_REQ: -- case P2P_DEVDISC_RESP: -+ process_p2p_devdisc_req(pwdinfo, pframe, len); - - process_p2p_devdisc_resp(pwdinfo, pframe, len); -+ break; ++ process_p2p_devdisc_req(pwdinfo, pframe, len); - break; -+ case P2P_DEVDISC_RESP: ++ break; - case P2P_PROVISION_DISC_REQ: - DBG_871X( "[%s] Got Provisioning Discovery Request Frame\n", __FUNCTION__ ); - process_p2p_provdisc_req(pwdinfo, pframe, len); - _rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN); -- ++ case P2P_DEVDISC_RESP: + - //20110902 Kurt - //Add the following statement to avoid receiving duplicate prov disc req. such that pre_p2p_state would be covered. - if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ)) @@ -13732,8 +13755,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + process_p2p_provdisc_req(pwdinfo, pframe, len); + _rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN); -- } -- } + //20110902 Kurt + //Add the following statement to avoid receiving duplicate prov disc req. such that pre_p2p_state would be covered. + if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ)) @@ -13747,10 +13768,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + padapter->mlmepriv.widi_state = INTEL_WIDI_STATE_WFD_CONNECTION; + _cancel_timer_ex(&(padapter->mlmepriv.listen_timer)); + intel_widi_wk_cmd(padapter, INTEL_WIDI_LISTEN_STOP_WK, NULL); -+ } + } +- } +#endif //CONFIG_INTEL_WIDI + break; -+ + +- } + case P2P_PROVISION_DISC_RESP: + // Commented by Albert 20110707 + // Should we check the pwdinfo->tx_prov_disc_info.bsent flag here?? @@ -13762,8 +13785,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + process_p2p_provdisc_resp(pwdinfo, pframe); + _set_timer( &pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT ); + break; - -- } ++ + } + } #endif //CONFIG_P2P @@ -13897,7 +13919,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned int OnAction_wmm(_adapter *padapter, union recv_frame *precv_frame) { return _SUCCESS; -@@ -4657,7 +6186,7 @@ unsigned int OnAction_p2p(_adapter *pada +@@ -4657,7 +6186,7 @@ unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame) return _SUCCESS; #ifdef CONFIG_IOCTL_CFG80211 @@ -13906,7 +13928,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { rtw_cfg80211_rx_action_p2p(padapter, pframe, len); return _SUCCESS; -@@ -4665,7 +6194,7 @@ unsigned int OnAction_p2p(_adapter *pada +@@ -4665,7 +6194,7 @@ unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame) else #endif //CONFIG_IOCTL_CFG80211 { @@ -13915,7 +13937,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release OUI_Subtype = frame_body[5]; dialogToken = frame_body[6]; -@@ -4694,7 +6223,6 @@ unsigned int OnAction_p2p(_adapter *pada +@@ -4694,7 +6223,6 @@ unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame) } } @@ -13923,7 +13945,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //CONFIG_P2P return _SUCCESS; -@@ -4728,43 +6256,53 @@ unsigned int OnAction(_adapter *padapter +@@ -4728,43 +6256,53 @@ unsigned int OnAction(_adapter *padapter, union recv_frame *precv_frame) unsigned int DoReserved(_adapter *padapter, union recv_frame *precv_frame) { @@ -13994,7 +14016,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /**************************************************************************** -@@ -4772,6 +6310,15 @@ Following are some TX fuctions for WiFi +@@ -4772,6 +6310,15 @@ Following are some TX fuctions for WiFi MLME *****************************************************************************/ @@ -14010,7 +14032,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void update_mgntframe_attrib(_adapter *padapter, struct pkt_attrib *pattrib) { struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); -@@ -4810,810 +6357,135 @@ void dump_mgntframe(_adapter *padapter, +@@ -4810,1305 +6357,1051 @@ void dump_mgntframe(_adapter *padapter, struct xmit_frame *pmgntframe) { if(padapter->bSurpriseRemoved == _TRUE || padapter->bDriverStopped == _TRUE) @@ -14073,14 +14095,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _rtw_memcpy(pwlanhdr->addr1, ptdls_sta->hwaddr, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -- ++ rtw_sctx_init(&sctx, timeout_ms); ++ pxmitbuf->sctx = &sctx; + - ptdls_sta->sta_xmitpriv.txseq_tid[pattrib->priority]++; - ptdls_sta->sta_xmitpriv.txseq_tid[pattrib->priority] &= 0xFFF; - pattrib->seqnum = ptdls_sta->sta_xmitpriv.txseq_tid[pattrib->priority]; - SetSeqNum(pwlanhdr, pattrib->seqnum); -+ rtw_sctx_init(&sctx, timeout_ms); -+ pxmitbuf->sctx = &sctx; - +- - SetFrameSubType(pframe, WIFI_DATA_NULL); + ret = rtw_hal_mgnt_xmit(padapter, pmgntframe); @@ -14116,33 +14138,46 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct security_priv *psecuritypriv = &padapter->securitypriv; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct qos_priv *pqospriv= &pmlmepriv->qospriv; -- ++ if(padapter->bSurpriseRemoved == _TRUE || ++ padapter->bDriverStopped == _TRUE) ++ { ++ rtw_free_xmitbuf(&padapter->xmitpriv, pmgntframe->pxmitbuf); ++ rtw_free_xmitframe(&padapter->xmitpriv, pmgntframe); ++ return -1; ++ } + - s32 res=_SUCCESS; - sint bmcast; -- ++ _enter_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL); ++ pxmitpriv->ack_tx = _TRUE; + - bmcast = IS_MCAST(pattrib->ra); - - psta = rtw_get_stainfo(pstapriv, pattrib->ra); - if (psta == NULL) { - res =_FAIL; - goto exit; -+ if(padapter->bSurpriseRemoved == _TRUE || -+ padapter->bDriverStopped == _TRUE) -+ { -+ rtw_free_xmitbuf(&padapter->xmitpriv, pmgntframe->pxmitbuf); -+ rtw_free_xmitframe(&padapter->xmitpriv, pmgntframe); -+ return -1; ++ pmgntframe->ack_report = 1; ++ if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) { ++ ret = rtw_ack_tx_wait(pxmitpriv, timeout_ms); } - pattrib->mac_id = psta->mac_id; - - pattrib->psta = psta; -- ++ pxmitpriv->ack_tx = _FALSE; ++ _exit_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL); + - pattrib->ack_policy = 0; - // get ether_hdr_len - pattrib->pkt_hdrlen = ETH_HLEN;//(pattrib->ether_type == 0x8100) ? (14 + 4 ): 14; //vlan tag -+ _enter_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL); -+ pxmitpriv->ack_tx = _TRUE; ++ return ret; ++#else //!CONFIG_XMIT_ACK ++ dump_mgntframe(padapter, pmgntframe); ++ rtw_msleep_os(50); ++ return _SUCCESS; ++#endif //!CONFIG_XMIT_ACK ++} - if (pqospriv->qos_option && psta->qos_option) { - pattrib->priority = 1; //tdls management frame should be AC_BK @@ -14152,29 +14187,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pattrib->hdrlen = WLAN_HDR_A3_LEN; - pattrib->subtype = WIFI_DATA_TYPE; - pattrib->priority = 0; -+ pmgntframe->ack_report = 1; -+ if (rtw_hal_mgnt_xmit(padapter, pmgntframe) == _SUCCESS) { -+ ret = rtw_ack_tx_wait(pxmitpriv, timeout_ms); - } - -- if (psta->ieee8021x_blocked == _TRUE) -- { -- pattrib->encrypt = 0; - } -- else -- { -- GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, bmcast); -+ pxmitpriv->ack_tx = _FALSE; -+ _exit_critical_mutex(&pxmitpriv->ack_tx_mutex, NULL); -+ -+ return ret; -+#else //!CONFIG_XMIT_ACK -+ dump_mgntframe(padapter, pmgntframe); -+ rtw_msleep_os(50); -+ return _SUCCESS; -+#endif //!CONFIG_XMIT_ACK -+} -+ +int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode) +{ + u8 *ssid_ie; @@ -14183,11 +14196,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + ssid_ie = rtw_get_ie(ies, WLAN_EID_SSID, &ssid_len_ori, ies_len); -- switch(psecuritypriv->dot11AuthAlgrthm) +- if (psta->ieee8021x_blocked == _TRUE) +- { +- pattrib->encrypt = 0; +- } +- else + //DBG_871X("%s hidden_ssid_mode:%u, ssid_ie:%p, ssid_len_ori:%d\n", __FUNCTION__, hidden_ssid_mode, ssid_ie, ssid_len_ori); + + if(ssid_ie && ssid_len_ori>0) -+ { + { +- GET_ENCRY_ALGO(psecuritypriv, psta, pattrib->encrypt, bmcast); +- +- switch(psecuritypriv->dot11AuthAlgrthm) + switch(hidden_ssid_mode) { - case dot11AuthAlgrthm_Open: @@ -14274,10 +14294,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -void free_tdls_sta(_adapter *padapter, struct sta_info *ptdls_sta) --{ ++void issue_beacon(_adapter *padapter) + { - struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; - struct sta_priv *pstapriv = &padapter->stapriv; -- _irqL irqL; ++ struct xmit_frame *pmgntframe; ++ struct pkt_attrib *pattrib; ++ unsigned char *pframe; ++ struct rtw_ieee80211_hdr *pwlanhdr; ++ unsigned short *fctrl; ++ unsigned int rate_len; ++ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); ++#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) + _irqL irqL; - - //free peer sta_info - DBG_8192C("Free sta_info\n"); @@ -14303,7 +14332,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtw_free_stainfo(padapter, ptdls_sta); - -} -- ++ struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); ++#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) ++ struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); ++ u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; ++#ifdef CONFIG_P2P ++ struct wifidirect_info *pwdinfo = &(padapter->wdinfo); ++#endif //CONFIG_P2P + -void issue_tdls_setup_req(_adapter *padapter, u8 *mac_addr) -{ - struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; @@ -14316,30 +14354,75 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _irqL irqL; - static u8 dialogtoken = 0; - u32 timeout_interval= TPK_RESEND_COUNT * 1000; //retry timer should set at least 301 sec, using TPK_count counting 301 times. -- + - if(ptdlsinfo->ap_prohibited == _TRUE) - goto exit; -- -- if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -- { -- return; -- } ++ //DBG_871X("%s\n", __FUNCTION__); + + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) + { ++ DBG_871X("%s, alloc mgnt frame fail\n", __FUNCTION__); + return; + } - -- //update attribute -- pattrib = &pmgntframe->attrib; -- ++#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) ++ _enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); ++#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) ++ + //update attribute + pattrib = &pmgntframe->attrib; ++ update_mgntframe_attrib(padapter, pattrib); ++ pattrib->qsel = 0x10; ++ ++ _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); ++ ++ pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; ++ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ++ ++ ++ fctrl = &(pwlanhdr->frame_ctl); ++ *(fctrl) = 0; ++ ++ _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); + - pmgntframe->frame_tag = DATA_FRAMETAG; - pattrib->ether_type = 0x890d; - pattrib->pctrl =0; - - _rtw_memcpy(pattrib->dst, mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->src, myid(&(padapter->eeprompriv)), ETH_ALEN); -- ++ SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); ++ //pmlmeext->mgnt_seq++; ++ SetFrameSubType(pframe, WIFI_BEACON); ++ ++ pframe += sizeof(struct rtw_ieee80211_hdr_3addr); ++ pattrib->pktlen = sizeof (struct rtw_ieee80211_hdr_3addr); ++ ++ if( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) ++ { ++ //DBG_871X("ie len=%d\n", cur_network->IELength); ++#ifdef CONFIG_P2P ++ // for P2P : Primary Device Type & Device Name ++ u32 wpsielen=0, insert_len=0; ++ u8 *wpsie=NULL; ++ wpsie = rtw_get_wps_ie(cur_network->IEs+_FIXED_IE_LENGTH_, cur_network->IELength-_FIXED_IE_LENGTH_, NULL, &wpsielen); ++ ++ if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) && wpsie && wpsielen>0) ++ { ++ uint wps_offset, remainder_ielen; ++ u8 *premainder_ie, *pframe_wscie; ++ ++ wps_offset = (uint)(wpsie - cur_network->IEs); + - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); -- ++ premainder_ie = wpsie + wpsielen; + - update_tdls_attrib(padapter, pattrib); -- ++ remainder_ielen = cur_network->IELength - wps_offset - wpsielen; + - //init peer sta_info - ptdls_sta = rtw_get_stainfo(pstapriv, mac_addr); - if(ptdls_sta==NULL) @@ -14351,9 +14434,32 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - ptdlsinfo->sta_cnt++; - _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); - if( ptdlsinfo->sta_cnt == (NUM_STA - 1) ) -- { ++#ifdef CONFIG_IOCTL_CFG80211 ++ if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 ) + { - ptdlsinfo->sta_maximum = _TRUE; -- } ++ if(pmlmepriv->wps_beacon_ie && pmlmepriv->wps_beacon_ie_len>0) ++ { ++ _rtw_memcpy(pframe, cur_network->IEs, wps_offset); ++ pframe += wps_offset; ++ pattrib->pktlen += wps_offset; ++ ++ _rtw_memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); ++ pframe += pmlmepriv->wps_beacon_ie_len; ++ pattrib->pktlen += pmlmepriv->wps_beacon_ie_len; ++ ++ //copy remainder_ie to pframe ++ _rtw_memcpy(pframe, premainder_ie, remainder_ielen); ++ pframe += remainder_ielen; ++ pattrib->pktlen += remainder_ielen; ++ } ++ else ++ { ++ _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); ++ pframe += cur_network->IELength; ++ pattrib->pktlen += cur_network->IELength; ++ } + } - } - else - { @@ -14371,7 +14477,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - ptdls_sta->TDLS_PeerKey_Lifetime = timeout_interval; - _set_timer( &ptdls_sta->handshake_timer, TDLS_HANDSHAKE_TIME ); - } -- ++ else ++#endif //CONFIG_IOCTL_CFG80211 ++ { ++ pframe_wscie = pframe + wps_offset; ++ _rtw_memcpy(pframe, cur_network->IEs, wps_offset+wpsielen); ++ pframe += (wps_offset + wpsielen); ++ pattrib->pktlen += (wps_offset + wpsielen); + - pattrib->qsel=pattrib->priority; - if(rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_SETUP_REQUEST) !=_SUCCESS ){ - rtw_free_xmitbuf(pxmitpriv,pmgntframe->pxmitbuf); @@ -14379,12 +14492,32 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto exit; - } - rtw_dump_xframe(padapter, pmgntframe); -- ++ //now pframe is end of wsc ie, insert Primary Device Type & Device Name ++ // Primary Device Type ++ // Type: ++ *(u16*) ( pframe + insert_len) = cpu_to_be16( WPS_ATTR_PRIMARY_DEV_TYPE ); ++ insert_len += 2; ++ ++ // Length: ++ *(u16*) ( pframe + insert_len ) = cpu_to_be16( 0x0008 ); ++ insert_len += 2; ++ ++ // Value: ++ // Category ID ++ *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_CID_MULIT_MEDIA ); ++ insert_len += 2; + -exit: -- ++ // OUI ++ *(u32*) ( pframe + insert_len ) = cpu_to_be32( WPSOUI ); ++ insert_len += 4; + - return; -} -- ++ // Sub Category ID ++ *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_SCID_MEDIA_SERVER ); ++ insert_len += 2; + -void issue_tdls_teardown(_adapter *padapter, u8 *mac_addr) -{ - struct xmit_frame *pmgntframe; @@ -14394,7 +14527,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct sta_priv *pstapriv = &padapter->stapriv; - struct sta_info *ptdls_sta=NULL; - _irqL irqL; -- + - ptdls_sta = rtw_get_stainfo(pstapriv, mac_addr); - if(ptdls_sta==NULL){ - DBG_8192C("issue tdls teardown unsuccessful\n"); @@ -14402,7 +14535,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - }else{ - ptdls_sta->tdls_sta_state=UN_TDLS_STATE; - } -- ++ // Device Name ++ // Type: ++ *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_ATTR_DEVICE_NAME ); ++ insert_len += 2; + - if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) - { - return; @@ -14410,17 +14547,25 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - //update attribute - pattrib = &pmgntframe->attrib; -- ++ // Length: ++ *(u16*) ( pframe + insert_len ) = cpu_to_be16( pwdinfo->device_name_len ); ++ insert_len += 2; + - pmgntframe->frame_tag = DATA_FRAMETAG; - pattrib->ether_type = 0x890d; - pattrib->pctrl =0; -- ++ // Value: ++ _rtw_memcpy( pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len ); ++ insert_len += pwdinfo->device_name_len; + - _rtw_memcpy(pattrib->dst, mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->src, myid(&(padapter->eeprompriv)), ETH_ALEN); -- + - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); -- ++ //update wsc ie length ++ *(pframe_wscie+1) = (wpsielen -2) + insert_len; + - update_tdls_attrib(padapter, pattrib); - pattrib->qsel=pattrib->priority; - if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_TEARDOWN) != _SUCCESS) { @@ -14429,7 +14574,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto exit; - } - rtw_dump_xframe(padapter, pmgntframe); -- ++ //pframe move to end ++ pframe+=insert_len; ++ pattrib->pktlen += insert_len; + - if(ptdls_sta->tdls_sta_state & TDLS_CH_SWITCH_ON_STATE){ - ptdls_sta->option =3; - rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_CS_OFF); @@ -14443,13 +14591,89 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - else - rtw_tdls_cmd(padapter, mac_addr, TDLS_FREE_STA ); -- -- ++ //copy remainder_ie to pframe ++ _rtw_memcpy(pframe, premainder_ie, remainder_ielen); ++ pframe += remainder_ielen; ++ pattrib->pktlen += remainder_ielen; ++ } ++ } ++ else ++#endif //CONFIG_P2P ++ { ++ int len_diff; ++ _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); ++ len_diff = update_hidden_ssid( ++ pframe+_BEACON_IE_OFFSET_ ++ , cur_network->IELength-_BEACON_IE_OFFSET_ ++ , pmlmeinfo->hidden_ssid_mode ++ ); ++ pframe += (cur_network->IELength+len_diff); ++ pattrib->pktlen += (cur_network->IELength+len_diff); ++ } + ++ { ++ u8 *wps_ie; ++ uint wps_ielen; ++ u8 sr = 0; ++ wps_ie = rtw_get_wps_ie(pmgntframe->buf_addr+TXDESC_OFFSET+sizeof (struct rtw_ieee80211_hdr_3addr)+_BEACON_IE_OFFSET_, ++ pattrib->pktlen-sizeof (struct rtw_ieee80211_hdr_3addr)-_BEACON_IE_OFFSET_, NULL, &wps_ielen); ++ if (wps_ie && wps_ielen>0) { ++ rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_SELECTED_REGISTRAR, (u8*)(&sr), NULL); ++ } ++ if (sr != 0) ++ set_fwstate(pmlmepriv, WIFI_UNDER_WPS); ++ else ++ _clr_fwstate_(pmlmepriv, WIFI_UNDER_WPS); ++ } + -exit: -- ++#ifdef CONFIG_P2P ++ if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) ++ { ++ u32 len; ++#ifdef CONFIG_IOCTL_CFG80211 ++ if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 ) ++ { ++ len = pmlmepriv->p2p_beacon_ie_len; ++ if(pmlmepriv->p2p_beacon_ie && len>0) ++ _rtw_memcpy(pframe, pmlmepriv->p2p_beacon_ie, len); ++ } ++ else ++#endif //CONFIG_IOCTL_CFG80211 ++ { ++ len = build_beacon_p2p_ie(pwdinfo, pframe); ++ } + - return; -} -- ++ pframe += len; ++ pattrib->pktlen += len; ++#ifdef CONFIG_WFD ++#ifdef CONFIG_IOCTL_CFG80211 ++ if(_TRUE == pwdinfo->wfd_info->wfd_enable) ++#endif //CONFIG_IOCTL_CFG80211 ++ { ++ len = build_beacon_wfd_ie( pwdinfo, pframe ); ++ } ++#ifdef CONFIG_IOCTL_CFG80211 ++ else ++ { ++ len = 0; ++ if(pmlmepriv->wfd_beacon_ie && pmlmepriv->wfd_beacon_ie_len>0) ++ { ++ len = pmlmepriv->wfd_beacon_ie_len; ++ _rtw_memcpy(pframe, pmlmepriv->wfd_beacon_ie, len); ++ } ++ } ++#endif //CONFIG_IOCTL_CFG80211 ++ pframe += len; ++ pattrib->pktlen += len; ++#endif //CONFIG_WFD ++ } ++#endif //CONFIG_P2P ++ ++ goto _issue_bcn; + -void issue_tdls_dis_req(_adapter *padapter, u8 *mac_addr) -{ - struct xmit_frame *pmgntframe; @@ -14461,25 +14685,30 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) - { - return; -- } + } - - //update attribute - pattrib = &pmgntframe->attrib; -- + - pmgntframe->frame_tag = DATA_FRAMETAG; - pattrib->ether_type = 0x890d; - pattrib->pctrl =0; -- ++ //below for ad-hoc mode + - if(mac_addr == NULL) - _rtw_memcpy(pattrib->dst, baddr, ETH_ALEN); - else - _rtw_memcpy(pattrib->dst, mac_addr, ETH_ALEN); - - _rtw_memcpy(pattrib->src, myid(&(padapter->eeprompriv)), ETH_ALEN); -- ++ //timestamp will be inserted by hardware ++ pframe += 8; ++ pattrib->pktlen += 8; + - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); -- ++ // beacon interval: 2 bytes + - update_tdls_attrib(padapter, pattrib); - pattrib->qsel=pattrib->priority; - if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_DISCOVERY_REQUEST) != _SUCCESS) { @@ -14489,12 +14718,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - rtw_dump_xframe(padapter, pmgntframe); - DBG_8192C("issue tdls dis req\n"); -- ++ _rtw_memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); + -exit: -- ++ pframe += 2; ++ pattrib->pktlen += 2; + - return; -} -- ++ // capability info: 2 bytes + -void issue_tdls_setup_rsp(_adapter *padapter, union recv_frame *precv_frame) -{ - struct xmit_frame *pmgntframe; @@ -14516,13 +14749,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pmgntframe->frame_tag = DATA_FRAMETAG; - pattrib->ether_type = 0x890d; - pattrib->pctrl =0; -- ++ _rtw_memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); + - _rtw_memcpy(pattrib->dst, rx_pkt_pattrib->src, ETH_ALEN); - _rtw_memcpy(pattrib->src, myid(&(padapter->eeprompriv)), ETH_ALEN); -- ++ pframe += 2; ++ pattrib->pktlen += 2; + - _rtw_memcpy(pattrib->ra, rx_pkt_pattrib->bssid, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); -- ++ // SSID ++ pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pattrib->pktlen); + - update_tdls_attrib(padapter, pattrib); - pattrib->qsel=pattrib->priority; - if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_SETUP_RESPONSE) != _SUCCESS) { @@ -14531,13 +14769,29 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto exit; - } - rtw_dump_xframe(padapter, pmgntframe); -- ++ // supported rates... ++ rate_len = rtw_get_rateset_len(cur_network->SupportedRates); ++ pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8)? 8: rate_len), cur_network->SupportedRates, &pattrib->pktlen); + -exit: -- ++ // DS parameter set ++ pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pattrib->pktlen); + - return; -- ++ //if( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) ++ { ++ u8 erpinfo=0; ++ u32 ATIMWindow; ++ // IBSS Parameter Set... ++ //ATIMWindow = cur->Configuration.ATIMWindow; ++ ATIMWindow = 0; ++ pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen); + -} -- ++ //ERP IE ++ pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen); ++ } + -void issue_tdls_setup_cfm(_adapter *padapter, union recv_frame *precv_frame) -{ - struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; @@ -14546,27 +14800,32 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); - struct sta_info *ptdls_sta=NULL; - _irqL irqL; -- + - struct rx_pkt_attrib *rx_pkt_pattrib = & precv_frame->u.hdr.attrib; - - if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -- { ++ // EXTERNDED SUPPORTED RATE ++ if (rate_len > 8) + { - return; -- } ++ pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen); + } - - //update attribute - pattrib = &pmgntframe->attrib; -- + - pmgntframe->frame_tag = DATA_FRAMETAG; - pattrib->ether_type = 0x890d; - pattrib->pctrl =0; -- + - _rtw_memcpy(pattrib->dst, rx_pkt_pattrib->src, ETH_ALEN); - _rtw_memcpy(pattrib->src, myid(&(padapter->eeprompriv)), ETH_ALEN); -- ++ //todo:HT for adhoc + - _rtw_memcpy(pattrib->ra, rx_pkt_pattrib->bssid, ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); -- ++_issue_bcn: + - update_tdls_attrib(padapter, pattrib); - pattrib->qsel=pattrib->priority; - if (rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_SETUP_CONFIRM) != _SUCCESS) { @@ -14574,45 +14833,94 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtw_free_xmitframe_ex(pxmitpriv, pmgntframe); - goto exit; - } -- ++#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) ++ pmlmepriv->update_bcn = _FALSE; ++ ++ _exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); ++#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) + - rtw_dump_xframe(padapter, pmgntframe); -- ++ if ((pattrib->pktlen + TXDESC_SIZE) > 512) ++ { ++ DBG_871X("beacon frame too large\n"); ++ return; ++ } ++ ++ pattrib->last_txcmdsz = pattrib->pktlen; + -exit: -- ++ //DBG_871X("issue bcn_sz=%d\n", pattrib->last_txcmdsz); + - return; -- --} -- ++ dump_mgntframe(padapter, pmgntframe); + + } + -//TDLS Discovery Response frame is a management action frame -void issue_tdls_dis_rsp(_adapter *padapter, union recv_frame *precv_frame, u8 dialog) --{ ++void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probereq) + { - struct xmit_frame *pmgntframe; - struct pkt_attrib *pattrib; - unsigned char *pframe; -- struct rtw_ieee80211_hdr *pwlanhdr; ++ struct xmit_frame *pmgntframe; ++ struct pkt_attrib *pattrib; ++ unsigned char *pframe; + struct rtw_ieee80211_hdr *pwlanhdr; - unsigned short *fctrl; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); -- ++ unsigned short *fctrl; ++ unsigned char *mac, *bssid; ++ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); ++#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) ++ u8 *pwps_ie; ++ uint wps_ielen; ++ struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ++#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); ++ unsigned int rate_len; ++#ifdef CONFIG_P2P ++ struct wifidirect_info *pwdinfo = &(padapter->wdinfo); ++#ifdef CONFIG_WFD ++ u32 wfdielen = 0; ++#endif //CONFIG_WFD ++#endif //CONFIG_P2P + - struct rx_pkt_attrib *rx_pkt_pattrib = &precv_frame->u.hdr.attrib; -- -- if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -- { -- return; -- } -- -- //update attribute -- pattrib = &pmgntframe->attrib; ++ //DBG_871X("%s\n", __FUNCTION__); + + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) + { ++ DBG_871X("%s, alloc mgnt frame fail\n", __FUNCTION__); + return; + } + ++ + //update attribute + pattrib = &pmgntframe->attrib; - update_mgntframe_attrib(padapter, pattrib); - -- _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); ++ update_mgntframe_attrib(padapter, pattrib); ++ + _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); - -- pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; ++ + pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; - pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; - -- fctrl = &(pwlanhdr->frame_ctl); -- *(fctrl) = 0; -- ++ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ++ ++ mac = myid(&(padapter->eeprompriv)); ++ bssid = cur_network->MacAddress; ++ + fctrl = &(pwlanhdr->frame_ctl); + *(fctrl) = 0; ++ _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); + - // unicast probe request frame - _rtw_memcpy(pwlanhdr->addr1, rx_pkt_pattrib->src, ETH_ALEN); - _rtw_memcpy(pattrib->dst, pwlanhdr->addr1, ETH_ALEN); @@ -14623,13 +14931,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _rtw_memcpy(pwlanhdr->addr3, rx_pkt_pattrib->bssid, ETH_ALEN); - _rtw_memcpy(pattrib->ra, pwlanhdr->addr3, ETH_ALEN); - -- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); -- pmlmeext->mgnt_seq++; + SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); + pmlmeext->mgnt_seq++; - SetFrameSubType(pframe, WIFI_ACTION); - - pframe += sizeof (struct rtw_ieee80211_hdr_3addr); - pattrib->pktlen = sizeof (struct rtw_ieee80211_hdr_3addr); -- ++ SetFrameSubType(fctrl, WIFI_PROBERSP); + - rtw_tdls_dis_rsp_fr(padapter, pmgntframe, pframe, dialog); - - pattrib->nr_frags = 1; @@ -14639,21 +14948,29 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - return; -} -- ++ pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); ++ pattrib->pktlen = pattrib->hdrlen; ++ pframe += pattrib->hdrlen; + -void issue_tdls_peer_traffic_indication(_adapter *padapter, struct sta_info *ptdls_sta) -{ - struct xmit_frame *pmgntframe; - struct pkt_attrib *pattrib; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- + - static u8 dialogtoken=0; -- ++ if(cur_network->IELength>MAX_IE_SZ) ++ return; + - if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -- { ++#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) ++ if( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) + { - return; - } -- ++ pwps_ie = rtw_get_wps_ie(cur_network->IEs+_FIXED_IE_LENGTH_, cur_network->IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen); + - //update attribute - pattrib = &pmgntframe->attrib; - @@ -14681,20 +14998,27 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto exit; - } - rtw_dump_xframe(padapter, pmgntframe); -- ++ //inerset & update wps_probe_resp_ie ++ if((pmlmepriv->wps_probe_resp_ie!=NULL) && pwps_ie && (wps_ielen>0)) ++ { ++ uint wps_offset, remainder_ielen; ++ u8 *premainder_ie; + -exit: -- ++ wps_offset = (uint)(pwps_ie - cur_network->IEs); + - return; -} -- ++ premainder_ie = pwps_ie + wps_ielen; + -void issue_tdls_ch_switch_req(_adapter *padapter, u8 *mac_addr) -+void issue_beacon(_adapter *padapter) - { - struct xmit_frame *pmgntframe; - struct pkt_attrib *pattrib; +-{ +- struct xmit_frame *pmgntframe; +- struct pkt_attrib *pattrib; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- ++ remainder_ielen = cur_network->IELength - wps_offset - wps_ielen; + - if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) - { - return; @@ -14702,19 +15026,51 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - //update attribute - pattrib = &pmgntframe->attrib; -- ++ _rtw_memcpy(pframe, cur_network->IEs, wps_offset); ++ pframe += wps_offset; ++ pattrib->pktlen += wps_offset; + - pmgntframe->frame_tag = DATA_FRAMETAG; - pattrib->ether_type = 0x890d; - pattrib->pctrl =0; -- ++ wps_ielen = (uint)pmlmepriv->wps_probe_resp_ie[1];//to get ie data len ++ if((wps_offset+wps_ielen+2)<=MAX_IE_SZ) ++ { ++ _rtw_memcpy(pframe, pmlmepriv->wps_probe_resp_ie, wps_ielen+2); ++ pframe += wps_ielen+2; ++ pattrib->pktlen += wps_ielen+2; ++ } + - _rtw_memcpy(pattrib->dst, mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->src, myid(&(padapter->eeprompriv)), ETH_ALEN); -- ++ if((wps_offset+wps_ielen+2+remainder_ielen)<=MAX_IE_SZ) ++ { ++ _rtw_memcpy(pframe, premainder_ie, remainder_ielen); ++ pframe += remainder_ielen; ++ pattrib->pktlen += remainder_ielen; ++ } ++ } ++ else ++ { ++ _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); ++ pframe += cur_network->IELength; ++ pattrib->pktlen += cur_network->IELength; ++ } + - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); -- ++ /* retrieve SSID IE from cur_network->Ssid */ ++ { ++ u8 *ssid_ie; ++ sint ssid_ielen; ++ sint ssid_ielen_diff; ++ u8 buf[MAX_IE_SZ]; ++ u8 *ies = pmgntframe->buf_addr+TXDESC_OFFSET+sizeof(struct rtw_ieee80211_hdr_3addr); + - update_tdls_attrib(padapter, pattrib); -- ++ ssid_ie = rtw_get_ie(ies+_FIXED_IE_LENGTH_, _SSID_IE_, &ssid_ielen, ++ (pframe-ies)-_FIXED_IE_LENGTH_); + - pattrib->qsel=pattrib->priority; - if(rtw_xmit_tdls_coalesce(padapter, pmgntframe, TDLS_CHANNEL_SWITCH_REQUEST) !=_SUCCESS ){ - rtw_free_xmitbuf(pxmitpriv,pmgntframe->pxmitbuf); @@ -14722,41 +15078,70 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto exit; - } - rtw_dump_xframe(padapter, pmgntframe); -- ++ ssid_ielen_diff = cur_network->Ssid.SsidLength - ssid_ielen; + -exit: -- ++ if (ssid_ie && cur_network->Ssid.SsidLength) { ++ uint remainder_ielen; ++ u8 *remainder_ie; ++ remainder_ie = ssid_ie+2; ++ remainder_ielen = (pframe-remainder_ie); + - return; -} -- ++ LOG_LEVEL(_drv_warning_, FUNC_ADPT_FMT" remainder_ielen > MAX_IE_SZ\n", FUNC_ADPT_ARG(padapter)); ++ if (remainder_ielen > MAX_IE_SZ) { ++ remainder_ielen = MAX_IE_SZ; ++ } + -void issue_tdls_ch_switch_rsp(_adapter *padapter, u8 *mac_addr) -{ - struct xmit_frame *pmgntframe; - struct pkt_attrib *pattrib; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- ++ _rtw_memcpy(buf, remainder_ie, remainder_ielen); ++ _rtw_memcpy(remainder_ie+ssid_ielen_diff, buf, remainder_ielen); ++ *(ssid_ie+1) = cur_network->Ssid.SsidLength; ++ _rtw_memcpy(ssid_ie+2, cur_network->Ssid.Ssid, cur_network->Ssid.SsidLength); + - _irqL irqL; - - if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -- { ++ pframe += ssid_ielen_diff; ++ pattrib->pktlen += ssid_ielen_diff; ++ } ++ } ++ } ++ else ++#endif + { - return; - } -- + - //update attribute - pattrib = &pmgntframe->attrib; -- ++ //timestamp will be inserted by hardware ++ pframe += 8; ++ pattrib->pktlen += 8; + - pmgntframe->frame_tag = DATA_FRAMETAG; - pattrib->ether_type = 0x890d; - pattrib->pctrl =0; -- ++ // beacon interval: 2 bytes + - _rtw_memcpy(pattrib->dst, mac_addr, ETH_ALEN); - _rtw_memcpy(pattrib->src, myid(&(padapter->eeprompriv)), ETH_ALEN); -- ++ _rtw_memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); + - _rtw_memcpy(pattrib->ra, get_bssid(pmlmepriv), ETH_ALEN); - _rtw_memcpy(pattrib->ta, pattrib->src, ETH_ALEN); -- ++ pframe += 2; ++ pattrib->pktlen += 2; + - update_tdls_attrib(padapter, pattrib); -- ++ // capability info: 2 bytes + - pattrib->qsel=pattrib->priority; -/* - _enter_critical_bh(&pxmitpriv->lock, &irqL); @@ -14771,12 +15156,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto exit; - } - rtw_dump_xframe(padapter, pmgntframe); -- ++ _rtw_memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); + -exit: -- ++ pframe += 2; ++ pattrib->pktlen += 2; + - return; -} -- ++ //below for ad-hoc mode + -sint On_TDLS_Dis_Rsp(_adapter *adapter, union recv_frame *precv_frame) -{ - struct sta_info *ptdls_sta = NULL; @@ -14785,17 +15174,25 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct rx_pkt_attrib *pattrib = &(precv_frame->u.hdr.attrib); - struct tdls_info *ptdlsinfo = &(adapter->tdlsinfo); - u8 empty_addr[ETH_ALEN] = { 0x00 }; -- ++ // SSID ++ pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pattrib->pktlen); + - psa = get_sa(ptr); - ptdls_sta = rtw_get_stainfo(&(adapter->stapriv), psa); -- ++ // supported rates... ++ rate_len = rtw_get_rateset_len(cur_network->SupportedRates); ++ pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8)? 8: rate_len), cur_network->SupportedRates, &pattrib->pktlen); + - if(ptdls_sta != NULL) - { - ptdls_sta->tdls_sta_state |= TDLS_ALIVE_STATE; -- ++ // DS parameter set ++ pframe =rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pattrib->pktlen); + - //Record the tdls sta with lowest signal strength - if( (ptdlsinfo->sta_maximum == _TRUE) && (ptdls_sta->alive_count >= 1) ) -- { ++ if( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) + { - printk("%s %d\n", __FUNCTION__, __LINE__); - if( _rtw_memcmp(ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN) ) - { @@ -14813,13 +15210,39 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - ptdlsinfo->ss_record.signal_strength = pattrib->signal_strength; - } - } -- } -- ++ u8 erpinfo=0; ++ u32 ATIMWindow; ++ // IBSS Parameter Set... ++ //ATIMWindow = cur->Configuration.ATIMWindow; ++ ATIMWindow = 0; ++ pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen); ++ ++ //ERP IE ++ pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen); + } + - } - else -- { ++ ++ // EXTERNDED SUPPORTED RATE ++ if (rate_len > 8) ++ { ++ pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen); ++ } ++ ++ ++ //todo:HT for adhoc ++ ++ } ++ ++#ifdef CONFIG_P2P ++ if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) /*&& is_valid_p2p_probereq*/) + { - if( ptdlsinfo->sta_maximum == _TRUE) -- { ++ u32 len; ++#ifdef CONFIG_IOCTL_CFG80211 ++ if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 ) + { - printk("%s %d\n", __FUNCTION__, __LINE__); - if( _rtw_memcmp( ptdlsinfo->ss_record.macaddr, empty_addr, ETH_ALEN ) ) - { @@ -14840,346 +15263,27 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - return _FAIL; - } - } -- } -- -- if( pattrib->signal_strength + TDLS_SIGNAL_THRESH >= precvpriv->signal_strength ) -- { -- issue_tdls_setup_req(adapter, psa); -- } -- } -- -- return _FAIL; --} -- --#endif -- --int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode) --{ -- u8 *ssid_ie; -- sint ssid_len_ori; -- int len_diff = 0; -- -- ssid_ie = rtw_get_ie(ies, WLAN_EID_SSID, &ssid_len_ori, ies_len); -- -- //DBG_871X("%s hidden_ssid_mode:%u, ssid_ie:%p, ssid_len_ori:%d\n", __FUNCTION__, hidden_ssid_mode, ssid_ie, ssid_len_ori); -- -- if(ssid_ie && ssid_len_ori>0) -- { -- switch(hidden_ssid_mode) -- { -- case 1: -- { -- u8 *next_ie = ssid_ie + 2 + ssid_len_ori; -- u32 remain_len = 0; -- -- remain_len = ies_len -(next_ie-ies); -- -- ssid_ie[1] = 0; -- _rtw_memcpy(ssid_ie+2, next_ie, remain_len); -- len_diff -= ssid_len_ori; -- -- break; -- } -- case 2: -- _rtw_memset(&ssid_ie[2], 0, ssid_len_ori); -- break; -- default: -- break; -- } -- } -- -- return len_diff; --} -- --void issue_beacon(_adapter *padapter) --{ -- _irqL irqL; -- struct xmit_frame *pmgntframe; -- struct pkt_attrib *pattrib; - unsigned char *pframe; - struct rtw_ieee80211_hdr *pwlanhdr; - unsigned short *fctrl; - unsigned int rate_len; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -+#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) -+ _irqL irqL; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); -+#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); -@@ -5630,8 +6502,9 @@ void issue_beacon(_adapter *padapter) - DBG_871X("%s, alloc mgnt frame fail\n", __FUNCTION__); - return; - } -- -- _enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); -+#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) -+ _enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); -+#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) - - //update attribute - pattrib = &pmgntframe->attrib; -@@ -5670,7 +6543,7 @@ void issue_beacon(_adapter *padapter) - if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) && wpsie && wpsielen>0) - { - uint wps_offset, remainder_ielen; -- u8 *premainder_ie, *pframe_wscie; -+ u8 *premainder_ie, *pframe_wscie; - - wps_offset = (uint)(wpsie - cur_network->IEs); - -@@ -5679,24 +6552,22 @@ void issue_beacon(_adapter *padapter) - remainder_ielen = cur_network->IELength - wps_offset - wpsielen; - - #ifdef CONFIG_IOCTL_CFG80211 -- if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled) -+ if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 ) - { - if(pmlmepriv->wps_beacon_ie && pmlmepriv->wps_beacon_ie_len>0) - { - _rtw_memcpy(pframe, cur_network->IEs, wps_offset); - pframe += wps_offset; - pattrib->pktlen += wps_offset; -- -- _rtw_memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); - -+ _rtw_memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); - pframe += pmlmepriv->wps_beacon_ie_len; -- pattrib->pktlen += pmlmepriv->wps_beacon_ie_len; -+ pattrib->pktlen += pmlmepriv->wps_beacon_ie_len; - - //copy remainder_ie to pframe - _rtw_memcpy(pframe, premainder_ie, remainder_ielen); - pframe += remainder_ielen; -- pattrib->pktlen += remainder_ielen; -- -+ pattrib->pktlen += remainder_ielen; - } - else - { -@@ -5708,7 +6579,6 @@ void issue_beacon(_adapter *padapter) - else - #endif //CONFIG_IOCTL_CFG80211 - { -- - pframe_wscie = pframe + wps_offset; - _rtw_memcpy(pframe, cur_network->IEs, wps_offset+wpsielen); - pframe += (wps_offset + wpsielen); -@@ -5726,7 +6596,7 @@ void issue_beacon(_adapter *padapter) - - // Value: - // Category ID -- *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_CID_RTK_WIDI ); -+ *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_CID_MULIT_MEDIA ); - insert_len += 2; - - // OUI -@@ -5734,7 +6604,7 @@ void issue_beacon(_adapter *padapter) - insert_len += 4; - - // Sub Category ID -- *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_SCID_RTK_DMP ); -+ *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_SCID_MEDIA_SERVER ); - insert_len += 2; - - -@@ -5762,9 +6632,8 @@ void issue_beacon(_adapter *padapter) - //copy remainder_ie to pframe - _rtw_memcpy(pframe, premainder_ie, remainder_ielen); - pframe += remainder_ielen; -- pattrib->pktlen += remainder_ielen; -+ pattrib->pktlen += remainder_ielen; - } -- - } - else - #endif //CONFIG_P2P -@@ -5780,12 +6649,27 @@ void issue_beacon(_adapter *padapter) - pattrib->pktlen += (cur_network->IELength+len_diff); - } - -+ { -+ u8 *wps_ie; -+ uint wps_ielen; -+ u8 sr = 0; -+ wps_ie = rtw_get_wps_ie(pmgntframe->buf_addr+TXDESC_OFFSET+sizeof (struct rtw_ieee80211_hdr_3addr)+_BEACON_IE_OFFSET_, -+ pattrib->pktlen-sizeof (struct rtw_ieee80211_hdr_3addr)-_BEACON_IE_OFFSET_, NULL, &wps_ielen); -+ if (wps_ie && wps_ielen>0) { -+ rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_SELECTED_REGISTRAR, (u8*)(&sr), NULL); -+ } -+ if (sr != 0) -+ set_fwstate(pmlmepriv, WIFI_UNDER_WPS); -+ else -+ _clr_fwstate_(pmlmepriv, WIFI_UNDER_WPS); ++ //if pwdinfo->role == P2P_ROLE_DEVICE will call issue_probersp_p2p() ++ len = pmlmepriv->p2p_go_probe_resp_ie_len; ++ if(pmlmepriv->p2p_go_probe_resp_ie && len>0) ++ _rtw_memcpy(pframe, pmlmepriv->p2p_go_probe_resp_ie, len); + } -+ - #ifdef CONFIG_P2P - if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) - { - u32 len; - #ifdef CONFIG_IOCTL_CFG80211 -- if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled) -+ if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 ) - { - len = pmlmepriv->p2p_beacon_ie_len; - if(pmlmepriv->p2p_beacon_ie && len>0) -@@ -5797,11 +6681,26 @@ void issue_beacon(_adapter *padapter) - len = build_beacon_p2p_ie(pwdinfo, pframe); - } - -- - pframe += len; - pattrib->pktlen += len; - #ifdef CONFIG_WFD -- len = build_beacon_wfd_ie( pwdinfo, pframe ); -+#ifdef CONFIG_IOCTL_CFG80211 -+ if(_TRUE == pwdinfo->wfd_info->wfd_enable) -+#endif //CONFIG_IOCTL_CFG80211 -+ { -+ len = build_beacon_wfd_ie( pwdinfo, pframe ); -+ } -+#ifdef CONFIG_IOCTL_CFG80211 -+ else -+ { -+ len = 0; -+ if(pmlmepriv->wfd_beacon_ie && pmlmepriv->wfd_beacon_ie_len>0) -+ { -+ len = pmlmepriv->wfd_beacon_ie_len; -+ _rtw_memcpy(pframe, pmlmepriv->wfd_beacon_ie, len); -+ } -+ } ++ else +#endif //CONFIG_IOCTL_CFG80211 - pframe += len; - pattrib->pktlen += len; - #endif //CONFIG_WFD -@@ -5867,9 +6766,11 @@ void issue_beacon(_adapter *padapter) - - _issue_bcn: - -+#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) - pmlmepriv->update_bcn = _FALSE; - - _exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); -+#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) - - if ((pattrib->pktlen + TXDESC_SIZE) > 512) - { -@@ -5887,8 +6788,6 @@ _issue_bcn: - - void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probereq) - { -- u8 *pwps_ie; -- uint wps_ielen; - struct xmit_frame *pmgntframe; - struct pkt_attrib *pattrib; - unsigned char *pframe; -@@ -5896,7 +6795,11 @@ void issue_probersp(_adapter *padapter, - unsigned short *fctrl; - unsigned char *mac, *bssid; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -+#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) -+ u8 *pwps_ie; -+ uint wps_ielen; - struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -+#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); -@@ -5908,8 +6811,6 @@ void issue_probersp(_adapter *padapter, - #endif //CONFIG_WFD - #endif //CONFIG_P2P - -- -- - //DBG_871X("%s\n", __FUNCTION__); - - if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -@@ -5946,7 +6847,7 @@ void issue_probersp(_adapter *padapter, - pframe += pattrib->hdrlen; - - -- if(cur_network->IELength>MAX_IE_SZ || cur_network->IELength<_FIXED_IE_LENGTH_) -+ if(cur_network->IELength>MAX_IE_SZ) - return; - - #if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) -@@ -5991,7 +6892,40 @@ void issue_probersp(_adapter *padapter, - pframe += cur_network->IELength; - pattrib->pktlen += cur_network->IELength; - } -- -+ -+ /* retrieve SSID IE from cur_network->Ssid */ + { -+ u8 *ssid_ie; -+ sint ssid_ielen; -+ sint ssid_ielen_diff; -+ u8 buf[MAX_IE_SZ]; -+ u8 *ies = pmgntframe->buf_addr+TXDESC_OFFSET+sizeof(struct rtw_ieee80211_hdr_3addr); -+ -+ ssid_ie = rtw_get_ie(ies+_FIXED_IE_LENGTH_, _SSID_IE_, &ssid_ielen, -+ (pframe-ies)-_FIXED_IE_LENGTH_); -+ -+ ssid_ielen_diff = cur_network->Ssid.SsidLength - ssid_ielen; -+ -+ if (ssid_ie && cur_network->Ssid.SsidLength) { -+ uint remainder_ielen; -+ u8 *remainder_ie; -+ remainder_ie = ssid_ie+2; -+ remainder_ielen = (pframe-remainder_ie); -+ -+ LOG_LEVEL(_drv_warning_, FUNC_ADPT_FMT" remainder_ielen > MAX_IE_SZ\n", FUNC_ADPT_ARG(padapter)); -+ if (remainder_ielen > MAX_IE_SZ) { -+ remainder_ielen = MAX_IE_SZ; -+ } -+ -+ _rtw_memcpy(buf, remainder_ie, remainder_ielen); -+ _rtw_memcpy(remainder_ie+ssid_ielen_diff, buf, remainder_ielen); -+ *(ssid_ie+1) = cur_network->Ssid.SsidLength; -+ _rtw_memcpy(ssid_ie+2, cur_network->Ssid.Ssid, cur_network->Ssid.SsidLength); -+ -+ pframe += ssid_ielen_diff; -+ pattrib->pktlen += ssid_ielen_diff; -+ } -+ } - } - else - #endif -@@ -6053,11 +6987,11 @@ void issue_probersp(_adapter *padapter, - } - - #ifdef CONFIG_P2P -- if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) && is_valid_p2p_probereq) -+ if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) /*&& is_valid_p2p_probereq*/) - { - u32 len; - #ifdef CONFIG_IOCTL_CFG80211 -- if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled) -+ if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 ) - { - //if pwdinfo->role == P2P_ROLE_DEVICE will call issue_probersp_p2p() - len = pmlmepriv->p2p_go_probe_resp_ie_len; -@@ -6065,7 +6999,7 @@ void issue_probersp(_adapter *padapter, - _rtw_memcpy(pframe, pmlmepriv->p2p_go_probe_resp_ie, len); - } - else --#endif //CONFIG_IOCTL_CFG80211 -+#endif //CONFIG_IOCTL_CFG80211 - { - len = build_probe_resp_p2p_ie(pwdinfo, pframe); ++ len = build_probe_resp_p2p_ie(pwdinfo, pframe); } -@@ -6074,15 +7008,62 @@ void issue_probersp(_adapter *padapter, - pattrib->pktlen += len; - - #ifdef CONFIG_WFD -- wfdielen = build_probe_resp_wfd_ie(pwdinfo, pframe); -- pframe += wfdielen; -- pattrib->pktlen += wfdielen; + +- if( pattrib->signal_strength + TDLS_SIGNAL_THRESH >= precvpriv->signal_strength ) ++ pframe += len; ++ pattrib->pktlen += len; ++ ++#ifdef CONFIG_WFD +#ifdef CONFIG_IOCTL_CFG80211 + if(_TRUE == pwdinfo->wfd_info->wfd_enable) +#endif //CONFIG_IOCTL_CFG80211 -+ { + { +- issue_tdls_setup_req(adapter, psa); + len = build_probe_resp_wfd_ie(pwdinfo, pframe, 0); + } +#ifdef CONFIG_IOCTL_CFG80211 @@ -15191,17 +15295,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + len = pmlmepriv->wfd_probe_resp_ie_len; + _rtw_memcpy(pframe, pmlmepriv->wfd_probe_resp_ie, len); + } -+ } + } +#endif //CONFIG_IOCTL_CFG80211 + pframe += len; + pattrib->pktlen += len; - #endif //CONFIG_WFD - -- } -+ } - #endif //CONFIG_P2P - ++#endif //CONFIG_WFD ++ + } ++#endif //CONFIG_P2P +- return _FAIL; ++ +#ifdef CONFIG_AUTO_AP_MODE +{ + struct sta_info *psta; @@ -15229,106 +15333,435 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, sizeof(RC_INFO), RC_INFO, &pattrib->pktlen); + } -+} + } +#endif //CONFIG_AUTO_AP_MODE -+ -+ - pattrib->last_txcmdsz = pattrib->pktlen; + +-#endif + +-int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode) +-{ +- u8 *ssid_ie; +- sint ssid_len_ori; +- int len_diff = 0; ++ pattrib->last_txcmdsz = pattrib->pktlen; +- ssid_ie = rtw_get_ie(ies, WLAN_EID_SSID, &ssid_len_ori, ies_len); -@@ -6092,8 +7073,9 @@ void issue_probersp(_adapter *padapter, +- //DBG_871X("%s hidden_ssid_mode:%u, ssid_ie:%p, ssid_len_ori:%d\n", __FUNCTION__, hidden_ssid_mode, ssid_ie, ssid_len_ori); ++ dump_mgntframe(padapter, pmgntframe); + +- if(ssid_ie && ssid_len_ori>0) +- { +- switch(hidden_ssid_mode) +- { +- case 1: +- { +- u8 *next_ie = ssid_ie + 2 + ssid_len_ori; +- u32 remain_len = 0; +- +- remain_len = ies_len -(next_ie-ies); +- +- ssid_ie[1] = 0; +- _rtw_memcpy(ssid_ie+2, next_ie, remain_len); +- len_diff -= ssid_len_ori; +- +- break; +- } +- case 2: +- _rtw_memset(&ssid_ie[2], 0, ssid_len_ori); +- break; +- default: +- break; +- } +- } ++ return; +- return len_diff; } --void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 blnbc) +-void issue_beacon(_adapter *padapter) +int _issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, int wait_ack) { +- _irqL irqL; +- struct xmit_frame *pmgntframe; +- struct pkt_attrib *pattrib; +- unsigned char *pframe; +- struct rtw_ieee80211_hdr *pwlanhdr; +- unsigned short *fctrl; +- unsigned int rate_len; +- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); + int ret = _FAIL; - struct xmit_frame *pmgntframe; - struct pkt_attrib *pattrib; - unsigned char *pframe; -@@ -6108,11 +7090,11 @@ void issue_probereq(_adapter *padapter, - int bssrate_len = 0; ++ struct xmit_frame *pmgntframe; ++ struct pkt_attrib *pattrib; ++ unsigned char *pframe; ++ struct rtw_ieee80211_hdr *pwlanhdr; ++ unsigned short *fctrl; ++ unsigned char *mac; ++ unsigned char bssrate[NumRates]; ++ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); + struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); ++ int bssrate_len = 0; u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; +-#ifdef CONFIG_P2P +- struct wifidirect_info *pwdinfo = &(padapter->wdinfo); +-#endif //CONFIG_P2P +- -- RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("+issue_probereq\n")); +- //DBG_871X("%s\n", __FUNCTION__); + RT_TRACE(_module_rtl871x_mlme_c_,_drv_notice_,("+issue_probereq\n")); if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) { +- DBG_871X("%s, alloc mgnt frame fail\n", __FUNCTION__); - return; + goto exit; } +- _enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); +- //update attribute -@@ -6130,11 +7112,11 @@ void issue_probereq(_adapter *padapter, + pattrib = &pmgntframe->attrib; + update_mgntframe_attrib(padapter, pattrib); +- pattrib->qsel = 0x10; +- ++ ++ + _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); +- ++ + pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; +- pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; +- +- ++ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ++ ++ mac = myid(&(padapter->eeprompriv)); ++ fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; +- +- _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(cur_network), ETH_ALEN); -- if ( 0 == blnbc ) +- SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); +- //pmlmeext->mgnt_seq++; +- SetFrameSubType(pframe, WIFI_BEACON); +- +- pframe += sizeof(struct rtw_ieee80211_hdr_3addr); +- pattrib->pktlen = sizeof (struct rtw_ieee80211_hdr_3addr); +- +- if( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) + if (da) { - // unicast probe request frame -- _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -- _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); +- //DBG_871X("ie len=%d\n", cur_network->IELength); +-#ifdef CONFIG_P2P +- // for P2P : Primary Device Type & Device Name +- u32 wpsielen=0, insert_len=0; +- u8 *wpsie=NULL; +- wpsie = rtw_get_wps_ie(cur_network->IEs+_FIXED_IE_LENGTH_, cur_network->IELength-_FIXED_IE_LENGTH_, NULL, &wpsielen); +- +- if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) && wpsie && wpsielen>0) +- { +- uint wps_offset, remainder_ielen; +- u8 *premainder_ie, *pframe_wscie; +- +- wps_offset = (uint)(wpsie - cur_network->IEs); +- +- premainder_ie = wpsie + wpsielen; ++ // unicast probe request frame + _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); + _rtw_memcpy(pwlanhdr->addr3, da, ETH_ALEN); - } - else - { -@@ -6191,11 +7173,64 @@ void issue_probereq(_adapter *padapter, ++ } ++ else ++ { ++ // broadcast probe request frame ++ _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); ++ } - pattrib->last_txcmdsz = pattrib->pktlen; +- remainder_ielen = cur_network->IELength - wps_offset - wpsielen; ++ _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); -- RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("issuing probe_req, tx_len=%d\n", pattrib->last_txcmdsz)); +-#ifdef CONFIG_IOCTL_CFG80211 +- if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled) +- { +- if(pmlmepriv->wps_beacon_ie && pmlmepriv->wps_beacon_ie_len>0) +- { +- _rtw_memcpy(pframe, cur_network->IEs, wps_offset); +- pframe += wps_offset; +- pattrib->pktlen += wps_offset; +- +- _rtw_memcpy(pframe, pmlmepriv->wps_beacon_ie, pmlmepriv->wps_beacon_ie_len); ++ SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); ++ pmlmeext->mgnt_seq++; ++ SetFrameSubType(pframe, WIFI_PROBEREQ); + +- pframe += pmlmepriv->wps_beacon_ie_len; +- pattrib->pktlen += pmlmepriv->wps_beacon_ie_len; ++ pframe += sizeof (struct rtw_ieee80211_hdr_3addr); ++ pattrib->pktlen = sizeof (struct rtw_ieee80211_hdr_3addr); + +- //copy remainder_ie to pframe +- _rtw_memcpy(pframe, premainder_ie, remainder_ielen); +- pframe += remainder_ielen; +- pattrib->pktlen += remainder_ielen; +- +- } +- else +- { +- _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); +- pframe += cur_network->IELength; +- pattrib->pktlen += cur_network->IELength; +- } +- } +- else +-#endif //CONFIG_IOCTL_CFG80211 +- { ++ if(pssid) ++ pframe = rtw_set_ie(pframe, _SSID_IE_, pssid->SsidLength, pssid->Ssid, &(pattrib->pktlen)); ++ else ++ pframe = rtw_set_ie(pframe, _SSID_IE_, 0, NULL, &(pattrib->pktlen)); + +- pframe_wscie = pframe + wps_offset; +- _rtw_memcpy(pframe, cur_network->IEs, wps_offset+wpsielen); +- pframe += (wps_offset + wpsielen); +- pattrib->pktlen += (wps_offset + wpsielen); ++ get_rate_set(padapter, bssrate, &bssrate_len); + +- //now pframe is end of wsc ie, insert Primary Device Type & Device Name +- // Primary Device Type +- // Type: +- *(u16*) ( pframe + insert_len) = cpu_to_be16( WPS_ATTR_PRIMARY_DEV_TYPE ); +- insert_len += 2; +- +- // Length: +- *(u16*) ( pframe + insert_len ) = cpu_to_be16( 0x0008 ); +- insert_len += 2; +- +- // Value: +- // Category ID +- *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_CID_RTK_WIDI ); +- insert_len += 2; ++ if (bssrate_len > 8) ++ { ++ pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen)); ++ pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen)); ++ } ++ else ++ { ++ pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &(pattrib->pktlen)); ++ } + +- // OUI +- *(u32*) ( pframe + insert_len ) = cpu_to_be32( WPSOUI ); +- insert_len += 4; +- +- // Sub Category ID +- *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_PDT_SCID_RTK_DMP ); +- insert_len += 2; +- +- +- // Device Name +- // Type: +- *(u16*) ( pframe + insert_len ) = cpu_to_be16( WPS_ATTR_DEVICE_NAME ); +- insert_len += 2; +- +- // Length: +- *(u16*) ( pframe + insert_len ) = cpu_to_be16( pwdinfo->device_name_len ); +- insert_len += 2; +- +- // Value: +- _rtw_memcpy( pframe + insert_len, pwdinfo->device_name, pwdinfo->device_name_len ); +- insert_len += pwdinfo->device_name_len; +- +- +- //update wsc ie length +- *(pframe_wscie+1) = (wpsielen -2) + insert_len; +- +- //pframe move to end +- pframe+=insert_len; +- pattrib->pktlen += insert_len; +- +- //copy remainder_ie to pframe +- _rtw_memcpy(pframe, premainder_ie, remainder_ielen); +- pframe += remainder_ielen; +- pattrib->pktlen += remainder_ielen; +- } +- +- } +- else +-#endif //CONFIG_P2P +- { +- int len_diff; +- _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); +- len_diff = update_hidden_ssid( +- pframe+_BEACON_IE_OFFSET_ +- , cur_network->IELength-_BEACON_IE_OFFSET_ +- , pmlmeinfo->hidden_ssid_mode +- ); +- pframe += (cur_network->IELength+len_diff); +- pattrib->pktlen += (cur_network->IELength+len_diff); +- } +- +-#ifdef CONFIG_P2P +- if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) +- { +- u32 len; +-#ifdef CONFIG_IOCTL_CFG80211 +- if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled) +- { +- len = pmlmepriv->p2p_beacon_ie_len; +- if(pmlmepriv->p2p_beacon_ie && len>0) +- _rtw_memcpy(pframe, pmlmepriv->p2p_beacon_ie, len); +- } +- else +-#endif //CONFIG_IOCTL_CFG80211 +- { +- len = build_beacon_p2p_ie(pwdinfo, pframe); +- } ++#if 0 ++ //add wps_ie for wps2.0 ++ if(pmlmepriv->probereq_wpsie_len>0 && pmlmepriv->probereq_wpsie_lenprobereq_wpsie, pmlmepriv->probereq_wpsie_len); ++ pframe += pmlmepriv->probereq_wpsie_len; ++ pattrib->pktlen += pmlmepriv->probereq_wpsie_len; ++ //pmlmepriv->probereq_wpsie_len = 0 ;//reset to zero ++ } ++#else ++ //add wps_ie for wps2.0 ++ if(pmlmepriv->wps_probe_req_ie_len>0 && pmlmepriv->wps_probe_req_ie) ++ { ++ _rtw_memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); ++ pframe += pmlmepriv->wps_probe_req_ie_len; ++ pattrib->pktlen += pmlmepriv->wps_probe_req_ie_len; ++ //pmlmepriv->wps_probe_req_ie_len = 0 ;//reset to zero ++ } ++#endif + +- +- pframe += len; +- pattrib->pktlen += len; +-#ifdef CONFIG_WFD +- len = build_beacon_wfd_ie( pwdinfo, pframe ); +- pframe += len; +- pattrib->pktlen += len; +-#endif //CONFIG_WFD +- } +-#endif //CONFIG_P2P ++ pattrib->last_txcmdsz = pattrib->pktlen; + +- goto _issue_bcn; + RT_TRACE(_module_rtl871x_mlme_c_,_drv_notice_,("issuing probe_req, tx_len=%d\n", pattrib->last_txcmdsz)); -- dump_mgntframe(padapter, pmgntframe); + if (wait_ack) { + ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe); + } else { + dump_mgntframe(padapter, pmgntframe); + ret = _SUCCESS; -+ } + } -- return; +- //below for ad-hoc mode +- +- //timestamp will be inserted by hardware +- pframe += 8; +- pattrib->pktlen += 8; +- +- // beacon interval: 2 bytes +- +- _rtw_memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); +- +- pframe += 2; +- pattrib->pktlen += 2; +- +- // capability info: 2 bytes +- +- _rtw_memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); +- +- pframe += 2; +- pattrib->pktlen += 2; +- +- // SSID +- pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pattrib->pktlen); +- +- // supported rates... +- rate_len = rtw_get_rateset_len(cur_network->SupportedRates); +- pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8)? 8: rate_len), cur_network->SupportedRates, &pattrib->pktlen); +- +- // DS parameter set +- pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pattrib->pktlen); +- +- //if( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) +- { +- u8 erpinfo=0; +- u32 ATIMWindow; +- // IBSS Parameter Set... +- //ATIMWindow = cur->Configuration.ATIMWindow; +- ATIMWindow = 0; +- pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen); +exit: + return ret; +} -+ + +- //ERP IE +- pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen); +- } +inline void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da) +{ + _issue_probereq(padapter, pssid, da, _FALSE); +} -+ + +int issue_probereq_ex(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, + int try_cnt, int wait_ms) +{ + int ret; + int i = 0; + u32 start = rtw_get_current_time(); -+ + +- // EXTERNDED SUPPORTED RATE +- if (rate_len > 8) + do -+ { + { +- pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen); +- } + ret = _issue_probereq(padapter, pssid, da, wait_ms>0?_TRUE:_FALSE); -+ + + i++; -+ + +- //todo:HT for adhoc + if (padapter->bDriverStopped || padapter->bSurpriseRemoved) + break; -+ + +-_issue_bcn: + if(i < try_cnt && wait_ms > 0 && ret==_FAIL) + rtw_msleep_os(wait_ms); -+ + +- pmlmepriv->update_bcn = _FALSE; +- +- _exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); + }while((ipktlen + TXDESC_SIZE) > 512) +- { +- DBG_871X("beacon frame too large\n"); +- return; + if (ret != _FAIL) { + ret = _SUCCESS; + #ifndef DBG_XMIT_ACK + goto exit; + #endif -+ } -+ + } +- +- pattrib->last_txcmdsz = pattrib->pktlen; +- +- //DBG_871X("issue bcn_sz=%d\n", pattrib->last_txcmdsz); +- +- dump_mgntframe(padapter, pmgntframe); + + if (try_cnt && wait_ms) { + if (da) + DBG_871X(FUNC_ADPT_FMT" to "MAC_FMT", ch:%u%s, %d/%d in %u ms\n", @@ -15343,49 +15776,685 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return ret; } - // if psta == NULL, indiate we are station(client) now... -@@ -6211,16 +7246,7 @@ void issue_auth(_adapter *padapter, stru - int use_shared_key = 0; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); +-void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probereq) ++// if psta == NULL, indiate we are station(client) now... ++void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status) + { +- u8 *pwps_ie; +- uint wps_ielen; + struct xmit_frame *pmgntframe; + struct pkt_attrib *pattrib; + unsigned char *pframe; + struct rtw_ieee80211_hdr *pwlanhdr; +- unsigned short *fctrl; +- unsigned char *mac, *bssid; +- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); +- struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ++ unsigned short *fctrl; ++ unsigned int val32; ++ unsigned short val16; ++ int use_shared_key = 0; ++ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); +- unsigned int rate_len; +-#ifdef CONFIG_P2P +- struct wifidirect_info *pwdinfo = &(padapter->wdinfo); +-#ifdef CONFIG_WFD +- u32 wfdielen = 0; +-#endif //CONFIG_WFD +-#endif //CONFIG_P2P - --/* -- if( (psta == NULL) && (pmlmeinfo->auth_seq != 3) ) { -- // Because of AP's not receiving deauth before -- // AP may: 1)not response auth or 2)deauth us after link is complete -- // issue deauth before issuing auth to deal with the situation -- issue_deauth(padapter, (&(pmlmeinfo->network))->MacAddress, WLAN_REASON_DEAUTH_LEAVING); -- } --*/ -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- +- +- //DBG_871X("%s\n", __FUNCTION__); if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) { -@@ -6298,12 +7324,12 @@ void issue_auth(_adapter *padapter, stru - val16 = cpu_to_le16(val16); - use_shared_key = 1; - } -- //DBG_8192C("%s auth_algo= %s auth_seq=%d\n",__FUNCTION__,(pmlmeinfo->auth_algo==0)?"OPEN":"SHARED",pmlmeinfo->auth_seq); -+ //DBG_871X("%s auth_algo= %s auth_seq=%d\n",__FUNCTION__,(pmlmeinfo->auth_algo==0)?"OPEN":"SHARED",pmlmeinfo->auth_seq); - - //setting IV for auth seq #3 - if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key==1)) - { -- //DBG_8192C("==> iv(%d),key_index(%d)\n",pmlmeinfo->iv,pmlmeinfo->key_index); -+ //DBG_871X("==> iv(%d),key_index(%d)\n",pmlmeinfo->iv,pmlmeinfo->key_index); - val32 = ((pmlmeinfo->iv++) | (pmlmeinfo->key_index << 30)); - val32 = cpu_to_le32(val32); - pframe = rtw_set_fixed_ie(pframe, 4, (unsigned char *)&val32, &(pattrib->pktlen)); -@@ -6373,7 +7399,6 @@ void issue_asocrsp(_adapter *padapter, u - #ifdef CONFIG_WFD - u32 wfdielen = 0; - #endif //CONFIG_WFD -- - #endif //CONFIG_P2P +- DBG_871X("%s, alloc mgnt frame fail\n", __FUNCTION__); + return; + } - DBG_871X("%s\n", __FUNCTION__); -@@ -6503,21 +7528,30 @@ void issue_asocrsp(_adapter *padapter, u +- + //update attribute + pattrib = &pmgntframe->attrib; +- update_mgntframe_attrib(padapter, pattrib); +- ++ update_mgntframe_attrib(padapter, pattrib); ++ + _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); +- ++ + pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; +- pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; +- +- mac = myid(&(padapter->eeprompriv)); +- bssid = cur_network->MacAddress; +- ++ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ++ + fctrl = &(pwlanhdr->frame_ctl); + *(fctrl) = 0; +- _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); + + SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); + pmlmeext->mgnt_seq++; +- SetFrameSubType(fctrl, WIFI_PROBERSP); +- +- pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); +- pattrib->pktlen = pattrib->hdrlen; +- pframe += pattrib->hdrlen; ++ SetFrameSubType(pframe, WIFI_AUTH); + ++ pframe += sizeof(struct rtw_ieee80211_hdr_3addr); ++ pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); + +- if(cur_network->IELength>MAX_IE_SZ || cur_network->IELength<_FIXED_IE_LENGTH_) +- return; +- +-#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +- if( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) ++ ++ if(psta)// for AP mode + { +- pwps_ie = rtw_get_wps_ie(cur_network->IEs+_FIXED_IE_LENGTH_, cur_network->IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen); +- +- //inerset & update wps_probe_resp_ie +- if((pmlmepriv->wps_probe_resp_ie!=NULL) && pwps_ie && (wps_ielen>0)) +- { +- uint wps_offset, remainder_ielen; +- u8 *premainder_ie; ++#ifdef CONFIG_NATIVEAP_MLME ++ ++ _rtw_memcpy(pwlanhdr->addr1, psta->hwaddr, ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr3, myid(&(padapter->eeprompriv)), ETH_ALEN); ++ + +- wps_offset = (uint)(pwps_ie - cur_network->IEs); ++ // setting auth algo number ++ val16 = (u16)psta->authalg; + +- premainder_ie = pwps_ie + wps_ielen; ++ if(status != _STATS_SUCCESSFUL_) ++ val16 = 0; + +- remainder_ielen = cur_network->IELength - wps_offset - wps_ielen; ++ if (val16) { ++ val16 = cpu_to_le16(val16); ++ use_shared_key = 1; ++ } + +- _rtw_memcpy(pframe, cur_network->IEs, wps_offset); +- pframe += wps_offset; +- pattrib->pktlen += wps_offset; ++ pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); + +- wps_ielen = (uint)pmlmepriv->wps_probe_resp_ie[1];//to get ie data len +- if((wps_offset+wps_ielen+2)<=MAX_IE_SZ) +- { +- _rtw_memcpy(pframe, pmlmepriv->wps_probe_resp_ie, wps_ielen+2); +- pframe += wps_ielen+2; +- pattrib->pktlen += wps_ielen+2; +- } ++ // setting auth seq number ++ val16 =(u16)psta->auth_seq; ++ val16 = cpu_to_le16(val16); ++ pframe = rtw_set_fixed_ie(pframe, _AUTH_SEQ_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); + +- if((wps_offset+wps_ielen+2+remainder_ielen)<=MAX_IE_SZ) +- { +- _rtw_memcpy(pframe, premainder_ie, remainder_ielen); +- pframe += remainder_ielen; +- pattrib->pktlen += remainder_ielen; +- } +- } +- else ++ // setting status code... ++ val16 = status; ++ val16 = cpu_to_le16(val16); ++ pframe = rtw_set_fixed_ie(pframe, _STATUS_CODE_, (unsigned char *)&val16, &(pattrib->pktlen)); ++ ++ // added challenging text... ++ if ((psta->auth_seq == 2) && (psta->state & WIFI_FW_AUTH_STATE) && (use_shared_key==1)) + { +- _rtw_memcpy(pframe, cur_network->IEs, cur_network->IELength); +- pframe += cur_network->IELength; +- pattrib->pktlen += cur_network->IELength; ++ pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, psta->chg_txt, &(pattrib->pktlen)); + } +- +- } +- else +-#endif +- { ++#endif ++ } ++ else ++ { ++ _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); ++ _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); + +- //timestamp will be inserted by hardware +- pframe += 8; +- pattrib->pktlen += 8; +- +- // beacon interval: 2 bytes +- +- _rtw_memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); +- +- pframe += 2; +- pattrib->pktlen += 2; +- +- // capability info: 2 bytes +- +- _rtw_memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); +- +- pframe += 2; +- pattrib->pktlen += 2; +- +- //below for ad-hoc mode +- +- // SSID +- pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pattrib->pktlen); +- +- // supported rates... +- rate_len = rtw_get_rateset_len(cur_network->SupportedRates); +- pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8)? 8: rate_len), cur_network->SupportedRates, &pattrib->pktlen); +- +- // DS parameter set +- pframe =rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pattrib->pktlen); +- +- if( (pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) ++ // setting auth algo number ++ val16 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared)? 1: 0;// 0:OPEN System, 1:Shared key ++ if (val16) { ++ val16 = cpu_to_le16(val16); ++ use_shared_key = 1; ++ } ++ //DBG_871X("%s auth_algo= %s auth_seq=%d\n",__FUNCTION__,(pmlmeinfo->auth_algo==0)?"OPEN":"SHARED",pmlmeinfo->auth_seq); ++ ++ //setting IV for auth seq #3 ++ if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key==1)) + { +- u8 erpinfo=0; +- u32 ATIMWindow; +- // IBSS Parameter Set... +- //ATIMWindow = cur->Configuration.ATIMWindow; +- ATIMWindow = 0; +- pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen); ++ //DBG_871X("==> iv(%d),key_index(%d)\n",pmlmeinfo->iv,pmlmeinfo->key_index); ++ val32 = ((pmlmeinfo->iv++) | (pmlmeinfo->key_index << 30)); ++ val32 = cpu_to_le32(val32); ++ pframe = rtw_set_fixed_ie(pframe, 4, (unsigned char *)&val32, &(pattrib->pktlen)); + +- //ERP IE +- pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen); ++ pattrib->iv_len = 4; + } + ++ pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); + +- // EXTERNDED SUPPORTED RATE +- if (rate_len > 8) +- { +- pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen); +- } ++ // setting auth seq number ++ val16 = pmlmeinfo->auth_seq; ++ val16 = cpu_to_le16(val16); ++ pframe = rtw_set_fixed_ie(pframe, _AUTH_SEQ_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); + ++ ++ // setting status code... ++ val16 = status; ++ val16 = cpu_to_le16(val16); ++ pframe = rtw_set_fixed_ie(pframe, _STATUS_CODE_, (unsigned char *)&val16, &(pattrib->pktlen)); + +- //todo:HT for adhoc ++ // then checking to see if sending challenging text... ++ if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key==1)) ++ { ++ pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, pmlmeinfo->chg_txt, &(pattrib->pktlen)); + +- } ++ SetPrivacy(fctrl); ++ ++ pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); ++ ++ pattrib->encrypt = _WEP40_; + +-#ifdef CONFIG_P2P +- if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) && is_valid_p2p_probereq) +- { +- u32 len; +-#ifdef CONFIG_IOCTL_CFG80211 +- if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled) +- { +- //if pwdinfo->role == P2P_ROLE_DEVICE will call issue_probersp_p2p() +- len = pmlmepriv->p2p_go_probe_resp_ie_len; +- if(pmlmepriv->p2p_go_probe_resp_ie && len>0) +- _rtw_memcpy(pframe, pmlmepriv->p2p_go_probe_resp_ie, len); +- } +- else +-#endif //CONFIG_IOCTL_CFG80211 +- { +- len = build_probe_resp_p2p_ie(pwdinfo, pframe); ++ pattrib->icv_len = 4; ++ ++ pattrib->pktlen += pattrib->icv_len; ++ + } +- +- pframe += len; +- pattrib->pktlen += len; + +-#ifdef CONFIG_WFD +- wfdielen = build_probe_resp_wfd_ie(pwdinfo, pframe); +- pframe += wfdielen; +- pattrib->pktlen += wfdielen; +-#endif //CONFIG_WFD +- +- } +-#endif //CONFIG_P2P +- ++ } + + pattrib->last_txcmdsz = pattrib->pktlen; +- ++ ++ rtw_wep_encrypt(padapter, (u8 *)pmgntframe); + + dump_mgntframe(padapter, pmgntframe); +- +- return; + ++ return; + } + +-void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 blnbc) ++ ++void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type) + { +- struct xmit_frame *pmgntframe; +- struct pkt_attrib *pattrib; +- unsigned char *pframe; ++#ifdef CONFIG_AP_MODE ++ struct xmit_frame *pmgntframe; + struct rtw_ieee80211_hdr *pwlanhdr; +- unsigned short *fctrl; +- unsigned char *mac; +- unsigned char bssrate[NumRates]; +- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); ++ struct pkt_attrib *pattrib; ++ unsigned char *pbuf, *pframe; ++ unsigned short val; ++ unsigned short *fctrl; ++ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); + struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); +- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- int bssrate_len = 0; +- u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ WLAN_BSSID_EX *pnetwork = &(pmlmeinfo->network); ++ u8 *ie = pnetwork->IEs; ++#ifdef CONFIG_P2P ++ struct wifidirect_info *pwdinfo = &(padapter->wdinfo); ++#ifdef CONFIG_WFD ++ u32 wfdielen = 0; ++#endif //CONFIG_WFD ++#endif //CONFIG_P2P + +- RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("+issue_probereq\n")); ++ DBG_871X("%s\n", __FUNCTION__); + + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) + { +@@ -6125,313 +7418,45 @@ void issue_probereq(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 blnbc) + pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; + pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; + +- mac = myid(&(padapter->eeprompriv)); +- + fctrl = &(pwlanhdr->frame_ctl); + *(fctrl) = 0; + +- if ( 0 == blnbc ) +- { +- // unicast probe request frame +- _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); +- } +- else +- { +- // broadcast probe request frame +- _rtw_memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr3, bc_addr, ETH_ALEN); +- } ++ _rtw_memcpy((void *)GetAddr1Ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN); ++ _rtw_memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&(padapter->eeprompriv)), ETH_ALEN); ++ _rtw_memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + +- _rtw_memcpy(pwlanhdr->addr2, mac, ETH_ALEN); + + SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); + pmlmeext->mgnt_seq++; +- SetFrameSubType(pframe, WIFI_PROBEREQ); ++ if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP)) ++ SetFrameSubType(pwlanhdr, pkt_type); ++ else ++ return; + +- pframe += sizeof (struct rtw_ieee80211_hdr_3addr); +- pattrib->pktlen = sizeof (struct rtw_ieee80211_hdr_3addr); ++ pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); ++ pattrib->pktlen += pattrib->hdrlen; ++ pframe += pattrib->hdrlen; + +- if(pssid) +- pframe = rtw_set_ie(pframe, _SSID_IE_, pssid->SsidLength, pssid->Ssid, &(pattrib->pktlen)); +- else +- pframe = rtw_set_ie(pframe, _SSID_IE_, 0, NULL, &(pattrib->pktlen)); ++ //capability ++ val = *(unsigned short *)rtw_get_capability_from_ie(ie); + +- get_rate_set(padapter, bssrate, &bssrate_len); ++ pframe = rtw_set_fixed_ie(pframe, _CAPABILITY_ , (unsigned char *)&val, &(pattrib->pktlen)); + +- if (bssrate_len > 8) +- { +- pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen)); +- pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen)); +- } +- else +- { +- pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &(pattrib->pktlen)); +- } ++ status = cpu_to_le16(status); ++ pframe = rtw_set_fixed_ie(pframe , _STATUS_CODE_ , (unsigned char *)&status, &(pattrib->pktlen)); ++ ++ val = cpu_to_le16(pstat->aid | BIT(14) | BIT(15)); ++ pframe = rtw_set_fixed_ie(pframe, _ASOC_ID_ , (unsigned char *)&val, &(pattrib->pktlen)); + +-#if 0 +- //add wps_ie for wps2.0 +- if(pmlmepriv->probereq_wpsie_len>0 && pmlmepriv->probereq_wpsie_lenbssratelen <= 8) + { +- _rtw_memcpy(pframe, pmlmepriv->probereq_wpsie, pmlmepriv->probereq_wpsie_len); +- pframe += pmlmepriv->probereq_wpsie_len; +- pattrib->pktlen += pmlmepriv->probereq_wpsie_len; +- //pmlmepriv->probereq_wpsie_len = 0 ;//reset to zero ++ pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, pstat->bssratelen, pstat->bssrateset, &(pattrib->pktlen)); + } +-#else +- //add wps_ie for wps2.0 +- if(pmlmepriv->wps_probe_req_ie_len>0 && pmlmepriv->wps_probe_req_ie) ++ else + { +- _rtw_memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); +- pframe += pmlmepriv->wps_probe_req_ie_len; +- pattrib->pktlen += pmlmepriv->wps_probe_req_ie_len; +- //pmlmepriv->wps_probe_req_ie_len = 0 ;//reset to zero +- } +-#endif +- +- pattrib->last_txcmdsz = pattrib->pktlen; +- +- RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("issuing probe_req, tx_len=%d\n", pattrib->last_txcmdsz)); +- +- dump_mgntframe(padapter, pmgntframe); +- +- return; +-} +- +-// if psta == NULL, indiate we are station(client) now... +-void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status) +-{ +- struct xmit_frame *pmgntframe; +- struct pkt_attrib *pattrib; +- unsigned char *pframe; +- struct rtw_ieee80211_hdr *pwlanhdr; +- unsigned short *fctrl; +- unsigned int val32; +- unsigned short val16; +- int use_shared_key = 0; +- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); +- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- +-/* +- if( (psta == NULL) && (pmlmeinfo->auth_seq != 3) ) { +- // Because of AP's not receiving deauth before +- // AP may: 1)not response auth or 2)deauth us after link is complete +- // issue deauth before issuing auth to deal with the situation +- issue_deauth(padapter, (&(pmlmeinfo->network))->MacAddress, WLAN_REASON_DEAUTH_LEAVING); +- } +-*/ +- +- if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) +- { +- return; +- } +- +- //update attribute +- pattrib = &pmgntframe->attrib; +- update_mgntframe_attrib(padapter, pattrib); +- +- _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); +- +- pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; +- pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; +- +- fctrl = &(pwlanhdr->frame_ctl); +- *(fctrl) = 0; +- +- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); +- pmlmeext->mgnt_seq++; +- SetFrameSubType(pframe, WIFI_AUTH); +- +- pframe += sizeof(struct rtw_ieee80211_hdr_3addr); +- pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); +- +- +- if(psta)// for AP mode +- { +-#ifdef CONFIG_NATIVEAP_MLME +- +- _rtw_memcpy(pwlanhdr->addr1, psta->hwaddr, ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr3, myid(&(padapter->eeprompriv)), ETH_ALEN); +- +- +- // setting auth algo number +- val16 = (u16)psta->authalg; +- +- if(status != _STATS_SUCCESSFUL_) +- val16 = 0; +- +- if (val16) { +- val16 = cpu_to_le16(val16); +- use_shared_key = 1; +- } +- +- pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); +- +- // setting auth seq number +- val16 =(u16)psta->auth_seq; +- val16 = cpu_to_le16(val16); +- pframe = rtw_set_fixed_ie(pframe, _AUTH_SEQ_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); +- +- // setting status code... +- val16 = status; +- val16 = cpu_to_le16(val16); +- pframe = rtw_set_fixed_ie(pframe, _STATUS_CODE_, (unsigned char *)&val16, &(pattrib->pktlen)); +- +- // added challenging text... +- if ((psta->auth_seq == 2) && (psta->state & WIFI_FW_AUTH_STATE) && (use_shared_key==1)) +- { +- pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, psta->chg_txt, &(pattrib->pktlen)); +- } +-#endif +- } +- else +- { +- _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); +- +- // setting auth algo number +- val16 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared)? 1: 0;// 0:OPEN System, 1:Shared key +- if (val16) { +- val16 = cpu_to_le16(val16); +- use_shared_key = 1; +- } +- //DBG_8192C("%s auth_algo= %s auth_seq=%d\n",__FUNCTION__,(pmlmeinfo->auth_algo==0)?"OPEN":"SHARED",pmlmeinfo->auth_seq); +- +- //setting IV for auth seq #3 +- if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key==1)) +- { +- //DBG_8192C("==> iv(%d),key_index(%d)\n",pmlmeinfo->iv,pmlmeinfo->key_index); +- val32 = ((pmlmeinfo->iv++) | (pmlmeinfo->key_index << 30)); +- val32 = cpu_to_le32(val32); +- pframe = rtw_set_fixed_ie(pframe, 4, (unsigned char *)&val32, &(pattrib->pktlen)); +- +- pattrib->iv_len = 4; +- } +- +- pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); +- +- // setting auth seq number +- val16 = pmlmeinfo->auth_seq; +- val16 = cpu_to_le16(val16); +- pframe = rtw_set_fixed_ie(pframe, _AUTH_SEQ_NUM_, (unsigned char *)&val16, &(pattrib->pktlen)); +- +- +- // setting status code... +- val16 = status; +- val16 = cpu_to_le16(val16); +- pframe = rtw_set_fixed_ie(pframe, _STATUS_CODE_, (unsigned char *)&val16, &(pattrib->pktlen)); +- +- // then checking to see if sending challenging text... +- if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key==1)) +- { +- pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, pmlmeinfo->chg_txt, &(pattrib->pktlen)); +- +- SetPrivacy(fctrl); +- +- pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); +- +- pattrib->encrypt = _WEP40_; +- +- pattrib->icv_len = 4; +- +- pattrib->pktlen += pattrib->icv_len; +- +- } +- +- } +- +- pattrib->last_txcmdsz = pattrib->pktlen; +- +- rtw_wep_encrypt(padapter, (u8 *)pmgntframe); +- +- dump_mgntframe(padapter, pmgntframe); +- +- return; +-} +- +- +-void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *pstat, int pkt_type) +-{ +-#ifdef CONFIG_AP_MODE +- struct xmit_frame *pmgntframe; +- struct rtw_ieee80211_hdr *pwlanhdr; +- struct pkt_attrib *pattrib; +- unsigned char *pbuf, *pframe; +- unsigned short val; +- unsigned short *fctrl; +- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); +- struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); +- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- WLAN_BSSID_EX *pnetwork = &(pmlmeinfo->network); +- u8 *ie = pnetwork->IEs; +-#ifdef CONFIG_P2P +- struct wifidirect_info *pwdinfo = &(padapter->wdinfo); +-#ifdef CONFIG_WFD +- u32 wfdielen = 0; +-#endif //CONFIG_WFD +- +-#endif //CONFIG_P2P +- +- DBG_871X("%s\n", __FUNCTION__); +- +- if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) +- { +- return; +- } +- +- //update attribute +- pattrib = &pmgntframe->attrib; +- update_mgntframe_attrib(padapter, pattrib); +- +- +- _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); +- +- pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; +- pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; +- +- fctrl = &(pwlanhdr->frame_ctl); +- *(fctrl) = 0; +- +- _rtw_memcpy((void *)GetAddr1Ptr(pwlanhdr), pstat->hwaddr, ETH_ALEN); +- _rtw_memcpy((void *)GetAddr2Ptr(pwlanhdr), myid(&(padapter->eeprompriv)), ETH_ALEN); +- _rtw_memcpy((void *)GetAddr3Ptr(pwlanhdr), get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); +- +- +- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); +- pmlmeext->mgnt_seq++; +- if ((pkt_type == WIFI_ASSOCRSP) || (pkt_type == WIFI_REASSOCRSP)) +- SetFrameSubType(pwlanhdr, pkt_type); +- else +- return; +- +- pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); +- pattrib->pktlen += pattrib->hdrlen; +- pframe += pattrib->hdrlen; +- +- //capability +- val = *(unsigned short *)rtw_get_capability_from_ie(ie); +- +- pframe = rtw_set_fixed_ie(pframe, _CAPABILITY_ , (unsigned char *)&val, &(pattrib->pktlen)); +- +- status = cpu_to_le16(status); +- pframe = rtw_set_fixed_ie(pframe , _STATUS_CODE_ , (unsigned char *)&status, &(pattrib->pktlen)); +- +- val = cpu_to_le16(pstat->aid | BIT(14) | BIT(15)); +- pframe = rtw_set_fixed_ie(pframe, _ASOC_ID_ , (unsigned char *)&val, &(pattrib->pktlen)); +- +- if (pstat->bssratelen <= 8) +- { +- pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, pstat->bssratelen, pstat->bssrateset, &(pattrib->pktlen)); +- } +- else +- { +- pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pstat->bssrateset, &(pattrib->pktlen)); +- pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (pstat->bssratelen-8), pstat->bssrateset+8, &(pattrib->pktlen)); +- } ++ pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pstat->bssrateset, &(pattrib->pktlen)); ++ pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (pstat->bssratelen-8), pstat->bssrateset+8, &(pattrib->pktlen)); ++ } + + #ifdef CONFIG_80211N_HT + if ((pstat->flags & WLAN_STA_HT) && (pmlmepriv->htpriv.ht_option)) +@@ -6503,21 +7528,30 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p } #ifdef CONFIG_P2P @@ -15425,7 +16494,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //CONFIG_P2P pattrib->last_txcmdsz = pattrib->pktlen; -@@ -6529,6 +7563,7 @@ void issue_asocrsp(_adapter *padapter, u +@@ -6529,6 +7563,7 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p void issue_assocreq(_adapter *padapter) { @@ -15797,7 +16866,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //update attribute -@@ -6997,7 +8130,7 @@ void issue_nulldata(_adapter *padapter, +@@ -6997,7 +8130,7 @@ void issue_nulldata(_adapter *padapter, unsigned int power_mode) SetPwrMgt(fctrl); } @@ -15806,7 +16875,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -@@ -7009,14 +8142,75 @@ void issue_nulldata(_adapter *padapter, +@@ -7009,14 +8142,75 @@ void issue_nulldata(_adapter *padapter, unsigned int power_mode) pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); pattrib->last_txcmdsz = pattrib->pktlen; @@ -15885,7 +16954,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; unsigned char *pframe; -@@ -7030,7 +8224,7 @@ void issue_qos_nulldata(_adapter *padapt +@@ -7030,7 +8224,7 @@ void issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid) if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) { @@ -15894,156 +16963,26 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //update attribute -@@ -7083,230 +8277,104 @@ void issue_qos_nulldata(_adapter *padapt +@@ -7083,11 +8277,71 @@ void issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid) pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos); pattrib->last_txcmdsz = pattrib->pktlen; - dump_mgntframe(padapter, pmgntframe); -- --} -- --void issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason) --{ -- struct xmit_frame *pmgntframe; -- struct pkt_attrib *pattrib; -- unsigned char *pframe; -- struct rtw_ieee80211_hdr *pwlanhdr; -- unsigned short *fctrl; -- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- -- DBG_871X("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); -- if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -- { -- return; -- } -- -- //update attribute -- pattrib = &pmgntframe->attrib; -- update_mgntframe_attrib(padapter, pattrib); -- pattrib->retry_ctrl = _FALSE; -- -- _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); -- -- pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; -- pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; -- -- fctrl = &(pwlanhdr->frame_ctl); -- *(fctrl) = 0; -- -- _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); -- _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); -- _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -- -- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); -- pmlmeext->mgnt_seq++; -- SetFrameSubType(pframe, WIFI_DEAUTH); -- -- pframe += sizeof(struct rtw_ieee80211_hdr_3addr); -- pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); -- -- reason = cpu_to_le16(reason); -- pframe = rtw_set_fixed_ie(pframe, _RSON_CODE_ , (unsigned char *)&reason, &(pattrib->pktlen)); -- -- pattrib->last_txcmdsz = pattrib->pktlen; -- -- dump_mgntframe(padapter, pmgntframe); --} -- --void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status) --{ -- u8 category = RTW_WLAN_CATEGORY_BACK; -- u16 start_seq; -- u16 BA_para_set; -- u16 reason_code; -- u16 BA_timeout_value; -- u16 BA_starting_seqctrl; -- struct xmit_frame *pmgntframe; -- struct pkt_attrib *pattrib; -- u8 *pframe; -- struct rtw_ieee80211_hdr *pwlanhdr; -- u16 *fctrl; -- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- struct sta_info *psta; -- struct sta_priv *pstapriv = &padapter->stapriv; -- struct registry_priv *pregpriv = &padapter->registrypriv; -- -- -- DBG_871X("%s, category=%d, action=%d, status=%d\n", __FUNCTION__, category, action, status); -- -- if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) + if(wait_ack) - { -- return; ++ { + ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe); + } + else + { + dump_mgntframe(padapter, pmgntframe); + ret = _SUCCESS; - } - -- //update attribute -- pattrib = &pmgntframe->attrib; -- update_mgntframe_attrib(padapter, pattrib); -- -- _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); -- -- pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; -- pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; -- -- fctrl = &(pwlanhdr->frame_ctl); -- *(fctrl) = 0; -- -- //_rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -- _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); -- _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); -- _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -- -- SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); -- pmlmeext->mgnt_seq++; -- SetFrameSubType(pframe, WIFI_ACTION); -- -- pframe += sizeof(struct rtw_ieee80211_hdr_3addr); -- pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); -- -- pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); -- pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); -- -- status = cpu_to_le16(status); -- -- -- if (category == 3) -- { -- switch (action) -- { -- case 0: //ADDBA req -- do { -- pmlmeinfo->dialogToken++; -- } while (pmlmeinfo->dialogToken == 0); -- pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->dialogToken), &(pattrib->pktlen)); -- -- BA_para_set = (0x1002 | ((status & 0xf) << 2)); //immediate ack & 64 buffer size -- //sys_mib.BA_para_set = 0x0802; //immediate ack & 32 buffer size -- BA_para_set = cpu_to_le16(BA_para_set); -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_para_set)), &(pattrib->pktlen)); -- -- //BA_timeout_value = 0xffff;//max: 65535 TUs(~ 65 ms) -- BA_timeout_value = 5000;//~ 5ms -- BA_timeout_value = cpu_to_le16(BA_timeout_value); -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_timeout_value)), &(pattrib->pktlen)); ++ } ++ +exit: + return ret; +} - -- //if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) -- if ((psta = rtw_get_stainfo(pstapriv, raddr)) != NULL) -- { -- start_seq = (psta->sta_xmitpriv.txseq_tid[status & 0x07]&0xfff) + 1; ++ +//when wait_ms >0 , this function shoule be called at process context +//da == NULL for station mode +int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, int try_cnt, int wait_ms) @@ -16053,17 +16992,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + u32 start = rtw_get_current_time(); + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - -- DBG_871X("BA_starting_seqctrl = %d for TID=%d\n", start_seq, status & 0x07); -- -- psta->BA_starting_seqctrl[status & 0x07] = start_seq; -- -- BA_starting_seqctrl = start_seq << 4; -- } -- -- BA_starting_seqctrl = cpu_to_le16(BA_starting_seqctrl); -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_starting_seqctrl)), &(pattrib->pktlen)); -- break; ++ + /* da == NULL, assum it's null data for sta to ap*/ + if (da == NULL) + da = get_my_bssid(&(pmlmeinfo->network)); @@ -16071,53 +17000,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + do + { + ret = _issue_qos_nulldata(padapter, da, tid, wait_ms>0?_TRUE:_FALSE); - -- case 1: //ADDBA rsp -- pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen)); -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen)); ++ + i++; - -- //BA_para_set = cpu_to_le16((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); //64 buffer size -- BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); //64 buffer size ++ + if (padapter->bDriverStopped || padapter->bSurpriseRemoved) + break; - -- if(pregpriv->ampdu_amsdu==0)//disabled -- BA_para_set = cpu_to_le16(BA_para_set & ~BIT(0)); -- else if(pregpriv->ampdu_amsdu==1)//enabled -- BA_para_set = cpu_to_le16(BA_para_set | BIT(0)); -- else //auto -- BA_para_set = cpu_to_le16(BA_para_set); -- -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_para_set)), &(pattrib->pktlen)); -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(pmlmeinfo->ADDBA_req.BA_timeout_value)), &(pattrib->pktlen)); -- break; -- case 2://DELBA -- BA_para_set = (status & 0x1F) << 3; -- BA_para_set = cpu_to_le16(BA_para_set); -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_para_set)), &(pattrib->pktlen)); ++ + if(i < try_cnt && wait_ms > 0 && ret==_FAIL) + rtw_msleep_os(wait_ms); - -- reason_code = 37;//Requested from peer STA as it does not want to use the mechanism -- reason_code = cpu_to_le16(reason_code); -- pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(reason_code)), &(pattrib->pktlen)); -- break; -- default: -- break; -- } -- } ++ + }while((ilast_txcmdsz = pattrib->pktlen; ++ + if (ret != _FAIL) { + ret = _SUCCESS; + #ifndef DBG_XMIT_ACK + goto exit; + #endif + } - -- dump_mgntframe(padapter, pmgntframe); ++ + if (try_cnt && wait_ms) { + if (da) + DBG_871X(FUNC_ADPT_FMT" to "MAC_FMT", ch:%u%s, %d/%d in %u ms\n", @@ -16132,46 +17032,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return ret; } --static void issue_action_BSSCoexistPacket(_adapter *padapter) --{ -- _irqL irqL; -- _list *plist, *phead; -- unsigned char category, action; +-void issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason) +static int _issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason, u8 wait_ack) -+{ + { struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; -- unsigned char *pframe; -+ unsigned char *pframe; - struct rtw_ieee80211_hdr *pwlanhdr; -- unsigned short *fctrl; -- struct wlan_network *pnetwork = NULL; -+ unsigned short *fctrl; +@@ -7097,12 +8351,24 @@ void issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason) struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- _queue *queue = &(pmlmepriv->scanned_queue); -- u8 InfoContent[16] = {0}; -- u8 ICS[8][15]; -- -- if((pmlmepriv->num_FortyMHzIntolerant==0) || (pmlmepriv->num_sta_no_ht==0)) -- return; - -- if(_TRUE == pmlmeinfo->bwmode_updated) -- return; +- DBG_871X("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); + int ret = _FAIL; +#ifdef CONFIG_P2P + struct wifidirect_info *pwdinfo= &(padapter->wdinfo); +#endif //CONFIG_P2P + //DBG_871X("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); - -- DBG_871X("%s\n", __FUNCTION__); -- -- -- category = RTW_WLAN_CATEGORY_PUBLIC; -- action = ACT_PUBLIC_BSSCOEXIST; ++ +#ifdef CONFIG_P2P + if ( !( rtw_p2p_chk_state( pwdinfo, P2P_STATE_NONE ) ) && ( pwdinfo->rx_invitereq_info.scan_op_ch_only ) ) + { @@ -16179,7 +17057,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + _set_timer( &pwdinfo->reset_ch_sitesurvey, 10 ); + } +#endif //CONFIG_P2P - ++ if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) { - return; @@ -16187,45 +17065,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //update attribute - pattrib = &pmgntframe->attrib; - update_mgntframe_attrib(padapter, pattrib); -+ pattrib->retry_ctrl = _FALSE; - - _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); - -@@ -7316,4715 +8384,4970 @@ static void issue_action_BSSCoexistPacke - fctrl = &(pwlanhdr->frame_ctl); - *(fctrl) = 0; - -- _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -+ _rtw_memcpy(pwlanhdr->addr1, da, ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); - _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - - SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); - pmlmeext->mgnt_seq++; -- SetFrameSubType(pframe, WIFI_ACTION); -+ SetFrameSubType(pframe, WIFI_DEAUTH); - - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); +@@ -7134,17 +8400,138 @@ void issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason) -- pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); -- pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); -+ reason = cpu_to_le16(reason); -+ pframe = rtw_set_fixed_ie(pframe, _RSON_CODE_ , (unsigned char *)&reason, &(pattrib->pktlen)); - -+ pattrib->last_txcmdsz = pattrib->pktlen; - -- // -- if(pmlmepriv->num_FortyMHzIntolerant>0) -- { -- u8 iedata=0; -- -- iedata |= BIT(2);//20 MHz BSS Width Request + pattrib->last_txcmdsz = pattrib->pktlen; -- pframe = rtw_set_ie(pframe, EID_BSSCoexistence, 1, &iedata, &(pattrib->pktlen)); -- ++ + if(wait_ack) + { + ret = dump_mgntframe_and_wait_ack(padapter, pmgntframe); @@ -16234,173 +17078,46 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + dump_mgntframe(padapter, pmgntframe); + ret = _SUCCESS; - } -- -- -- // -- _rtw_memset(ICS, 0, sizeof(ICS)); -- if(pmlmepriv->num_sta_no_ht>0) -- { -- int i; -- -- _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); - -- phead = get_list_head(queue); -- plist = get_next(phead); -- -- while(1) -- { -- int len; -- u8 *p; -- WLAN_BSSID_EX *pbss_network; -- -- if (rtw_end_of_queue_search(phead,plist)== _TRUE) -- break; ++ } ++ +exit: + return ret; +} - -- pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); -- -- plist = get_next(plist); ++ +int issue_deauth(_adapter *padapter, unsigned char *da, unsigned short reason) +{ + DBG_871X("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); + return _issue_deauth(padapter, da, reason, _FALSE); +} - -- pbss_network = (WLAN_BSSID_EX *)&pnetwork->network; ++ +int issue_deauth_ex(_adapter *padapter, u8 *da, unsigned short reason, int try_cnt, + int wait_ms) +{ + int ret; + int i = 0; + u32 start = rtw_get_current_time(); - -- p = rtw_get_ie(pbss_network->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, pbss_network->IELength - _FIXED_IE_LENGTH_); -- if((p==NULL) || (len==0))//non-HT -- { -- if((pbss_network->Configuration.DSConfig<=0) || (pbss_network->Configuration.DSConfig>14)) -- continue; -- -- ICS[0][pbss_network->Configuration.DSConfig]=1; -- -- if(ICS[0][0] == 0) -- ICS[0][0] = 1; -- } -- -- } ++ + do + { + ret = _issue_deauth(padapter, da, reason, wait_ms>0?_TRUE:_FALSE); - -- _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); ++ + i++; - ++ + if (padapter->bDriverStopped || padapter->bSurpriseRemoved) + break; - -- for(i= 0;i<8;i++) -- { -- if(ICS[i][0] == 1) -- { -- int j, k = 0; -- -- InfoContent[k] = i; -- //SET_BSS_INTOLERANT_ELE_REG_CLASS(InfoContent,i); -- k++; -- -- for(j=1;j<=14;j++) -- { -- if(ICS[i][j]==1) -- { -- if(k<16) -- { -- InfoContent[k] = j; //channel number -- //SET_BSS_INTOLERANT_ELE_CHANNEL(InfoContent+k, j); -- k++; -- } -- } -- } ++ + if(i < try_cnt && wait_ms > 0 && ret==_FAIL) + rtw_msleep_os(wait_ms); - -- pframe = rtw_set_ie(pframe, EID_BSSIntolerantChlReport, k, InfoContent, &(pattrib->pktlen)); -- -- } -- -- } -- ++ + }while((ilast_txcmdsz = pattrib->pktlen; -- -- dump_mgntframe(padapter, pmgntframe); -- --} -- --unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr) --{ -- struct sta_priv *pstapriv = &padapter->stapriv; -- struct sta_info *psta = NULL; -- //struct recv_reorder_ctrl *preorder_ctrl; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- u16 tid; -- -- if((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) -- if (!(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)) -- return _SUCCESS; -- -- psta = rtw_get_stainfo(pstapriv, addr); -- if(psta==NULL) -- return _SUCCESS; - -- //DBG_8192C("%s:%s\n", __FUNCTION__, (initiator==0)?"RX_DIR":"TX_DIR"); -- -- if(initiator==0) // recipient -- { -- for(tid = 0;tidrecvreorder_ctrl[tid].enable == _TRUE) -- { -- DBG_8192C("rx agg disable tid(%d)\n",tid); -- issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid <<1) |initiator)&0x1F)); -- psta->recvreorder_ctrl[tid].enable = _FALSE; -- psta->recvreorder_ctrl[tid].indicate_seq = 0xffff; -- #ifdef DBG_RX_SEQ -- DBG_871X("DBG_RX_SEQ %s:%d indicate_seq:%u \n", __FUNCTION__, __LINE__, -- psta->recvreorder_ctrl[tid].indicate_seq); -- #endif -- } -- } -- } -- else if(initiator == 1)// originator -- { -- //DBG_8192C("tx agg_enable_bitmap(0x%08x)\n", psta->htpriv.agg_enable_bitmap); -- for(tid = 0;tidhtpriv.agg_enable_bitmap & BIT(tid)) -- { -- DBG_8192C("tx agg disable tid(%d)\n",tid); -- issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid <<1) |initiator)&0x1F) ); -- psta->htpriv.agg_enable_bitmap &= ~BIT(tid); -- psta->htpriv.candidate_tid_bitmap &= ~BIT(tid); -- -- } -- } -- } -- -- return _SUCCESS; -- ++ } ++ + if (try_cnt && wait_ms) { + if (da) + DBG_871X(FUNC_ADPT_FMT" to "MAC_FMT", ch:%u%s, %d/%d in %u ms\n", @@ -16413,12 +17130,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +exit: + return ret; - } - --unsigned int send_beacon(_adapter *padapter) --{ -- u8 bxmitok = _FALSE; -- int retry=0; ++} ++ +void issue_action_spct_ch_switch(_adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset) +{ + _irqL irqL; @@ -16432,199 +17145,118 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - -- //DBG_871X("%s\n", __FUNCTION__); - --#ifdef CONFIG_PCI_HCI ++ ++ + DBG_871X(FUNC_NDEV_FMT" ra="MAC_FMT", ch:%u, offset:%u\n", + FUNC_NDEV_ARG(padapter->pnetdev), MAC_ARG(ra), new_ch, ch_offset); - -- issue_beacon(padapter); ++ + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) + return; - -- return _SUCCESS; ++ + //update attribute + pattrib = &pmgntframe->attrib; + update_mgntframe_attrib(padapter, pattrib); - --#endif ++ + _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); - --#ifdef CONFIG_USB_HCI -- do{ ++ + pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; + pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; - -- issue_beacon(padapter); ++ + fctrl = &(pwlanhdr->frame_ctl); + *(fctrl) = 0; - -- padapter->HalFunc.GetHwRegHandler(padapter, HW_VAR_TX_BCN_DONE, (u8 *)(&bxmitok)); ++ + _rtw_memcpy(pwlanhdr->addr1, ra, ETH_ALEN); /* RA */ + _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); /* TA */ + _rtw_memcpy(pwlanhdr->addr3, ra, ETH_ALEN); /* DA = RA */ - -- }while((_FALSE == bxmitok) &&((retry++)<100 )); ++ + SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); + pmlmeext->mgnt_seq++; + SetFrameSubType(pframe, WIFI_ACTION); - -- if(retry == 100) -- { -- DBG_871X("send_beacon, fail!\n"); -- return _FAIL; -- } -- else ++ + pframe += sizeof(struct rtw_ieee80211_hdr_3addr); + pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); + + /* category, action */ - { -- return _SUCCESS; ++ { + u8 category, action; + category = RTW_WLAN_CATEGORY_SPECTRUM_MGMT; + action = RTW_WLAN_ACTION_SPCT_CHL_SWITCH; + + pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); + pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); - } --#endif -- --} - --/**************************************************************************** ++ } ++ + pframe = rtw_set_ie_ch_switch(pframe, &(pattrib->pktlen), 0, new_ch, 0); + pframe = rtw_set_ie_secondary_ch_offset(pframe, &(pattrib->pktlen), + hal_ch_offset_to_secondary_ch_offset(ch_offset)); - --Following are some utitity fuctions for WiFi MLME ++ + pattrib->last_txcmdsz = pattrib->pktlen; - --*****************************************************************************/ -+ dump_mgntframe(padapter, pmgntframe); - --BOOLEAN IsLegal5GChannel( -- IN PADAPTER Adapter, -- IN u8 channel) --{ -- -- int i=0; -- u8 Channel_5G[45] = {36,38,40,42,44,46,48,50,52,54,56,58, -- 60,62,64,100,102,104,106,108,110,112,114,116,118,120,122, -- 124,126,128,130,132,134,136,138,140,149,151,153,155,157,159, -- 161,163,165}; -- for(i=0;imlmeextpriv; +- u8 category = RTW_WLAN_CATEGORY_BACK; +- u16 start_seq; +- u16 BA_para_set; + u8 category = RTW_WLAN_CATEGORY_SA_QUERY; -+ u16 reason_code; -+ struct xmit_frame *pmgntframe; -+ struct pkt_attrib *pattrib; -+ u8 *pframe; -+ struct rtw_ieee80211_hdr *pwlanhdr; -+ u16 *fctrl; -+ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -+ struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- u32 initialgain = 0; -- --#ifdef CONFIG_P2P -- struct wifidirect_info *pwdinfo= &(padapter->wdinfo); -- static unsigned char prev_survey_channel = 0; -- static unsigned int p2p_scan_count = 0; -- -- if(rtw_p2p_findphase_ex_is_social(pwdinfo)) -+ struct sta_info *psta; -+ struct sta_priv *pstapriv = &padapter->stapriv; -+ struct registry_priv *pregpriv = &padapter->registrypriv; -+ -+ + u16 reason_code; +- u16 BA_timeout_value; +- u16 BA_starting_seqctrl; + struct xmit_frame *pmgntframe; + struct pkt_attrib *pattrib; + u8 *pframe; +@@ -7158,10 +8545,11 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act + struct registry_priv *pregpriv = &padapter->registrypriv; + + +- DBG_871X("%s, category=%d, action=%d, status=%d\n", __FUNCTION__, category, action, status); + DBG_871X("%s\n", __FUNCTION__); -+ -+ if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) + + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) { -- // Commented by Albert 2011/06/03 -- // The driver is in the find phase, it should go through the social channel. -- survey_channel = pwdinfo->social_chan[pmlmeext->sitesurvey_res.channel_idx]; + DBG_871X("%s: alloc_mgtxmitframe fail\n", __FUNCTION__); -+ return; + return; } -+ -+ //update attribute -+ pattrib = &pmgntframe->attrib; -+ update_mgntframe_attrib(padapter, pattrib); -+ -+ _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); -+ -+ pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; -+ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; -+ -+ fctrl = &(pwlanhdr->frame_ctl); -+ *(fctrl) = 0; -+ + +@@ -7177,8 +8565,10 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act + fctrl = &(pwlanhdr->frame_ctl); + *(fctrl) = 0; + +- //_rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); +- _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); + if(raddr) + _rtw_memcpy(pwlanhdr->addr1, raddr, ETH_ALEN); - else --#endif //CONFIG_P2P -- { -- survey_channel = pmlmeext->channel_set[pmlmeext->sitesurvey_res.channel_idx].ChannelNum; -- } ++ else + _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -+ _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); -+ _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); + _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); + _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -- ScanType = pmlmeext->channel_set[pmlmeext->sitesurvey_res.channel_idx].ScanType; -- -- //DBG_871X("switching to ch:%d (cnt:%u,idx:%d) at %dms, %c%c%c\n" -- // , survey_channel -- // , pwdinfo->find_phase_state_exchange_cnt, pmlmeext->sitesurvey_res.channel_idx -- // , rtw_get_passing_time_ms(padapter->mlmepriv.scan_start_time) -- // , ScanType?'A':'P', pmlmeext->sitesurvey_res.scan_mode?'A':'P' -- // , pmlmeext->sitesurvey_res.ssid[0].SsidLength?'S':' ' -- //); -+ SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); -+ pmlmeext->mgnt_seq++; -+ SetFrameSubType(pframe, WIFI_ACTION); +@@ -7189,11 +8579,89 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act + pframe += sizeof(struct rtw_ieee80211_hdr_3addr); + pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); -- if(survey_channel != 0) -+ pframe += sizeof(struct rtw_ieee80211_hdr_3addr); -+ pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); -+ +- pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); +- pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); +- +- status = cpu_to_le16(status); +- + pframe = rtw_set_fixed_ie(pframe, 1, &category, &pattrib->pktlen); + pframe = rtw_set_fixed_ie(pframe, 1, &action, &pattrib->pktlen); + + switch (action) - { -- //PAUSE 4-AC Queue when site_survey -- //padapter->HalFunc.GetHwRegHandler(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); -- //val8 |= 0x0f; -- //padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); ++ { + case 0: //SA Query req + pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&pmlmeext->sa_query_seq, &pattrib->pktlen); + pmlmeext->sa_query_seq++; + //send sa query request to AP, AP should reply sa query response in 1 second + set_sa_query_timer(pmlmeext, 1000); + break; - -- if(pmlmeext->sitesurvey_res.channel_idx == 0) -- { -- set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); -- } -- else -- { -- SelectChannel(padapter, survey_channel); -- } ++ + case 1: //SA Query rsp + tid = cpu_to_le16(tid); + pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&tid, &pattrib->pktlen); @@ -16632,46 +17264,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + default: + break; + } - ++ + pattrib->last_txcmdsz = pattrib->pktlen; - -- if(ScanType == SCAN_ACTIVE) //obey the channel plan setting... -- { -- #ifdef CONFIG_P2P -- if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || -- rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH) -- ) -- { -- issue_probereq_p2p(padapter); -- issue_probereq_p2p(padapter); -- issue_probereq_p2p(padapter); -- } -- else -- #endif //CONFIG_P2P -- { -- int i; -- for(i=0;isitesurvey_res.ssid[i].SsidLength) { -- //todo: to issue two probe req??? -- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]),1); -- //rtw_msleep_os(SURVEY_TO>>1); -- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]),1); -- } else { -- break; -- } -- } ++ + dump_mgntframe(padapter, pmgntframe); +} +#endif //CONFIG_IEEE80211W - -- if(pmlmeext->sitesurvey_res.scan_mode == SCAN_ACTIVE) { -- //todo: to issue two probe req??? -- issue_probereq(padapter, NULL, 1); -- //rtw_msleep_os(SURVEY_TO>>1); -- issue_probereq(padapter, NULL, 1); -- } -- } -- } ++ +void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status) +{ + u8 category = RTW_WLAN_CATEGORY_BACK; @@ -16691,70 +17290,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + struct sta_info *psta; + struct sta_priv *pstapriv = &padapter->stapriv; + struct registry_priv *pregpriv = &padapter->registrypriv; - -- set_survey_timer(pmlmeext, pmlmeext->chan_scan_time); - -- } -- else ++ ++ + DBG_871X("%s, category=%d, action=%d, status=%d\n", __FUNCTION__, category, action, status); + + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) - { ++ { + return; + } - -- // channel number is 0 or this channel is not valid. --#ifdef CONFIG_P2P -- if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH)) -- { -- #ifdef CONFIG_DBG_P2P -- DBG_8192C( "[%s] find phase exchange cnt = %d\n", __FUNCTION__, pwdinfo->find_phase_state_exchange_cnt ); -- #endif -- } -- -- if(rtw_p2p_findphase_ex_is_needed(pwdinfo)) -- { -- // Set the P2P State to the listen state of find phase and set the current channel to the listen channel -- set_channel_bwmode(padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); -- rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_LISTEN); -- -- pmlmeext->sitesurvey_res.state = SCAN_DISABLE; ++ + //update attribute + pattrib = &pmgntframe->attrib; + update_mgntframe_attrib(padapter, pattrib); - -- _set_timer( &pwdinfo->find_phase_timer, ( u32 ) ( ( u32 ) ( pwdinfo->listen_dwell ) * 100 ) ); -- } -- else --#endif //CONFIG_P2P -- { ++ + _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); - --#ifdef CONFIG_ANTENNA_DIVERSITY -- // 20100721:Interrupt scan operation here. -- // For SW antenna diversity before link, it needs to switch to another antenna and scan again. -- // It compares the scan result and select beter one to do connection. -- if(padapter->HalFunc.SwAntDivBeforeLinkHandler(padapter)) -- { -- pmlmeext->sitesurvey_res.bss_cnt = 0; -- pmlmeext->sitesurvey_res.channel_idx = -1; -- pmlmeext->chan_scan_time = SURVEY_TO /2; -- set_survey_timer(pmlmeext, pmlmeext->chan_scan_time); -- return; -- } --#endif ++ + pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; + pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; - --#ifdef CONFIG_P2P -- if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH)) -- { -- rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN); -- } -- rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); --#endif //CONFIG_P2P -- -- pmlmeext->sitesurvey_res.state = SCAN_COMPLETE; ++ + fctrl = &(pwlanhdr->frame_ctl); + *(fctrl) = 0; + @@ -16769,547 +17322,55 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + pframe += sizeof(struct rtw_ieee80211_hdr_3addr); + pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); - -- //switch back to the original channel -- //SelectChannel(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset); ++ + pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); + pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); - --#ifdef CONFIG_P2P -- if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_OK) -- && pwdinfo->peer_operating_ch != 0 -- ) -- { -- DBG_8192C( "[%s] In P2P WPS mode, stay in the peer operating channel = %d\n", __FUNCTION__, pwdinfo->peer_operating_ch ); -- set_channel_bwmode(padapter, pwdinfo->peer_operating_ch, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -- } -- else --#endif //CONFIG_P2P -- { -- set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -- } ++ + status = cpu_to_le16(status); + -- //flush 4-AC Queue after site_survey -- //val8 = 0; -- //padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); -+ if (category == 3) -+ { -+ switch (action) -+ { -+ case 0: //ADDBA req -+ do { -+ pmlmeinfo->dialogToken++; -+ } while (pmlmeinfo->dialogToken == 0); -+ pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->dialogToken), &(pattrib->pktlen)); - -- val8 = 0; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); -+ BA_para_set = (0x1002 | ((status & 0xf) << 2)); //immediate ack & 64 buffer size -+ //sys_mib.BA_para_set = 0x0802; //immediate ack & 32 buffer size -+ BA_para_set = cpu_to_le16(BA_para_set); -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_para_set)), &(pattrib->pktlen)); - -- //config MSR -- Set_NETYPE0_MSR(padapter, (pmlmeinfo->state & 0x3)); -+ //BA_timeout_value = 0xffff;//max: 65535 TUs(~ 65 ms) -+ BA_timeout_value = 5000;//~ 5ms -+ BA_timeout_value = cpu_to_le16(BA_timeout_value); -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_timeout_value)), &(pattrib->pktlen)); - -- initialgain = 0xff; //restore RX GAIN -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); -- //turn on dynamic functions -- Restore_DM_Func_Flag(padapter); -- //Switch_DM_Func(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, _TRUE); -+ //if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) -+ if ((psta = rtw_get_stainfo(pstapriv, raddr)) != NULL) -+ { -+ start_seq = (psta->sta_xmitpriv.txseq_tid[status & 0x07]&0xfff) + 1; - -- if (is_client_associated_to_ap(padapter) == _TRUE) -- { -- //issue null data -- issue_nulldata(padapter, 0); -- } -+ DBG_871X("BA_starting_seqctrl = %d for TID=%d\n", start_seq, status & 0x07); -+ -+ psta->BA_starting_seqctrl[status & 0x07] = start_seq; -+ -+ BA_starting_seqctrl = start_seq << 4; -+ } -+ -+ BA_starting_seqctrl = cpu_to_le16(BA_starting_seqctrl); -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_starting_seqctrl)), &(pattrib->pktlen)); -+ break; - -- report_surveydone_event(padapter); -+ case 1: //ADDBA rsp -+ pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen)); -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen)); - -- pmlmeext->chan_scan_time = SURVEY_TO; -- pmlmeext->sitesurvey_res.state = SCAN_DISABLE; -+ //BA_para_set = cpu_to_le16((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); //64 buffer size -+ BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); //64 buffer size - -- issue_action_BSSCoexistPacket(padapter); -- issue_action_BSSCoexistPacket(padapter); -- issue_action_BSSCoexistPacket(padapter); -+ if(pregpriv->ampdu_amsdu==0)//disabled -+ BA_para_set = cpu_to_le16(BA_para_set & ~BIT(0)); -+ else if(pregpriv->ampdu_amsdu==1)//enabled -+ BA_para_set = cpu_to_le16(BA_para_set | BIT(0)); -+ else //auto -+ BA_para_set = cpu_to_le16(BA_para_set); -+ -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_para_set)), &(pattrib->pktlen)); -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(pmlmeinfo->ADDBA_req.BA_timeout_value)), &(pattrib->pktlen)); -+ break; -+ case 2://DELBA -+ BA_para_set = (status & 0x1F) << 3; -+ BA_para_set = cpu_to_le16(BA_para_set); -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(BA_para_set)), &(pattrib->pktlen)); - -+ reason_code = 37;//Requested from peer STA as it does not want to use the mechanism -+ reason_code = cpu_to_le16(reason_code); -+ pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(reason_code)), &(pattrib->pktlen)); -+ break; -+ default: -+ break; - } -- - } - -- return; -+ pattrib->last_txcmdsz = pattrib->pktlen; - -+ dump_mgntframe(padapter, pmgntframe); - } - --//collect bss info from Beacon and Probe response frames. --u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSID_EX *bssid) --{ -- int i; -- u32 len; -- u8 *p; -- u16 val16, subtype; -- u8 *pframe = precv_frame->u.hdr.rx_data; -- u32 packet_len = precv_frame->u.hdr.len; -- struct registry_priv *pregistrypriv = &padapter->registrypriv; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+static void issue_action_BSSCoexistPacket(_adapter *padapter) -+{ -+ _irqL irqL; -+ _list *plist, *phead; -+ unsigned char category, action; -+ struct xmit_frame *pmgntframe; -+ struct pkt_attrib *pattrib; -+ unsigned char *pframe; -+ struct rtw_ieee80211_hdr *pwlanhdr; -+ unsigned short *fctrl; -+ struct wlan_network *pnetwork = NULL; -+ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -+ struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -+ struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ _queue *queue = &(pmlmepriv->scanned_queue); -+ u8 InfoContent[16] = {0}; -+ u8 ICS[8][15]; -+ -+ if((pmlmepriv->num_FortyMHzIntolerant==0) || (pmlmepriv->num_sta_no_ht==0)) -+ return; - -- len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); -+ if(_TRUE == pmlmeinfo->bwmode_updated) -+ return; -+ - -- if (len > MAX_IE_SZ) -+ DBG_871X("%s\n", __FUNCTION__); -+ -+ -+ category = RTW_WLAN_CATEGORY_PUBLIC; -+ action = ACT_PUBLIC_BSSCOEXIST; -+ -+ if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) - { -- //DBG_8192C("IE too long for survey event\n"); -- return _FAIL; -+ return; - } - -- _rtw_memset(bssid, 0, sizeof(WLAN_BSSID_EX)); -+ //update attribute -+ pattrib = &pmgntframe->attrib; -+ update_mgntframe_attrib(padapter, pattrib); - -- subtype = GetFrameSubType(pframe); -+ _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); - -- if(subtype==WIFI_BEACON) -- bssid->Reserved[0] = 1; -- else -- bssid->Reserved[0] = 0; -- -- bssid->Length = sizeof(WLAN_BSSID_EX) - MAX_IE_SZ + len; -+ pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; -+ pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; - -- //below is to copy the information element -- bssid->IELength = len; -- _rtw_memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); -+ fctrl = &(pwlanhdr->frame_ctl); -+ *(fctrl) = 0; - -- //get the signal strength -- bssid->PhyInfo.SignalQuality = precv_frame->u.hdr.attrib.signal_qual;//in percentage -- bssid->PhyInfo.SignalStrength = precv_frame->u.hdr.attrib.signal_strength;//in percentage -- bssid->Rssi = precv_frame->u.hdr.attrib.RecvSignalPower; // in dBM.raw data -- --#ifdef CONFIG_ANTENNA_DIVERSITY -- //padapter->HalFunc.GetHwRegHandler(padapter, HW_VAR_CURRENT_ANTENNA, (u8 *)(&bssid->PhyInfo.Optimum_antenna)); -- padapter->HalFunc.GetHalDefVarHandler(padapter, HAL_DEF_CURRENT_ANTENNA, &bssid->PhyInfo.Optimum_antenna); --#endif -+ _rtw_memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); -+ _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); -+ _rtw_memcpy(pwlanhdr->addr3, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); - -- // checking SSID -- if ((p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_)) == NULL) -- { -- DBG_871X("marc: cannot find SSID for survey event\n"); -- return _FAIL; -- } -+ SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); -+ pmlmeext->mgnt_seq++; -+ SetFrameSubType(pframe, WIFI_ACTION); - -- if (*(p + 1)) -- { -- _rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); -- bssid->Ssid.SsidLength = *(p + 1); -- } -- else -- { -- bssid->Ssid.SsidLength = 0; -- } -+ pframe += sizeof(struct rtw_ieee80211_hdr_3addr); -+ pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); - -- _rtw_memset(bssid->SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX); -+ pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); -+ pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); - -- //checking rate info... -- i = 0; -- p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SUPPORTEDRATES_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- if (p != NULL) -- { -- _rtw_memcpy(bssid->SupportedRates, (p + 2), len); -- i = len; -- } - -- p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _EXT_SUPPORTEDRATES_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- if (p != NULL) -+ // -+ if(pmlmepriv->num_FortyMHzIntolerant>0) + if (category == 3) { -- _rtw_memcpy(bssid->SupportedRates + i, (p + 2), len); -- } -+ u8 iedata=0; -+ -+ iedata |= BIT(2);//20 MHz BSS Width Request - -- //todo: --#if 0 -- if (judge_network_type(bssid->SupportedRates, (len + i)) == WIRELESS_11B) -- { -- bssid->NetworkTypeInUse = Ndis802_11DS; -- } -- else --#endif -- { -- bssid->NetworkTypeInUse = Ndis802_11OFDM24; -+ pframe = rtw_set_ie(pframe, EID_BSSCoexistence, 1, &iedata, &(pattrib->pktlen)); -+ - } -+ - -- // Checking for DSConfig -- p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _DSSET_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- -- bssid->Configuration.DSConfig = 0; -- bssid->Configuration.Length = 0; -+ // -+ _rtw_memset(ICS, 0, sizeof(ICS)); -+ if(pmlmepriv->num_sta_no_ht>0) -+ { -+ int i; -+ -+ _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); - -- if (p) -- { -- bssid->Configuration.DSConfig = *(p + 2); -- } -- else -- {// In 5G, some ap do not have DSSET IE -- // checking HT info for channel -- p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- if(p) -+ phead = get_list_head(queue); -+ plist = get_next(phead); -+ -+ while(1) - { -- struct HT_info_element *HT_info = (struct HT_info_element *)(p + 2); -- bssid->Configuration.DSConfig = HT_info->primary_channel; -- } -- else -- { // use current channel -- if (padapter->mlmeextpriv.sitesurvey_res.state == SCAN_PROCESS) -- bssid->Configuration.DSConfig = padapter->mlmeextpriv.channel_set[padapter->mlmeextpriv.sitesurvey_res.channel_idx].ChannelNum; -- else -- bssid->Configuration.DSConfig = padapter->mlmeextpriv.cur_channel; -- } -- } -- -- _rtw_memcpy(&bssid->Configuration.BeaconPeriod, rtw_get_beacon_interval_from_ie(bssid->IEs), 2); -- -+ int len; -+ u8 *p; -+ WLAN_BSSID_EX *pbss_network; -+ -+ if (rtw_end_of_queue_search(phead,plist)== _TRUE) -+ break; - -- bssid->Configuration.BeaconPeriod = le32_to_cpu(bssid->Configuration.BeaconPeriod); -+ pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); -+ -+ plist = get_next(plist); - -- val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid); -+ pbss_network = (WLAN_BSSID_EX *)&pnetwork->network; - -- if (val16 & BIT(0)) -- { -- bssid->InfrastructureMode = Ndis802_11Infrastructure; -- _rtw_memcpy(bssid->MacAddress, GetAddr2Ptr(pframe), ETH_ALEN); -- } -- else -- { -- bssid->InfrastructureMode = Ndis802_11IBSS; -- _rtw_memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); -- } -+ p = rtw_get_ie(pbss_network->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, pbss_network->IELength - _FIXED_IE_LENGTH_); -+ if((p==NULL) || (len==0))//non-HT -+ { -+ if((pbss_network->Configuration.DSConfig<=0) || (pbss_network->Configuration.DSConfig>14)) -+ continue; -+ -+ ICS[0][pbss_network->Configuration.DSConfig]=1; -+ -+ if(ICS[0][0] == 0) -+ ICS[0][0] = 1; -+ } -+ -+ } - -- if (val16 & BIT(4)) -- bssid->Privacy = 1; -- else -- bssid->Privacy = 0; -+ _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); - -- bssid->Configuration.ATIMWindow = 0; - -- //20/40 BSS Coexistence check -- if((pregistrypriv->wifi_spec==1) && (_FALSE == pmlmeinfo->bwmode_updated)) -- { -- struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -- -- p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- if(p && len>0) -+ for(i= 0;i<8;i++) - { -- struct HT_caps_element *pHT_caps; -- pHT_caps = (struct HT_caps_element *)(p + 2); -- -- if(pHT_caps->HT_cap_element.HT_caps_info&BIT(14)) -- { -- pmlmepriv->num_FortyMHzIntolerant++; -+ if(ICS[i][0] == 1) -+ { -+ int j, k = 0; -+ -+ InfoContent[k] = i; -+ //SET_BSS_INTOLERANT_ELE_REG_CLASS(InfoContent,i); -+ k++; -+ -+ for(j=1;j<=14;j++) -+ { -+ if(ICS[i][j]==1) -+ { -+ if(k<16) -+ { -+ InfoContent[k] = j; //channel number -+ //SET_BSS_INTOLERANT_ELE_CHANNEL(InfoContent+k, j); -+ k++; -+ } -+ } -+ } -+ -+ pframe = rtw_set_ie(pframe, EID_BSSIntolerantChlReport, k, InfoContent, &(pattrib->pktlen)); -+ - } -- } -- else -- { -- pmlmepriv->num_sta_no_ht++; -+ - } - -- } - -- -- #if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING) & 1 -- if(strcmp(bssid->Ssid.Ssid, DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) == 0) { -- DBG_871X("Receiving %s("MAC_FMT", DSConfig:%u) from ch%u with ss:%3u, sq:%3u, RawRSSI:%3ld\n" -- , bssid->Ssid.Ssid, MAC_ARG(bssid->MacAddress), bssid->Configuration.DSConfig -- , padapter->mlmeextpriv.channel_set[padapter->mlmeextpriv.sitesurvey_res.channel_idx].ChannelNum -- , bssid->PhyInfo.SignalStrength, bssid->PhyInfo.SignalQuality, bssid->Rssi -- ); - } -- #endif - -- // mark bss info receving from nearby channel as SignalQuality 101 -- if(bssid->Configuration.DSConfig != padapter->mlmeextpriv.channel_set[padapter->mlmeextpriv.sitesurvey_res.channel_idx].ChannelNum) -- { -- bssid->PhyInfo.SignalQuality= 101; -- } - -- return _SUCCESS; -+ pattrib->last_txcmdsz = pattrib->pktlen; -+ -+ dump_mgntframe(padapter, pmgntframe); - - } - --void start_create_ibss(_adapter* padapter) -+unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr) - { -- unsigned short caps; -- u32 val32; -- u8 val8; -- u8 join_type; -+ struct sta_priv *pstapriv = &padapter->stapriv; -+ struct sta_info *psta = NULL; -+ //struct recv_reorder_ctrl *preorder_ctrl; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); -- pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; -- pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); -+ u16 tid; - -- //update wireless mode -- update_wireless_mode(padapter); -+ if((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE) -+ if (!(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)) -+ return _SUCCESS; -+ -+ psta = rtw_get_stainfo(pstapriv, addr); -+ if(psta==NULL) -+ return _SUCCESS; +@@ -7442,7 +8910,7 @@ unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr) + if(psta==NULL) + return _SUCCESS; -- //udpate capability -- caps = rtw_get_capability((WLAN_BSSID_EX *)pnetwork); -- update_capinfo(padapter, caps); -- if(caps&cap_IBSS)//adhoc master +- //DBG_8192C("%s:%s\n", __FUNCTION__, (initiator==0)?"RX_DIR":"TX_DIR"); + //DBG_871X("%s:%s\n", __FUNCTION__, (initiator==0)?"RX_DIR":"TX_DIR"); -+ -+ if(initiator==0) // recipient + + if(initiator==0) // recipient { -- //set_opmode_cmd(padapter, adhoc);//removed -- -- val8 = 0xcf; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); -- -- //switch channel -- //SelectChannel(padapter, pmlmeext->cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE); -- set_channel_bwmode(padapter, pmlmeext->cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); -- -- beacon_timing_control(padapter); -- -- //set msr to WIFI_FW_ADHOC_STATE -- pmlmeinfo->state = WIFI_FW_ADHOC_STATE; -- Set_NETYPE0_MSR(padapter, (pmlmeinfo->state & 0x3)); -- -- //issue beacon -- if(send_beacon(padapter)==_FAIL) -+ for(tid = 0;tidstate = WIFI_FW_NULL_STATE; -- } -- else -- { -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, padapter->registrypriv.dev_network.MacAddress); -- join_type = 0; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); -- -- report_join_res(padapter, 1); -- pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS; -+ if(psta->recvreorder_ctrl[tid].enable == _TRUE) -+ { + if(psta->recvreorder_ctrl[tid].enable == _TRUE) + { +- DBG_8192C("rx agg disable tid(%d)\n",tid); + DBG_871X("rx agg disable tid(%d)\n",tid); -+ issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid <<1) |initiator)&0x1F)); -+ psta->recvreorder_ctrl[tid].enable = _FALSE; -+ psta->recvreorder_ctrl[tid].indicate_seq = 0xffff; -+ #ifdef DBG_RX_SEQ -+ DBG_871X("DBG_RX_SEQ %s:%d indicate_seq:%u \n", __FUNCTION__, __LINE__, -+ psta->recvreorder_ctrl[tid].indicate_seq); -+ #endif -+ } - } + issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid <<1) |initiator)&0x1F)); + psta->recvreorder_ctrl[tid].enable = _FALSE; + psta->recvreorder_ctrl[tid].indicate_seq = 0xffff; +@@ -7463,12 +8931,12 @@ unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr) } -- else -+ else if(initiator == 1)// originator + else if(initiator == 1)// originator { -- DBG_871X("start_create_ibss, invalid cap:%x\n", caps); -- return; +- //DBG_8192C("tx agg_enable_bitmap(0x%08x)\n", psta->htpriv.agg_enable_bitmap); + //DBG_871X("tx agg_enable_bitmap(0x%08x)\n", psta->htpriv.agg_enable_bitmap); -+ for(tid = 0;tidhtpriv.agg_enable_bitmap & BIT(tid)) -+ { + for(tid = 0;tidhtpriv.agg_enable_bitmap & BIT(tid)) + { +- DBG_8192C("tx agg disable tid(%d)\n",tid); + DBG_871X("tx agg disable tid(%d)\n",tid); -+ issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid <<1) |initiator)&0x1F) ); -+ psta->htpriv.agg_enable_bitmap &= ~BIT(tid); -+ psta->htpriv.candidate_tid_bitmap &= ~BIT(tid); -+ -+ } -+ } - } -- -+ -+ return _SUCCESS; -+ - } - --void start_clnt_join(_adapter* padapter) -+unsigned int send_beacon(_adapter *padapter) + issue_action_BA(padapter, addr, RTW_WLAN_ACTION_DELBA, (((tid <<1) |initiator)&0x1F) ); + psta->htpriv.agg_enable_bitmap &= ~BIT(tid); + psta->htpriv.candidate_tid_bitmap &= ~BIT(tid); +@@ -7484,38 +8952,63 @@ unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr) + unsigned int send_beacon(_adapter *padapter) { -- unsigned short caps; -- u8 val8; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); -+ u8 bxmitok = _FALSE; + u8 bxmitok = _FALSE; +- int retry=0; +- +- //DBG_871X("%s\n", __FUNCTION__); + int issue=0; + int poll = 0; +//#ifdef CONFIG_CONCURRENT_MODE @@ -17319,39 +17380,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + //struct mlme_priv *pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv); +//#endif -+#ifdef CONFIG_PCI_HCI + #ifdef CONFIG_PCI_HCI -- pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; -- pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); + //DBG_871X("%s\n", __FUNCTION__); ++ + issue_beacon(padapter); -- //update wireless mode -- update_wireless_mode(padapter); -+ issue_beacon(padapter); - -- //udpate capability -- caps = rtw_get_capability((WLAN_BSSID_EX *)pnetwork); -- update_capinfo(padapter, caps); -- if (caps&cap_ESS) -- { -- Set_NETYPE0_MSR(padapter, WIFI_FW_STATION_STATE); -+ return _SUCCESS; + return _SUCCESS; -- val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); -+#endif + #endif -- //switch channel -- set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); +-#ifdef CONFIG_USB_HCI +- do{ +#if defined(CONFIG_USB_HCI) || defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) + u32 start = rtw_get_current_time(); -- //here wait for receiving the beacon to start auth -- //and enable a timer -- set_link_timer(pmlmeext, decide_wait_for_beacon_timeout(pmlmeinfo->bcn_interval)); + rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL); + do{ -+ issue_beacon(padapter); + issue_beacon(padapter); + issue++; + do { + rtw_yield_os(); @@ -17359,182 +17405,113 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + poll++; + }while((poll%10)!=0 && _FALSE == bxmitok && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); -- pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE; +- padapter->HalFunc.GetHwRegHandler(padapter, HW_VAR_TX_BCN_DONE, (u8 *)(&bxmitok)); +- +- }while((_FALSE == bxmitok) &&((retry++)<100 )); + }while(_FALSE == bxmitok && issue<100 && !padapter->bSurpriseRemoved && !padapter->bDriverStopped); -+ + +- if(retry == 100) + if(padapter->bSurpriseRemoved || padapter->bDriverStopped) + { + return _FAIL; - } -- else if (caps&cap_IBSS) //adhoc client ++ } + if(_FALSE == bxmitok) { -- Set_NETYPE0_MSR(padapter, WIFI_FW_ADHOC_STATE); -- -- val8 = 0xcf; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); -- -- //switch channel -- set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -- -- beacon_timing_control(padapter); -- -- pmlmeinfo->state = WIFI_FW_ADHOC_STATE; -- -- report_join_res(padapter, 1); +- DBG_871X("send_beacon, fail!\n"); + DBG_871X("%s fail! %u ms\n", __FUNCTION__, rtw_get_passing_time_ms(start)); -+ return _FAIL; + return _FAIL; } else { -- //DBG_8192C("marc: invalid cap:%x\n", caps); -- return; -- } -- --} -- --void start_clnt_auth(_adapter* padapter) --{ -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- -- _cancel_timer_ex(&pmlmeext->link_timer); + u32 passing_time = rtw_get_passing_time_ms(start); - -- pmlmeinfo->state &= (~WIFI_FW_AUTH_NULL); -- pmlmeinfo->state |= WIFI_FW_AUTH_STATE; ++ + if(passing_time > 100 || issue > 3) + DBG_871X("%s success, issue:%d, poll:%d, %u ms\n", __FUNCTION__, issue, poll, rtw_get_passing_time_ms(start)); + //else + // DBG_871X("%s success, issue:%d, poll:%d, %u ms\n", __FUNCTION__, issue, poll, rtw_get_passing_time_ms(start)); + -+ return _SUCCESS; -+ } - -- pmlmeinfo->auth_seq = 1; -- pmlmeinfo->reauth_count = 0; -- pmlmeinfo->reassoc_count = 0; -- pmlmeinfo->link_count = 0; + return _SUCCESS; + } +-#endif +- ++ +#endif - -+} - -- // Because of AP's not receiving deauth before -- // AP may: 1)not response auth or 2)deauth us after link is complete -- // issue deauth before issuing auth to deal with the situation -- issue_deauth(padapter, (&(pmlmeinfo->network))->MacAddress, WLAN_REASON_DEAUTH_LEAVING); -+/**************************************************************************** - -- issue_auth(padapter, NULL, 0); -+Following are some utitity fuctions for WiFi MLME - -- set_link_timer(pmlmeext, REAUTH_TO); -+*****************************************************************************/ - -+BOOLEAN IsLegal5GChannel( -+ IN PADAPTER Adapter, -+ IN u8 channel) -+{ -+ -+ int i=0; -+ u8 Channel_5G[45] = {36,38,40,42,44,46,48,50,52,54,56,58, -+ 60,62,64,100,102,104,106,108,110,112,114,116,118,120,122, -+ 124,126,128,130,132,134,136,138,140,149,151,153,155,157,159, -+ 161,163,165}; -+ for(i=0;imlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ u32 initialgain = 0; + u32 initialgain = 0; +- + u8 restore_initial_gain = 1; - -- _cancel_timer_ex(&pmlmeext->link_timer); -- -- pmlmeinfo->state &= (~(WIFI_FW_AUTH_NULL | WIFI_FW_AUTH_STATE)); -- pmlmeinfo->state |= (WIFI_FW_AUTH_SUCCESS | WIFI_FW_ASSOC_STATE); -+#ifdef CONFIG_P2P - -- issue_assocreq(padapter); ++ + #ifdef CONFIG_P2P ++ +#ifdef CONFIG_CONCURRENT_MODE - -- set_link_timer(pmlmeext, REASSOC_TO); --} ++ +#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE + u8 stay_buddy_ch = 0; +#endif //CONFIG_STA_MODE_SCAN_UNDER_AP_MODE - --unsigned int receive_disconnect(_adapter *padapter, unsigned char *MacAddr, unsigned short reason) --{ -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ + struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; + struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; - -- //check A3 -- if (!(_rtw_memcmp(MacAddr, get_my_bssid(&pmlmeinfo->network), ETH_ALEN))) -- return _SUCCESS; ++ +#endif //CONFIG_CONCURRENT_MODE -+ struct wifidirect_info *pwdinfo= &(padapter->wdinfo); -+ static unsigned char prev_survey_channel = 0; -+ static unsigned int p2p_scan_count = 0; - -- DBG_871X("%s\n", __FUNCTION__); - -- if((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) + struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + static unsigned char prev_survey_channel = 0; + static unsigned int p2p_scan_count = 0; +- +- if(rtw_p2p_findphase_ex_is_social(pwdinfo)) ++ ++ + if ( ( pwdinfo->rx_invitereq_info.scan_op_ch_only ) || ( pwdinfo->p2p_info.scan_op_ch_only ) ) - { -- if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) ++ { + if ( pwdinfo->rx_invitereq_info.scan_op_ch_only ) - { -- pmlmeinfo->state = WIFI_FW_NULL_STATE; -- report_del_sta_event(padapter, MacAddr, reason); ++ { + survey_channel = pwdinfo->rx_invitereq_info.operation_ch[pmlmeext->sitesurvey_res.channel_idx]; - } -- else if (pmlmeinfo->state & WIFI_FW_LINKING_STATE) ++ } + else - { -- pmlmeinfo->state = WIFI_FW_NULL_STATE; -- report_join_res(padapter, -2); ++ { + survey_channel = pwdinfo->p2p_info.operation_ch[pmlmeext->sitesurvey_res.channel_idx]; + } + ScanType = SCAN_ACTIVE; + } + else if(rtw_p2p_findphase_ex_is_social(pwdinfo)) -+ { -+ // Commented by Albert 2011/06/03 -+ // The driver is in the find phase, it should go through the social channel. + { + // Commented by Albert 2011/06/03 + // The driver is in the find phase, it should go through the social channel. + int ch_set_idx; -+ survey_channel = pwdinfo->social_chan[pmlmeext->sitesurvey_res.channel_idx]; + survey_channel = pwdinfo->social_chan[pmlmeext->sitesurvey_res.channel_idx]; + ch_set_idx = rtw_ch_set_search_ch(pmlmeext->channel_set, survey_channel); + if (ch_set_idx >= 0) + ScanType = pmlmeext->channel_set[ch_set_idx].ScanType; + else + ScanType = SCAN_ACTIVE; -+ } -+ else -+#endif //CONFIG_P2P -+ { + } + else + #endif //CONFIG_P2P + { +- survey_channel = pmlmeext->channel_set[pmlmeext->sitesurvey_res.channel_idx].ChannelNum; + struct rtw_ieee80211_channel *ch; + if (pmlmeext->sitesurvey_res.channel_idx < pmlmeext->sitesurvey_res.ch_num) { + ch = &pmlmeext->sitesurvey_res.ch[pmlmeext->sitesurvey_res.channel_idx]; + survey_channel = ch->hw_value; + ScanType = (ch->flags & RTW_IEEE80211_CHAN_PASSIVE_SCAN) ? SCAN_PASSIVE : SCAN_ACTIVE; - } ++ } } -- return _SUCCESS; --} +- ScanType = pmlmeext->channel_set[pmlmeext->sitesurvey_res.channel_idx].ScanType; +- +- //DBG_871X("switching to ch:%d (cnt:%u,idx:%d) at %dms, %c%c%c\n" +- // , survey_channel +- // , pwdinfo->find_phase_state_exchange_cnt, pmlmeext->sitesurvey_res.channel_idx +- // , rtw_get_passing_time_ms(padapter->mlmepriv.scan_start_time) +- // , ScanType?'A':'P', pmlmeext->sitesurvey_res.scan_mode?'A':'P' +- // , pmlmeext->sitesurvey_res.ssid[0].SsidLength?'S':' ' +- //); + if (0) + DBG_871X(FUNC_ADPT_FMT" ch:%u(cnt:%u,idx:%d) at %dms, %c%c%c\n" + , FUNC_ADPT_ARG(padapter) @@ -17545,12 +17522,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + , pmlmeext->sitesurvey_res.ssid[0].SsidLength?'S':' ' + ); --/**************************************************************************** -+ if(survey_channel != 0) -+ { -+ //PAUSE 4-AC Queue when site_survey + if(survey_channel != 0) + { + //PAUSE 4-AC Queue when site_survey +- //padapter->HalFunc.GetHwRegHandler(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); + //rtw_hal_get_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); -+ //val8 |= 0x0f; + //val8 |= 0x0f; +- //padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); +- + //rtw_hal_set_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); +#ifdef CONFIG_CONCURRENT_MODE +#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE @@ -17571,23 +17550,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +#endif //CONFIG_STA_MODE_SCAN_UNDER_AP_MODE +#endif //CONFIG_CONCURRENT_MODE -+ if(pmlmeext->sitesurvey_res.channel_idx == 0) -+ { -+ set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); -+ } -+ else -+ { -+ SelectChannel(padapter, survey_channel); -+ } + if(pmlmeext->sitesurvey_res.channel_idx == 0) + { + set_channel_bwmode(padapter, survey_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); +@@ -7591,17 +9139,35 @@ void site_survey(_adapter *padapter) + SelectChannel(padapter, survey_channel); + } --Following are the functions to report events +#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE + if( stay_buddy_ch == 1 ) + { + val8 = 0; //survey done + rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); - --*****************************************************************************/ ++ + if(check_buddy_mlmeinfo_state(padapter, WIFI_FW_AP_STATE) && + check_buddy_fwstate(padapter, _FW_LINKED)) + { @@ -17601,56 +17576,49 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +#endif //CONFIG_STA_MODE_SCAN_UNDER_AP_MODE --void report_survey_event(_adapter *padapter, union recv_frame *precv_frame) --{ -- struct cmd_obj *pcmd_obj; -- u8 *pevtcmd; -- u32 cmdsz; -- struct survey_event *psurvey_evt; -- struct C2HEvent_Header *pc2h_evt_hdr; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct cmd_priv *pcmdpriv = &padapter->cmdpriv; -- //u8 *pframe = precv_frame->u.hdr.rx_data; -- //uint len = precv_frame->u.hdr.len; -+ if(ScanType == SCAN_ACTIVE) //obey the channel plan setting... + if(ScanType == SCAN_ACTIVE) //obey the channel plan setting... +- { + { -+ #ifdef CONFIG_P2P -+ if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || -+ rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH) -+ ) -+ { + #ifdef CONFIG_P2P + if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || + rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH) + ) + { +- issue_probereq_p2p(padapter); +- issue_probereq_p2p(padapter); +- issue_probereq_p2p(padapter); + issue_probereq_p2p(padapter, NULL); + issue_probereq_p2p(padapter, NULL); + issue_probereq_p2p(padapter, NULL); -+ } -+ else -+ #endif //CONFIG_P2P -+ { -+ int i; -+ for(i=0;isitesurvey_res.ssid[i].SsidLength) { -+ //todo: to issue two probe req??? + } + else + #endif //CONFIG_P2P +@@ -7610,9 +9176,9 @@ void site_survey(_adapter *padapter) + for(i=0;isitesurvey_res.ssid[i].SsidLength) { + //todo: to issue two probe req??? +- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]),1); + issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL); -+ //rtw_msleep_os(SURVEY_TO>>1); + //rtw_msleep_os(SURVEY_TO>>1); +- issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]),1); + issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL); -+ } else { -+ break; -+ } -+ } + } else { + break; + } +@@ -7620,47 +9186,98 @@ void site_survey(_adapter *padapter) -- if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -- { -- return; -- } -+ if(pmlmeext->sitesurvey_res.scan_mode == SCAN_ACTIVE) { -+ //todo: to issue two probe req??? + if(pmlmeext->sitesurvey_res.scan_mode == SCAN_ACTIVE) { + //todo: to issue two probe req??? +- issue_probereq(padapter, NULL, 1); + issue_probereq(padapter, NULL, NULL); -+ //rtw_msleep_os(SURVEY_TO>>1); + //rtw_msleep_os(SURVEY_TO>>1); +- issue_probereq(padapter, NULL, 1); + issue_probereq(padapter, NULL, NULL); -+ } -+ } -+ } -+ + } + } + } + +- set_survey_timer(pmlmeext, pmlmeext->chan_scan_time); +#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE + if( stay_buddy_ch == 1 ) + set_survey_timer(pmlmeext, pmlmeext->chan_scan_time * RTW_STAY_AP_CH_MILLISECOND ); @@ -17658,21 +17626,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif //CONFIG_STA_MODE_SCAN_UNDER_AP_MODE + set_survey_timer(pmlmeext, pmlmeext->chan_scan_time); -- cmdsz = (sizeof(struct survey_event) + sizeof(struct C2HEvent_Header)); -- if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) -- { -- rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -- return; } -+ else -+ { - -- _rtw_init_listhead(&pcmd_obj->list); -+ // channel number is 0 or this channel is not valid. + else + { -- pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -- pcmd_obj->cmdsz = cmdsz; -- pcmd_obj->parmbuf = pevtcmd; + // channel number is 0 or this channel is not valid. ++ +#ifdef CONFIG_CONCURRENT_MODE + u8 cur_channel; + u8 cur_bwmode; @@ -17703,75 +17662,60 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + cur_ch_offset = pmlmeext->cur_ch_offset; + } +#endif - -- pcmd_obj->rsp = NULL; -- pcmd_obj->rspsz = 0; ++ + -+#ifdef CONFIG_P2P -+ if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH)) -+ { + #ifdef CONFIG_P2P + if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH)) + { + if( ( pwdinfo->rx_invitereq_info.scan_op_ch_only ) || ( pwdinfo->p2p_info.scan_op_ch_only ) ) + { + // Set the find_phase_state_exchange_cnt to P2P_FINDPHASE_EX_CNT. + // This will let the following flow to run the scanning end. + rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_MAX); + } -+ #ifdef CONFIG_DBG_P2P + #ifdef CONFIG_DBG_P2P +- DBG_8192C( "[%s] find phase exchange cnt = %d\n", __FUNCTION__, pwdinfo->find_phase_state_exchange_cnt ); + DBG_871X( "[%s] find phase exchange cnt = %d\n", __FUNCTION__, pwdinfo->find_phase_state_exchange_cnt ); -+ #endif -+ } - -- pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -- pc2h_evt_hdr->len = sizeof(struct survey_event); -- pc2h_evt_hdr->ID = GEN_EVT_CODE(_Survey); -- pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); -+ if(rtw_p2p_findphase_ex_is_needed(pwdinfo)) -+ { -+ // Set the P2P State to the listen state of find phase and set the current channel to the listen channel -+ set_channel_bwmode(padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); -+ rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_LISTEN); -+ pmlmeext->sitesurvey_res.state = SCAN_DISABLE; + #endif + } +- ++ + if(rtw_p2p_findphase_ex_is_needed(pwdinfo)) + { + // Set the P2P State to the listen state of find phase and set the current channel to the listen channel + set_channel_bwmode(padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); + rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_LISTEN); +- + pmlmeext->sitesurvey_res.state = SCAN_DISABLE; -- psurvey_evt = (struct survey_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); + //turn on dynamic functions + Restore_DM_Func_Flag(padapter); + //Switch_DM_Func(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, _TRUE); + -+ _set_timer( &pwdinfo->find_phase_timer, ( u32 ) ( ( u32 ) ( pwdinfo->listen_dwell ) * 100 ) ); -+ } -+ else -+#endif //CONFIG_P2P -+ { + _set_timer( &pwdinfo->find_phase_timer, ( u32 ) ( ( u32 ) ( pwdinfo->listen_dwell ) * 100 ) ); + } + else + #endif //CONFIG_P2P + { -- if (collect_bss_info(padapter, precv_frame, (WLAN_BSSID_EX *)&psurvey_evt->bss) == _FAIL) -- { -- rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -- rtw_mfree((u8 *)pevtcmd, cmdsz); -- return; -- } +#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE + pmlmeinfo->scan_cnt = 0; +#endif //CONFIG_DMP_STA_NODE_SCAN_UNDER_AP_MODE - -- rtw_enqueue_cmd(pcmdpriv, pcmd_obj); -+#ifdef CONFIG_ANTENNA_DIVERSITY -+ // 20100721:Interrupt scan operation here. -+ // For SW antenna diversity before link, it needs to switch to another antenna and scan again. -+ // It compares the scan result and select beter one to do connection. ++ + #ifdef CONFIG_ANTENNA_DIVERSITY + // 20100721:Interrupt scan operation here. + // For SW antenna diversity before link, it needs to switch to another antenna and scan again. + // It compares the scan result and select beter one to do connection. +- if(padapter->HalFunc.SwAntDivBeforeLinkHandler(padapter)) + if(rtw_hal_antdiv_before_linked(padapter)) -+ { -+ pmlmeext->sitesurvey_res.bss_cnt = 0; -+ pmlmeext->sitesurvey_res.channel_idx = -1; -+ pmlmeext->chan_scan_time = SURVEY_TO /2; -+ set_survey_timer(pmlmeext, pmlmeext->chan_scan_time); -+ return; -+ } -+#endif - -- pmlmeext->sitesurvey_res.bss_cnt++; -+#ifdef CONFIG_P2P -+ if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH)) -+ { + { + pmlmeext->sitesurvey_res.bss_cnt = 0; + pmlmeext->sitesurvey_res.channel_idx = -1; +@@ -7673,7 +9290,18 @@ void site_survey(_adapter *padapter) + #ifdef CONFIG_P2P + if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_SCAN) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH)) + { +- rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN); + #ifdef CONFIG_CONCURRENT_MODE + if( pwdinfo->driver_interface == DRIVER_WEXT ) + { @@ -17784,18 +17728,25 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #else + rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo)); + #endif -+ } -+ rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); -+#endif //CONFIG_P2P -+ -+ pmlmeext->sitesurvey_res.state = SCAN_COMPLETE; - -- return; -+ //switch back to the original channel -+ //SelectChannel(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset); + } + rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); + #endif //CONFIG_P2P +@@ -7683,41 +9311,77 @@ void site_survey(_adapter *padapter) + //switch back to the original channel + //SelectChannel(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset); --} -+ { +-#ifdef CONFIG_P2P +- if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_OK) +- && pwdinfo->peer_operating_ch != 0 +- ) +- { +- DBG_8192C( "[%s] In P2P WPS mode, stay in the peer operating channel = %d\n", __FUNCTION__, pwdinfo->peer_operating_ch ); +- set_channel_bwmode(padapter, pwdinfo->peer_operating_ch, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); +- } +- else +-#endif //CONFIG_P2P + { +- set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); +#ifdef CONFIG_CONCURRENT_MODE + set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode); +#else @@ -17817,25 +17768,20 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +#endif //CONFIG_DUALMAC_CONCURRENT +#endif //CONFIG_CONCURRENT_MODE -+ } + } --void report_surveydone_event(_adapter *padapter) --{ -- struct cmd_obj *pcmd_obj; -- u8 *pevtcmd; -- u32 cmdsz; -- struct surveydone_event *psurveydone_evt; -- struct C2HEvent_Header *pc2h_evt_hdr; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct cmd_priv *pcmdpriv = &padapter->cmdpriv; -+ //flush 4-AC Queue after site_survey -+ //val8 = 0; + //flush 4-AC Queue after site_survey + //val8 = 0; +- //padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); + //rtw_hal_set_hwreg(padapter, HW_VAR_TXPAUSE, (u8 *)(&val8)); -+ + +- val8 = 0; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); + val8 = 0; //survey done + rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); -+ -+ //config MSR + + //config MSR +- Set_NETYPE0_MSR(padapter, (pmlmeinfo->state & 0x3)); + Set_MSR(padapter, (pmlmeinfo->state & 0x3)); + + @@ -17851,17 +17797,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + initialgain = 0xff; //restore RX GAIN + rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); + } -+ -+ //turn on dynamic functions -+ Restore_DM_Func_Flag(padapter); -+ //Switch_DM_Func(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, _TRUE); -- if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -- { -- return; -- } -+ if (is_client_associated_to_ap(padapter) == _TRUE) -+ { +- initialgain = 0xff; //restore RX GAIN +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); + //turn on dynamic functions + Restore_DM_Func_Flag(padapter); + //Switch_DM_Func(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, _TRUE); + + if (is_client_associated_to_ap(padapter) == _TRUE) + { +- //issue null data +- issue_nulldata(padapter, 0); + issue_nulldata(padapter, NULL, 0, 3, 500); + +#ifdef CONFIG_CONCURRENT_MODE @@ -17877,537 +17823,230 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + else if(is_client_associated_to_ap(padapter->pbuddy_adapter) == _TRUE) + { + issue_nulldata(padapter->pbuddy_adapter, NULL, 0, 3, 500); -+ } + } +#endif -- cmdsz = (sizeof(struct surveydone_event) + sizeof(struct C2HEvent_Header)); -- if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) -- { -- rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -- return; -- } -+ report_surveydone_event(padapter); + report_surveydone_event(padapter); -- _rtw_init_listhead(&pcmd_obj->list); -+ pmlmeext->chan_scan_time = SURVEY_TO; -+ pmlmeext->sitesurvey_res.state = SCAN_DISABLE; +@@ -7730,6 +9394,19 @@ void site_survey(_adapter *padapter) -- pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -- pcmd_obj->cmdsz = cmdsz; -- pcmd_obj->parmbuf = pevtcmd; -+ issue_action_BSSCoexistPacket(padapter); -+ issue_action_BSSCoexistPacket(padapter); -+ issue_action_BSSCoexistPacket(padapter); - -- pcmd_obj->rsp = NULL; -- pcmd_obj->rspsz = 0; -+ } + } -- pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -- pc2h_evt_hdr->len = sizeof(struct surveydone_event); -- pc2h_evt_hdr->ID = GEN_EVT_CODE(_SurveyDone); -- pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); +#ifdef CONFIG_CONCURRENT_MODE + if(check_buddy_mlmeinfo_state(padapter, WIFI_FW_AP_STATE) && + check_buddy_fwstate(padapter, _FW_LINKED)) + { - -- psurveydone_evt = (struct surveydone_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -- psurveydone_evt->bss_cnt = pmlmeext->sitesurvey_res.bss_cnt; ++ + DBG_871X("survey done, current CH=%d, BW=%d, offset=%d\n", cur_channel, cur_bwmode, cur_ch_offset); - -- DBG_871X("survey done event(%x)\n", psurveydone_evt->bss_cnt); ++ + DBG_871X("restart pbuddy_adapter's beacon\n"); + + update_beacon(padapter->pbuddy_adapter, 0, NULL, _TRUE); + } +#endif - -- rtw_enqueue_cmd(pcmdpriv, pcmd_obj); -+ } ++ + } return; +@@ -7753,7 +9430,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI - } - --void report_join_res(_adapter *padapter, int res) -+//collect bss info from Beacon and Probe response frames. -+u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSID_EX *bssid) - { -- struct cmd_obj *pcmd_obj; -- u8 *pevtcmd; -- u32 cmdsz; -- struct joinbss_event *pjoinbss_evt; -- struct C2HEvent_Header *pc2h_evt_hdr; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ int i; -+ u32 len; -+ u8 *p; -+ u16 val16, subtype; -+ u8 *pframe = precv_frame->u.hdr.rx_data; -+ u32 packet_len = precv_frame->u.hdr.len; -+ struct registry_priv *pregistrypriv = &padapter->registrypriv; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - -- if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -- { -- return; -- } -+ len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); - -- cmdsz = (sizeof(struct joinbss_event) + sizeof(struct C2HEvent_Header)); -- if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) -+ if (len > MAX_IE_SZ) + if (len > MAX_IE_SZ) { -- rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -- return; +- //DBG_8192C("IE too long for survey event\n"); + //DBG_871X("IE too long for survey event\n"); -+ return _FAIL; + return _FAIL; } -- _rtw_init_listhead(&pcmd_obj->list); -- -- pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -- pcmd_obj->cmdsz = cmdsz; -- pcmd_obj->parmbuf = pevtcmd; -- -- pcmd_obj->rsp = NULL; -- pcmd_obj->rspsz = 0; -+ _rtw_memset(bssid, 0, sizeof(WLAN_BSSID_EX)); - -- pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -- pc2h_evt_hdr->len = sizeof(struct joinbss_event); -- pc2h_evt_hdr->ID = GEN_EVT_CODE(_JoinBss); -- pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); -+ subtype = GetFrameSubType(pframe); - -- pjoinbss_evt = (struct joinbss_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -- _rtw_memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); -- pjoinbss_evt->network.join_res = pjoinbss_evt->network.aid = res; -+ if(subtype==WIFI_BEACON) -+ bssid->Reserved[0] = 1; -+ else -+ bssid->Reserved[0] = 0; -+ -+ bssid->Length = sizeof(WLAN_BSSID_EX) - MAX_IE_SZ + len; - -- DBG_871X("report_join_res(%d)\n", res); -+ //below is to copy the information element -+ bssid->IELength = len; -+ _rtw_memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); - -+ //get the signal strength -+ bssid->PhyInfo.SignalQuality = precv_frame->u.hdr.attrib.signal_qual;//in percentage -+ bssid->PhyInfo.SignalStrength = precv_frame->u.hdr.attrib.signal_strength;//in percentage -+ bssid->Rssi = precv_frame->u.hdr.attrib.RecvSignalPower; // in dBM.raw data +@@ -7778,8 +9455,8 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI + bssid->Rssi = precv_frame->u.hdr.attrib.RecvSignalPower; // in dBM.raw data -- rtw_joinbss_event_prehandle(padapter, (u8 *)&pjoinbss_evt->network); -- -+#ifdef CONFIG_ANTENNA_DIVERSITY + #ifdef CONFIG_ANTENNA_DIVERSITY +- //padapter->HalFunc.GetHwRegHandler(padapter, HW_VAR_CURRENT_ANTENNA, (u8 *)(&bssid->PhyInfo.Optimum_antenna)); +- padapter->HalFunc.GetHalDefVarHandler(padapter, HAL_DEF_CURRENT_ANTENNA, &bssid->PhyInfo.Optimum_antenna); + //rtw_hal_get_hwreg(padapter, HW_VAR_CURRENT_ANTENNA, (u8 *)(&bssid->PhyInfo.Optimum_antenna)); + rtw_hal_get_def_var(padapter, HAL_DEF_CURRENT_ANTENNA, &bssid->PhyInfo.Optimum_antenna); -+#endif + #endif -- rtw_enqueue_cmd(pcmdpriv, pcmd_obj); -+ // checking SSID -+ if ((p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SSID_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_)) == NULL) -+ { -+ DBG_871X("marc: cannot find SSID for survey event\n"); -+ return _FAIL; -+ } + // checking SSID +@@ -7791,6 +9468,11 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI -- return; -+ if (*(p + 1)) -+ { + if (*(p + 1)) + { + if (len > NDIS_802_11_LENGTH_SSID) + { + DBG_871X("%s()-%d: IE too long (%d) for survey event\n", __FUNCTION__, __LINE__, len); + return _FAIL; + } -+ _rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); -+ bssid->Ssid.SsidLength = *(p + 1); -+ } -+ else -+ { -+ bssid->Ssid.SsidLength = 0; -+ } - --} -+ _rtw_memset(bssid->SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX); - --void report_del_sta_event(_adapter *padapter, unsigned char* MacAddr, unsigned short reason) --{ -- struct cmd_obj *pcmd_obj; -- u8 *pevtcmd; -- u32 cmdsz; -- struct stadel_event *pdel_sta_evt; -- struct C2HEvent_Header *pc2h_evt_hdr; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- struct cmd_priv *pcmdpriv = &padapter->cmdpriv; -+ //checking rate info... -+ i = 0; -+ p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SUPPORTEDRATES_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -+ if (p != NULL) -+ { + _rtw_memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1)); + bssid->Ssid.SsidLength = *(p + 1); + } +@@ -7806,6 +9488,11 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI + p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _SUPPORTEDRATES_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); + if (p != NULL) + { + if (len > NDIS_802_11_LENGTH_RATES_EX) + { + DBG_871X("%s()-%d: IE too long (%d) for survey event\n", __FUNCTION__, __LINE__, len); + return _FAIL; + } -+ _rtw_memcpy(bssid->SupportedRates, (p + 2), len); -+ i = len; -+ } - -- if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -+ p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _EXT_SUPPORTEDRATES_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -+ if (p != NULL) + _rtw_memcpy(bssid->SupportedRates, (p + 2), len); + i = len; + } +@@ -7813,6 +9500,11 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI + p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _EXT_SUPPORTEDRATES_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); + if (p != NULL) { -- return; + if (len > (NDIS_802_11_LENGTH_RATES_EX-i)) + { + DBG_871X("%s()-%d: IE too long (%d) for survey event\n", __FUNCTION__, __LINE__, len); + return _FAIL; + } -+ _rtw_memcpy(bssid->SupportedRates + i, (p + 2), len); + _rtw_memcpy(bssid->SupportedRates + i, (p + 2), len); } -- cmdsz = (sizeof(struct stadel_event) + sizeof(struct C2HEvent_Header)); -- if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) -+ //todo: -+#if 0 -+ if (judge_network_type(bssid->SupportedRates, (len + i)) == WIRELESS_11B) - { -- rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -- return; -+ bssid->NetworkTypeInUse = Ndis802_11DS; -+ } -+ else -+#endif -+ { -+ bssid->NetworkTypeInUse = Ndis802_11OFDM24; +@@ -7828,6 +9520,9 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI + bssid->NetworkTypeInUse = Ndis802_11OFDM24; } -- _rtw_init_listhead(&pcmd_obj->list); + if (bssid->IELength < 12) + return _FAIL; ++ + // Checking for DSConfig + p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _DSSET_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -- pcmd_obj->cmdsz = cmdsz; -- pcmd_obj->parmbuf = pevtcmd; -+ // Checking for DSConfig -+ p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _DSSET_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); - -- pcmd_obj->rsp = NULL; -- pcmd_obj->rspsz = 0; -+ bssid->Configuration.DSConfig = 0; -+ bssid->Configuration.Length = 0; - -- pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -- pc2h_evt_hdr->len = sizeof(struct stadel_event); -- pc2h_evt_hdr->ID = GEN_EVT_CODE(_DelSTA); -- pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); -+ if (p) -+ { -+ bssid->Configuration.DSConfig = *(p + 2); -+ } -+ else -+ {// In 5G, some ap do not have DSSET IE -+ // checking HT info for channel -+ p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_ADD_INFO_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -+ if(p) -+ { -+ struct HT_info_element *HT_info = (struct HT_info_element *)(p + 2); -+ bssid->Configuration.DSConfig = HT_info->primary_channel; -+ } -+ else -+ { // use current channel +@@ -7849,16 +9544,11 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI + } + else + { // use current channel +- if (padapter->mlmeextpriv.sitesurvey_res.state == SCAN_PROCESS) +- bssid->Configuration.DSConfig = padapter->mlmeextpriv.channel_set[padapter->mlmeextpriv.sitesurvey_res.channel_idx].ChannelNum; +- else +- bssid->Configuration.DSConfig = padapter->mlmeextpriv.cur_channel; + bssid->Configuration.DSConfig = rtw_get_oper_ch(padapter); -+ } -+ } - -- pdel_sta_evt = (struct stadel_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -- _rtw_memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN); -- _rtw_memcpy((unsigned char *)(pdel_sta_evt->rsvd),(unsigned char *)(&reason),2); -+ _rtw_memcpy(&bssid->Configuration.BeaconPeriod, rtw_get_beacon_interval_from_ie(bssid->IEs), 2); -+ bssid->Configuration.BeaconPeriod = le32_to_cpu(bssid->Configuration.BeaconPeriod); - -- DBG_871X("report_del_sta_event: delete STA\n"); -+ val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid); - -- rtw_enqueue_cmd(pcmdpriv, pcmd_obj); -+ if (val16 & BIT(0)) -+ { -+ bssid->InfrastructureMode = Ndis802_11Infrastructure; -+ _rtw_memcpy(bssid->MacAddress, GetAddr2Ptr(pframe), ETH_ALEN); -+ } -+ else -+ { -+ bssid->InfrastructureMode = Ndis802_11IBSS; -+ _rtw_memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); -+ } - -- return; --} -+ if (val16 & BIT(4)) -+ bssid->Privacy = 1; -+ else -+ bssid->Privacy = 0; + } + } --void report_add_sta_event(_adapter *padapter, unsigned char* MacAddr, int cam_idx) --{ -- struct cmd_obj *pcmd_obj; -- u8 *pevtcmd; -- u32 cmdsz; -- struct stassoc_event *padd_sta_evt; -- struct C2HEvent_Header *pc2h_evt_hdr; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- struct cmd_priv *pcmdpriv = &padapter->cmdpriv; -+ bssid->Configuration.ATIMWindow = 0; + _rtw_memcpy(&bssid->Configuration.BeaconPeriod, rtw_get_beacon_interval_from_ie(bssid->IEs), 2); +- +- + bssid->Configuration.BeaconPeriod = le32_to_cpu(bssid->Configuration.BeaconPeriod); -- if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -- { -- return; -+ //20/40 BSS Coexistence check -+ if((pregistrypriv->wifi_spec==1) && (_FALSE == pmlmeinfo->bwmode_updated)) -+ { -+ struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -+ -+ p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); -+ if(p && len>0) -+ { -+ struct HT_caps_element *pHT_caps; -+ pHT_caps = (struct HT_caps_element *)(p + 2); -+ + val16 = rtw_get_capability((WLAN_BSSID_EX *)bssid); +@@ -7892,7 +9582,7 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI + struct HT_caps_element *pHT_caps; + pHT_caps = (struct HT_caps_element *)(p + 2); + +- if(pHT_caps->HT_cap_element.HT_caps_info&BIT(14)) + if(pHT_caps->u.HT_cap_element.HT_caps_info&BIT(14)) -+ { -+ pmlmepriv->num_FortyMHzIntolerant++; -+ } -+ } -+ else -+ { -+ pmlmepriv->num_sta_no_ht++; -+ } -+ + { + pmlmepriv->num_FortyMHzIntolerant++; + } +@@ -7904,31 +9594,36 @@ u8 collect_bss_info(_adapter *padapter, union recv_frame *precv_frame, WLAN_BSSI + } -- cmdsz = (sizeof(struct stassoc_event) + sizeof(struct C2HEvent_Header)); -- if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) +#ifdef CONFIG_INTEL_WIDI + //process_intel_widi_query_or_tigger(padapter, bssid); + if(process_intel_widi_query_or_tigger(padapter, bssid)) - { -- rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -- return; ++ { + return _FAIL; - } ++ } +#endif // CONFIG_INTEL_WIDI -- _rtw_init_listhead(&pcmd_obj->list); -- -- pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -- pcmd_obj->cmdsz = cmdsz; -- pcmd_obj->parmbuf = pevtcmd; -- -- pcmd_obj->rsp = NULL; -- pcmd_obj->rspsz = 0; -- -- pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -- pc2h_evt_hdr->len = sizeof(struct stassoc_event); -- pc2h_evt_hdr->ID = GEN_EVT_CODE(_AddSTA); -- pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); -- -- padd_sta_evt = (struct stassoc_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -- _rtw_memcpy((unsigned char *)(&(padd_sta_evt->macaddr)), MacAddr, ETH_ALEN); -- padd_sta_evt->cam_id = cam_idx; -- -- DBG_871X("report_add_sta_event: add STA\n"); +- #if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING) & 1 + #if defined(DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) & 1 -+ if(strcmp(bssid->Ssid.Ssid, DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) == 0) { -+ DBG_871X("Receiving %s("MAC_FMT", DSConfig:%u) from ch%u with ss:%3u, sq:%3u, RawRSSI:%3ld\n" -+ , bssid->Ssid.Ssid, MAC_ARG(bssid->MacAddress), bssid->Configuration.DSConfig + if(strcmp(bssid->Ssid.Ssid, DBG_RX_SIGNAL_DISPLAY_SSID_MONITORED) == 0) { + DBG_871X("Receiving %s("MAC_FMT", DSConfig:%u) from ch%u with ss:%3u, sq:%3u, RawRSSI:%3ld\n" + , bssid->Ssid.Ssid, MAC_ARG(bssid->MacAddress), bssid->Configuration.DSConfig +- , padapter->mlmeextpriv.channel_set[padapter->mlmeextpriv.sitesurvey_res.channel_idx].ChannelNum + , rtw_get_oper_ch(padapter) -+ , bssid->PhyInfo.SignalStrength, bssid->PhyInfo.SignalQuality, bssid->Rssi -+ ); -+ } -+ #endif - -- rtw_enqueue_cmd(pcmdpriv, pcmd_obj); -+ // mark bss info receving from nearby channel as SignalQuality 101 + , bssid->PhyInfo.SignalStrength, bssid->PhyInfo.SignalQuality, bssid->Rssi + ); + } + #endif +- ++ + // mark bss info receving from nearby channel as SignalQuality 101 +- if(bssid->Configuration.DSConfig != padapter->mlmeextpriv.channel_set[padapter->mlmeextpriv.sitesurvey_res.channel_idx].ChannelNum) + if(bssid->Configuration.DSConfig != rtw_get_oper_ch(padapter)) -+ { -+ bssid->PhyInfo.SignalQuality= 101; -+ } + { + bssid->PhyInfo.SignalQuality= 101; + } -- return; -+ return _SUCCESS; + return _SUCCESS; +- } -- --/**************************************************************************** -- --Following are the event callback functions -- --*****************************************************************************/ -- --//for sta/adhoc mode --void update_sta_info(_adapter *padapter, struct sta_info *psta) -+void start_create_ibss(_adapter* padapter) + void start_create_ibss(_adapter* padapter) { -- struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); -+ unsigned short caps; -+ u8 val8; -+ u8 join_type; + unsigned short caps; +- u32 val32; + u8 val8; + u8 join_type; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); -+ pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; -+ pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); +@@ -7948,7 +9643,7 @@ void start_create_ibss(_adapter* padapter) + //set_opmode_cmd(padapter, adhoc);//removed -- //ERP -- VCS_update(padapter, psta); -- -+ //update wireless mode -+ update_wireless_mode(padapter); - -- //HT -- if(pmlmepriv->htpriv.ht_option) -+ //udpate capability -+ caps = rtw_get_capability((WLAN_BSSID_EX *)pnetwork); -+ update_capinfo(padapter, caps); -+ if(caps&cap_IBSS)//adhoc master - { -- psta->htpriv.ht_option = _TRUE; -- -- psta->htpriv.ampdu_enable = pmlmepriv->htpriv.ampdu_enable; -+ //set_opmode_cmd(padapter, adhoc);//removed - -- if (support_short_GI(padapter, &(pmlmeinfo->HT_caps))) -- psta->htpriv.sgi = _TRUE; -+ val8 = 0xcf; + val8 = 0xcf; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); -- psta->qos_option = _TRUE; -- -- } -- else -- { -- psta->htpriv.ht_option = _FALSE; -+ //switch channel -+ //SelectChannel(padapter, pmlmeext->cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE); -+ set_channel_bwmode(padapter, pmlmeext->cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); - -- psta->htpriv.ampdu_enable = _FALSE; -- -- psta->htpriv.sgi = _FALSE; -+ beacon_timing_control(padapter); + //switch channel + //SelectChannel(padapter, pmlmeext->cur_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE); +@@ -7958,7 +9653,7 @@ void start_create_ibss(_adapter* padapter) -- psta->qos_option = _FALSE; -+ //set msr to WIFI_FW_ADHOC_STATE -+ pmlmeinfo->state = WIFI_FW_ADHOC_STATE; + //set msr to WIFI_FW_ADHOC_STATE + pmlmeinfo->state = WIFI_FW_ADHOC_STATE; +- Set_NETYPE0_MSR(padapter, (pmlmeinfo->state & 0x3)); + Set_MSR(padapter, (pmlmeinfo->state & 0x3)); -- } -- -- psta->htpriv.bwmode = pmlmeext->cur_bwmode; -- psta->htpriv.ch_offset = pmlmeext->cur_ch_offset; -- -- psta->htpriv.agg_enable_bitmap = 0x0;//reset -- psta->htpriv.candidate_tid_bitmap = 0x0;//reset -- -+ //issue beacon -+ if(send_beacon(padapter)==_FAIL) -+ { -+ RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("issuing beacon frame fail....\n")); - -- //QoS -- if(pmlmepriv->qospriv.qos_option) -- psta->qos_option = _TRUE; -- -+ report_join_res(padapter, -1); -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ } -+ else + //issue beacon + if(send_beacon(padapter)==_FAIL) +@@ -7969,11 +9664,11 @@ void start_create_ibss(_adapter* padapter) + pmlmeinfo->state = WIFI_FW_NULL_STATE; + } + else +- { +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, padapter->registrypriv.dev_network.MacAddress); + { + rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, padapter->registrypriv.dev_network.MacAddress); -+ join_type = 0; + join_type = 0; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); +- + rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); - -- psta->state = _FW_LINKED; -+ report_join_res(padapter, 1); -+ pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS; -+ } -+ } -+ else -+ { -+ DBG_871X("start_create_ibss, invalid cap:%x\n", caps); -+ return; -+ } - - } - --u8 null_addr[ETH_ALEN]= {0,0,0,0,0,0}; -- --void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) -+void start_clnt_join(_adapter* padapter) - { -- struct sta_info *psta, *psta_bmc; -+ unsigned short caps; -+ u8 val8; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ + report_join_res(padapter, 1); + pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS; + } +@@ -7994,10 +9689,6 @@ void start_clnt_join(_adapter* padapter) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); -- struct sta_priv *pstapriv = &padapter->stapriv; -- u8 join_type, init_rts_rate; -+ WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); - -- if(join_res < 0) -- { -- join_type = 1; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, null_addr); -- return; -- } -+ //update wireless mode -+ update_wireless_mode(padapter); + WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); -- if((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) -+ //udpate capability -+ caps = rtw_get_capability((WLAN_BSSID_EX *)pnetwork); -+ update_capinfo(padapter, caps); -+ if (caps&cap_ESS) - { -- //for bc/mc -- psta_bmc = rtw_get_bcmc_stainfo(padapter); -- if(psta_bmc) -- { -- pmlmeinfo->FW_sta_info[psta_bmc->mac_id].psta = psta_bmc; -- update_bmc_sta_support_rate(padapter, psta_bmc->mac_id); -- Update_RA_Entry(padapter, psta_bmc->mac_id); -- } -- } - +- pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; +- pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); - -- //turn on dynamic functions -- Switch_DM_Func(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, _TRUE); + //update wireless mode + update_wireless_mode(padapter); + +@@ -8006,13 +9697,53 @@ void start_clnt_join(_adapter* padapter) + update_capinfo(padapter, caps); + if (caps&cap_ESS) + { +- Set_NETYPE0_MSR(padapter, WIFI_FW_STATION_STATE); + Set_MSR(padapter, WIFI_FW_STATION_STATE); -- // update IOT-releated issue -- update_IOT_info(padapter); -+ val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; + val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BASIC_RATE, cur_network->SupportedRates); +- //switch channel +- set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); + #ifdef CONFIG_DEAUTH_BEFORE_CONNECT + // Because of AP's not receiving deauth before + // AP may: 1)not response auth or 2)deauth us after link is complete + // issue deauth before issuing auth to deal with the situation - -- //BCN interval -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&pmlmeinfo->bcn_interval)); ++ + // Commented by Albert 2012/07/21 + // For the Win8 P2P connection, it will be hard to have a successful connection if this Wi-Fi doesn't connect to it. + { @@ -18439,187 +18078,65 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + + _exit_critical_bh(&(padapter->mlmepriv.scanned_queue.lock), &irqL); - -- //udpate capability -- update_capinfo(padapter, pmlmeinfo->capability); ++ + if (scanned == NULL || rtw_end_of_queue_search(head, pos) || has_p2p_ie == _FALSE) + #endif /* CONFIG_P2P */ + issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, 5, 100); + } + #endif /* CONFIG_DEAUTH_BEFORE_CONNECT */ -- //WMM, Update EDCA param -- WMMOnAssocRsp(padapter); -+ //here wait for receiving the beacon to start auth -+ //and enable a timer -+ set_link_timer(pmlmeext, decide_wait_for_beacon_timeout(pmlmeinfo->bcn_interval)); - -- //HT -- HTOnAssocRsp(padapter); -+ pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE; -+ } -+ else if (caps&cap_IBSS) //adhoc client -+ { + //here wait for receiving the beacon to start auth + //and enable a timer +@@ -8022,10 +9753,10 @@ void start_clnt_join(_adapter* padapter) + } + else if (caps&cap_IBSS) //adhoc client + { +- Set_NETYPE0_MSR(padapter, WIFI_FW_ADHOC_STATE); + Set_MSR(padapter, WIFI_FW_ADHOC_STATE); -+ val8 = 0xcf; + val8 = 0xcf; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); + rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); -- //Set cur_channel&cur_bwmode&cur_ch_offset -- set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -+ //switch channel -+ set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); - -+ beacon_timing_control(padapter); - -- psta = rtw_get_stainfo(pstapriv, cur_network->MacAddress); -- if (psta) //only for infra. mode -- { -- pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta; -+ pmlmeinfo->state = WIFI_FW_ADHOC_STATE; - -- //DBG_871X("set_sta_rate\n"); -- -- //set per sta rate after updating HT cap. -- set_sta_rate(padapter, psta); -+ report_join_res(padapter, 1); + //switch channel + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); +@@ -8038,7 +9769,7 @@ void start_clnt_join(_adapter* padapter) } -- -- join_type = 2; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); -- -- if((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) -+ else + else { -- // correcting TSF -- correct_TSF(padapter, pmlmeext); -- -- //set_link_timer(pmlmeext, DISCONNECT_TO); +- //DBG_8192C("marc: invalid cap:%x\n", caps); + //DBG_871X("marc: invalid cap:%x\n", caps); -+ return; + return; } --#ifdef CONFIG_LPS -- rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_CONNECT, 0); --#endif -- -- DBG_871X("=>%s\n", __FUNCTION__); -- - } - --void mlmeext_sta_add_event_callback(_adapter *padapter, struct sta_info *psta) -+void start_clnt_auth(_adapter* padapter) - { -- struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- u8 join_type; - -- DBG_871X("%s\n", __FUNCTION__); -+ _cancel_timer_ex(&pmlmeext->link_timer); - -- if((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) -- { -- if(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)//adhoc master or sta_count>1 -- { -- //nothing to do -- } -- else//adhoc client -- { -- //update TSF Value -- //update_TSF(pmlmeext, pframe, len); -+ pmlmeinfo->state &= (~WIFI_FW_AUTH_NULL); -+ pmlmeinfo->state |= WIFI_FW_AUTH_STATE; - -- // correcting TSF -- correct_TSF(padapter, pmlmeext); -+ pmlmeinfo->auth_seq = 1; -+ pmlmeinfo->reauth_count = 0; -+ pmlmeinfo->reassoc_count = 0; -+ pmlmeinfo->link_count = 0; +@@ -8058,13 +9789,9 @@ void start_clnt_auth(_adapter* padapter) + pmlmeinfo->reauth_count = 0; + pmlmeinfo->reassoc_count = 0; + pmlmeinfo->link_count = 0; + pmlmeext->retry = 0; -- //start beacon -- if(send_beacon(padapter)==_FAIL) -- { -- pmlmeinfo->FW_sta_info[psta->mac_id].status = 0; - -- pmlmeinfo->state ^= WIFI_FW_ADHOC_STATE; -+ issue_auth(padapter, NULL, 0); -+ -+ set_link_timer(pmlmeext, REAUTH_TO); - -- return; -- } -+} - -- pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS; -- -- } - -- join_type = 2; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); -- } -+void start_clnt_assoc(_adapter* padapter) -+{ -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - -- pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta; -+ _cancel_timer_ex(&pmlmeext->link_timer); - -- //rate radaptive -- Update_RA_Entry(padapter, psta->mac_id); -+ pmlmeinfo->state &= (~(WIFI_FW_AUTH_NULL | WIFI_FW_AUTH_STATE)); -+ pmlmeinfo->state |= (WIFI_FW_AUTH_SUCCESS | WIFI_FW_ASSOC_STATE); - -- //update adhoc sta_info -- update_sta_info(padapter, psta); -+ issue_assocreq(padapter); - -+ set_link_timer(pmlmeext, REASSOC_TO); - } - --void mlmeext_sta_del_event_callback(_adapter *padapter) -+unsigned int receive_disconnect(_adapter *padapter, unsigned char *MacAddr, unsigned short reason) - { - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- if (is_client_associated_to_ap(padapter) || is_IBSS_empty(padapter)) -+ //check A3 -+ if (!(_rtw_memcmp(MacAddr, get_my_bssid(&pmlmeinfo->network), ETH_ALEN))) -+ return _SUCCESS; -+ -+ DBG_871X("%s\n", __FUNCTION__); -+ -+ if((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) - { -- //set_opmode_cmd(padapter, infra_client_with_mlme); -+ if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) -+ { -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ report_del_sta_event(padapter, MacAddr, reason); - -- //switch to the 20M Hz mode after disconnect -- pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; -- pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; -+ } -+ else if (pmlmeinfo->state & WIFI_FW_LINKING_STATE) -+ { -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ report_join_res(padapter, -2); -+ } -+ } +- // Because of AP's not receiving deauth before +- // AP may: 1)not response auth or 2)deauth us after link is complete +- // issue deauth before issuing auth to deal with the situation +- issue_deauth(padapter, (&(pmlmeinfo->network))->MacAddress, WLAN_REASON_DEAUTH_LEAVING); +- + issue_auth(padapter, NULL, 0); -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_DISCONNECT, 0); -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, null_addr); -+ return _SUCCESS; -+} + set_link_timer(pmlmeext, REAUTH_TO); +@@ -8104,6 +9831,7 @@ unsigned int receive_disconnect(_adapter *padapter, unsigned char *MacAddr, unsi + { + pmlmeinfo->state = WIFI_FW_NULL_STATE; + report_del_sta_event(padapter, MacAddr, reason); ++ + } + else if (pmlmeinfo->state & WIFI_FW_LINKING_STATE) + { +@@ -8115,24 +9843,321 @@ unsigned int receive_disconnect(_adapter *padapter, unsigned char *MacAddr, unsi + return _SUCCESS; + } -- //SelectChannel(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset); -- set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -- flush_all_cam_entry(padapter); +-/**************************************************************************** +#ifdef CONFIG_80211D +static void process_80211d(PADAPTER padapter, WLAN_BSSID_EX *bssid) +{ @@ -18629,14 +18146,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + u8 channel; + u8 i; -- pmlmeinfo->state = WIFI_FW_NULL_STATE; +-Following are the functions to report events -- //set MSR to no link state -- Set_NETYPE0_MSR(padapter, _HW_STATE_NOLINK_); +-*****************************************************************************/ + pregistrypriv = &padapter->registrypriv; + pmlmeext = &padapter->mlmeextpriv; -- _cancel_timer_ex(&pmlmeext->link_timer); +-void report_survey_event(_adapter *padapter, union recv_frame *precv_frame) +-{ +- struct cmd_obj *pcmd_obj; +- u8 *pevtcmd; +- u32 cmdsz; +- struct survey_event *psurvey_evt; + // Adjust channel plan by AP Country IE + if (pregistrypriv->enable80211d && + (!pmlmeext->update_channel_plan_by_ap_done)) @@ -18649,63 +18170,38 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + u8 fcn; // first channel number + u8 noc; // number of channel + u8 j, k; - -- } ++ + ie = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _COUNTRY_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); + if (!ie) return; + if (len < 6) return; - --} ++ + ie += 2; + p = ie; + ie += len; - --/**************************************************************************** ++ + _rtw_memset(country, 0, 4); + _rtw_memcpy(country, p, 3); + p += 3; + RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, + ("%s: 802.11d country=%s\n", __FUNCTION__, country)); - --Following are the functions for the timer handlers ++ + i = 0; + while ((ie - p) >= 3) + { + fcn = *(p++); + noc = *(p++); + p++; - --*****************************************************************************/ ++ + for (j = 0; j < noc; j++) + { + if (fcn <= 14) channel = fcn + j; // 2.4 GHz + else channel = fcn + j*4; // 5 GHz - --void _linked_rx_signal_strehgth_display(_adapter *padapter) --{ -- int UndecoratedSmoothedPWDB; -- DBG_8192C("============ linked status check ===================\n"); -- DBG_8192C("pathA Rx SNRdb:%d, pathB Rx SNRdb:%d\n",padapter->recvpriv.RxSNRdB[0],padapter->recvpriv.RxSNRdB[1]); -- DBG_8192C("pathA Rx RSSI:%d,pathB Rx RSSI:%d\n",padapter->recvpriv.RxRssi[0],padapter->recvpriv.RxRssi[1]); -- -- DBG_8192C("pathA Rx PWDB:%d\n",padapter->recvpriv.rxpwdb); -- padapter->HalFunc.GetHalDefVarHandler(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB); -- DBG_8192C("UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB); -- DBG_8192C("Rx RSSI:%d\n",padapter->recvpriv.rssi); -- DBG_8192C("Rx Signal_strength:%d\n",padapter->recvpriv.signal_strength); -- DBG_8192C("Rx Signal_qual:%d \n",padapter->recvpriv.signal_qual); -- DBG_8192C("============ linked status check ===================\n"); -- DBG_8192C(" DIG PATH-A(0x%02x), PATH-B(0x%02x)\n",rtw_read8(padapter,0xc50),rtw_read8(padapter,0xc58)); -- DBG_8192C(" OFDM -Alarm DA2(0x%04x),DA4(0x%04x),DA6(0x%04x),DA8(0x%04x)\n", -- rtw_read16(padapter,0xDA2),rtw_read16(padapter,0xDA4),rtw_read16(padapter,0xDA6),rtw_read16(padapter,0xDA8)); ++ + chplan_ap.Channel[i++] = channel; + } + } + chplan_ap.Len = i; - -- DBG_8192C(" CCK -Alarm A5B(0x%02x),A5C(0x%02x)\n",rtw_read8(padapter,0xA5B),rtw_read8(padapter,0xA5C)); -- DBG_8192C(" FalseAlmCnt_all(%d)\n",padapter->recvpriv.FalseAlmCnt_all); --} ++ +#ifdef CONFIG_DEBUG_RTL871X +#ifdef PLATFORM_LINUX + i = 0; @@ -18718,17 +18214,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + printk("}\n"); +#endif +#endif - --void linked_status_chk(_adapter *padapter) --{ -- u32 i; -- struct sta_info *psta; -- struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -- struct recv_priv *precvpriv = &(padapter->recvpriv); -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -- struct sta_priv *pstapriv = &padapter->stapriv; -- struct registry_priv *pregistrypriv = &padapter->registrypriv; ++ + _rtw_memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta)); +#ifdef CONFIG_DEBUG_RTL871X +#ifdef PLATFORM_LINUX @@ -18742,98 +18228,38 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + printk("}\n"); +#endif +#endif - -- if(padapter->bRxRSSIDisplay) -- _linked_rx_signal_strehgth_display(padapter); ++ + _rtw_memset(pmlmeext->channel_set, 0, sizeof(pmlmeext->channel_set)); + chplan_new = pmlmeext->channel_set; - -- if (is_client_associated_to_ap(padapter)) -- { -- //linked infrastructure client mode -- if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) ++ + i = j = k = 0; + if (pregistrypriv->wireless_mode & WIRELESS_11G) - { -- #ifdef DBG_EXPIRATION_CHK -- DBG_871X("%s rx:"STA_PKTS_FMT", BI:%u, retry:%u\n" -- , __FUNCTION__ -- , STA_RX_PKTS_ARG(psta) -- , pmlmeinfo->bcn_interval -- , pmlmeext->retry -- ); -- #endif ++ { + do { + if ((i == MAX_CHANNEL_NUM) || + (chplan_sta[i].ChannelNum == 0) || + (chplan_sta[i].ChannelNum > 14)) + break; - -- /*to monitor whether the AP is alive or not*/ -- if (sta_last_rx_pkts(psta) == sta_rx_pkts(psta)) -- { -- // Commented by Albert 2010/07/21 -- // In this case, there is no any rx packet received by driver. ++ + if ((j == chplan_ap.Len) || (chplan_ap.Channel[j] > 14)) + break; - -- #ifdef DBG_ROAMING_TEST -- if(pmlmeext->retry<1) -- #else -- if(pmlmeext->retry<8)// Alter the retry limit to 8 -- #endif ++ + if (chplan_sta[i].ChannelNum == chplan_ap.Channel[j]) - { -- if(pmlmeext->retry==0) -- { -- #ifdef DBG_CONFIG_ERROR_DETECT -- if(padapter->HalFunc.sreset_linked_status_check) -- padapter->HalFunc.sreset_linked_status_check(padapter); -- #endif -- -- // In order to know the AP's current state, try to send the probe request -- // to trigger the AP to send the probe response. -- #ifdef CONFIG_P2P -- if(!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) { -- #ifdef DBG_EXPIRATION_CHK -- DBG_871X("issue_probereq_p2p to trigger probersp, retry=%d\n", pmlmeext->retry); -- #endif -- issue_probereq_p2p(padapter); -- } else -- #endif -- { -- #ifdef DBG_EXPIRATION_CHK -- DBG_871X("issue_probereq to trigger probersp, retry=%d\n", pmlmeext->retry); -- #endif -- issue_probereq(padapter, &(pmlmeinfo->network.Ssid), 0); -- issue_probereq(padapter, &(pmlmeinfo->network.Ssid), 0); -- issue_probereq(padapter, &(pmlmeinfo->network.Ssid), 0); -- } -- } -- -- pmlmeext->retry++; ++ { + chplan_new[k].ChannelNum = chplan_ap.Channel[j]; + chplan_new[k].ScanType = SCAN_ACTIVE; + i++; + j++; + k++; - } -- else ++ } + else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) - { -- pmlmeext->retry = 0; -- DBG_871X("no beacon to call receive_disconnect()\n"); -- receive_disconnect(padapter, pmlmeinfo->network.MacAddress -- , 65535// indicate disconnect caused by no rx -- ); -- pmlmeinfo->link_count = 0; -- return; ++ { + chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; +// chplan_new[k].ScanType = chplan_sta[i].ScanType; + chplan_new[k].ScanType = SCAN_PASSIVE; + i++; + k++; - } ++ } + else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) + { + chplan_new[k].ChannelNum = chplan_ap.Channel[j]; @@ -18853,41 +18279,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + chplan_new[k].ScanType = SCAN_PASSIVE; + i++; + k++; - } -- else -- { -- pmlmeext->retry = 0; -- sta_update_last_rx_pkts(psta); -- //set_link_timer(pmlmeext, DISCONNECT_TO); -- } -- -- #ifdef DBG_EXPIRATION_CHK -- DBG_871X("%s tx_pkts:%llu, link_count:%u\n", __FUNCTION__ -- , pxmitpriv->tx_pkts -- , pmlmeinfo->link_count -- ); -- #endif - -- /*to send the AP a nulldata if no frame is xmitted in order to keep alive*/ -- if(pxmitpriv->last_tx_pkts == pxmitpriv->tx_pkts) ++ } ++ + // add channel AP supported + while ((j < chplan_ap.Len) && (chplan_ap.Channel[j] <= 14)) - { -- if(pmlmeinfo->link_count++ == 0xf) -- { -- //DBG_871X("(Interface %d)issue nulldata to keep alive\n",padapter->dvobjpriv.InterfaceNumber); -- #ifdef DBG_EXPIRATION_CHK -- DBG_871X("%s issue_nulldata 0\n", __FUNCTION__); -- #endif -- issue_nulldata(padapter, 0); -- pmlmeinfo->link_count = 0; -- } ++ { + chplan_new[k].ChannelNum = chplan_ap.Channel[j]; + chplan_new[k].ScanType = SCAN_ACTIVE; + j++; + k++; - } -- else ++ } + } + else + { @@ -18904,67 +18305,37 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + // skip AP 2.4G channel plan + while ((j < chplan_ap.Len) && (chplan_ap.Channel[j] <= 14)) - { -- pxmitpriv->last_tx_pkts = pxmitpriv->tx_pkts; -- pmlmeinfo->link_count = 0; ++ { + j++; - } ++ } + } - -- } //end of if ((psta = rtw_get_stainfo(pstapriv, passoc_res->network.MacAddress)) != NULL) -- } -- else if (is_client_associated_to_ibss(padapter)) -- { -- //linked IBSS mode -- //for each assoc list entry to check the rx pkt counter -- for (i = IBSS_START_MAC_ID; i < NUM_STA; i++) ++ + if (pregistrypriv->wireless_mode & WIRELESS_11A) - { -- if (pmlmeinfo->FW_sta_info[i].status == 1) -- { -- psta = pmlmeinfo->FW_sta_info[i].psta; ++ { + do { + if ((i == MAX_CHANNEL_NUM) || + (chplan_sta[i].ChannelNum == 0)) + break; - -- if(NULL==psta) continue; ++ + if ((j == chplan_ap.Len) || (chplan_ap.Channel[j] == 0)) + break; - -- if (pmlmeinfo->FW_sta_info[i].rx_pkt == sta_rx_pkts(psta)) ++ + if (chplan_sta[i].ChannelNum == chplan_ap.Channel[j]) - { -- -- if(pmlmeinfo->FW_sta_info[i].retry<3) -- { -- pmlmeinfo->FW_sta_info[i].retry++; -- } -- else -- { -- pmlmeinfo->FW_sta_info[i].retry = 0; -- pmlmeinfo->FW_sta_info[i].status = 0; -- report_del_sta_event(padapter, psta->hwaddr -- , 65535// indicate disconnect caused by no rx -- ); -- } ++ { + chplan_new[k].ChannelNum = chplan_ap.Channel[j]; + chplan_new[k].ScanType = SCAN_ACTIVE; + i++; + j++; + k++; - } -- else ++ } + else if (chplan_sta[i].ChannelNum < chplan_ap.Channel[j]) - { -- pmlmeinfo->FW_sta_info[i].retry = 0; -- pmlmeinfo->FW_sta_info[i].rx_pkt = (u32)sta_rx_pkts(psta); ++ { + chplan_new[k].ChannelNum = chplan_sta[i].ChannelNum; +// chplan_new[k].ScanType = chplan_sta[i].ScanType; + chplan_new[k].ScanType = SCAN_PASSIVE; + i++; + k++; - } ++ } + else if (chplan_sta[i].ChannelNum > chplan_ap.Channel[j]) + { + chplan_new[k].ChannelNum = chplan_ap.Channel[j]; @@ -19002,10 +18373,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + chplan_new[k].ScanType = chplan_sta[i].ScanType; + i++; + k++; - } - } - -- //set_link_timer(pmlmeext, DISCONNECT_TO); ++ } ++ } ++ + pmlmeext->update_channel_plan_by_ap_done = 1; + +#ifdef CONFIG_DEBUG_RTL871X @@ -19020,7 +18390,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + printk("}\n"); +#endif +#endif - ++ +#if 0 + // recover the right channel index + channel = chplan_sta[pmlmeext->sitesurvey_res.channel_idx].ChannelNum; @@ -19037,8 +18407,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + k++; + } +#endif - } - ++ } ++ + // If channel is used by AP, set channel scan type to active + channel = bssid->Configuration.DSConfig; + chplan_new = pmlmeext->channel_set; @@ -19062,10 +18432,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + i++; + } - } ++} +#endif - --void survey_timer_hdl(_adapter *padapter) ++ +/**************************************************************************** + +Following are the functions to report events @@ -19073,148 +18442,655 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +*****************************************************************************/ + +void report_survey_event(_adapter *padapter, union recv_frame *precv_frame) - { -- struct cmd_obj *ph2c; -- struct sitesurvey_parm *psurveyPara; -- struct cmd_priv *pcmdpriv=&padapter->cmdpriv; -- struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; --#ifdef CONFIG_P2P -- struct wifidirect_info *pwdinfo= &(padapter->wdinfo); --#endif ++{ + struct cmd_obj *pcmd_obj; + u8 *pevtcmd; + u32 cmdsz; + struct survey_event *psurvey_evt; -+ struct C2HEvent_Header *pc2h_evt_hdr; + struct C2HEvent_Header *pc2h_evt_hdr; +- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct cmd_priv *pcmdpriv = &padapter->cmdpriv; + struct mlme_ext_priv *pmlmeext; + struct cmd_priv *pcmdpriv; -+ //u8 *pframe = precv_frame->u.hdr.rx_data; -+ //uint len = precv_frame->u.hdr.len; + //u8 *pframe = precv_frame->u.hdr.rx_data; + //uint len = precv_frame->u.hdr.len; -- //DBG_8192C("marc: survey timer\n"); + if(!padapter) + return; - -- //issue rtw_sitesurvey_cmd -- if (pmlmeext->sitesurvey_res.state > SCAN_START) ++ + pmlmeext = &padapter->mlmeextpriv; + pcmdpriv = &padapter->cmdpriv; + + -+ if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) + if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) { -- if(pmlmeext->sitesurvey_res.state == SCAN_PROCESS) -- pmlmeext->sitesurvey_res.channel_idx++; -+ return; + return; +@@ -8168,6 +10193,10 @@ void report_survey_event(_adapter *padapter, union recv_frame *precv_frame) + return; + } + ++#ifdef CONFIG_80211D ++ process_80211d(padapter, &psurvey_evt->bss); ++#endif ++ + rtw_enqueue_cmd(pcmdpriv, pcmd_obj); + + pmlmeext->sitesurvey_res.bss_cnt++; +@@ -8215,7 +10244,7 @@ void report_surveydone_event(_adapter *padapter) + psurveydone_evt = (struct surveydone_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); + psurveydone_evt->bss_cnt = pmlmeext->sitesurvey_res.bss_cnt; + +- DBG_871X("survey done event(%x)\n", psurveydone_evt->bss_cnt); ++ DBG_871X("survey done event(%x) band:%d for "ADPT_FMT"\n", psurveydone_evt->bss_cnt, padapter->setband, ADPT_ARG(padapter)); + + rtw_enqueue_cmd(pcmdpriv, pcmd_obj); + +@@ -8265,11 +10294,11 @@ void report_join_res(_adapter *padapter, int res) + pjoinbss_evt->network.join_res = pjoinbss_evt->network.aid = res; + + DBG_871X("report_join_res(%d)\n", res); +- ++ + + rtw_joinbss_event_prehandle(padapter, (u8 *)&pjoinbss_evt->network); + +- ++ + rtw_enqueue_cmd(pcmdpriv, pcmd_obj); + + return; +@@ -8281,10 +10310,11 @@ void report_del_sta_event(_adapter *padapter, unsigned char* MacAddr, unsigned s + struct cmd_obj *pcmd_obj; + u8 *pevtcmd; + u32 cmdsz; ++ struct sta_info *psta; ++ int mac_id; + struct stadel_event *pdel_sta_evt; + struct C2HEvent_Header *pc2h_evt_hdr; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; + + if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) +@@ -8317,7 +10347,16 @@ void report_del_sta_event(_adapter *padapter, unsigned char* MacAddr, unsigned s + _rtw_memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN); + _rtw_memcpy((unsigned char *)(pdel_sta_evt->rsvd),(unsigned char *)(&reason),2); + +- DBG_871X("report_del_sta_event: delete STA\n"); ++ ++ psta = rtw_get_stainfo(&padapter->stapriv, MacAddr); ++ if(psta) ++ mac_id = (int)psta->mac_id; ++ else ++ mac_id = (-1); ++ ++ pdel_sta_evt->mac_id = mac_id; ++ ++ DBG_871X("report_del_sta_event: delete STA, mac_id=%d\n", mac_id); + + rtw_enqueue_cmd(pcmdpriv, pcmd_obj); + +@@ -8332,7 +10371,6 @@ void report_add_sta_event(_adapter *padapter, unsigned char* MacAddr, int cam_id + struct stassoc_event *padd_sta_evt; + struct C2HEvent_Header *pc2h_evt_hdr; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct cmd_priv *pcmdpriv = &padapter->cmdpriv; + + if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) +@@ -8431,8 +10469,6 @@ void update_sta_info(_adapter *padapter, struct sta_info *psta) + + } + +-u8 null_addr[ETH_ALEN]= {0,0,0,0,0,0}; +- + void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) + { + struct sta_info *psta, *psta_bmc; +@@ -8440,14 +10476,25 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); + struct sta_priv *pstapriv = &padapter->stapriv; +- u8 join_type, init_rts_rate; ++ u8 join_type; + + if(join_res < 0) + { + join_type = 1; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, null_addr); +- return; ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); ++ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr); ++ ++ //restore to initial setting. ++ update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode); ++#if 0 //temply remove ++#ifdef CONFIG_INTEL_WIDI ++#ifdef DBG_CONFIG_ERROR_DETECT ++ DBG_871X("%s(): do silentreset\n",__FUNCTION__); ++ rtw_hal_sreset_reset(padapter); ++#endif ++#endif ++#endif ++ goto exit_mlmeext_joinbss_event_callback; + } + + if((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) +@@ -8469,10 +10516,10 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) + // update IOT-releated issue + update_IOT_info(padapter); + +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BASIC_RATE, cur_network->SupportedRates); ++ rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, cur_network->SupportedRates); + + //BCN interval +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&pmlmeinfo->bcn_interval)); ++ rtw_hal_set_hwreg(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&pmlmeinfo->bcn_interval)); + + //udpate capability + update_capinfo(padapter, pmlmeinfo->capability); +@@ -8483,10 +10530,11 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) + //HT + HTOnAssocRsp(padapter); + +- ++#ifndef CONFIG_CONCURRENT_MODE ++ // Call set_channel_bwmode when the CONFIG_CONCURRENT_MODE doesn't be defined. + //Set cur_channel&cur_bwmode&cur_ch_offset + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); +- ++#endif + + psta = rtw_get_stainfo(pstapriv, cur_network->MacAddress); + if (psta) //only for infra. mode +@@ -8496,11 +10544,11 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) + //DBG_871X("set_sta_rate\n"); + + //set per sta rate after updating HT cap. +- set_sta_rate(padapter, psta); ++ set_sta_rate(padapter, psta); + } + + join_type = 2; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); + + if((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) + { +@@ -8513,7 +10561,16 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) + #ifdef CONFIG_LPS + rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_CONNECT, 0); + #endif +- ++ ++exit_mlmeext_joinbss_event_callback: ++ ++#ifdef CONFIG_DUALMAC_CONCURRENT ++ dc_handle_join_done(padapter, join_res); ++#endif ++#ifdef CONFIG_CONCURRENT_MODE ++ concurrent_chk_joinbss_done(padapter, join_res); ++#endif ++ + DBG_871X("=>%s\n", __FUNCTION__); + + } +@@ -8555,7 +10612,7 @@ void mlmeext_sta_add_event_callback(_adapter *padapter, struct sta_info *psta) + } + + join_type = 2; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); + } + + pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta; +@@ -8577,21 +10634,38 @@ void mlmeext_sta_del_event_callback(_adapter *padapter) + { + //set_opmode_cmd(padapter, infra_client_with_mlme); + ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, 0); ++ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr); ++ ++ //restore to initial setting. ++ update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode); ++ ++#ifdef CONFIG_DUALMAC_CONCURRENT ++ dc_set_channel_bwmode_disconnect(padapter); ++#else ++#ifdef CONFIG_CONCURRENT_MODE ++ if((check_buddy_fwstate(padapter, _FW_LINKED)) != _TRUE) ++ { ++#endif //CONFIG_CONCURRENT_MODE ++ + //switch to the 20M Hz mode after disconnect + pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; + pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; + +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_DISCONNECT, 0); +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, null_addr); +- + //SelectChannel(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset); + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); ++ ++#ifdef CONFIG_CONCURRENT_MODE ++ } ++#endif //CONFIG_CONCURRENT_MODE ++#endif //CONFIG_DUALMAC_CONCURRENT ++ + flush_all_cam_entry(padapter); + + pmlmeinfo->state = WIFI_FW_NULL_STATE; + +- //set MSR to no link state +- Set_NETYPE0_MSR(padapter, _HW_STATE_NOLINK_); ++ //set MSR to no link state -> infra. mode ++ Set_MSR(padapter, _HW_STATE_STATION_); + + _cancel_timer_ex(&pmlmeext->link_timer); + +@@ -8604,27 +10678,94 @@ void mlmeext_sta_del_event_callback(_adapter *padapter) + Following are the functions for the timer handlers + + *****************************************************************************/ +- ++void _linked_rx_signal_strehgth_display(_adapter *padapter); + void _linked_rx_signal_strehgth_display(_adapter *padapter) + { + int UndecoratedSmoothedPWDB; +- DBG_8192C("============ linked status check ===================\n"); +- DBG_8192C("pathA Rx SNRdb:%d, pathB Rx SNRdb:%d\n",padapter->recvpriv.RxSNRdB[0],padapter->recvpriv.RxSNRdB[1]); +- DBG_8192C("pathA Rx RSSI:%d,pathB Rx RSSI:%d\n",padapter->recvpriv.RxRssi[0],padapter->recvpriv.RxRssi[1]); +- +- DBG_8192C("pathA Rx PWDB:%d\n",padapter->recvpriv.rxpwdb); +- padapter->HalFunc.GetHalDefVarHandler(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB); +- DBG_8192C("UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB); +- DBG_8192C("Rx RSSI:%d\n",padapter->recvpriv.rssi); +- DBG_8192C("Rx Signal_strength:%d\n",padapter->recvpriv.signal_strength); +- DBG_8192C("Rx Signal_qual:%d \n",padapter->recvpriv.signal_qual); +- DBG_8192C("============ linked status check ===================\n"); +- DBG_8192C(" DIG PATH-A(0x%02x), PATH-B(0x%02x)\n",rtw_read8(padapter,0xc50),rtw_read8(padapter,0xc58)); +- DBG_8192C(" OFDM -Alarm DA2(0x%04x),DA4(0x%04x),DA6(0x%04x),DA8(0x%04x)\n", ++ ++#ifdef CONFIG_CONCURRENT_MODE ++ PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; ++ DBG_871X("============ pbuddy_adapter linked status check ===================\n"); ++ DBG_871X("buddy_adapter_type=%d\n", pbuddy_adapter->adapter_type); ++ DBG_871X("pbuddy_adapter pathA Rx SNRdb:%d\n",pbuddy_adapter->recvpriv.RxSNRdB[0]); ++ DBG_871X("pbuddy_adapter pathA Rx PWDB:%d\n",pbuddy_adapter->recvpriv.rxpwdb); ++ DBG_871X("pbuddy_adapter pathA Rx RSSI:%d,pathB Rx RSSI:%d\n" ++ ,pbuddy_adapter->recvpriv.RxRssi[0],pbuddy_adapter->recvpriv.RxRssi[1]); ++ rtw_hal_get_def_var(pbuddy_adapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB); ++ DBG_871X("pbuddy_adapter UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB); ++ DBG_871X("Rx RSSI:%d\n",pbuddy_adapter->recvpriv.rssi); ++ DBG_871X("Rx Signal_strength:%d\n",pbuddy_adapter->recvpriv.signal_strength); ++ DBG_871X("Rx Signal_qual:%d \n",pbuddy_adapter->recvpriv.signal_qual); ++ DBG_871X("============ linked status check ===================\n"); ++ DBG_871X("adapter_type=%d\n", padapter->adapter_type); ++#else //CONFIG_CONCURRENT_MODE ++ DBG_871X("============ linked status check ===================\n"); ++#endif //CONFIG_CONCURRENT_MODE ++ DBG_871X("pathA Rx SNRdb:%d, pathB Rx SNRdb:%d\n",padapter->recvpriv.RxSNRdB[0], padapter->recvpriv.RxSNRdB[1]); ++ DBG_871X("pathA Rx PWDB:%d\n",padapter->recvpriv.rxpwdb); ++ DBG_871X("pathA Rx RSSI:%d,pathB Rx RSSI:%d\n",padapter->recvpriv.RxRssi[0],padapter->recvpriv.RxRssi[1]); ++ rtw_hal_get_def_var(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB); ++ DBG_871X("UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB); ++ DBG_871X("Rx RSSI:%d\n",padapter->recvpriv.rssi); ++ DBG_871X("Rx Signal_strength:%d\n",padapter->recvpriv.signal_strength); ++ DBG_871X("Rx Signal_qual:%d \n",padapter->recvpriv.signal_qual); ++ if ( check_fwstate( &padapter->mlmepriv, _FW_LINKED )) ++ { ++ DBG_871X("bw mode: %d, channel: %d\n", padapter->mlmeextpriv.cur_bwmode, padapter->mlmeextpriv.cur_channel ); ++ DBG_871X("received bytes = %d\n", (u32) (padapter->recvpriv.rx_bytes - padapter->recvpriv.last_rx_bytes ) ); + } ++ DBG_871X("============ linked status check ===================\n"); ++ DBG_871X(" DIG PATH-A(0x%02x), PATH-B(0x%02x)\n",rtw_read8(padapter,0xc50),rtw_read8(padapter,0xc58)); ++ DBG_871X(" OFDM -Alarm DA2(0x%04x),DA4(0x%04x),DA6(0x%04x),DA8(0x%04x)\n", + rtw_read16(padapter,0xDA2),rtw_read16(padapter,0xDA4),rtw_read16(padapter,0xDA6),rtw_read16(padapter,0xDA8)); -- if(pmlmeext->scan_abort == _TRUE) -- { -- #ifdef CONFIG_P2P -- if(!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) +- DBG_8192C(" CCK -Alarm A5B(0x%02x),A5C(0x%02x)\n",rtw_read8(padapter,0xA5B),rtw_read8(padapter,0xA5C)); +- DBG_8192C(" FalseAlmCnt_all(%d)\n",padapter->recvpriv.FalseAlmCnt_all); ++ DBG_871X(" CCK -Alarm A5B(0x%02x),A5C(0x%02x)\n",rtw_read8(padapter,0xA5B),rtw_read8(padapter,0xA5C)); ++ DBG_871X(" FalseAlmCnt_all(%d)\n",padapter->recvpriv.FalseAlmCnt_all); ++ ++} ++ ++u8 chk_ap_is_alive(_adapter *padapter, struct sta_info *psta) ++{ ++ u8 ret = _FALSE; ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ ++ #ifdef DBG_EXPIRATION_CHK ++ DBG_871X(FUNC_ADPT_FMT" rx:"STA_PKTS_FMT", beacon:%llu, probersp_to_self:%llu" ++ /*", probersp_bm:%llu, probersp_uo:%llu, probereq:%llu, BI:%u"*/ ++ ", retry:%u\n" ++ , FUNC_ADPT_ARG(padapter) ++ , STA_RX_PKTS_DIFF_ARG(psta) ++ , psta->sta_stats.rx_beacon_pkts - psta->sta_stats.last_rx_beacon_pkts ++ , psta->sta_stats.rx_probersp_pkts - psta->sta_stats.last_rx_probersp_pkts ++ /*, psta->sta_stats.rx_probersp_bm_pkts - psta->sta_stats.last_rx_probersp_bm_pkts ++ , psta->sta_stats.rx_probersp_uo_pkts - psta->sta_stats.last_rx_probersp_uo_pkts ++ , psta->sta_stats.rx_probereq_pkts - psta->sta_stats.last_rx_probereq_pkts ++ , pmlmeinfo->bcn_interval*/ ++ , pmlmeext->retry ++ ); ++ ++ DBG_871X(FUNC_ADPT_FMT" tx_pkts:%llu, link_count:%u\n", FUNC_ADPT_ARG(padapter) ++ , padapter->xmitpriv.tx_pkts ++ , pmlmeinfo->link_count ++ ); ++ #endif ++ ++ if((sta_rx_data_pkts(psta) == sta_last_rx_data_pkts(psta)) ++ && sta_rx_beacon_pkts(psta) == sta_last_rx_beacon_pkts(psta) ++ && sta_rx_probersp_pkts(psta) == sta_last_rx_probersp_pkts(psta) ++ ) ++ { ++ ret = _FALSE; ++ } ++ else ++ { ++ ret = _TRUE; ++ } ++ ++ sta_update_last_rx_pkts(psta); ++ ++ return ret; + } + + void linked_status_chk(_adapter *padapter) +@@ -8632,110 +10773,116 @@ void linked_status_chk(_adapter *padapter) + u32 i; + struct sta_info *psta; + struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); +- struct recv_priv *precvpriv = &(padapter->recvpriv); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + struct sta_priv *pstapriv = &padapter->stapriv; +- struct registry_priv *pregistrypriv = &padapter->registrypriv; + + if(padapter->bRxRSSIDisplay) +- _linked_rx_signal_strehgth_display(padapter); ++ _linked_rx_signal_strehgth_display(padapter); ++ ++ #ifdef DBG_CONFIG_ERROR_DETECT ++ rtw_hal_sreset_linked_status_check(padapter); ++ #endif + + if (is_client_associated_to_ap(padapter)) + { + //linked infrastructure client mode ++ ++ int tx_chk = _SUCCESS, rx_chk = _SUCCESS; ++ int rx_chk_limit; ++ ++ #if defined(DBG_ROAMING_TEST) ++ rx_chk_limit = 1; ++ #elif defined(CONFIG_ACTIVE_KEEP_ALIVE_CHECK) ++ rx_chk_limit = 4; ++ #else ++ rx_chk_limit = 8; ++ #endif ++ ++ // Marked by Kurt 20130715 ++ // For WiDi 3.5 and later on, they don't ask WiDi sink to do roaming, so we could not check rx limit that strictly. ++ // todo: To check why rx_chk would be _FALSE under miracast session. ++ //#ifdef CONFIG_INTEL_WIDI ++ //if (padapter->mlmepriv.widi_state != INTEL_WIDI_STATE_NONE) ++ // rx_chk_limit = 1; ++ //#endif ++ + if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) + { +- #ifdef DBG_EXPIRATION_CHK +- DBG_871X("%s rx:"STA_PKTS_FMT", BI:%u, retry:%u\n" +- , __FUNCTION__ +- , STA_RX_PKTS_ARG(psta) +- , pmlmeinfo->bcn_interval +- , pmlmeext->retry +- ); ++ bool is_p2p_enable = _FALSE; ++ #ifdef CONFIG_P2P ++ is_p2p_enable = !rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE); + #endif ++ ++ if (chk_ap_is_alive(padapter, psta) == _FALSE) ++ rx_chk = _FAIL; + +- /*to monitor whether the AP is alive or not*/ +- if (sta_last_rx_pkts(psta) == sta_rx_pkts(psta)) - { -- rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_MAX); -- pmlmeext->sitesurvey_res.channel_idx = 3; -- DBG_871X("%s idx:%d, cnt:%u\n", __FUNCTION__ -- , pmlmeext->sitesurvey_res.channel_idx -- , pwdinfo->find_phase_state_exchange_cnt -- ); +- // Commented by Albert 2010/07/21 +- // In this case, there is no any rx packet received by driver. ++ if (pxmitpriv->last_tx_pkts == pxmitpriv->tx_pkts) ++ tx_chk = _FAIL; + +- #ifdef DBG_ROAMING_TEST +- if(pmlmeext->retry<1) +- #else +- if(pmlmeext->retry<8)// Alter the retry limit to 8 +- #endif +- { +- if(pmlmeext->retry==0) +- { +- #ifdef DBG_CONFIG_ERROR_DETECT +- if(padapter->HalFunc.sreset_linked_status_check) +- padapter->HalFunc.sreset_linked_status_check(padapter); +- #endif ++ #ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK ++ if (pmlmeext->active_keep_alive_check && (rx_chk == _FAIL || tx_chk == _FAIL)) { ++ u8 backup_oper_channel=0; + +- // In order to know the AP's current state, try to send the probe request +- // to trigger the AP to send the probe response. +- #ifdef CONFIG_P2P +- if(!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) { +- #ifdef DBG_EXPIRATION_CHK +- DBG_871X("issue_probereq_p2p to trigger probersp, retry=%d\n", pmlmeext->retry); +- #endif +- issue_probereq_p2p(padapter); +- } else +- #endif +- { +- #ifdef DBG_EXPIRATION_CHK +- DBG_871X("issue_probereq to trigger probersp, retry=%d\n", pmlmeext->retry); +- #endif +- issue_probereq(padapter, &(pmlmeinfo->network.Ssid), 0); +- issue_probereq(padapter, &(pmlmeinfo->network.Ssid), 0); +- issue_probereq(padapter, &(pmlmeinfo->network.Ssid), 0); +- } +- } +- +- pmlmeext->retry++; ++ /* switch to correct channel of current network before issue keep-alive frames */ ++ if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) { ++ backup_oper_channel = rtw_get_oper_ch(padapter); ++ SelectChannel(padapter, pmlmeext->cur_channel); + } +- else +- { +- pmlmeext->retry = 0; +- DBG_871X("no beacon to call receive_disconnect()\n"); +- receive_disconnect(padapter, pmlmeinfo->network.MacAddress +- , 65535// indicate disconnect caused by no rx +- ); +- pmlmeinfo->link_count = 0; +- return; ++ ++ if (rx_chk != _SUCCESS) ++ issue_probereq_ex(padapter, &pmlmeinfo->network.Ssid, psta->hwaddr, 3, 1); ++ ++ if ((tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) || rx_chk != _SUCCESS) { ++ tx_chk = issue_nulldata(padapter, psta->hwaddr, 0, 3, 1); ++ /* if tx acked and p2p disabled, set rx_chk _SUCCESS to reset retry count */ ++ if (tx_chk == _SUCCESS && !is_p2p_enable) ++ rx_chk = _SUCCESS; + } ++ ++ /* back to the original operation channel */ ++ if(backup_oper_channel>0) ++ SelectChannel(padapter, backup_oper_channel); ++ + } + else ++ #endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */ + { +- pmlmeext->retry = 0; +- sta_update_last_rx_pkts(psta); +- //set_link_timer(pmlmeext, DISCONNECT_TO); - } -- else +- +- #ifdef DBG_EXPIRATION_CHK +- DBG_871X("%s tx_pkts:%llu, link_count:%u\n", __FUNCTION__ +- , pxmitpriv->tx_pkts +- , pmlmeinfo->link_count +- ); - #endif ++ if (rx_chk != _SUCCESS) { ++ if (pmlmeext->retry == 0) { ++ #ifdef DBG_EXPIRATION_CHK ++ DBG_871X("issue_probereq to trigger probersp, retry=%d\n", pmlmeext->retry); ++ #endif ++ issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress); ++ issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress); ++ issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress); ++ } ++ } + +- /*to send the AP a nulldata if no frame is xmitted in order to keep alive*/ +- if(pxmitpriv->last_tx_pkts == pxmitpriv->tx_pkts) - { -- pmlmeext->sitesurvey_res.channel_idx = pmlmeext->max_chan_nums; -- DBG_871X("%s idx:%d\n", __FUNCTION__ -- , pmlmeext->sitesurvey_res.channel_idx -- ); -- } -+ cmdsz = (sizeof(struct survey_event) + sizeof(struct C2HEvent_Header)); -+ if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) -+ { -+ rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -+ return; -+ } +- if(pmlmeinfo->link_count++ == 0xf) +- { +- //DBG_871X("(Interface %d)issue nulldata to keep alive\n",padapter->dvobjpriv.InterfaceNumber); ++ if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) { + #ifdef DBG_EXPIRATION_CHK + DBG_871X("%s issue_nulldata 0\n", __FUNCTION__); + #endif +- issue_nulldata(padapter, 0); +- pmlmeinfo->link_count = 0; ++ tx_chk = issue_nulldata(padapter, NULL, 0, 1, 0); + } + } +- else +- { ++ ++ if (rx_chk == _FAIL) { ++ pmlmeext->retry++; ++ if (pmlmeext->retry > rx_chk_limit) { ++ DBG_871X(FUNC_ADPT_FMT" disconnect or roaming\n", ++ FUNC_ADPT_ARG(padapter)); ++ receive_disconnect(padapter, pmlmeinfo->network.MacAddress ++ , WLAN_REASON_EXPIRATION_CHK); ++ return; ++ } ++ } else { ++ pmlmeext->retry = 0; ++ } ++ ++ if (tx_chk == _FAIL) { ++ pmlmeinfo->link_count &= 0xf; ++ } else { + pxmitpriv->last_tx_pkts = pxmitpriv->tx_pkts; + pmlmeinfo->link_count = 0; + } +@@ -8789,19 +10936,41 @@ void survey_timer_hdl(_adapter *padapter) + struct cmd_obj *ph2c; + struct sitesurvey_parm *psurveyPara; + struct cmd_priv *pcmdpriv=&padapter->cmdpriv; +- struct mlme_priv *pmlmepriv = &padapter->mlmepriv; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + #ifdef CONFIG_P2P + struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + #endif -- pmlmeext->scan_abort = _FALSE;//reset -- } -+ _rtw_init_listhead(&pcmd_obj->list); +- //DBG_8192C("marc: survey timer\n"); ++ //DBG_871X("marc: survey timer\n"); ++#ifdef PLATFORM_FREEBSD ++ rtw_mtx_lock(NULL); ++ if (callout_pending(&padapter->mlmeextpriv.survey_timer.callout)) { ++ /* callout was reset */ ++ //mtx_unlock(&sc->sc_mtx); ++ rtw_mtx_unlock(NULL); ++ return; ++ } ++ if (!callout_active(&padapter->mlmeextpriv.survey_timer.callout)) { ++ /* callout was stopped */ ++ //mtx_unlock(&sc->sc_mtx); ++ rtw_mtx_unlock(NULL); ++ return; ++ } ++ callout_deactivate(&padapter->mlmeextpriv.survey_timer.callout); ++ ++ ++#endif + + //issue rtw_sitesurvey_cmd + if (pmlmeext->sitesurvey_res.state > SCAN_START) + { + if(pmlmeext->sitesurvey_res.state == SCAN_PROCESS) +- pmlmeext->sitesurvey_res.channel_idx++; ++ { ++#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE ++ if( padapter->mlmeextpriv.mlmext_info.scan_cnt != RTW_SCAN_NUM_OF_CH ) ++#endif //CONFIG_STA_MODE_SCAN_UNDER_AP_MODE ++ pmlmeext->sitesurvey_res.channel_idx++; ++ } + + if(pmlmeext->scan_abort == _TRUE) + { +@@ -8818,7 +10987,7 @@ void survey_timer_hdl(_adapter *padapter) + else + #endif + { +- pmlmeext->sitesurvey_res.channel_idx = pmlmeext->max_chan_nums; ++ pmlmeext->sitesurvey_res.channel_idx = pmlmeext->sitesurvey_res.ch_num; + DBG_871X("%s idx:%d\n", __FUNCTION__ + , pmlmeext->sitesurvey_res.channel_idx + ); +@@ -8827,3204 +10996,2358 @@ void survey_timer_hdl(_adapter *padapter) + pmlmeext->scan_abort = _FALSE;//reset + } - if ((ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) - { - goto exit_survey_timer_hdl; - } -+ pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -+ pcmd_obj->cmdsz = cmdsz; -+ pcmd_obj->parmbuf = pevtcmd; - +- - if ((psurveyPara = (struct sitesurvey_parm*)rtw_zmalloc(sizeof(struct sitesurvey_parm))) == NULL) - { - rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); - goto exit_survey_timer_hdl; - } -+ pcmd_obj->rsp = NULL; -+ pcmd_obj->rspsz = 0; - +- - init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey)); - rtw_enqueue_cmd(pcmdpriv, ph2c); -+ pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -+ pc2h_evt_hdr->len = sizeof(struct survey_event); -+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_Survey); -+ pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); -+ -+ psurvey_evt = (struct survey_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -+ -+ if (collect_bss_info(padapter, precv_frame, (WLAN_BSSID_EX *)&psurvey_evt->bss) == _FAIL) -+ { -+ rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -+ rtw_mfree((u8 *)pevtcmd, cmdsz); -+ return; - } - -+#ifdef CONFIG_80211D -+ process_80211d(padapter, &psurvey_evt->bss); -+#endif -+ -+ rtw_enqueue_cmd(pcmdpriv, pcmd_obj); - +- } +- +- -exit_survey_timer_hdl: -+ pmlmeext->sitesurvey_res.bss_cnt++; - - return; -+ - } - +- +- return; +-} +- -void link_timer_hdl(_adapter *padapter) -+void report_surveydone_event(_adapter *padapter) - { +-{ - static unsigned int rx_pkt = 0; - static u64 tx_cnt = 0; - struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct sta_priv *pstapriv = &padapter->stapriv; -+ struct cmd_obj *pcmd_obj; -+ u8 *pevtcmd; -+ u32 cmdsz; -+ struct surveydone_event *psurveydone_evt; -+ struct C2HEvent_Header *pc2h_evt_hdr; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - +- - if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) -+ if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) - { +- { - DBG_871X("link_timer_hdl:no beacon while connecting\n"); - pmlmeinfo->state = WIFI_FW_NULL_STATE; - report_join_res(padapter, -3); -+ return; - } +- } - else if (pmlmeinfo->state & WIFI_FW_AUTH_STATE) -+ -+ cmdsz = (sizeof(struct surveydone_event) + sizeof(struct C2HEvent_Header)); -+ if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) - { +- { - //re-auth timer - if (++pmlmeinfo->reauth_count > REAUTH_LIMIT) - { @@ -19235,9 +19111,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pmlmeinfo->auth_seq = 1; - issue_auth(padapter, NULL, 0); - set_link_timer(pmlmeext, REAUTH_TO); -+ rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -+ return; - } +- } - else if (pmlmeinfo->state & WIFI_FW_ASSOC_STATE) - { - //re-assoc timer @@ -19247,7 +19121,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - report_join_res(padapter, -2); - return; - } - +- - DBG_871X("link_timer_hdl: assoc timeout and try again\n"); - issue_assocreq(padapter); - set_link_timer(pmlmeext, REASSOC_TO); @@ -19269,14 +19143,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rx_pkt = psta->sta_stats.rx_pkts; - set_link_timer(pmlmeext, DISCONNECT_TO); - } -+ _rtw_init_listhead(&pcmd_obj->list); - +- - //update the EDCA paramter according to the Tx/RX mode - update_EDCA_param(padapter); -+ pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -+ pcmd_obj->cmdsz = cmdsz; -+ pcmd_obj->parmbuf = pevtcmd; - +- - /*to send the AP a nulldata if no frame is xmitted in order to keep alive*/ - if (pmlmeinfo->link_count++ == 0) - { @@ -19288,9 +19158,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - issue_nulldata(padapter, 0); - } -+ pcmd_obj->rsp = NULL; -+ pcmd_obj->rspsz = 0; - +- - tx_cnt = pxmitpriv->tx_pkts; - } - } //end of if ((psta = rtw_get_stainfo(pstapriv, passoc_res->network.MacAddress)) != NULL) @@ -19304,11 +19172,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - if (pmlmeinfo->FW_sta_info[i].status == 1) - { - psta = pmlmeinfo->FW_sta_info[i].psta; -+ pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -+ pc2h_evt_hdr->len = sizeof(struct surveydone_event); -+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_SurveyDone); -+ pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); - +- - if (pmlmeinfo->FW_sta_info[i].rx_pkt == psta->sta_stats.rx_pkts) - { - pmlmeinfo->FW_sta_info[i].status = 0; @@ -19320,105 +19184,46 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - } - } -+ psurveydone_evt = (struct surveydone_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -+ psurveydone_evt->bss_cnt = pmlmeext->sitesurvey_res.bss_cnt; - +- - set_link_timer(pmlmeext, DISCONNECT_TO); - } -#endif -+ DBG_871X("survey done event(%x) band:%d for "ADPT_FMT"\n", psurveydone_evt->bss_cnt, padapter->setband, ADPT_ARG(padapter)); -+ -+ rtw_enqueue_cmd(pcmdpriv, pcmd_obj); - - return; -+ - } - +- +- return; +-} +- -void addba_timer_hdl(struct sta_info *psta) -+void report_join_res(_adapter *padapter, int res) - { +-{ - u8 bitmap; - u16 tid; - struct ht_priv *phtpriv; -+ struct cmd_obj *pcmd_obj; -+ u8 *pevtcmd; -+ u32 cmdsz; -+ struct joinbss_event *pjoinbss_evt; -+ struct C2HEvent_Header *pc2h_evt_hdr; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - +- - if(!psta) -+ if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -+ { - return; +- return; - - phtpriv = &psta->htpriv; -+ } - +- - if((phtpriv->ht_option==_TRUE) && (phtpriv->ampdu_enable==_TRUE)) -+ cmdsz = (sizeof(struct joinbss_event) + sizeof(struct C2HEvent_Header)); -+ if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) - { +- { - if(phtpriv->candidate_tid_bitmap) - phtpriv->candidate_tid_bitmap=0x0; - -+ rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -+ return; - } -+ -+ _rtw_init_listhead(&pcmd_obj->list); -+ -+ pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -+ pcmd_obj->cmdsz = cmdsz; -+ pcmd_obj->parmbuf = pevtcmd; -+ -+ pcmd_obj->rsp = NULL; -+ pcmd_obj->rspsz = 0; -+ -+ pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -+ pc2h_evt_hdr->len = sizeof(struct joinbss_event); -+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_JoinBss); -+ pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); -+ -+ pjoinbss_evt = (struct joinbss_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -+ _rtw_memcpy((unsigned char *)(&(pjoinbss_evt->network.network)), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); -+ pjoinbss_evt->network.join_res = pjoinbss_evt->network.aid = res; -+ -+ DBG_871X("report_join_res(%d)\n", res); - +- } +- -} -+ -+ rtw_joinbss_event_prehandle(padapter, (u8 *)&pjoinbss_evt->network); -+ -+ -+ rtw_enqueue_cmd(pcmdpriv, pcmd_obj); -+ -+ return; - +- -u8 NULL_hdl(_adapter *padapter, u8 *pbuf) -{ - return H2C_SUCCESS; - } - +-} +- -u8 setopmode_hdl(_adapter *padapter, u8 *pbuf) -+void report_del_sta_event(_adapter *padapter, unsigned char* MacAddr, unsigned short reason) - { +-{ - u8 type; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct setopmode_parm *psetop = (struct setopmode_parm *)pbuf; -+ struct cmd_obj *pcmd_obj; -+ u8 *pevtcmd; -+ u32 cmdsz; -+ struct sta_info *psta; -+ int mac_id; -+ struct stadel_event *pdel_sta_evt; -+ struct C2HEvent_Header *pc2h_evt_hdr; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - +- - if(psetop->mode == Ndis802_11APMode) - { - pmlmeinfo->state = WIFI_FW_AP_STATE; @@ -19428,82 +19233,36 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#endif - } - else if(psetop->mode == Ndis802_11Infrastructure) -+ if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) - { +- { - type = _HW_STATE_STATION_; -+ return; - } +- } - else if(psetop->mode == Ndis802_11IBSS) -+ -+ cmdsz = (sizeof(struct stadel_event) + sizeof(struct C2HEvent_Header)); -+ if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) - { +- { - type = _HW_STATE_ADHOC_; -+ rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -+ return; - } -+ -+ _rtw_init_listhead(&pcmd_obj->list); -+ -+ pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -+ pcmd_obj->cmdsz = cmdsz; -+ pcmd_obj->parmbuf = pevtcmd; -+ -+ pcmd_obj->rsp = NULL; -+ pcmd_obj->rspsz = 0; -+ -+ pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -+ pc2h_evt_hdr->len = sizeof(struct stadel_event); -+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_DelSTA); -+ pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); -+ -+ pdel_sta_evt = (struct stadel_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -+ _rtw_memcpy((unsigned char *)(&(pdel_sta_evt->macaddr)), MacAddr, ETH_ALEN); -+ _rtw_memcpy((unsigned char *)(pdel_sta_evt->rsvd),(unsigned char *)(&reason),2); -+ -+ -+ psta = rtw_get_stainfo(&padapter->stapriv, MacAddr); -+ if(psta) -+ mac_id = (int)psta->mac_id; - else +- } +- else - { - type = _HW_STATE_NOLINK_; - } -+ mac_id = (-1); - +- - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SET_OPMODE, (u8 *)(&type)); - //Set_NETYPE0_MSR(padapter, type); -+ pdel_sta_evt->mac_id = mac_id; - +- - return H2C_SUCCESS; - -+ DBG_871X("report_del_sta_event: delete STA, mac_id=%d\n", mac_id); -+ -+ rtw_enqueue_cmd(pcmdpriv, pcmd_obj); -+ -+ return; - } - +-} +- -u8 createbss_hdl(_adapter *padapter, u8 *pbuf) -+void report_add_sta_event(_adapter *padapter, unsigned char* MacAddr, int cam_idx) - { +-{ - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); - struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; - u32 initialgain; -+ struct cmd_obj *pcmd_obj; -+ u8 *pevtcmd; -+ u32 cmdsz; -+ struct stassoc_event *padd_sta_evt; -+ struct C2HEvent_Header *pc2h_evt_hdr; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - +- - - if(pparm->network.InfrastructureMode == Ndis802_11APMode) -+ if ((pcmd_obj = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) - { +- { -#ifdef CONFIG_AP_MODE - - if(pmlmeinfo->state == WIFI_FW_AP_STATE) @@ -19512,14 +19271,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - return H2C_SUCCESS; - } -#endif -+ return; - } - +- } +- - //below is for ad-hoc master - if(pparm->network.InfrastructureMode == Ndis802_11IBSS) -+ cmdsz = (sizeof(struct stassoc_event) + sizeof(struct C2HEvent_Header)); -+ if ((pevtcmd = (u8*)rtw_zmalloc(cmdsz)) == NULL) - { +- { - rtw_joinbss_reset(padapter); - - pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; @@ -19531,76 +19287,48 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pmlmeinfo->HT_info_enable = 0; - pmlmeinfo->agg_enable_bitmap = 0; - pmlmeinfo->candidate_tid_bitmap = 0; -+ rtw_mfree((u8 *)pcmd_obj, sizeof(struct cmd_obj)); -+ return; -+ } - +- - //disable dynamic functions, such as high power, DIG - Save_DM_Func_Flag(padapter); - Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); -+ _rtw_init_listhead(&pcmd_obj->list); - +- - //config the initial gain under linking, need to write the BB registers - initialgain = 0x1E; - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); -+ pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT); -+ pcmd_obj->cmdsz = cmdsz; -+ pcmd_obj->parmbuf = pevtcmd; - +- - //cancel link timer - _cancel_timer_ex(&pmlmeext->link_timer); -+ pcmd_obj->rsp = NULL; -+ pcmd_obj->rspsz = 0; - +- - //clear CAM - flush_all_cam_entry(padapter); -+ pc2h_evt_hdr = (struct C2HEvent_Header*)(pevtcmd); -+ pc2h_evt_hdr->len = sizeof(struct stassoc_event); -+ pc2h_evt_hdr->ID = GEN_EVT_CODE(_AddSTA); -+ pc2h_evt_hdr->seq = ATOMIC_INC_RETURN(&pmlmeext->event_seq); - +- - _rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); - pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; -+ padd_sta_evt = (struct stassoc_event*)(pevtcmd + sizeof(struct C2HEvent_Header)); -+ _rtw_memcpy((unsigned char *)(&(padd_sta_evt->macaddr)), MacAddr, ETH_ALEN); -+ padd_sta_evt->cam_id = cam_idx; - +- - if(pnetwork->IELength>MAX_IE_SZ)//Check pbuf->IELength - return H2C_PARAMETERS_ERROR; -+ DBG_871X("report_add_sta_event: add STA\n"); - +- - _rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); - - start_create_ibss(padapter); -+ rtw_enqueue_cmd(pcmdpriv, pcmd_obj); - +- - } -+ return; -+} - +- - return H2C_SUCCESS; - +- -} -+/**************************************************************************** - +- -u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) -+Following are the event callback functions -+ -+*****************************************************************************/ -+ -+//for sta/adhoc mode -+void update_sta_info(_adapter *padapter, struct sta_info *psta) - { +-{ - u8 join_type; - PNDIS_802_11_VARIABLE_IEs pIE; - struct registry_priv *pregpriv = &padapter->registrypriv; -+ struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); - struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; - u32 acparm, initialgain, i; - +- - //check already connecting to AP or not - if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) - { @@ -19608,9 +19336,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - issue_deauth(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING); - } -+ //ERP -+ VCS_update(padapter, psta); - +- - pmlmeinfo->state = WIFI_FW_NULL_STATE; - - //clear CAM @@ -19620,19 +19346,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - //set MSR to nolink - Set_NETYPE0_MSR(padapter, _HW_STATE_NOLINK_); - +- - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_DISCONNECT, 0); - } -+ //HT -+ if(pmlmepriv->htpriv.ht_option) -+ { -+ psta->htpriv.ht_option = _TRUE; - +- -#ifdef CONFIG_ANTENNA_DIVERSITY - rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, _FALSE); -#endif -+ psta->htpriv.ampdu_enable = pmlmepriv->htpriv.ampdu_enable; - +- - rtw_joinbss_reset(padapter); - - pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; @@ -19646,25 +19367,20 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pmlmeinfo->candidate_tid_bitmap = 0; - pmlmeinfo->bwmode_updated = _FALSE; - //pmlmeinfo->assoc_AP_vendor = maxAP; -+ if (support_short_GI(padapter, &(pmlmeinfo->HT_caps))) -+ psta->htpriv.sgi = _TRUE; - +- - _rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); - pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; - - if(pnetwork->IELength>MAX_IE_SZ)//Check pbuf->IELength - return H2C_PARAMETERS_ERROR; -+ psta->qos_option = _TRUE; - +- - _rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); - - //Check AP vendor to move rtw_joinbss_cmd() - //pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pnetwork->IEs, pnetwork->IELength); - - for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;) -+ } -+ else - { +- { - pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i); - - switch (pIE->ElementID) @@ -19715,8 +19431,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - default: - break; - } -+ psta->htpriv.ht_option = _FALSE; - +- - i += (pIE->Length + 2); - } -#if 0 @@ -19750,10 +19465,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#endif - //disable dynamic functions, such as high power, DIG - //Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); -+ psta->htpriv.ampdu_enable = _FALSE; -+ -+ psta->htpriv.sgi = _FALSE; - +- - //config the initial gain under linking, need to write the BB registers - #ifndef CONFIG_BEFORE_LINKED_DIG - initialgain = 0x1E; @@ -19763,37 +19475,21 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress); - join_type = 0; - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); -+ psta->qos_option = _FALSE; - +- - //cancel link timer - _cancel_timer_ex(&pmlmeext->link_timer); -+ } - +- - start_clnt_join(padapter); -+ psta->htpriv.bwmode = pmlmeext->cur_bwmode; -+ psta->htpriv.ch_offset = pmlmeext->cur_ch_offset; - +- - return H2C_SUCCESS; -+ psta->htpriv.agg_enable_bitmap = 0x0;//reset -+ psta->htpriv.candidate_tid_bitmap = 0x0;//reset - -+ -+ //QoS -+ if(pmlmepriv->qospriv.qos_option) -+ psta->qos_option = _TRUE; -+ -+ -+ psta->state = _FW_LINKED; -+ - } - +- +-} +- -u8 disconnect_hdl(_adapter *padapter, unsigned char *pbuf) -+void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res) - { +-{ - struct disconnect_parm *pparm = (struct disconnect_parm *)pbuf; -+ struct sta_info *psta, *psta_bmc; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); - u8 val8; - @@ -19801,17 +19497,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - issue_deauth(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING); - } -+ WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); -+ struct sta_priv *pstapriv = &padapter->stapriv; -+ u8 join_type; - +- - //set_opmode_cmd(padapter, infra_client_with_mlme); -+ if(join_res < 0) -+ { -+ join_type = 1; -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); -+ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr); - +- - pmlmeinfo->state = WIFI_FW_NULL_STATE; - - //switch to the 20M Hz mode after disconnect @@ -19820,38 +19508,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - //set MSR to no link state - Set_NETYPE0_MSR(padapter, _HW_STATE_NOLINK_); -+ //restore to initial setting. -+ update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode); -+#if 0 //temply remove -+#ifdef CONFIG_INTEL_WIDI -+#ifdef DBG_CONFIG_ERROR_DETECT -+ DBG_871X("%s(): do silentreset\n",__FUNCTION__); -+ rtw_hal_sreset_reset(padapter); -+#endif -+#endif -+#endif -+ goto exit_mlmeext_joinbss_event_callback; -+ } - +- - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_DISCONNECT, 0); - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, null_addr); - - if(((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)) -+ if((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) - { -- //Stop BCN -- val8 = 0; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BCN_FUNC, (u8 *)(&val8)); -+ //for bc/mc -+ psta_bmc = rtw_get_bcmc_stainfo(padapter); -+ if(psta_bmc) -+ { -+ pmlmeinfo->FW_sta_info[psta_bmc->mac_id].psta = psta_bmc; -+ update_bmc_sta_support_rate(padapter, psta_bmc->mac_id); -+ Update_RA_Entry(padapter, psta_bmc->mac_id); -+ } - } - +- { +- //Stop BCN +- val8 = 0; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BCN_FUNC, (u8 *)(&val8)); +- } +- - pmlmeinfo->state = WIFI_FW_NULL_STATE; - - set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); @@ -19870,22 +19537,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - u8 val8; - u32 initialgain; - u32 i; - +- -#ifdef CONFIG_P2P - struct wifidirect_info* pwdinfo = &padapter->wdinfo; -#endif -+ //turn on dynamic functions -+ Switch_DM_Func(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, _TRUE); - +- - if (pmlmeext->sitesurvey_res.state == SCAN_DISABLE) - { - //for first time sitesurvey_cmd - pmlmeext->sitesurvey_res.state = SCAN_START; - pmlmeext->sitesurvey_res.bss_cnt = 0; - pmlmeext->sitesurvey_res.channel_idx = 0; -+ // update IOT-releated issue -+ update_IOT_info(padapter); - +- - for(i=0;issid[i].SsidLength) { - _rtw_memcpy(pmlmeext->sitesurvey_res.ssid[i].Ssid, pparm->ssid[i].Ssid, IW_ESSID_MAX_SIZE); @@ -19894,42 +19557,26 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pmlmeext->sitesurvey_res.ssid[i].SsidLength= 0; - } - } -+ rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, cur_network->SupportedRates); - +- - pmlmeext->sitesurvey_res.scan_mode = pparm->scan_mode; -+ //BCN interval -+ rtw_hal_set_hwreg(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&pmlmeinfo->bcn_interval)); - +- - //issue null data if associating to the AP - if (is_client_associated_to_ap(padapter) == _TRUE) - { - pmlmeext->sitesurvey_res.state = SCAN_TXNULL; -+ //udpate capability -+ update_capinfo(padapter, pmlmeinfo->capability); - +- - issue_nulldata(padapter, 1); - issue_nulldata(padapter, 1); -+ //WMM, Update EDCA param -+ WMMOnAssocRsp(padapter); - +- - //delay 50ms to protect nulldata(1). - set_survey_timer(pmlmeext, 50); -+ //HT -+ HTOnAssocRsp(padapter); - +- - return H2C_SUCCESS; - } - } -+#ifndef CONFIG_CONCURRENT_MODE -+ // Call set_channel_bwmode when the CONFIG_CONCURRENT_MODE doesn't be defined. -+ //Set cur_channel&cur_bwmode&cur_ch_offset -+ set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -+#endif - +- - if ((pmlmeext->sitesurvey_res.state == SCAN_START) || (pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) -+ psta = rtw_get_stainfo(pstapriv, cur_network->MacAddress); -+ if (psta) //only for infra. mode - { +- { -#ifdef CONFIG_FIND_BEST_CHANNEL -#if 0 - for (i=0; pmlmeext->channel_set[i].ChannelNum !=0; i++) { @@ -19937,17 +19584,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } -#endif -#endif /* CONFIG_FIND_BEST_CHANNEL */ -+ pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta; - +- - //disable dynamic functions, such as high power, DIG - Save_DM_Func_Flag(padapter); - Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); -+ //DBG_871X("set_sta_rate\n"); -+ -+ //set per sta rate after updating HT cap. -+ set_sta_rate(padapter, psta); -+ } - +- - //config the initial gain under scaning, need to write the BB registers -#ifdef CONFIG_IOCTL_CFG80211 - if((wdev_to_priv(padapter->rtw_wdev))->p2p_enabled == _TRUE) @@ -19955,102 +19596,46 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - else -#endif - initialgain = 0x17; -+ join_type = 2; -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); - +- -#ifdef CONFIG_P2P - if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE)) - initialgain = 0x27; -#endif //CONFIG_P2P -+ if((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) -+ { -+ // correcting TSF -+ correct_TSF(padapter, pmlmeext); -+ -+ //set_link_timer(pmlmeext, DISCONNECT_TO); -+ } - +- - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); - - //set MSR to no link state - Set_NETYPE0_MSR(padapter, _HW_STATE_NOLINK_); -+#ifdef CONFIG_LPS -+ rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_CONNECT, 0); -+#endif - +- - val8 = 1; //before site survey - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); -+exit_mlmeext_joinbss_event_callback: - +- - // Commented by Albert 2011/08/05 - // The pre_tx_scan_timer_process will issue the scan H2C command. - // However, the driver should NOT enter the scanning mode at that time. - pmlmeext->sitesurvey_res.state = SCAN_PROCESS; - } -+#ifdef CONFIG_DUALMAC_CONCURRENT -+ dc_handle_join_done(padapter, join_res); -+#endif -+#ifdef CONFIG_CONCURRENT_MODE -+ concurrent_chk_joinbss_done(padapter, join_res); -+#endif - +- - site_survey(padapter); -+ DBG_871X("=>%s\n", __FUNCTION__); - +- - return H2C_SUCCESS; - - } - +-} +- -u8 setauth_hdl(_adapter *padapter, unsigned char *pbuf) -+void mlmeext_sta_add_event_callback(_adapter *padapter, struct sta_info *psta) - { +-{ - struct setauth_parm *pparm = (struct setauth_parm *)pbuf; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - - if (pparm->mode < 4) -+ u8 join_type; -+ -+ DBG_871X("%s\n", __FUNCTION__); -+ -+ if((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) - { +- { - pmlmeinfo->auth_algo = pparm->mode; -+ if(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)//adhoc master or sta_count>1 -+ { -+ //nothing to do -+ } -+ else//adhoc client -+ { -+ //update TSF Value -+ //update_TSF(pmlmeext, pframe, len); -+ -+ // correcting TSF -+ correct_TSF(padapter, pmlmeext); -+ -+ //start beacon -+ if(send_beacon(padapter)==_FAIL) -+ { -+ pmlmeinfo->FW_sta_info[psta->mac_id].status = 0; -+ -+ pmlmeinfo->state ^= WIFI_FW_ADHOC_STATE; -+ -+ return; -+ } -+ -+ pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS; -+ -+ } -+ -+ join_type = 2; -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); - } - +- } +- - return H2C_SUCCESS; -} -+ pmlmeinfo->FW_sta_info[psta->mac_id].psta = psta; - +- -u8 setkey_hdl(_adapter *padapter, u8 *pbuf) -{ - unsigned short ctrl; @@ -20058,29 +19643,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - unsigned char null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -+ //rate radaptive -+ Update_RA_Entry(padapter, psta->mac_id); - +- - //main tx key for wep. - if(pparm->set_tx) - pmlmeinfo->key_index = pparm->keyid; - - //write cam - ctrl = BIT(15) | ((pparm->algorithm) << 2) | pparm->keyid; -+ //update adhoc sta_info -+ update_sta_info(padapter, psta); - +- - write_cam(padapter, pparm->keyid, ctrl, null_sta, pparm->key); - - return H2C_SUCCESS; - } - +-} +- -u8 set_stakey_hdl(_adapter *padapter, u8 *pbuf) -+void mlmeext_sta_del_event_callback(_adapter *padapter) - { +-{ - unsigned short ctrl=0; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - struct set_stakey_parm *pparm = (struct set_stakey_parm *)pbuf; -#ifdef CONFIG_TDLS - struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; @@ -20098,7 +19678,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - if(psta) - { - ctrl = (BIT(15) | ((pparm->algorithm) << 2)); - +- - DBG_8192C("r871x_set_stakey_hdl(): enc_algorithm=%d\n", pparm->algorithm); - - if((psta->mac_id<1) || (psta->mac_id>(NUM_STA-4))) @@ -20108,136 +19688,61 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - - cam_id = (psta->mac_id + 3);//0~3 for default key, cmd_id=macid + 3, macid=aid+1; -+ if (is_client_associated_to_ap(padapter) || is_IBSS_empty(padapter)) -+ { -+ //set_opmode_cmd(padapter, infra_client_with_mlme); - +- - DBG_8192C("Write CAM, mac_addr=%x:%x:%x:%x:%x:%x, cam_entry=%d\n", pparm->addr[0], - pparm->addr[1], pparm->addr[2], pparm->addr[3], pparm->addr[4], - pparm->addr[5], cam_id); -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, 0); -+ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr); - +- - write_cam(padapter, cam_id, ctrl, pparm->addr, pparm->key); - - return H2C_SUCCESS_RSP; - - } - else -+ //restore to initial setting. -+ update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode); -+ -+#ifdef CONFIG_DUALMAC_CONCURRENT -+ dc_set_channel_bwmode_disconnect(padapter); -+#else -+#ifdef CONFIG_CONCURRENT_MODE -+ if((check_buddy_fwstate(padapter, _FW_LINKED)) != _TRUE) - { +- { - DBG_8192C("r871x_set_stakey_hdl(): sta has been free\n"); - return H2C_REJECTED; - } - - } -+#endif //CONFIG_CONCURRENT_MODE - +- - //below for sta mode - - ctrl = BIT(15) | ((pparm->algorithm) << 2); -+ //switch to the 20M Hz mode after disconnect -+ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; -+ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; -+ -+ //SelectChannel(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset); -+ set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); - +- -#ifdef CONFIG_TDLS - if(ptdlsinfo->cam_entry_to_clear!=0){ - clear_cam_entry(padapter, ptdlsinfo->cam_entry_to_clear); - ptdlsinfo->cam_entry_to_clear=0; -+#ifdef CONFIG_CONCURRENT_MODE -+ } -+#endif //CONFIG_CONCURRENT_MODE -+#endif //CONFIG_DUALMAC_CONCURRENT - +- - return H2C_SUCCESS; - } -+ flush_all_cam_entry(padapter); -+ -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ -+ //set MSR to no link state -> infra. mode -+ Set_MSR(padapter, _HW_STATE_STATION_); -+ -+ _cancel_timer_ex(&pmlmeext->link_timer); - +- - psta = rtw_get_stainfo(pstapriv, pparm->addr);//Get TDLS Peer STA - if( psta->tdls_sta_state&TDLS_LINKED_STATE ){ - write_cam(padapter, psta->cam_entry, ctrl, pparm->addr, pparm->key); - } +- } - else -#endif - write_cam(padapter, 5, ctrl, pparm->addr, pparm->key); - +- - pmlmeinfo->enc_algo = pparm->algorithm; - - return H2C_SUCCESS; - } - +-} +- -u8 add_ba_hdl(_adapter *padapter, unsigned char *pbuf) -{ - struct addBaReq_parm *pparm = (struct addBaReq_parm *)pbuf; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+/**************************************************************************** - +- - struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, pparm->addr); -+Following are the functions for the timer handlers -+ -+*****************************************************************************/ -+void _linked_rx_signal_strehgth_display(_adapter *padapter); -+void _linked_rx_signal_strehgth_display(_adapter *padapter) -+{ -+ int UndecoratedSmoothedPWDB; - +- - if(!psta) - return H2C_SUCCESS; - -+#ifdef CONFIG_CONCURRENT_MODE -+ PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; -+ DBG_871X("============ pbuddy_adapter linked status check ===================\n"); -+ DBG_871X("buddy_adapter_type=%d\n", pbuddy_adapter->adapter_type); -+ DBG_871X("pbuddy_adapter pathA Rx SNRdb:%d\n",pbuddy_adapter->recvpriv.RxSNRdB[0]); -+ DBG_871X("pbuddy_adapter pathA Rx PWDB:%d\n",pbuddy_adapter->recvpriv.rxpwdb); -+ DBG_871X("pbuddy_adapter pathA Rx RSSI:%d,pathB Rx RSSI:%d\n" -+ ,pbuddy_adapter->recvpriv.RxRssi[0],pbuddy_adapter->recvpriv.RxRssi[1]); -+ rtw_hal_get_def_var(pbuddy_adapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB); -+ DBG_871X("pbuddy_adapter UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB); -+ DBG_871X("Rx RSSI:%d\n",pbuddy_adapter->recvpriv.rssi); -+ DBG_871X("Rx Signal_strength:%d\n",pbuddy_adapter->recvpriv.signal_strength); -+ DBG_871X("Rx Signal_qual:%d \n",pbuddy_adapter->recvpriv.signal_qual); -+ DBG_871X("============ linked status check ===================\n"); -+ DBG_871X("adapter_type=%d\n", padapter->adapter_type); -+#else //CONFIG_CONCURRENT_MODE -+ DBG_871X("============ linked status check ===================\n"); -+#endif //CONFIG_CONCURRENT_MODE -+ DBG_871X("pathA Rx SNRdb:%d, pathB Rx SNRdb:%d\n",padapter->recvpriv.RxSNRdB[0], padapter->recvpriv.RxSNRdB[1]); -+ DBG_871X("pathA Rx PWDB:%d\n",padapter->recvpriv.rxpwdb); -+ DBG_871X("pathA Rx RSSI:%d,pathB Rx RSSI:%d\n",padapter->recvpriv.RxRssi[0],padapter->recvpriv.RxRssi[1]); -+ rtw_hal_get_def_var(padapter, HAL_DEF_UNDERCORATEDSMOOTHEDPWDB, &UndecoratedSmoothedPWDB); -+ DBG_871X("UndecoratedSmoothedPWDB:%d\n",UndecoratedSmoothedPWDB); -+ DBG_871X("Rx RSSI:%d\n",padapter->recvpriv.rssi); -+ DBG_871X("Rx Signal_strength:%d\n",padapter->recvpriv.signal_strength); -+ DBG_871X("Rx Signal_qual:%d \n",padapter->recvpriv.signal_qual); -+ if ( check_fwstate( &padapter->mlmepriv, _FW_LINKED )) -+ { -+ DBG_871X("bw mode: %d, channel: %d\n", padapter->mlmeextpriv.cur_bwmode, padapter->mlmeextpriv.cur_channel ); -+ DBG_871X("received bytes = %d\n", (u32) (padapter->recvpriv.rx_bytes - padapter->recvpriv.last_rx_bytes ) ); -+ } -+ DBG_871X("============ linked status check ===================\n"); -+ DBG_871X(" DIG PATH-A(0x%02x), PATH-B(0x%02x)\n",rtw_read8(padapter,0xc50),rtw_read8(padapter,0xc58)); -+ DBG_871X(" OFDM -Alarm DA2(0x%04x),DA4(0x%04x),DA6(0x%04x),DA8(0x%04x)\n", -+ rtw_read16(padapter,0xDA2),rtw_read16(padapter,0xDA4),rtw_read16(padapter,0xDA6),rtw_read16(padapter,0xDA8)); - +- - if (((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) && (pmlmeinfo->HT_enable)) || - ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)) - { @@ -20252,68 +19757,35 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - psta->htpriv.candidate_tid_bitmap &= ~BIT(pparm->tid); - } -+ DBG_871X(" CCK -Alarm A5B(0x%02x),A5C(0x%02x)\n",rtw_read8(padapter,0xA5B),rtw_read8(padapter,0xA5C)); -+ DBG_871X(" FalseAlmCnt_all(%d)\n",padapter->recvpriv.FalseAlmCnt_all); - +- - return H2C_SUCCESS; - } - +-} +- -u8 set_tx_beacon_cmd(_adapter* padapter) -+u8 chk_ap_is_alive(_adapter *padapter, struct sta_info *psta) - { +-{ - struct cmd_obj *ph2c; - struct Tx_Beacon_param *ptxBeacon_parm; - struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); -+ u8 ret = _FALSE; - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); +- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - u8 res = _SUCCESS; - int len_diff = 0; - -_func_enter_; - - if ((ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -+ -+ #ifdef DBG_EXPIRATION_CHK -+ DBG_871X(FUNC_ADPT_FMT" rx:"STA_PKTS_FMT", beacon:%llu, probersp_to_self:%llu" -+ /*", probersp_bm:%llu, probersp_uo:%llu, probereq:%llu, BI:%u"*/ -+ ", retry:%u\n" -+ , FUNC_ADPT_ARG(padapter) -+ , STA_RX_PKTS_DIFF_ARG(psta) -+ , psta->sta_stats.rx_beacon_pkts - psta->sta_stats.last_rx_beacon_pkts -+ , psta->sta_stats.rx_probersp_pkts - psta->sta_stats.last_rx_probersp_pkts -+ /*, psta->sta_stats.rx_probersp_bm_pkts - psta->sta_stats.last_rx_probersp_bm_pkts -+ , psta->sta_stats.rx_probersp_uo_pkts - psta->sta_stats.last_rx_probersp_uo_pkts -+ , psta->sta_stats.rx_probereq_pkts - psta->sta_stats.last_rx_probereq_pkts -+ , pmlmeinfo->bcn_interval*/ -+ , pmlmeext->retry -+ ); -+ -+ DBG_871X(FUNC_ADPT_FMT" tx_pkts:%llu, link_count:%u\n", FUNC_ADPT_ARG(padapter) -+ , padapter->xmitpriv.tx_pkts -+ , pmlmeinfo->link_count -+ ); -+ #endif -+ -+ if((sta_rx_data_pkts(psta) == sta_last_rx_data_pkts(psta)) -+ && sta_rx_beacon_pkts(psta) == sta_last_rx_beacon_pkts(psta) -+ && sta_rx_probersp_pkts(psta) == sta_last_rx_probersp_pkts(psta) -+ ) - { +- { - res= _FAIL; - goto exit; -+ ret = _FALSE; - } +- } - - if ((ptxBeacon_parm = (struct Tx_Beacon_param *)rtw_zmalloc(sizeof(struct Tx_Beacon_param))) == NULL) -+ else - { +- { - rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); - res= _FAIL; - goto exit; -+ ret = _TRUE; - } - +- } +- - _rtw_memcpy(&(ptxBeacon_parm->network), &(pmlmeinfo->network), sizeof(WLAN_BSSID_EX)); - - len_diff = update_hidden_ssid( @@ -20331,28 +19803,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -exit: - -_func_exit_; -+ sta_update_last_rx_pkts(psta); - +- - return res; -+ return ret; - } - +-} +- - -u8 mlme_evt_hdl(_adapter *padapter, unsigned char *pbuf) -+void linked_status_chk(_adapter *padapter) - { +-{ - u8 evt_code, evt_seq; - u16 evt_sz; - uint *peventbuf; - void (*event_callback)(_adapter *dev, u8 *pbuf); - struct evt_priv *pevt_priv = &(padapter->evtpriv); -+ u32 i; -+ struct sta_info *psta; -+ struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ struct sta_priv *pstapriv = &padapter->stapriv; - +- - peventbuf = (uint*)pbuf; - evt_sz = (u16)(*peventbuf&0xffff); - evt_seq = (u8)((*peventbuf>>24)&0x7f); @@ -20366,24 +19829,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - RT_TRACE(_module_rtl871x_cmd_c_,_drv_info_,("Evetn Seq Error! %d vs %d\n", (evt_seq & 0x7f), (ATOMIC_READ(&pevt_priv->event_seq) & 0x7f))); - - pevt_priv->event_seq = (evt_seq+1)&0x7f; -+ if(padapter->bRxRSSIDisplay) -+ _linked_rx_signal_strehgth_display(padapter); - +- - goto _abort_event_; - } -+ #ifdef DBG_CONFIG_ERROR_DETECT -+ rtw_hal_sreset_linked_status_check(padapter); - #endif - +- #endif +- - // checking if event code is valid - if (evt_code >= MAX_C2HEVT) -+ if (is_client_associated_to_ap(padapter)) - { +- { - RT_TRACE(_module_rtl871x_cmd_c_,_drv_err_,("\nEvent Code(%d) mismatch!\n", evt_code)); - goto _abort_event_; - } -+ //linked infrastructure client mode - +- - // checking if event size match the event parm size - if ((wlanevents[evt_code].parmsize != 0) && - (wlanevents[evt_code].parmsize != evt_sz)) @@ -20394,17 +19851,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto _abort_event_; - - } -+ int tx_chk = _SUCCESS, rx_chk = _SUCCESS; -+ int rx_chk_limit; - +- - ATOMIC_INC(&pevt_priv->event_seq); -+ #if defined(DBG_ROAMING_TEST) -+ rx_chk_limit = 1; -+ #elif defined(CONFIG_ACTIVE_KEEP_ALIVE_CHECK) -+ rx_chk_limit = 4; -+ #else -+ rx_chk_limit = 8; -+ #endif ++ if ((ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) ++ { ++ goto exit_survey_timer_hdl; ++ } - peventbuf += 2; - @@ -20412,93 +19864,75 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - event_callback = wlanevents[evt_code].event_callback; - event_callback(padapter, (u8*)peventbuf); -+ // Marked by Kurt 20130715 -+ // For WiDi 3.5 and later on, they don't ask WiDi sink to do roaming, so we could not check rx limit that strictly. -+ // todo: To check why rx_chk would be _FALSE under miracast session. -+ //#ifdef CONFIG_INTEL_WIDI -+ //if (padapter->mlmepriv.widi_state != INTEL_WIDI_STATE_NONE) -+ // rx_chk_limit = 1; -+ //#endif -+ -+ if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) ++ if ((psurveyPara = (struct sitesurvey_parm*)rtw_zmalloc(sizeof(struct sitesurvey_parm))) == NULL) + { -+ bool is_p2p_enable = _FALSE; -+ #ifdef CONFIG_P2P -+ is_p2p_enable = !rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE); -+ #endif -+ -+ if (chk_ap_is_alive(padapter, psta) == _FALSE) -+ rx_chk = _FAIL; ++ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); ++ goto exit_survey_timer_hdl; ++ } - pevt_priv->evt_done_cnt++; -- } -+ if (pxmitpriv->last_tx_pkts == pxmitpriv->tx_pkts) -+ tx_chk = _FAIL; ++ init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey)); ++ rtw_enqueue_cmd(pcmdpriv, ph2c); + } -+ #ifdef CONFIG_ACTIVE_KEEP_ALIVE_CHECK -+ if (pmlmeext->active_keep_alive_check && (rx_chk == _FAIL || tx_chk == _FAIL)) { -+ u8 backup_oper_channel=0; -_abort_event_: -+ /* switch to correct channel of current network before issue keep-alive frames */ -+ if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) { -+ backup_oper_channel = rtw_get_oper_ch(padapter); -+ SelectChannel(padapter, pmlmeext->cur_channel); -+ } - -+ if (rx_chk != _SUCCESS) -+ issue_probereq_ex(padapter, &pmlmeinfo->network.Ssid, psta->hwaddr, 3, 1); +- ++exit_survey_timer_hdl: ++#ifdef PLATFORM_FREEBSD ++ rtw_mtx_unlock(NULL); ++#endif - return H2C_SUCCESS; - --} -+ if ((tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) || rx_chk != _SUCCESS) { -+ tx_chk = issue_nulldata(padapter, psta->hwaddr, 0, 3, 1); -+ /* if tx acked and p2p disabled, set rx_chk _SUCCESS to reset retry count */ -+ if (tx_chk == _SUCCESS && !is_p2p_enable) -+ rx_chk = _SUCCESS; -+ } ++ return; + } -u8 h2c_msg_hdl(_adapter *padapter, unsigned char *pbuf) --{ ++void link_timer_hdl(_adapter *padapter) + { - if(!pbuf) - return H2C_PARAMETERS_ERROR; -+ /* back to the original operation channel */ -+ if(backup_oper_channel>0) -+ SelectChannel(padapter, backup_oper_channel); - +- - return H2C_SUCCESS; -} -+ } -+ else -+ #endif /* CONFIG_ACTIVE_KEEP_ALIVE_CHECK */ -+ { -+ if (rx_chk != _SUCCESS) { -+ if (pmlmeext->retry == 0) { -+ #ifdef DBG_EXPIRATION_CHK -+ DBG_871X("issue_probereq to trigger probersp, retry=%d\n", pmlmeext->retry); -+ #endif -+ issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress); -+ issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress); -+ issue_probereq(padapter, &pmlmeinfo->network.Ssid, pmlmeinfo->network.MacAddress); -+ } -+ } ++ //static unsigned int rx_pkt = 0; ++ //static u64 tx_cnt = 0; ++ //struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ //struct sta_priv *pstapriv = &padapter->stapriv; ++ ++#ifdef PLATFORM_FREEBSD ++ rtw_mtx_lock(NULL); ++ if (callout_pending(&padapter->mlmeextpriv.survey_timer.callout)) { ++ /* callout was reset */ ++ //mtx_unlock(&sc->sc_mtx); ++ rtw_mtx_unlock(NULL); ++ return; ++ } ++ if (!callout_active(&padapter->mlmeextpriv.survey_timer.callout)) { ++ /* callout was stopped */ ++ //mtx_unlock(&sc->sc_mtx); ++ rtw_mtx_unlock(NULL); ++ return; ++ } ++ callout_deactivate(&padapter->mlmeextpriv.survey_timer.callout); -+ if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == 0xf) { -+ #ifdef DBG_EXPIRATION_CHK -+ DBG_871X("%s issue_nulldata 0\n", __FUNCTION__); -+ #endif -+ tx_chk = issue_nulldata(padapter, NULL, 0, 1, 0); -+ } -+ } ++ ++#endif -u8 tx_beacon_hdl(_adapter *padapter, unsigned char *pbuf) -{ - if(send_beacon(padapter)==_FAIL) -- { ++ if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) + { - DBG_871X("issue_beacon, fail!\n"); - return H2C_PARAMETERS_ERROR; -- } ++ DBG_871X("link_timer_hdl:no beacon while connecting\n"); ++ pmlmeinfo->state = WIFI_FW_NULL_STATE; ++ report_join_res(padapter, -3); + } -#ifdef CONFIG_AP_MODE - else //tx bc/mc frames after update TIM - { @@ -20507,7 +19941,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _list *xmitframe_plist, *xmitframe_phead; - struct xmit_frame *pxmitframe=NULL; - struct sta_priv *pstapriv = &padapter->stapriv; -- ++ else if (pmlmeinfo->state & WIFI_FW_AUTH_STATE) ++ { ++ //re-auth timer ++ if (++pmlmeinfo->reauth_count > REAUTH_LIMIT) ++ { ++ //if (pmlmeinfo->auth_algo != dot11AuthAlgrthm_Auto) ++ //{ ++ pmlmeinfo->state = 0; ++ report_join_res(padapter, -1); ++ return; ++ //} ++ //else ++ //{ ++ // pmlmeinfo->auth_algo = dot11AuthAlgrthm_Shared; ++ // pmlmeinfo->reauth_count = 0; ++ //} ++ } + - //for BC/MC Frames - psta_bmc = rtw_get_bcmc_stainfo(padapter); - if(!psta_bmc) @@ -20519,31 +19970,67 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtw_msleep_os(10);// 10ms, ATIM(HIQ) Windows -#endif - _enter_critical_bh(&psta_bmc->sleep_q.lock, &irqL); -+ if (rx_chk == _FAIL) { -+ pmlmeext->retry++; -+ if (pmlmeext->retry > rx_chk_limit) { -+ DBG_871X(FUNC_ADPT_FMT" disconnect or roaming\n", -+ FUNC_ADPT_ARG(padapter)); -+ receive_disconnect(padapter, pmlmeinfo->network.MacAddress -+ , WLAN_REASON_EXPIRATION_CHK); -+ return; -+ } -+ } else { -+ pmlmeext->retry = 0; -+ } ++ DBG_871X("link_timer_hdl: auth timeout and try again\n"); ++ pmlmeinfo->auth_seq = 1; ++ issue_auth(padapter, NULL, 0); ++ set_link_timer(pmlmeext, REAUTH_TO); ++ } ++ else if (pmlmeinfo->state & WIFI_FW_ASSOC_STATE) ++ { ++ //re-assoc timer ++ if (++pmlmeinfo->reassoc_count > REASSOC_LIMIT) ++ { ++ pmlmeinfo->state = WIFI_FW_NULL_STATE; ++ report_join_res(padapter, -2); ++ return; ++ } - xmitframe_phead = get_list_head(&psta_bmc->sleep_q); - xmitframe_plist = get_next(xmitframe_phead); -+ if (tx_chk == _FAIL) { -+ pmlmeinfo->link_count &= 0xf; -+ } else { -+ pxmitpriv->last_tx_pkts = pxmitpriv->tx_pkts; -+ pmlmeinfo->link_count = 0; ++ DBG_871X("link_timer_hdl: assoc timeout and try again\n"); ++ issue_assocreq(padapter); ++ set_link_timer(pmlmeext, REASSOC_TO); ++ } ++#if 0 ++ else if (is_client_associated_to_ap(padapter)) ++ { ++ //linked infrastructure client mode ++ if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) ++ { ++ /*to monitor whether the AP is alive or not*/ ++ if (rx_pkt == psta->sta_stats.rx_pkts) ++ { ++ receive_disconnect(padapter, pmlmeinfo->network.MacAddress); ++ return; ++ } ++ else ++ { ++ rx_pkt = psta->sta_stats.rx_pkts; ++ set_link_timer(pmlmeext, DISCONNECT_TO); + } - while ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == _FALSE) - { - pxmitframe = LIST_CONTAINOR(xmitframe_plist, struct xmit_frame, list); ++ //update the EDCA paramter according to the Tx/RX mode ++ update_EDCA_param(padapter); + +- xmitframe_plist = get_next(xmitframe_plist); ++ /*to send the AP a nulldata if no frame is xmitted in order to keep alive*/ ++ if (pmlmeinfo->link_count++ == 0) ++ { ++ tx_cnt = pxmitpriv->tx_pkts; ++ } ++ else if ((pmlmeinfo->link_count & 0xf) == 0) ++ { ++ if (tx_cnt == pxmitpriv->tx_pkts) ++ { ++ issue_nulldata(padapter, NULL, 0, 0, 0); ++ } + +- rtw_list_delete(&pxmitframe->list); ++ tx_cnt = pxmitpriv->tx_pkts; ++ } + } //end of if ((psta = rtw_get_stainfo(pstapriv, passoc_res->network.MacAddress)) != NULL) + } + else if (is_client_associated_to_ibss(padapter)) @@ -20556,28 +20043,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + psta = pmlmeinfo->FW_sta_info[i].psta; -- xmitframe_plist = get_next(xmitframe_plist); -+ if(NULL==psta) continue; - -- rtw_list_delete(&pxmitframe->list); -+ if (pmlmeinfo->FW_sta_info[i].rx_pkt == sta_rx_pkts(psta)) -+ { - - psta_bmc->sleepq_len--; - if(psta_bmc->sleepq_len>0) - pxmitframe->attrib.mdata = 1; -+ if(pmlmeinfo->FW_sta_info[i].retry<3) -+ { -+ pmlmeinfo->FW_sta_info[i].retry++; -+ } -+ else -+ { -+ pmlmeinfo->FW_sta_info[i].retry = 0; -+ pmlmeinfo->FW_sta_info[i].status = 0; -+ report_del_sta_event(padapter, psta->hwaddr -+ , 65535// indicate disconnect caused by no rx -+ ); -+ } ++ if (pmlmeinfo->FW_sta_info[i].rx_pkt == psta->sta_stats.rx_pkts) ++ { ++ pmlmeinfo->FW_sta_info[i].status = 0; ++ report_del_sta_event(padapter, psta->hwaddr); + } else - pxmitframe->attrib.mdata = 0; @@ -20590,8 +20062,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - rtw_os_xmit_complete(padapter, pxmitframe); + { -+ pmlmeinfo->FW_sta_info[i].retry = 0; -+ pmlmeinfo->FW_sta_info[i].rx_pkt = (u32)sta_rx_pkts(psta); ++ pmlmeinfo->FW_sta_info[i].rx_pkt = psta->sta_stats.rx_pkts; } - - //pstapriv->tim_bitmap &= ~BIT(0); @@ -20603,115 +20074,89 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } } -+ //set_link_timer(pmlmeext, DISCONNECT_TO); -+ ++ set_link_timer(pmlmeext, DISCONNECT_TO); } --#endif + #endif - return H2C_SUCCESS; - - } +-} ++#ifdef PLATFORM_FREEBSD ++ rtw_mtx_unlock(NULL); ++#endif -#ifdef CONFIG_AP_MODE -- ++ return; ++} + -void init_mlme_ap_info(_adapter *padapter) -+void survey_timer_hdl(_adapter *padapter) ++void addba_timer_hdl(struct sta_info *psta) { - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); -+ struct cmd_obj *ph2c; -+ struct sitesurvey_parm *psurveyPara; -+ struct cmd_priv *pcmdpriv=&padapter->cmdpriv; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+#ifdef CONFIG_P2P -+ struct wifidirect_info *pwdinfo= &(padapter->wdinfo); -+#endif - +- - _rtw_spinlock_init(&pmlmepriv->bcn_update_lock); -+ //DBG_871X("marc: survey timer\n"); -+#ifdef PLATFORM_FREEBSD -+ rtw_mtx_lock(NULL); -+ if (callout_pending(&padapter->mlmeextpriv.survey_timer.callout)) { -+ /* callout was reset */ -+ //mtx_unlock(&sc->sc_mtx); -+ rtw_mtx_unlock(NULL); -+ return; -+ } -+ if (!callout_active(&padapter->mlmeextpriv.survey_timer.callout)) { -+ /* callout was stopped */ -+ //mtx_unlock(&sc->sc_mtx); -+ rtw_mtx_unlock(NULL); -+ return; -+ } -+ callout_deactivate(&padapter->mlmeextpriv.survey_timer.callout); ++ struct ht_priv *phtpriv; - //pmlmeext->bstart_bss = _FALSE; ++ if(!psta) ++ return; ++ ++ phtpriv = &psta->htpriv; - start_ap_mode(padapter); --} -+#endif ++ if((phtpriv->ht_option==_TRUE) && (phtpriv->ampdu_enable==_TRUE)) ++ { ++ if(phtpriv->candidate_tid_bitmap) ++ phtpriv->candidate_tid_bitmap=0x0; ++ ++ } + } -void free_mlme_ap_info(_adapter *padapter) --{ -- _irqL irqL; ++#ifdef CONFIG_IEEE80211W ++void sa_query_timer_hdl(_adapter *padapter) + { ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ struct mlme_priv * pmlmepriv = &padapter->mlmepriv; + _irqL irqL; - struct sta_info *psta=NULL; - struct sta_priv *pstapriv = &padapter->stapriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ //issue rtw_sitesurvey_cmd -+ if (pmlmeext->sitesurvey_res.state > SCAN_START) -+ { -+ if(pmlmeext->sitesurvey_res.state == SCAN_PROCESS) -+ { -+#ifdef CONFIG_STA_MODE_SCAN_UNDER_AP_MODE -+ if( padapter->mlmeextpriv.mlmext_info.scan_cnt != RTW_SCAN_NUM_OF_CH ) -+#endif //CONFIG_STA_MODE_SCAN_UNDER_AP_MODE -+ pmlmeext->sitesurvey_res.channel_idx++; -+ } ++ //disconnect ++ _enter_critical_bh(&pmlmepriv->lock, &irqL); - //stop_ap_mode(padapter); -+ if(pmlmeext->scan_abort == _TRUE) -+ { -+ #ifdef CONFIG_P2P -+ if(!rtw_p2p_chk_state(&padapter->wdinfo, P2P_STATE_NONE)) -+ { -+ rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_MAX); -+ pmlmeext->sitesurvey_res.channel_idx = 3; -+ DBG_871X("%s idx:%d, cnt:%u\n", __FUNCTION__ -+ , pmlmeext->sitesurvey_res.channel_idx -+ , pwdinfo->find_phase_state_exchange_cnt -+ ); -+ } -+ else -+ #endif -+ { -+ pmlmeext->sitesurvey_res.channel_idx = pmlmeext->sitesurvey_res.ch_num; -+ DBG_871X("%s idx:%d\n", __FUNCTION__ -+ , pmlmeext->sitesurvey_res.channel_idx -+ ); -+ } ++ if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) ++ { ++ rtw_disassoc_cmd(padapter, 0, _TRUE); ++ rtw_indicate_disconnect(padapter); ++ rtw_free_assoc_resources(padapter, 1); ++ } - pmlmepriv->update_bcn = _FALSE; - pmlmeext->bstart_bss = _FALSE; - - rtw_sta_flush(padapter); -+ pmlmeext->scan_abort = _FALSE;//reset -+ } ++ _exit_critical_bh(&pmlmepriv->lock, &irqL); ++ DBG_871X("SA query timeout disconnect\n"); ++} ++#endif //CONFIG_IEEE80211W - pmlmeinfo->state = _HW_STATE_NOLINK_; -+ if ((ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj))) == NULL) -+ { -+ goto exit_survey_timer_hdl; -+ } ++u8 NULL_hdl(_adapter *padapter, u8 *pbuf) ++{ ++ return H2C_SUCCESS; ++} - //free_assoc_sta_resources - rtw_free_all_stainfo(padapter); -+ if ((psurveyPara = (struct sitesurvey_parm*)rtw_zmalloc(sizeof(struct sitesurvey_parm))) == NULL) -+ { -+ rtw_mfree((unsigned char *)ph2c, sizeof(struct cmd_obj)); -+ goto exit_survey_timer_hdl; -+ } ++#ifdef CONFIG_AUTO_AP_MODE ++void rtw_start_auto_ap(_adapter *adapter) ++{ ++ DBG_871X("%s\n", __FUNCTION__); - //free bc/mc sta_info - psta = rtw_get_bcmc_stainfo(padapter); @@ -20719,23 +20164,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtw_free_stainfo(padapter, psta); - _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); - -+ init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey)); -+ rtw_enqueue_cmd(pcmdpriv, ph2c); -+ } ++ rtw_set_802_11_infrastructure_mode(adapter, Ndis802_11APMode); - _rtw_spinlock_free(&pmlmepriv->bcn_update_lock); - -+ -+exit_survey_timer_hdl: -+#ifdef PLATFORM_FREEBSD -+ rtw_mtx_unlock(NULL); -+#endif -+ -+ return; ++ rtw_setopmode_cmd(adapter, Ndis802_11APMode); } -static void update_BCNTIM(_adapter *padapter) -+void link_timer_hdl(_adapter *padapter) ++static int rtw_auto_ap_start_beacon(_adapter *adapter) { - struct sta_priv *pstapriv = &padapter->stapriv; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -20755,116 +20192,70 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - u8 *p, ie_len; - u16 tim_bitmap_le; - u32 tmp_len, head_len=0; -+ //static unsigned int rx_pkt = 0; -+ //static u64 tx_cnt = 0; -+ //struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ //struct sta_priv *pstapriv = &padapter->stapriv; -+ -+#ifdef PLATFORM_FREEBSD -+ rtw_mtx_lock(NULL); -+ if (callout_pending(&padapter->mlmeextpriv.survey_timer.callout)) { -+ /* callout was reset */ -+ //mtx_unlock(&sc->sc_mtx); -+ rtw_mtx_unlock(NULL); -+ return; -+ } -+ if (!callout_active(&padapter->mlmeextpriv.survey_timer.callout)) { -+ /* callout was stopped */ -+ //mtx_unlock(&sc->sc_mtx); -+ rtw_mtx_unlock(NULL); -+ return; -+ } -+ callout_deactivate(&padapter->mlmeextpriv.survey_timer.callout); ++ int ret=0; ++ u8 *pbuf = NULL; ++ uint len; ++ u8 supportRate[16]; ++ int sz = 0, rateLen; ++ u8 * ie; ++ u8 wireless_mode, oper_channel; ++ u8 ssid[3] = {0}; //hidden ssid ++ u32 ssid_len = sizeof(ssid); ++ struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); - tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap); - +- - //calucate head_len - head_len = _FIXED_IE_LENGTH_; - head_len += pnetwork->Ssid.SsidLength + 2; -+#endif - // get supported rates len - p = rtw_get_ie(src_ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &tmp_len, (pnetwork->IELength - _BEACON_IE_OFFSET_)); - if (p != NULL) - { - head_len += tmp_len+2; -+ if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) -+ { -+ DBG_871X("link_timer_hdl:no beacon while connecting\n"); -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ report_join_res(padapter, -3); -+ } -+ else if (pmlmeinfo->state & WIFI_FW_AUTH_STATE) -+ { -+ //re-auth timer -+ if (++pmlmeinfo->reauth_count > REAUTH_LIMIT) -+ { -+ //if (pmlmeinfo->auth_algo != dot11AuthAlgrthm_Auto) -+ //{ -+ pmlmeinfo->state = 0; -+ report_join_res(padapter, -1); -+ return; -+ //} -+ //else -+ //{ -+ // pmlmeinfo->auth_algo = dot11AuthAlgrthm_Shared; -+ // pmlmeinfo->reauth_count = 0; -+ //} - } -- +- } ++ if(check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) ++ return -EINVAL; + - //DS Parameter Set IE, len=3 - head_len += 3; -- + - //copy head offset - _rtw_memcpy(dst_ie, src_ie, head_len); - -+ DBG_871X("link_timer_hdl: auth timeout and try again\n"); -+ pmlmeinfo->auth_seq = 1; -+ issue_auth(padapter, NULL, 0); -+ set_link_timer(pmlmeext, REAUTH_TO); -+ } -+ else if (pmlmeinfo->state & WIFI_FW_ASSOC_STATE) -+ { -+ //re-assoc timer -+ if (++pmlmeinfo->reassoc_count > REASSOC_LIMIT) -+ { -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ report_join_res(padapter, -2); -+ return; -+ } +- ++ len = 128; ++ pbuf = rtw_zmalloc(len); ++ if(!pbuf) ++ return -ENOMEM; - //append TIM IE from head_len offset - dst_ie+=head_len; -- + - *dst_ie++=_TIM_IE_; -- ++ //generate beacon ++ ie = pbuf; + - if((pstapriv->tim_bitmap&0xff00) && (pstapriv->tim_bitmap&0x00fc)) - ie_len = 5; - else - ie_len = 4; -+ DBG_871X("link_timer_hdl: assoc timeout and try again\n"); -+ issue_assocreq(padapter); -+ set_link_timer(pmlmeext, REASSOC_TO); -+ } -+#if 0 -+ else if (is_client_associated_to_ap(padapter)) -+ { -+ //linked infrastructure client mode -+ if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) -+ { -+ /*to monitor whether the AP is alive or not*/ -+ if (rx_pkt == psta->sta_stats.rx_pkts) -+ { -+ receive_disconnect(padapter, pmlmeinfo->network.MacAddress); -+ return; -+ } -+ else -+ { -+ rx_pkt = psta->sta_stats.rx_pkts; -+ set_link_timer(pmlmeext, DISCONNECT_TO); -+ } ++ //timestamp will be inserted by hardware ++ sz += 8; ++ ie += sz; ++ ++ //beacon interval : 2bytes ++ *(u16*)ie = cpu_to_le16((u16)100);//BCN_INTERVAL=100; ++ sz += 2; ++ ie += 2; ++ ++ //capability info ++ *(u16*)ie = 0; ++ *(u16*)ie |= cpu_to_le16(cap_ESS); ++ *(u16*)ie |= cpu_to_le16(cap_ShortPremble); ++ //*(u16*)ie |= cpu_to_le16(cap_Privacy); ++ sz += 2; ++ ie += 2; - *dst_ie++= ie_len; - @@ -20875,8 +20266,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - *dst_ie++ = BIT(0);//bitmap ctrl - else - *dst_ie++ = 0; -+ //update the EDCA paramter according to the Tx/RX mode -+ update_EDCA_param(padapter); ++ //SSID ++ ie = rtw_set_ie(ie, _SSID_IE_, ssid_len, ssid, &sz); - if(ie_len==4) - { @@ -20890,91 +20281,80 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - //copy remainder IE - _rtw_memcpy(dst_ie, src_ie+head_len, src_ielen-head_len); -+ /*to send the AP a nulldata if no frame is xmitted in order to keep alive*/ -+ if (pmlmeinfo->link_count++ == 0) -+ { -+ tx_cnt = pxmitpriv->tx_pkts; -+ } -+ else if ((pmlmeinfo->link_count & 0xf) == 0) -+ { -+ if (tx_cnt == pxmitpriv->tx_pkts) -+ { -+ issue_nulldata(padapter, NULL, 0, 0, 0); -+ } ++ //supported rates ++ wireless_mode = WIRELESS_11BG_24N; ++ rtw_set_supported_rate(supportRate, wireless_mode) ; ++ rateLen = rtw_get_rateset_len(supportRate); ++ if (rateLen > 8) ++ { ++ ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, 8, supportRate, &sz); ++ } ++ else ++ { ++ ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, rateLen, supportRate, &sz); ++ } ++ ++ ++ //DS parameter set ++ if(check_buddy_fwstate(adapter, _FW_LINKED) && ++ check_buddy_fwstate(adapter, WIFI_STATION_STATE)) ++ { ++ PADAPTER pbuddy_adapter = adapter->pbuddy_adapter; ++ struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; ++ ++ oper_channel = pbuddy_mlmeext->cur_channel; ++ } ++ else ++ { ++ oper_channel = adapter_to_dvobj(adapter)->oper_channel; ++ } ++ ie = rtw_set_ie(ie, _DSSET_IE_, 1, &oper_channel, &sz); ++ ++ //ext supported rates ++ if (rateLen > 8) ++ { ++ ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (supportRate + 8), &sz); ++ } ++ ++ DBG_871X("%s, start auto ap beacon sz=%d\n", __FUNCTION__, sz); ++ ++ //lunch ap mode & start to issue beacon ++ if(rtw_check_beacon_data(adapter, pbuf, sz) == _SUCCESS) ++ { - //pnetwork_mlmeext->Length += ie_len+2; - //pnetwork_mlmeext->IELength += ie_len+2; - pnetwork_mlmeext->Length = pnetwork->Length+ie_len+2; - pnetwork_mlmeext->IELength = src_ielen+ie_len+2; - -+ tx_cnt = pxmitpriv->tx_pkts; -+ } -+ } //end of if ((psta = rtw_get_stainfo(pstapriv, passoc_res->network.MacAddress)) != NULL) } -- else -+ else if (is_client_associated_to_ibss(padapter)) + else { - _rtw_memcpy(dst_ie, src_ie, src_ielen); - pnetwork_mlmeext->Length = pnetwork->Length; - pnetwork_mlmeext->IELength = src_ielen; -+ //linked IBSS mode -+ //for each assoc list entry to check the rx pkt counter -+ for (i = IBSS_START_MAC_ID; i < NUM_STA; i++) -+ { -+ if (pmlmeinfo->FW_sta_info[i].status == 1) -+ { -+ psta = pmlmeinfo->FW_sta_info[i].psta; -+ -+ if (pmlmeinfo->FW_sta_info[i].rx_pkt == psta->sta_stats.rx_pkts) -+ { -+ pmlmeinfo->FW_sta_info[i].status = 0; -+ report_del_sta_event(padapter, psta->hwaddr); -+ } -+ else -+ { -+ pmlmeinfo->FW_sta_info[i].rx_pkt = psta->sta_stats.rx_pkts; -+ } -+ } -+ } -+ -+ set_link_timer(pmlmeext, DISCONNECT_TO); ++ ret = -EINVAL; } -+#endif -#ifdef CONFIG_USB_HCI - set_tx_beacon_cmd(padapter); -+#ifdef PLATFORM_FREEBSD -+ rtw_mtx_unlock(NULL); - #endif +-#endif -+ return; -+} ++ rtw_mfree(pbuf, len); -/* - if(send_beacon(padapter)==_FAIL) -+void addba_timer_hdl(struct sta_info *psta) -+{ -+ struct ht_priv *phtpriv; -+ -+ if(!psta) -+ return; -+ -+ phtpriv = &psta->htpriv; -+ -+ if((phtpriv->ht_option==_TRUE) && (phtpriv->ampdu_enable==_TRUE)) - { +- { - DBG_871X("issue_beacon, fail!\n"); -+ if(phtpriv->candidate_tid_bitmap) -+ phtpriv->candidate_tid_bitmap=0x0; -+ - } +- } -*/ -- ++ return ret; + } ++#endif//CONFIG_AUTO_AP_MODE -u8 chk_sta_is_alive(struct sta_info *psta) -+#ifdef CONFIG_IEEE80211W -+void sa_query_timer_hdl(_adapter *padapter) ++u8 setopmode_hdl(_adapter *padapter, u8 *pbuf) { - u8 ret = _FALSE; - #ifdef DBG_EXPIRATION_CHK @@ -20984,57 +20364,64 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - , psta->state&WIFI_SLEEP_STATE?"SLEEP":"" - ); - #endif ++ u8 type; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_priv * pmlmepriv = &padapter->mlmepriv; -+ _irqL irqL; -+ //disconnect -+ _enter_critical_bh(&pmlmepriv->lock, &irqL); ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ struct setopmode_parm *psetop = (struct setopmode_parm *)pbuf; - //if(sta_last_rx_pkts(psta) == sta_rx_pkts(psta)) - if(psta->sta_stats.last_rx_data_pkts == psta->sta_stats.rx_data_pkts) -- { ++ if(psetop->mode == Ndis802_11APMode) + { - #if 0 - if(psta->state&WIFI_SLEEP_STATE) - ret = _TRUE; - #endif -- } -- else -+ if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) ++ pmlmeinfo->state = WIFI_FW_AP_STATE; ++ type = _HW_STATE_AP_; ++#ifdef CONFIG_NATIVEAP_MLME ++ //start_ap_mode(padapter); ++#endif ++ } ++ else if(psetop->mode == Ndis802_11Infrastructure) ++ { ++ pmlmeinfo->state &= ~(BIT(0)|BIT(1));// clear state ++ pmlmeinfo->state |= WIFI_FW_STATION_STATE;//set to STATION_STATE ++ type = _HW_STATE_STATION_; ++ } ++ else if(psetop->mode == Ndis802_11IBSS) ++ { ++ type = _HW_STATE_ADHOC_; + } + else { - ret = _TRUE; -+ rtw_disassoc_cmd(padapter, 0, _TRUE); -+ rtw_indicate_disconnect(padapter); -+ rtw_free_assoc_resources(padapter, 1); ++ type = _HW_STATE_NOLINK_; } - - sta_update_last_rx_pkts(psta); - +- - return ret; -+ _exit_critical_bh(&pmlmepriv->lock, &irqL); -+ DBG_871X("SA query timeout disconnect\n"); - } -+#endif //CONFIG_IEEE80211W - +-} +- -void expire_timeout_chk(_adapter *padapter) -+u8 NULL_hdl(_adapter *padapter, u8 *pbuf) - { +-{ - _irqL irqL; - _list *phead, *plist; - struct sta_info *psta=NULL; - struct sta_priv *pstapriv = &padapter->stapriv; -+ return H2C_SUCCESS; -+} -+#ifdef CONFIG_AUTO_AP_MODE -+void rtw_start_auto_ap(_adapter *adapter) -+{ -+ DBG_871X("%s\n", __FUNCTION__); ++ rtw_hal_set_hwreg(padapter, HW_VAR_SET_OPMODE, (u8 *)(&type)); ++ //Set_NETYPE0_MSR(padapter, type); - _enter_critical_bh(&pstapriv->auth_list_lock, &irqL); - - phead = &pstapriv->auth_list; - plist = get_next(phead); -+ rtw_set_802_11_infrastructure_mode(adapter, Ndis802_11APMode); ++#ifdef CONFIG_AUTO_AP_MODE ++ if(psetop->mode == Ndis802_11APMode) ++ rtw_auto_ap_start_beacon(padapter); ++#endif - //check auth_queue - while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) @@ -21042,7 +20429,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - psta = LIST_CONTAINOR(plist, struct sta_info, auth_list); - - plist = get_next(plist); -- ++ return H2C_SUCCESS; + - if(psta->expire_to>0) - { - psta->expire_to--; @@ -21064,52 +20452,50 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - - } -+ rtw_setopmode_cmd(adapter, Ndis802_11APMode); -+} - +- - _exit_critical_bh(&pstapriv->auth_list_lock, &irqL); -+static int rtw_auto_ap_start_beacon(_adapter *adapter) -+{ -+ int ret=0; -+ u8 *pbuf = NULL; -+ uint len; -+ u8 supportRate[16]; -+ int sz = 0, rateLen; -+ u8 * ie; -+ u8 wireless_mode, oper_channel; -+ u8 ssid[3] = {0}; //hidden ssid -+ u32 ssid_len = sizeof(ssid); -+ struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); ++} - psta = NULL; - ++u8 createbss_hdl(_adapter *padapter, u8 *pbuf) ++{ ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); ++ struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; ++ u32 initialgain; - _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); -- + - phead = &pstapriv->asoc_list; - plist = get_next(phead); -+ if(check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) -+ return -EINVAL; - +- - //check asoc_queue - while ((rtw_end_of_queue_search(phead, plist)) == _FALSE) -- { ++ if(pparm->network.InfrastructureMode == Ndis802_11APMode) + { - psta = LIST_CONTAINOR(plist, struct sta_info, asoc_list); - - plist = get_next(plist); -- ++#ifdef CONFIG_AP_MODE + - if(chk_sta_is_alive(psta)) - { - psta->expire_to = pstapriv->expire_to; -#ifdef CONFIG_TX_MCAST2UNI - psta->under_exist_checking = 0; -#endif // CONFIG_TX_MCAST2UNI -- } ++ if(pmlmeinfo->state == WIFI_FW_AP_STATE) ++ { ++ //todo: ++ return H2C_SUCCESS; + } - - if(psta->expire_to>0) - { - psta->expire_to--; - +- -#ifdef CONFIG_TX_MCAST2UNI - if ( (psta->flags & WLAN_STA_HT) && (psta->htpriv.agg_enable_bitmap || psta->under_exist_checking) ) { - // check sta by delba(addba) for 11n STA @@ -21130,10 +20516,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - } -#endif // CONFIG_TX_MCAST2UNI -+ len = 128; -+ pbuf = rtw_zmalloc(len); -+ if(!pbuf) -+ return -ENOMEM; ++#endif ++ } - if (psta->expire_to == 0) - { @@ -21146,14 +20530,30 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#if 0 - //tear down Rx AMPDU - send_delba(padapter, 0, psta->hwaddr);// recipient -- ++ //below is for ad-hoc master ++ if(pparm->network.InfrastructureMode == Ndis802_11IBSS) ++ { ++ rtw_joinbss_reset(padapter); + - //tear down TX AMPDU - send_delba(padapter, 1, psta->hwaddr);// // originator - psta->htpriv.agg_enable_bitmap = 0x0;//reset - psta->htpriv.candidate_tid_bitmap = 0x0;//reset -- ++ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; ++ pmlmeext->cur_ch_offset= HAL_PRIME_CHNL_OFFSET_DONT_CARE; ++ pmlmeinfo->ERP_enable = 0; ++ pmlmeinfo->WMM_enable = 0; ++ pmlmeinfo->HT_enable = 0; ++ pmlmeinfo->HT_caps_enable = 0; ++ pmlmeinfo->HT_info_enable = 0; ++ pmlmeinfo->agg_enable_bitmap = 0; ++ pmlmeinfo->candidate_tid_bitmap = 0; + - issue_deauth(padapter, psta->hwaddr, WLAN_REASON_DEAUTH_LEAVING); -- ++ //disable dynamic functions, such as high power, DIG ++ Save_DM_Func_Flag(padapter); ++ Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); + - _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL); - rtw_free_stainfo(padapter, psta); - _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); @@ -21174,28 +20574,20 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - - } ++ //config the initial gain under linking, need to write the BB registers ++ initialgain = 0x1E; ++ rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); - _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); -+ //generate beacon -+ ie = pbuf; ++ //cancel link timer ++ _cancel_timer_ex(&pmlmeext->link_timer); -} -+ //timestamp will be inserted by hardware -+ sz += 8; -+ ie += sz; ++ //clear CAM ++ flush_all_cam_entry(padapter); -+ //beacon interval : 2bytes -+ *(u16*)ie = cpu_to_le16((u16)100);//BCN_INTERVAL=100; -+ sz += 2; -+ ie += 2; -+ -+ //capability info -+ *(u16*)ie = 0; -+ *(u16*)ie |= cpu_to_le16(cap_ESS); -+ *(u16*)ie |= cpu_to_le16(cap_ShortPremble); -+ //*(u16*)ie |= cpu_to_le16(cap_Privacy); -+ sz += 2; -+ ie += 2; ++ _rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); ++ pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; -static void add_RATid(_adapter *padapter, struct sta_info *psta) -{ @@ -21208,76 +20600,69 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct ht_priv *psta_ht = NULL; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - WLAN_BSSID_EX *pcur_network = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network; -+ //SSID -+ ie = rtw_set_ie(ie, _SSID_IE_, ssid_len, ssid, &sz); ++ if(pnetwork->IELength>MAX_IE_SZ)//Check pbuf->IELength ++ return H2C_PARAMETERS_ERROR; -- ++ _rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); + - if(psta) - psta_ht = &psta->htpriv; -+ //supported rates -+ wireless_mode = WIRELESS_11BG_24N; -+ rtw_set_supported_rate(supportRate, wireless_mode) ; -+ rateLen = rtw_get_rateset_len(supportRate); -+ if (rateLen > 8) -+ { -+ ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, 8, supportRate, &sz); -+ } - else +- else - return; - - //b/g mode ra_bitmap - for (i=0; ibssrateset); i++) - { +- { - if (psta->bssrateset[i]) - tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value(psta->bssrateset[i]&0x7f); -+ ie = rtw_set_ie(ie, _SUPPORTEDRATES_IE_, rateLen, supportRate, &sz); - } +- } ++ start_create_ibss(padapter); - //n mode ra_bitmap - if(psta_ht->ht_option) -+ -+ //DS parameter set -+ if(check_buddy_fwstate(adapter, _FW_LINKED) && -+ check_buddy_fwstate(adapter, WIFI_STATION_STATE)) - { +- { - padapter->HalFunc.GetHwRegHandler(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type)); - if(rf_type == RF_2T2R) - limit=16;// 2R - else - limit=8;// 1R -+ PADAPTER pbuddy_adapter = adapter->pbuddy_adapter; -+ struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; ++ } - for (i=0; iht_cap.supp_mcs_set[i/8] & BIT(i%8)) - tx_ra_bitmap |= BIT(i+12); - } -+ oper_channel = pbuddy_mlmeext->cur_channel; -+ } -+ else -+ { -+ oper_channel = adapter_to_dvobj(adapter)->oper_channel; -+ } -+ ie = rtw_set_ie(ie, _DSSET_IE_, 1, &oper_channel, &sz); ++ return H2C_SUCCESS; - //max short GI rate - shortGIrate = psta_ht->sgi; -+ //ext supported rates -+ if (rateLen > 8) -+ { -+ ie = rtw_set_ie(ie, _EXT_SUPPORTEDRATES_IE_, (rateLen - 8), (supportRate + 8), &sz); - } +- } ++} -+ DBG_871X("%s, start auto ap beacon sz=%d\n", __FUNCTION__, sz); ++u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) ++{ ++ u8 join_type; ++ PNDIS_802_11_VARIABLE_IEs pIE; ++ struct registry_priv *pregpriv = &padapter->registrypriv; ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ++ WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); ++#ifdef CONFIG_ANTENNA_DIVERSITY ++ struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; ++#endif //CONFIG_ANTENNA_DIVERSITY ++ u32 initialgain, i; ++ u8 cbw40_enable=0; ++ //u32 acparm; -#if 0//gtest - if(get_rf_mimo_mode(padapter) == RTL8712_RF_2T2R) -+ //lunch ap mode & start to issue beacon -+ if(rtw_check_beacon_data(adapter, pbuf, sz) == _SUCCESS) ++ //check already connecting to AP or not ++ if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) { - //is this a 2r STA? - if((pstat->tx_ra_bitmap & 0x0ff00000) != 0 && !(priv->pshare->has_2r_sta & BIT(pstat->aid))) -- { ++ if (pmlmeinfo->state & WIFI_FW_STATION_STATE) + { - priv->pshare->has_2r_sta |= BIT(pstat->aid); - if(rtw_read16(padapter, 0x102501f6) != 0xffff) - { @@ -21297,13 +20682,58 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - Switch_1SS_Antenna(priv, 2); - } - } -- } -- -- } ++ issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, 5, 100); + } ++ ++ pmlmeinfo->state = WIFI_FW_NULL_STATE; ++ ++ //clear CAM ++ flush_all_cam_entry(padapter); ++ ++ _cancel_timer_ex(&pmlmeext->link_timer); ++ ++ //set MSR to nolink -> infra. mode ++ //Set_MSR(padapter, _HW_STATE_NOLINK_); ++ Set_MSR(padapter, _HW_STATE_STATION_); + ++ ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, 0); + } - if ((pstat->rssi_level < 1) || (pstat->rssi_level > 3)) -+ } -+ else ++#ifdef CONFIG_ANTENNA_DIVERSITY ++ rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, _FALSE); ++#endif ++ ++ rtw_joinbss_reset(padapter); ++ ++ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; ++ pmlmeext->cur_ch_offset= HAL_PRIME_CHNL_OFFSET_DONT_CARE; ++ pmlmeinfo->ERP_enable = 0; ++ pmlmeinfo->WMM_enable = 0; ++ pmlmeinfo->HT_enable = 0; ++ pmlmeinfo->HT_caps_enable = 0; ++ pmlmeinfo->HT_info_enable = 0; ++ pmlmeinfo->agg_enable_bitmap = 0; ++ pmlmeinfo->candidate_tid_bitmap = 0; ++ pmlmeinfo->bwmode_updated = _FALSE; ++ //pmlmeinfo->assoc_AP_vendor = maxAP; ++ ++ _rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); ++ pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; ++ ++ if(pnetwork->IELength>MAX_IE_SZ)//Check pbuf->IELength ++ return H2C_PARAMETERS_ERROR; ++ ++ _rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); ++ ++ pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; ++ pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); ++ ++ //Check AP vendor to move rtw_joinbss_cmd() ++ //pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pnetwork->IEs, pnetwork->IELength); ++ ++ for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;) { - if (pstat->rssi >= priv->pshare->rf_ft_var.raGoDownUpper) - pstat->rssi_level = 1; @@ -21314,8 +20744,59 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pstat->rssi_level = 2; - else - pstat->rssi_level = 3; -+ ret = -EINVAL; - } +- } ++ pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i); ++ ++ switch (pIE->ElementID) ++ { ++ case _VENDOR_SPECIFIC_IE_://Get WMM IE. ++ if ( _rtw_memcmp(pIE->data, WMM_OUI, 4) ) ++ { ++ pmlmeinfo->WMM_enable = 1; ++ } ++ break; ++ ++ case _HT_CAPABILITY_IE_: //Get HT Cap IE. ++ pmlmeinfo->HT_caps_enable = 1; ++ break; ++ ++ case _HT_EXTRA_INFO_IE_: //Get HT Info IE. ++ pmlmeinfo->HT_info_enable = 1; ++ ++ //spec case only for cisco's ap because cisco's ap issue assoc rsp using mcs rate @40MHz or @20MHz ++//#if !defined(CONFIG_CONCURRENT_MODE) && !defined(CONFIG_DUALMAC_CONCURRENT) ++// if(pmlmeinfo->assoc_AP_vendor == ciscoAP) ++//#endif ++ { ++ struct HT_info_element *pht_info = (struct HT_info_element *)(pIE->data); ++ ++ if( pnetwork->Configuration.DSConfig > 14 ) ++ { ++ if( pregpriv->cbw40_enable & BIT(1) ) ++ cbw40_enable = 1; ++ } ++ else ++ if( pregpriv->cbw40_enable & BIT(0) ) ++ cbw40_enable = 1; ++ ++ if ((cbw40_enable) && (pht_info->infos[0] & BIT(2))) ++ { ++ //switch to the 40M Hz mode according to the AP ++ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40; ++ switch (pht_info->infos[0] & 0x3) ++ { ++ case 1: ++ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER; ++ break; ++ ++ case 3: ++ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER; ++ break; ++ ++ default: ++ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; ++ break; ++ } - // rate adaptive by rssi - if ((priv->pmib->dot11BssType.net_work_type & WIRELESS_11N) && pstat->ht_cap_len) @@ -21334,10 +20815,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pstat->tx_ra_bitmap &= 0x100ff005; - else - pstat->tx_ra_bitmap &= 0x100ff001; ++ DBG_871X("set ch/bw before connected\n"); ++ } ++ } ++ break; - break; - } -- } ++ default: ++ break; + } - else - { - switch (pstat->rssi_level) { @@ -21352,40 +20839,22 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pstat->tx_ra_bitmap &= 0x000ff005; - else - pstat->tx_ra_bitmap &= 0x000ff001; -+ rtw_mfree(pbuf, len); - +- - break; - } -+ return ret; - // Don't need to mask high rates due to new rate adaptive parameters - //if (pstat->is_broadcom_sta) // use MCS12 as the highest rate vs. Broadcom sta - // pstat->tx_ra_bitmap &= 0x81ffffff; -+} -+#endif//CONFIG_AUTO_AP_MODE - +- - // NIC driver will report not supporting MCS15 and MCS14 in asoc req - //if (pstat->is_rtl8190_sta && !pstat->is_2t_mimo_sta) - // pstat->tx_ra_bitmap &= 0x83ffffff; // if Realtek 1x2 sta, don't use MCS15 and MCS14 - } -+u8 setopmode_hdl(_adapter *padapter, u8 *pbuf) -+{ -+ u8 type; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ struct setopmode_parm *psetop = (struct setopmode_parm *)pbuf; -+ -+ if(psetop->mode == Ndis802_11APMode) -+ { -+ pmlmeinfo->state = WIFI_FW_AP_STATE; -+ type = _HW_STATE_AP_; -+#ifdef CONFIG_NATIVEAP_MLME -+ //start_ap_mode(padapter); -+#endif ++ i += (pIE->Length + 2); } - else if ((priv->pmib->dot11BssType.net_work_type & WIRELESS_11G) && isErpSta(pstat)) -+ else if(psetop->mode == Ndis802_11Infrastructure) - { +- { - switch (pstat->rssi_level) { - case 1: - pstat->tx_ra_bitmap &= 0x00000f00; @@ -21396,29 +20865,59 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - case 3: - pstat->tx_ra_bitmap &= 0x00000ff5; - break; -- } -+ pmlmeinfo->state &= ~(BIT(0)|BIT(1));// clear state -+ pmlmeinfo->state |= WIFI_FW_STATION_STATE;//set to STATION_STATE -+ type = _HW_STATE_STATION_; ++#if 0 ++ if (padapter->registrypriv.wifi_spec) { ++ // for WiFi test, follow WMM test plan spec ++ acparm = 0x002F431C; // VO ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm)); ++ acparm = 0x005E541C; // VI ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm)); ++ acparm = 0x0000A525; // BE ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm)); ++ acparm = 0x0000A549; // BK ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm)); ++ ++ // for WiFi test, mixed mode with intel STA under bg mode throughput issue ++ if (padapter->mlmepriv.htpriv.ht_option == _FALSE){ ++ acparm = 0x00004320; ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm)); + } } - else -+ else if(psetop->mode == Ndis802_11IBSS) - { +- { - pstat->tx_ra_bitmap &= 0x0000000d; -+ type = _HW_STATE_ADHOC_; ++ else { ++ acparm = 0x002F3217; // VO ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm)); ++ acparm = 0x005E4317; // VI ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm)); ++ acparm = 0x00105320; // BE ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm)); ++ acparm = 0x0000A444; // BK ++ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm)); } -- ++#endif + - // disable tx short GI when station cannot rx MCS15(AP is 2T2R) - // disable tx short GI when station cannot rx MCS7 (AP is 1T2R or 1T1R) - // if there is only 1r STA and we are 2T2R, DO NOT mask SGI rate - if ((!(pstat->tx_ra_bitmap & 0x8000000) && (priv->pshare->has_2r_sta > 0) && (get_rf_mimo_mode(padapter) == RTL8712_RF_2T2R)) || - (!(pstat->tx_ra_bitmap & 0x80000) && (get_rf_mimo_mode(padapter) != RTL8712_RF_2T2R))) -+ else - { +- { - pstat->tx_ra_bitmap &= ~BIT(28); -+ type = _HW_STATE_NOLINK_; ++ /* check channel, bandwidth, offset and switch */ ++#ifdef CONFIG_DUALMAC_CONCURRENT ++ if(dc_handle_join_request(padapter) == _FAIL) { ++ DBG_871X("dc_handle_join_request fail !!!\n"); ++ return H2C_SUCCESS; ++ } ++ set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); ++#else //NON CONFIG_DUALMAC_CONCURRENT ++ if(rtw_chk_start_clnt_join(padapter) == _FAIL) { ++ report_join_res(padapter, (-4)); ++ return H2C_SUCCESS; } --#endif + #endif - if ( pcur_network->Configuration.DSConfig > 14 ) { - // 5G band @@ -21434,10 +20933,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - else - sta_band |= WIRELESS_11B; - } -- ++ //disable dynamic functions, such as high power, DIG ++ //Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); + - raid = networktype_to_raid(sta_band); - init_rate = get_highest_rate_idx(tx_ra_bitmap&0x0fffffff)&0x3f; -- ++ //config the initial gain under linking, need to write the BB registers ++ ++ initialgain = 0x1E; ++ rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); + - if (psta->aid < NUM_STA) - { - u8 arg = 0; @@ -21476,23 +20981,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - //printk("%s psta->mac_id=%d arg=0x%x\n",__FUNCTION__,psta->mac_id,arg); - } - tx_ra_bitmap |= ((raid<<28)&0xf0000000); -+ rtw_hal_set_hwreg(padapter, HW_VAR_SET_OPMODE, (u8 *)(&type)); -+ //Set_NETYPE0_MSR(padapter, type); - +- - DBG_871X("update raid entry, bitmap=0x%x, arg=0x%x\n", tx_ra_bitmap, arg); -+#ifdef CONFIG_AUTO_AP_MODE -+ if(psetop->mode == Ndis802_11APMode) -+ rtw_auto_ap_start_beacon(padapter); -+#endif - +- - //bitmap[0:27] = tx_rate_bitmap - //bitmap[28:31]= Rate Adaptive id - //arg[0:4] = macid - //arg[5] = Short GI - padapter->HalFunc.Add_RateATid(padapter, tx_ra_bitmap, arg,psta->mac_id); -+ return H2C_SUCCESS; -+ -+} - if (shortGIrate==_TRUE) - init_rate |= BIT(6); @@ -21503,75 +20999,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - } - else -+u8 createbss_hdl(_adapter *padapter, u8 *pbuf) -+{ -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); -+ struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; -+ u32 initialgain; -+ -+ -+ if(pparm->network.InfrastructureMode == Ndis802_11APMode) - { +- { - DBG_871X("station aid %d exceed the max number\n", psta->aid); -+#ifdef CONFIG_AP_MODE -+ -+ if(pmlmeinfo->state == WIFI_FW_AP_STATE) -+ { -+ //todo: -+ return H2C_SUCCESS; -+ } -+#endif - } +- } ++ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress); ++ join_type = 0; ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); -+ //below is for ad-hoc master -+ if(pparm->network.InfrastructureMode == Ndis802_11IBSS) -+ { -+ rtw_joinbss_reset(padapter); ++ //cancel link timer ++ _cancel_timer_ex(&pmlmeext->link_timer); + -+ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; -+ pmlmeext->cur_ch_offset= HAL_PRIME_CHNL_OFFSET_DONT_CARE; -+ pmlmeinfo->ERP_enable = 0; -+ pmlmeinfo->WMM_enable = 0; -+ pmlmeinfo->HT_enable = 0; -+ pmlmeinfo->HT_caps_enable = 0; -+ pmlmeinfo->HT_info_enable = 0; -+ pmlmeinfo->agg_enable_bitmap = 0; -+ pmlmeinfo->candidate_tid_bitmap = 0; -+ -+ //disable dynamic functions, such as high power, DIG -+ Save_DM_Func_Flag(padapter); -+ Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); -+ -+ //config the initial gain under linking, need to write the BB registers -+ initialgain = 0x1E; -+ rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); -+ -+ //cancel link timer -+ _cancel_timer_ex(&pmlmeext->link_timer); -+ -+ //clear CAM -+ flush_all_cam_entry(padapter); -+ -+ _rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); -+ pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; -+ -+ if(pnetwork->IELength>MAX_IE_SZ)//Check pbuf->IELength -+ return H2C_PARAMETERS_ERROR; -+ -+ _rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); ++ start_clnt_join(padapter); + -+ start_create_ibss(padapter); -+ -+ } -+ + return H2C_SUCCESS; -+ ++ } -static void update_bmc_sta(_adapter *padapter) -+u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf) ++u8 disconnect_hdl(_adapter *padapter, unsigned char *pbuf) { - _irqL irqL; - u32 init_rate=0; @@ -21582,22 +21027,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - WLAN_BSSID_EX *pcur_network = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network; - struct sta_info *psta = rtw_get_bcmc_stainfo(padapter); -+ u8 join_type; -+ PNDIS_802_11_VARIABLE_IEs pIE; -+ struct registry_priv *pregpriv = &padapter->registrypriv; ++ struct disconnect_parm *param = (struct disconnect_parm *)pbuf; + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); -+#ifdef CONFIG_ANTENNA_DIVERSITY -+ struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; -+#endif //CONFIG_ANTENNA_DIVERSITY -+ u32 initialgain, i; -+ u8 cbw40_enable=0; -+ //u32 acparm; ++ u8 val8; - if(psta) -+ //check already connecting to AP or not -+ if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) ++ if (is_client_associated_to_ap(padapter)) { - psta->aid = 0;//default set to 0 - //psta->mac_id = psta->aid+4; @@ -21607,65 +21044,35 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - psta->htpriv.ht_option = _FALSE; - - psta->ieee8021x_blocked = 0; -+ if (pmlmeinfo->state & WIFI_FW_STATION_STATE) -+ { -+ issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, 5, 100); -+ } - +- - _rtw_memset((void*)&psta->sta_stats, 0, sizeof(struct stainfo_stats)); -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ -+ //clear CAM -+ flush_all_cam_entry(padapter); -+ -+ _cancel_timer_ex(&pmlmeext->link_timer); -+ -+ //set MSR to nolink -> infra. mode -+ //Set_MSR(padapter, _HW_STATE_NOLINK_); -+ Set_MSR(padapter, _HW_STATE_STATION_); -+ - +- - //psta->dot118021XPrivacy = _NO_PRIVACY_;//!!! remove it, because it has been set before this. -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, 0); ++ issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, param->deauth_timeout_ms/100, 100); + } -+#ifdef CONFIG_ANTENNA_DIVERSITY -+ rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, _FALSE); -+#endif ++ //set_opmode_cmd(padapter, infra_client_with_mlme); -+ rtw_joinbss_reset(padapter); ++ //pmlmeinfo->state = WIFI_FW_NULL_STATE; + -+ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; -+ pmlmeext->cur_ch_offset= HAL_PRIME_CHNL_OFFSET_DONT_CARE; -+ pmlmeinfo->ERP_enable = 0; -+ pmlmeinfo->WMM_enable = 0; -+ pmlmeinfo->HT_enable = 0; -+ pmlmeinfo->HT_caps_enable = 0; -+ pmlmeinfo->HT_info_enable = 0; -+ pmlmeinfo->agg_enable_bitmap = 0; -+ pmlmeinfo->candidate_tid_bitmap = 0; -+ pmlmeinfo->bwmode_updated = _FALSE; -+ //pmlmeinfo->assoc_AP_vendor = maxAP; - //prepare for add_RATid - supportRateNum = rtw_get_rateset_len((u8*)&pcur_network->SupportedRates); - network_type = rtw_check_network_type((u8*)&pcur_network->SupportedRates, supportRateNum, 1); -+ _rtw_memcpy(pnetwork, pbuf, FIELD_OFFSET(WLAN_BSSID_EX, IELength)); -+ pnetwork->IELength = ((WLAN_BSSID_EX *)pbuf)->IELength; -+ -+ if(pnetwork->IELength>MAX_IE_SZ)//Check pbuf->IELength -+ return H2C_PARAMETERS_ERROR; - +- - _rtw_memcpy(psta->bssrateset, &pcur_network->SupportedRates, supportRateNum); - psta->bssratelen = supportRateNum; -- ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, 0); ++ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr); + - //b/g mode ra_bitmap - for (i=0; ibssrateset[i]) - tx_ra_bitmap |= rtw_get_bit_value_from_ieee_value(psta->bssrateset[i]&0x7f); - } -+ _rtw_memcpy(pnetwork->IEs, ((WLAN_BSSID_EX *)pbuf)->IEs, pnetwork->IELength); ++ //restore to initial setting. ++ update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode); - if ( pcur_network->Configuration.DSConfig > 14 ) { - //force to A mode. 5G doesn't support CCK rates @@ -21676,31 +21083,26 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - network_type = WIRELESS_11B; - tx_ra_bitmap = 0xf; - } -+ pmlmeext->cur_channel = (u8)pnetwork->Configuration.DSConfig; -+ pmlmeinfo->bcn_interval = get_beacon_interval(pnetwork); ++ if(((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)) ++ { ++ //Stop BCN ++ val8 = 0; ++ rtw_hal_set_hwreg(padapter, HW_VAR_BCN_FUNC, (u8 *)(&val8)); ++ } - //tx_ra_bitmap = update_basic_rate(pcur_network->SupportedRates, supportRateNum); -+ //Check AP vendor to move rtw_joinbss_cmd() -+ //pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pnetwork->IEs, pnetwork->IELength); - raid = networktype_to_raid(network_type); - init_rate = get_highest_rate_idx(tx_ra_bitmap&0x0fffffff)&0x3f; - - //DBG_871X("Add id %d val %08x to ratr for bmc sta\n", psta->aid, tx_ra_bitmap); -+ for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;) -+ { -+ pIE = (PNDIS_802_11_VARIABLE_IEs)(pnetwork->IEs + i); ++ //set MSR to no link state -> infra. mode ++ Set_MSR(padapter, _HW_STATE_STATION_); - //if(pHalData->fw_ractrl == _TRUE) -+ switch (pIE->ElementID) - { +- { - u8 arg = 0; -+ case _VENDOR_SPECIFIC_IE_://Get WMM IE. -+ if ( _rtw_memcmp(pIE->data, WMM_OUI, 4) ) -+ { -+ pmlmeinfo->WMM_enable = 1; -+ } -+ break; ++ pmlmeinfo->state = WIFI_FW_NULL_STATE; - arg = psta->mac_id&0x1f; - @@ -21708,65 +21110,35 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - //if (shortGIrate==_TRUE) - // arg |= BIT(5); -+ case _HT_CAPABILITY_IE_: //Get HT Cap IE. -+ pmlmeinfo->HT_caps_enable = 1; -+ break; -+ -+ case _HT_EXTRA_INFO_IE_: //Get HT Info IE. -+ pmlmeinfo->HT_info_enable = 1; -+ -+ //spec case only for cisco's ap because cisco's ap issue assoc rsp using mcs rate @40MHz or @20MHz -+//#if !defined(CONFIG_CONCURRENT_MODE) && !defined(CONFIG_DUALMAC_CONCURRENT) -+// if(pmlmeinfo->assoc_AP_vendor == ciscoAP) -+//#endif -+ { -+ struct HT_info_element *pht_info = (struct HT_info_element *)(pIE->data); -+ -+ if( pnetwork->Configuration.DSConfig > 14 ) -+ { -+ if( pregpriv->cbw40_enable & BIT(1) ) -+ cbw40_enable = 1; -+ } -+ else -+ if( pregpriv->cbw40_enable & BIT(0) ) -+ cbw40_enable = 1; -+ -+ if ((cbw40_enable) && (pht_info->infos[0] & BIT(2))) -+ { -+ //switch to the 40M Hz mode according to the AP -+ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40; -+ switch (pht_info->infos[0] & 0x3) -+ { -+ case 1: -+ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER; -+ break; - +- - tx_ra_bitmap |= ((raid<<28)&0xf0000000); -+ case 3: -+ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER; -+ break; -+ -+ default: -+ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; -+ break; -+ } ++#ifdef CONFIG_DUALMAC_CONCURRENT ++ dc_set_channel_bwmode_disconnect(padapter); ++#else ++#ifdef CONFIG_CONCURRENT_MODE ++ if((check_buddy_fwstate(padapter, _FW_LINKED)) != _TRUE) ++ { ++#endif //CONFIG_CONCURRENT_MODE ++ //switch to the 20M Hz mode after disconnect ++ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; ++ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; - DBG_871X("update_bmc_sta, mask=0x%x, arg=0x%x\n", tx_ra_bitmap, arg); -+ DBG_871X("set ch/bw before connected\n"); -+ } -+ } -+ break; ++ set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); ++#ifdef CONFIG_CONCURRENT_MODE ++ } ++#endif //CONFIG_CONCURRENT_MODE ++#endif //CONFIG_DUALMAC_CONCURRENT - //bitmap[0:27] = tx_rate_bitmap - //bitmap[28:31]= Rate Adaptive id - //arg[0:4] = macid - //arg[5] = Short GI - padapter->HalFunc.Add_RateATid(padapter, tx_ra_bitmap, arg,psta->mac_id ); -- -+ default: -+ break; - } - ++ flush_all_cam_entry(padapter); + +- } +- - //set ra_id, init_rate - psta->raid = raid; - psta->init_rate = init_rate; @@ -21774,56 +21146,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _enter_critical_bh(&psta->lock, &irqL); - psta->state = _FW_LINKED; - _exit_critical_bh(&psta->lock, &irqL); -+ i += (pIE->Length + 2); -+ } -+#if 0 -+ if (padapter->registrypriv.wifi_spec) { -+ // for WiFi test, follow WMM test plan spec -+ acparm = 0x002F431C; // VO -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm)); -+ acparm = 0x005E541C; // VI -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm)); -+ acparm = 0x0000A525; // BE -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm)); -+ acparm = 0x0000A549; // BK -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm)); -+ -+ // for WiFi test, mixed mode with intel STA under bg mode throughput issue -+ if (padapter->mlmepriv.htpriv.ht_option == _FALSE){ -+ acparm = 0x00004320; -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm)); -+ } -+ } -+ else { -+ acparm = 0x002F3217; // VO -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm)); -+ acparm = 0x005E4317; // VI -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm)); -+ acparm = 0x00105320; // BE -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm)); -+ acparm = 0x0000A444; // BK -+ rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm)); -+ } -+#endif ++ _cancel_timer_ex(&pmlmeext->link_timer); -+ /* check channel, bandwidth, offset and switch */ -+#ifdef CONFIG_DUALMAC_CONCURRENT -+ if(dc_handle_join_request(padapter) == _FAIL) { -+ DBG_871X("dc_handle_join_request fail !!!\n"); -+ return H2C_SUCCESS; - } +- } - else - { - DBG_871X("add_RATid_bmc_sta error!\n"); -+ set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -+#else //NON CONFIG_DUALMAC_CONCURRENT -+ if(rtw_chk_start_clnt_join(padapter) == _FAIL) { -+ report_join_res(padapter, (-4)); -+ return H2C_SUCCESS; - } +- } - --} -+#endif ++ rtw_free_uc_swdec_pending_queue(padapter); ++ ++ return H2C_SUCCESS; + } -//notes: -//AID: 1~MAX for sta and 0 for bc/mc in ap/adhoc mode @@ -21831,9 +21165,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -//MAC_ID = 1 for bc/mc for sta/ap/adhoc -//MAC_ID = 0 for bssid for sta/ap/adhoc -//CAM_ID = //0~3 for default key, cmd_id=macid + 3, macid=aid+1; -+ //disable dynamic functions, such as high power, DIG -+ //Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); - +- -void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta) -{ - _irqL irqL; @@ -21842,61 +21174,58 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv; - struct ht_priv *phtpriv_sta = &psta->htpriv; -+ //config the initial gain under linking, need to write the BB registers -+ -+ initialgain = 0x1E; -+ rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); -+ ++int rtw_scan_ch_decision(_adapter *padapter, struct rtw_ieee80211_channel *out, ++ u32 out_num, struct rtw_ieee80211_channel *in, u32 in_num) ++{ ++ int i, j; ++ int scan_ch_num = 0; ++ int set_idx; ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - //set intf_tag to if1 - //psta->intf_tag = 0; -+ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress); -+ join_type = 0; -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); ++ /* clear first */ ++ _rtw_memset(out, 0, sizeof(struct rtw_ieee80211_channel)*out_num); - //psta->mac_id = psta->aid+4; - psta->mac_id = psta->aid+1; -+ //cancel link timer -+ _cancel_timer_ex(&pmlmeext->link_timer); - +- - if(psecuritypriv->dot11AuthAlgrthm==dot11AuthAlgrthm_8021X) - psta->ieee8021x_blocked = _TRUE; - else - psta->ieee8021x_blocked = _FALSE; -+ start_clnt_join(padapter); - -- +- ++ /* acquire channels from in */ ++ j = 0; ++ for (i=0;iht_option) -+} -+ -+u8 disconnect_hdl(_adapter *padapter, unsigned char *pbuf) -+{ -+ struct disconnect_parm *param = (struct disconnect_parm *)pbuf; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ WLAN_BSSID_EX *pnetwork = (WLAN_BSSID_EX*)(&(pmlmeinfo->network)); -+ u8 val8; -+ -+ if (is_client_associated_to_ap(padapter)) - { +- { - //check if sta supports rx ampdu - phtpriv_sta->ampdu_enable = phtpriv_ap->ampdu_enable; -+ issue_deauth_ex(padapter, pnetwork->MacAddress, WLAN_REASON_DEAUTH_LEAVING, param->deauth_timeout_ms/100, 100); -+ } ++ if (0) ++ DBG_871X(FUNC_ADPT_FMT" "CHAN_FMT"\n", FUNC_ADPT_ARG(padapter), CHAN_ARG(&in[i])); - //check if sta support s Short GI - if((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SGI_20|IEEE80211_HT_CAP_SGI_40)) -- { ++ if(in[i].hw_value && !(in[i].flags & RTW_IEEE80211_CHAN_DISABLED) ++ && (set_idx=rtw_ch_set_search_ch(pmlmeext->channel_set, in[i].hw_value)) >=0 ++ && rtw_mlme_band_check(padapter, in[i].hw_value) == _TRUE ++ ) + { - phtpriv_sta->sgi = _TRUE; - } -+ //set_opmode_cmd(padapter, infra_client_with_mlme); ++ if (j >= out_num) { ++ DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" out_num:%u not enough\n", ++ FUNC_ADPT_ARG(padapter), out_num); ++ break; ++ } - // bwmode - if((phtpriv_sta->ht_cap.cap_info & phtpriv_ap->ht_cap.cap_info) & cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH)) @@ -21904,33 +21233,29 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - //phtpriv_sta->bwmode = HT_CHANNEL_WIDTH_40; - phtpriv_sta->bwmode = pmlmeext->cur_bwmode; - phtpriv_sta->ch_offset = pmlmeext->cur_ch_offset; -- ++ _rtw_memcpy(&out[j], &in[i], sizeof(struct rtw_ieee80211_channel)); + - } -+ //pmlmeinfo->state = WIFI_FW_NULL_STATE; -+ - +- - psta->qos_option = _TRUE; - - } - else -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, 0); -+ rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, null_addr); -+ -+ //restore to initial setting. -+ update_tx_basic_rate(padapter, padapter->registrypriv.wireless_mode); -+ -+ if(((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE)) - { +- { - phtpriv_sta->ampdu_enable = _FALSE; - - phtpriv_sta->sgi = _FALSE; - phtpriv_sta->bwmode = HT_CHANNEL_WIDTH_20; - phtpriv_sta->ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; -+ //Stop BCN -+ val8 = 0; -+ rtw_hal_set_hwreg(padapter, HW_VAR_BCN_FUNC, (u8 *)(&val8)); ++ if(pmlmeext->channel_set[set_idx].ScanType == SCAN_PASSIVE) ++ out[j].flags &= RTW_IEEE80211_CHAN_PASSIVE_SCAN; ++ ++ j++; ++ } ++ if(j>=out_num) ++ break; } - +- - //Rx AMPDU - send_delba(padapter, 0, psta->hwaddr);// recipient - @@ -21938,64 +21263,56 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - send_delba(padapter, 1, psta->hwaddr);// // originator - phtpriv_sta->agg_enable_bitmap = 0x0;//reset - phtpriv_sta->candidate_tid_bitmap = 0x0;//reset -- + ++ /* if out is empty, use channel_set as default */ ++ if(j == 0) { ++ for (i=0;imax_chan_nums;i++) { - //todo: init other variables - - _rtw_memset((void*)&psta->sta_stats, 0, sizeof(struct stainfo_stats)); -+ //set MSR to no link state -> infra. mode -+ Set_MSR(padapter, _HW_STATE_STATION_); -+ -+ pmlmeinfo->state = WIFI_FW_NULL_STATE; ++ if (0) ++ DBG_871X(FUNC_ADPT_FMT" ch:%u\n", FUNC_ADPT_ARG(padapter), pmlmeext->channel_set[i].ChannelNum); -+#ifdef CONFIG_DUALMAC_CONCURRENT -+ dc_set_channel_bwmode_disconnect(padapter); -+#else -+#ifdef CONFIG_CONCURRENT_MODE -+ if((check_buddy_fwstate(padapter, _FW_LINKED)) != _TRUE) -+ { -+#endif //CONFIG_CONCURRENT_MODE -+ //switch to the 20M Hz mode after disconnect -+ pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; -+ pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; ++ if (rtw_mlme_band_check(padapter, pmlmeext->channel_set[i].ChannelNum) == _TRUE) { - //add ratid - //add_RATid(padapter, psta);//move to ap_sta_info_defer_update() -+ set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); -+#ifdef CONFIG_CONCURRENT_MODE -+ } -+#endif //CONFIG_CONCURRENT_MODE -+#endif //CONFIG_DUALMAC_CONCURRENT ++ if (j >= out_num) { ++ DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" out_num:%u not enough\n", ++ FUNC_ADPT_ARG(padapter), out_num); ++ break; ++ } -+ flush_all_cam_entry(padapter); -+ -+ _cancel_timer_ex(&pmlmeext->link_timer); ++ out[j].hw_value = pmlmeext->channel_set[i].ChannelNum; ++ ++ if(pmlmeext->channel_set[i].ScanType == SCAN_PASSIVE) ++ out[j].flags &= RTW_IEEE80211_CHAN_PASSIVE_SCAN; - _enter_critical_bh(&psta->lock, &irqL); - psta->state |= _FW_LINKED; - _exit_critical_bh(&psta->lock, &irqL); -+ rtw_free_uc_swdec_pending_queue(padapter); - -- -+ return H2C_SUCCESS; +- ++ j++; ++ } ++ } ++ } + ++ return j; } -static void update_hw_ht_param(_adapter *padapter) -+int rtw_scan_ch_decision(_adapter *padapter, struct rtw_ieee80211_channel *out, -+ u32 out_num, struct rtw_ieee80211_channel *in, u32 in_num) ++u8 sitesurvey_cmd_hdl(_adapter *padapter, u8 *pbuf) { - unsigned char max_AMPDU_len; - unsigned char min_MPDU_spacing; - struct registry_priv *pregpriv = &padapter->registrypriv; -+ int i, j; -+ int scan_ch_num = 0; -+ int set_idx; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - - DBG_871X("%s\n", __FUNCTION__); - - +- - //handle A-MPDU parameter field - /* - AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k @@ -22006,34 +21323,25 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - min_MPDU_spacing = (pmlmeinfo->HT_caps.HT_cap_element.AMPDU_para & 0x1c) >> 2; - - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_AMPDU_MIN_SPACE, (u8 *)(&min_MPDU_spacing)); -+ /* clear first */ -+ _rtw_memset(out, 0, sizeof(struct rtw_ieee80211_channel)*out_num); ++ struct sitesurvey_parm *pparm = (struct sitesurvey_parm *)pbuf; ++ u8 bdelayscan = _FALSE; ++ u8 val8; ++ u32 initialgain; ++ u32 i; ++ u8 write_initial_gain = 1; - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&max_AMPDU_len)); -+ /* acquire channels from in */ -+ j = 0; -+ for (i=0;ichannel_set, in[i].hw_value)) >=0 -+ && rtw_mlme_band_check(padapter, in[i].hw_value) == _TRUE -+ ) -+ { -+ if (j >= out_num) { -+ DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" out_num:%u not enough\n", -+ FUNC_ADPT_ARG(padapter), out_num); -+ break; -+ } ++#ifdef CONFIG_P2P ++ struct wifidirect_info* pwdinfo = &padapter->wdinfo; ++#endif - // - // Config SM Power Save setting - // - pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.HT_cap_element.HT_caps_info & 0x0C) >> 2; - if(pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC) -- { ++ if (pmlmeext->sitesurvey_res.state == SCAN_DISABLE) + { - /*u8 i; - //update the MCS rates - for (i = 0; i < 16; i++) @@ -22041,52 +21349,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pmlmeinfo->HT_caps.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i]; - }*/ - DBG_8192C("%s(): WLAN_HT_CAP_SM_PS_STATIC\n",__FUNCTION__); -+ _rtw_memcpy(&out[j], &in[i], sizeof(struct rtw_ieee80211_channel)); -+ -+ if(pmlmeext->channel_set[set_idx].ScanType == SCAN_PASSIVE) -+ out[j].flags &= RTW_IEEE80211_CHAN_PASSIVE_SCAN; -+ -+ j++; -+ } -+ if(j>=out_num) -+ break; - } -+ -+ /* if out is empty, use channel_set as default */ -+ if(j == 0) { -+ for (i=0;imax_chan_nums;i++) { -+ -+ if (0) -+ DBG_871X(FUNC_ADPT_FMT" ch:%u\n", FUNC_ADPT_ARG(padapter), pmlmeext->channel_set[i].ChannelNum); -+ -+ if (rtw_mlme_band_check(padapter, pmlmeext->channel_set[i].ChannelNum) == _TRUE) { -+ -+ if (j >= out_num) { -+ DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" out_num:%u not enough\n", -+ FUNC_ADPT_ARG(padapter), out_num); -+ break; -+ } - +- } +- - // - // Config current HT Protection mode. - // - //pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3; -+ out[j].hw_value = pmlmeext->channel_set[i].ChannelNum; -+ -+ if(pmlmeext->channel_set[i].ScanType == SCAN_PASSIVE) -+ out[j].flags &= RTW_IEEE80211_CHAN_PASSIVE_SCAN; -+ -+ j++; -+ } -+ } -+ } - -+ return j; - } - +- +-} +- -static void start_bss_network(_adapter *padapter, u8 *pbuf) -+u8 sitesurvey_cmd_hdl(_adapter *padapter, u8 *pbuf) - { +-{ - u8 *p; - u8 val8, cur_channel, cur_bwmode, cur_ch_offset; - u16 bcn_interval; @@ -22105,19 +21378,28 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - - //DBG_8192C("%s\n", __FUNCTION__); -- ++#ifdef CONFIG_CONCURRENT_MODE ++ //for first time sitesurvey_cmd ++ rtw_hal_set_hwreg(padapter, HW_VAR_CHECK_TXBUF, 0); ++#endif //CONFIG_CONCURRENT_MODE ++ ++ pmlmeext->sitesurvey_res.state = SCAN_START; ++ pmlmeext->sitesurvey_res.bss_cnt = 0; ++ pmlmeext->sitesurvey_res.channel_idx = 0; + - bcn_interval = (u16)pnetwork->Configuration.BeaconPeriod; - cur_channel = pnetwork->Configuration.DSConfig; - cur_bwmode = HT_CHANNEL_WIDTH_20;; - cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; - -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct sitesurvey_parm *pparm = (struct sitesurvey_parm *)pbuf; -+ u8 bdelayscan = _FALSE; -+ u8 val8; -+ u32 initialgain; -+ u32 i; -+ u8 write_initial_gain = 1; ++ for(i=0;issid[i].SsidLength) { ++ _rtw_memcpy(pmlmeext->sitesurvey_res.ssid[i].Ssid, pparm->ssid[i].Ssid, IW_ESSID_MAX_SIZE); ++ pmlmeext->sitesurvey_res.ssid[i].SsidLength= pparm->ssid[i].SsidLength; ++ } else { ++ pmlmeext->sitesurvey_res.ssid[i].SsidLength= 0; ++ } ++ } - //check if there is wps ie, - //if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, @@ -22135,53 +21417,41 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - //pmlmeinfo->HT_enable; - if(pmlmepriv->qospriv.qos_option) - pmlmeinfo->WMM_enable = _TRUE; -+#ifdef CONFIG_P2P -+ struct wifidirect_info* pwdinfo = &padapter->wdinfo; -+#endif ++ pmlmeext->sitesurvey_res.ch_num = rtw_scan_ch_decision(padapter ++ , pmlmeext->sitesurvey_res.ch, RTW_CHANNEL_SCAN_AMOUNT ++ , pparm->ch, pparm->ch_num ++ ); - if(pmlmepriv->htpriv.ht_option) -+ if (pmlmeext->sitesurvey_res.state == SCAN_DISABLE) - { +- { - pmlmeinfo->WMM_enable = _TRUE; - pmlmeinfo->HT_enable = _TRUE; - //pmlmeinfo->HT_info_enable = _TRUE; - //pmlmeinfo->HT_caps_enable = _TRUE; -+#ifdef CONFIG_CONCURRENT_MODE -+ //for first time sitesurvey_cmd -+ rtw_hal_set_hwreg(padapter, HW_VAR_CHECK_TXBUF, 0); -+#endif //CONFIG_CONCURRENT_MODE -+ -+ pmlmeext->sitesurvey_res.state = SCAN_START; -+ pmlmeext->sitesurvey_res.bss_cnt = 0; -+ pmlmeext->sitesurvey_res.channel_idx = 0; ++ pmlmeext->sitesurvey_res.scan_mode = pparm->scan_mode; - update_hw_ht_param(padapter); - } - -+ for(i=0;issid[i].SsidLength) { -+ _rtw_memcpy(pmlmeext->sitesurvey_res.ssid[i].Ssid, pparm->ssid[i].Ssid, IW_ESSID_MAX_SIZE); -+ pmlmeext->sitesurvey_res.ssid[i].SsidLength= pparm->ssid[i].SsidLength; -+ } else { -+ pmlmeext->sitesurvey_res.ssid[i].SsidLength= 0; -+ } -+ } ++#ifdef CONFIG_DUALMAC_CONCURRENT ++ bdelayscan = dc_handle_site_survey(padapter); ++#endif - if(pmlmepriv->cur_network.join_res != _TRUE) //setting only at first time - { - flush_all_cam_entry(padapter); //clear CAM - } -+ pmlmeext->sitesurvey_res.ch_num = rtw_scan_ch_decision(padapter -+ , pmlmeext->sitesurvey_res.ch, RTW_CHANNEL_SCAN_AMOUNT -+ , pparm->ch, pparm->ch_num -+ ); ++ //issue null data if associating to the AP ++ if (is_client_associated_to_ap(padapter) == _TRUE) ++ { ++ pmlmeext->sitesurvey_res.state = SCAN_TXNULL; - //set MSR to AP_Mode - Set_NETYPE0_MSR(padapter, _HW_STATE_AP_); - - //Set BSSID REG - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BSSID, pnetwork->MacAddress); -+ pmlmeext->sitesurvey_res.scan_mode = pparm->scan_mode; ++ issue_nulldata(padapter, NULL, 1, 3, 500); - //Set EDCA param reg - acparm = 0x002F3217; // VO @@ -22193,29 +21463,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm)); - acparm = 0x0000A444; // BK - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm)); -- -- //Set Security -- val8 = (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); -+#ifdef CONFIG_DUALMAC_CONCURRENT -+ bdelayscan = dc_handle_site_survey(padapter); -+#endif - -- //Beacon Control related register -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&bcn_interval)); -+ //issue null data if associating to the AP -+ if (is_client_associated_to_ap(padapter) == _TRUE) -+ { -+ pmlmeext->sitesurvey_res.state = SCAN_TXNULL; - -- -- UpdateBrateTbl(padapter, pnetwork->SupportedRates); -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates); -+ issue_nulldata(padapter, NULL, 1, 3, 500); - -- if(pmlmepriv->cur_network.join_res != _TRUE) //setting only at first time -- { -- u32 initialgain; +#ifdef CONFIG_CONCURRENT_MODE + if(is_client_associated_to_ap(padapter->pbuddy_adapter) == _TRUE) + { @@ -22236,19 +21483,55 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + #endif //CONFIG_TDLS -- //disable dynamic functions, such as high power, DIG +- //Set Security +- val8 = (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)? 0xcc: 0xcf; +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); ++ pmlmeext->sitesurvey_res.state = SCAN_TXNULL; + +- //Beacon Control related register +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&bcn_interval)); ++ issue_nulldata(padapter->pbuddy_adapter, NULL, 1, 3, 500); + +- +- UpdateBrateTbl(padapter, pnetwork->SupportedRates); +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates); ++ bdelayscan = _TRUE; ++ } ++#endif ++ if(bdelayscan) ++ { ++ //delay 50ms to protect nulldata(1). ++ set_survey_timer(pmlmeext, 50); ++ return H2C_SUCCESS; ++ } ++ } + +- if(pmlmepriv->cur_network.join_res != _TRUE) //setting only at first time ++ if ((pmlmeext->sitesurvey_res.state == SCAN_START) || (pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) + { +- u32 initialgain; ++#ifdef CONFIG_FIND_BEST_CHANNEL ++#if 0 ++ for (i=0; pmlmeext->channel_set[i].ChannelNum !=0; i++) { ++ pmlmeext->channel_set[i].rx_count = 0; ++ } ++#endif ++#endif /* CONFIG_FIND_BEST_CHANNEL */ + + //disable dynamic functions, such as high power, DIG - //Save_DM_Func_Flag(padapter); - //Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); - - //turn on dynamic functions - Switch_DM_Func(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, _TRUE); -+ pmlmeext->sitesurvey_res.state = SCAN_TXNULL; ++ Save_DM_Func_Flag(padapter); ++ Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); - initialgain = 0x30; - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); - - } -+ issue_nulldata(padapter->pbuddy_adapter, NULL, 1, 3, 500); ++ //config the initial gain under scaning, need to write the BB registers - //set channel, bwmode - p = rtw_get_ie((pnetwork->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _HT_ADD_INFO_IE_, &ie_len, (pnetwork->IELength - sizeof(NDIS_802_11_FIXED_IEs))); @@ -22257,10 +21540,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct HT_info_element *pht_info = (struct HT_info_element *)(p+2); - - if ((pregpriv->cbw40_enable) && (pht_info->infos[0] & BIT(2))) -+ bdelayscan = _TRUE; -+ } -+#endif -+ if(bdelayscan) ++#ifdef CONFIG_P2P ++#ifdef CONFIG_IOCTL_CFG80211 ++ if((wdev_to_priv(padapter->rtw_wdev))->p2p_enabled == _TRUE && pwdinfo->driver_interface == DRIVER_CFG80211 ) { - //switch to the 40M Hz mode - //pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40; @@ -22283,78 +21565,57 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - break; - } - -+ //delay 50ms to protect nulldata(1). -+ set_survey_timer(pmlmeext, 50); -+ return H2C_SUCCESS; ++ write_initial_gain = 0; } - - } - +- } +- - //TODO: need to judge the phy parameters on concurrent mode for single phy - //set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); - set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode); - - DBG_871X("CH=%d, BW=%d, offset=%d\n", cur_channel, cur_bwmode, cur_ch_offset); -+ if ((pmlmeext->sitesurvey_res.state == SCAN_START) || (pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) -+ { -+#ifdef CONFIG_FIND_BEST_CHANNEL -+#if 0 -+ for (i=0; pmlmeext->channel_set[i].ChannelNum !=0; i++) { -+ pmlmeext->channel_set[i].rx_count = 0; -+ } -+#endif -+#endif /* CONFIG_FIND_BEST_CHANNEL */ - +- - // - pmlmeext->cur_channel = cur_channel; - pmlmeext->cur_bwmode = cur_bwmode; - pmlmeext->cur_ch_offset = cur_ch_offset; - pmlmeext->cur_wireless_mode = pmlmepriv->cur_network.network_type; -+ //disable dynamic functions, such as high power, DIG -+ Save_DM_Func_Flag(padapter); -+ Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, _FALSE); ++ else ++#endif //CONFIG_IOCTL_CFG80211 ++ if ( !rtw_p2p_chk_state( pwdinfo, P2P_STATE_NONE ) ) ++ initialgain = 0x28; ++ else ++#endif //CONFIG_P2P ++ initialgain = 0x17; - //update cur_wireless_mode - update_wireless_mode(padapter); - - //let pnetwork_mlmeext == pnetwork_mlme. - _rtw_memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length); -+ //config the initial gain under scaning, need to write the BB registers ++ if(write_initial_gain == 1) ++ rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); - #ifdef CONFIG_P2P +-#ifdef CONFIG_P2P - _rtw_memcpy(pwdinfo->p2p_group_ssid, pnetwork->Ssid.Ssid, pnetwork->Ssid.SsidLength); - pwdinfo->p2p_group_ssid_len = pnetwork->Ssid.SsidLength; -+#ifdef CONFIG_IOCTL_CFG80211 -+ if((wdev_to_priv(padapter->rtw_wdev))->p2p_enabled == _TRUE && pwdinfo->driver_interface == DRIVER_CFG80211 ) -+ { -+ write_initial_gain = 0; -+ } -+ else -+#endif //CONFIG_IOCTL_CFG80211 -+ if ( !rtw_p2p_chk_state( pwdinfo, P2P_STATE_NONE ) ) -+ initialgain = 0x28; -+ else - #endif //CONFIG_P2P -+ initialgain = 0x17; +-#endif //CONFIG_P2P ++ //set MSR to no link state ++ Set_MSR(padapter, _HW_STATE_NOLINK_); - - if(_TRUE == pmlmeext->bstart_bss) - { - update_beacon(padapter, _TIM_IE_, NULL, _FALSE); -+ if(write_initial_gain == 1) -+ rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); ++ val8 = 1; //under site survey ++ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); - //issue beacon frame - if(send_beacon(padapter)==_FAIL) - { - DBG_871X("issue_beacon, fail!\n"); - } -+ //set MSR to no link state -+ Set_MSR(padapter, _HW_STATE_NOLINK_); -+ -+ val8 = 1; //under site survey -+ rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); -+ + pmlmeext->sitesurvey_res.state = SCAN_PROCESS; } @@ -22463,14 +21724,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif //CONFIG_TDLS - _rtw_memcpy(pbss_network->MacAddress, myid(&(padapter->eeprompriv)), ETH_ALEN); -+ //cam_entry: -+ //0~3 for default key - +- - //beacon interval - p = rtw_get_beacon_interval_from_ie(ie);//ie + 8; // 8: TimeStamp, 2: Beacon Interval 2:Capability - //pbss_network->Configuration.BeaconPeriod = le16_to_cpu(*(unsigned short*)p); - pbss_network->Configuration.BeaconPeriod = RTW_GET_LE16(p); -- ++ //cam_entry: ++ //0~3 for default key + - //capability - //cap = *(unsigned short *)rtw_get_capability_from_ie(ie); - //cap = le16_to_cpu(cap); @@ -22479,26 +21740,33 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + //default key is disable, using sw encrypt/decrypt + //cam_entry = 4 //for sta mode (macid=0) + //cam_entry(macid+3) = 5 ~ N//for ap mode (aid=1~N, macid=2 ~N) -+ -+ //for concurrent mode (sta+sta): -+ //default key is disable, using sw encrypt/decrypt -+ //cam_entry = 4 //mapping to macid=0 -+ //cam_entry = 5 //mapping to macid=2 - //SSID - p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength -_BEACON_IE_OFFSET_)); - if(p && ie_len>0) ++ //for concurrent mode (sta+sta): ++ //default key is disable, using sw encrypt/decrypt ++ //cam_entry = 4 //mapping to macid=0 ++ //cam_entry = 5 //mapping to macid=2 ++ +#ifdef CONFIG_CONCURRENT_MODE + if((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) { - _rtw_memset(&pbss_network->Ssid, 0, sizeof(NDIS_802_11_SSID)); - _rtw_memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len); - pbss_network->Ssid.SsidLength = ie_len; +- } + struct sta_priv *pstapriv = &padapter->stapriv; + struct sta_info *psta; + + psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress); -+ + +- //chnnel +- channel = 0; +- pbss_network->Configuration.Length = 0; +- p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _DSSET_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); +- if(p && ie_len>0) +- channel = *(p + 2); + if(psta && psta->mac_id==2) + { + cam_id = 5; @@ -22517,20 +21785,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + cam_id = 4; + } +*/ - } ++ } +#else + cam_id = 4; +#endif -- //chnnel -- channel = 0; -- pbss_network->Configuration.Length = 0; -- p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _DSSET_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); -- if(p && ie_len>0) -- channel = *(p + 2); -- - pbss_network->Configuration.DSConfig = channel; -- + - - _rtw_memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX); - // get supported rates @@ -22544,7 +21805,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - //get ext_supported rates - p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_SUPPORTEDRATES_IE_, &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_); - if (p != NULL) -+ + if((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) { - _rtw_memcpy(supportRate+supportRateNum, p+2, ie_len); @@ -22553,11 +21813,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - - network_type = rtw_check_network_type(supportRate, supportRateNum, channel); -- -- rtw_set_supported_rate(pbss_network->SupportedRates, network_type); + struct sta_info *psta; + struct sta_priv *pstapriv = &padapter->stapriv; +- rtw_set_supported_rate(pbss_network->SupportedRates, network_type); + if(pparm->algorithm == _NO_PRIVACY_) // clear cam entry + { + clear_cam_entry(padapter, pparm->id); @@ -22569,6 +21828,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + ctrl = (BIT(15) | ((pparm->algorithm) << 2)); ++ DBG_871X("r871x_set_stakey_hdl(): enc_algorithm=%d\n", pparm->algorithm); + - //parsing ERP_IE - p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _ERPINFO_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); - if(p && ie_len>0) @@ -22645,7 +21906,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - DBG_8192C("%s id=0x%x len=%d rem=%d next p %p\n",__FUNCTION__,*p,p[1],rem,p + (p[1]+2)); - if ((p) && (_rtw_memcmp(p+2, OUI1, 4))) -- { ++ if((psta->mac_id<1) || (psta->mac_id>(NUM_STA-4))) + { - //remove wpa ie - u32 remain=0; - u8 *ptr; @@ -22674,15 +21936,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - } -#else //SUPPORT_64_STA -+ DBG_871X("r871x_set_stakey_hdl(): enc_algorithm=%d\n", pparm->algorithm); - +- - //update privacy/security - if (cap & BIT(4)) - pbss_network->Privacy = 1; - else - pbss_network->Privacy = 0; -+ if((psta->mac_id<1) || (psta->mac_id>(NUM_STA-4))) -+ { + DBG_871X("r871x_set_stakey_hdl():set_stakey failed, mac_id(aid)=%d\n", psta->mac_id); + return H2C_REJECTED; + } @@ -22779,8 +22038,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - psecuritypriv->dot11AuthAlgrthm= dot11AuthAlgrthm_8021X; - - psecuritypriv->dot8021xalg = 1;//psk, todo:802.1x -- -- psecuritypriv->wpa_psk |= BIT(0); + clear_cam_entry(padapter, pparm->id); + return H2C_SUCCESS; + } @@ -22792,10 +22049,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + clear_cam_entry(padapter, ptdlsinfo->clear_cam); + ptdlsinfo->clear_cam=0; +- psecuritypriv->wpa_psk |= BIT(0); ++ return H2C_SUCCESS; ++ } + - psecuritypriv->wpa_group_cipher = group_cipher; - psecuritypriv->wpa_pairwise_cipher = pairwise_cipher; -+ return H2C_SUCCESS; ++ psta = rtw_get_stainfo(pstapriv, pparm->addr);//Get TDLS Peer STA ++ if( psta->tdls_sta_state&TDLS_LINKED_STATE ){ ++ write_cam(padapter, psta->mac_id, ctrl, pparm->addr, pparm->key); + } ++ else ++#endif //CONFIG_TDLS ++ write_cam(padapter, cam_id, ctrl, pparm->addr, pparm->key); -#if 0 - switch(group_cipher) @@ -22816,13 +22082,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - psecuritypriv->wpa_group_cipher = _WEP104_; - break; - } -+ psta = rtw_get_stainfo(pstapriv, pparm->addr);//Get TDLS Peer STA -+ if( psta->tdls_sta_state&TDLS_LINKED_STATE ){ -+ write_cam(padapter, psta->mac_id, ctrl, pparm->addr, pparm->key); -+ } -+ else -+#endif //CONFIG_TDLS -+ write_cam(padapter, cam_id, ctrl, pparm->addr, pparm->key); ++ pmlmeinfo->enc_algo = pparm->algorithm; ++ ++ return H2C_SUCCESS; ++} - switch(pairwise_cipher) - { @@ -22844,10 +22107,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } -#endif - } -+ pmlmeinfo->enc_algo = pparm->algorithm; -+ -+ return H2C_SUCCESS; -+} ++u8 add_ba_hdl(_adapter *padapter, unsigned char *pbuf) ++{ ++ struct addBaReq_parm *pparm = (struct addBaReq_parm *)pbuf; ++ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; ++ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); - break; - @@ -22857,12 +22121,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - break; - } -+u8 add_ba_hdl(_adapter *padapter, unsigned char *pbuf) -+{ -+ struct addBaReq_parm *pparm = (struct addBaReq_parm *)pbuf; -+ struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -+ struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); -+ + struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, pparm->addr); + + if(!psta) @@ -23256,21 +22514,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - WLAN_BSSID_EX *pnetwork = &(pmlmeinfo->network); - unsigned char *ie = pnetwork->IEs; - u32 ielen = pnetwork->IELength; -- -- -- DBG_871X("%s\n", __FUNCTION__); + u8 network_type,rate_len, total_rate_len,remainder_rate_len; + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); + u8 erpinfo=0x4; -- pwps_ie = rtw_get_wps_ie(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen); -- -- if(pwps_ie==NULL || wps_ielen==0) -- return; + //DBG_871X("%s\n", __FUNCTION__); -- wps_offset = (uint)(pwps_ie-ie); +- DBG_871X("%s\n", __FUNCTION__); + if(pmlmeext->cur_channel >= 36) + { + network_type = WIRELESS_11A; @@ -23286,19 +22537,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + rtw_add_bcn_ie(padapter, pnetwork, _ERPINFO_IE_, &erpinfo, 1); + } -- premainder_ie = pwps_ie + wps_ielen; +- pwps_ie = rtw_get_wps_ie(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen); +- +- if(pwps_ie==NULL || wps_ielen==0) +- return; + rtw_set_supported_rate(pnetwork->SupportedRates, network_type); - -- remainder_ielen = ielen - wps_offset - wps_ielen; ++ + UpdateBrateTbl(padapter, pnetwork->SupportedRates); + rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates); - -- if(remainder_ielen>0) ++ + if(total_rate_len > 8) - { -- pbackup_remainder_ie = rtw_malloc(remainder_ielen); -- if(pbackup_remainder_ie) -- _rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); ++ { + rate_len = 8; + remainder_rate_len = total_rate_len - 8; + } @@ -23306,21 +22555,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + rate_len = total_rate_len; + remainder_rate_len = 0; - } - -- -- pwps_ie_src = pmlmepriv->wps_beacon_ie; -- if(pwps_ie_src == NULL) -- return; -- ++ } ++ + rtw_add_bcn_ie(padapter, pnetwork, _SUPPORTEDRATES_IE_, pnetwork->SupportedRates, rate_len); -- wps_ielen = (uint)pwps_ie_src[1];//to get ie data len -- if((wps_offset+wps_ielen+2+remainder_ielen)<=MAX_IE_SZ) +- wps_offset = (uint)(pwps_ie-ie); + if(remainder_rate_len) - { -- _rtw_memcpy(pwps_ie, pwps_ie_src, wps_ielen+2); -- pwps_ie += (wps_ielen+2); ++ { + rtw_add_bcn_ie(padapter, pnetwork, _EXT_SUPPORTEDRATES_IE_, (pnetwork->SupportedRates+8), remainder_rate_len); + } + else @@ -23329,19 +22570,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +} -- if(pbackup_remainder_ie) -- _rtw_memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen); +- premainder_ie = pwps_ie + wps_ielen; -- //update IELength -- pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen; -- } +- remainder_ielen = ielen - wps_offset - wps_ielen; +#ifdef CONFIG_DUALMAC_CONCURRENT +void dc_SelectChannel(_adapter *padapter, unsigned char channel) +{ + PADAPTER ptarget_adapter; -- if(pbackup_remainder_ie) -- rtw_mfree(pbackup_remainder_ie, remainder_ielen); +- if(remainder_ielen>0) + if( (padapter->pbuddy_adapter != NULL) && + (padapter->DualMacConcurrent == _TRUE) && + (padapter->adapter_type == SECONDARY_ADAPTER)) @@ -23350,60 +22587,79 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + ptarget_adapter = padapter->pbuddy_adapter; + } + else -+ { + { +- pbackup_remainder_ie = rtw_malloc(remainder_ielen); +- if(pbackup_remainder_ie) +- _rtw_memcpy(pbackup_remainder_ie, premainder_ie, remainder_ielen); + ptarget_adapter = padapter; -+ } + } --} +- +- pwps_ie_src = pmlmepriv->wps_beacon_ie; +- if(pwps_ie_src == NULL) +- return; + _enter_critical_mutex(&(adapter_to_dvobj(ptarget_adapter)->setch_mutex), NULL); --static void update_bcn_p2p_ie(_adapter *padapter) --{ + rtw_hal_set_chan(ptarget_adapter, channel); +- wps_ielen = (uint)pwps_ie_src[1];//to get ie data len +- if((wps_offset+wps_ielen+2+remainder_ielen)<=MAX_IE_SZ) +- { +- _rtw_memcpy(pwps_ie, pwps_ie_src, wps_ielen+2); +- pwps_ie += (wps_ielen+2); + _exit_critical_mutex(&(adapter_to_dvobj(ptarget_adapter)->setch_mutex), NULL); - } ++} --static void update_bcn_vendor_spec_ie(_adapter *padapter, u8*oui) +- if(pbackup_remainder_ie) +- _rtw_memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen); +void dc_SetBWMode(_adapter *padapter, unsigned short bwmode, unsigned char channel_offset) - { -- DBG_871X("%s\n", __FUNCTION__); ++{ + PADAPTER ptarget_adapter; -- if(_rtw_memcmp(WPA_OUI, oui, 4)) +- //update IELength +- pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen; + if( (padapter->pbuddy_adapter != NULL) && + (padapter->DualMacConcurrent == _TRUE) && + (padapter->adapter_type == SECONDARY_ADAPTER)) - { -- update_bcn_wpa_ie(padapter); ++ { + // only mac0 could control BB&RF + ptarget_adapter = padapter->pbuddy_adapter; - } -- else if(_rtw_memcmp(WMM_OUI, oui, 4)) ++ } + else - { -- update_bcn_wmm_ie(padapter); ++ { + ptarget_adapter = padapter; } -- else if(_rtw_memcmp(WPS_OUI, oui, 4)) -+ + +- if(pbackup_remainder_ie) +- rtw_mfree(pbackup_remainder_ie, remainder_ielen); +- +-} + _enter_critical_mutex(&(adapter_to_dvobj(ptarget_adapter)->setbw_mutex), NULL); -+ + +-static void update_bcn_p2p_ie(_adapter *padapter) +-{ + rtw_hal_set_bwmode(ptarget_adapter, (HT_CHANNEL_WIDTH)bwmode, channel_offset); -+ + + _exit_critical_mutex(&(adapter_to_dvobj(ptarget_adapter)->setbw_mutex), NULL); -+} -+ + } + +-static void update_bcn_vendor_spec_ie(_adapter *padapter, u8*oui) +void dc_set_channel_bwmode_disconnect(_adapter *padapter) -+{ + { +- DBG_871X("%s\n", __FUNCTION__); + struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; + PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; + struct mlme_priv *pbuddy_mlmepriv = NULL; -+ + +- if(_rtw_memcmp(WPA_OUI, oui, 4)) +- { +- update_bcn_wpa_ie(padapter); +- } +- else if(_rtw_memcmp(WMM_OUI, oui, 4)) + if(pbuddy_adapter != NULL && + padapter->DualMacConcurrent == _TRUE) { -- update_bcn_wps_ie(padapter); +- update_bcn_wmm_ie(padapter); + pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv); + if((check_fwstate(pbuddy_mlmepriv, _FW_LINKED)) != _TRUE) + { @@ -23414,17 +22670,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); + } } -- else if(_rtw_memcmp(P2P_OUI, oui, 4)) +- else if(_rtw_memcmp(WPS_OUI, oui, 4)) + else { -- update_bcn_p2p_ie(padapter); +- update_bcn_wps_ie(padapter); + //switch to the 20M Hz mode after disconnect + pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; + pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; + + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); } -- else +- else if(_rtw_memcmp(P2P_OUI, oui, 4)) +} + +u8 dc_handle_join_request(_adapter *padapter) @@ -23440,10 +22696,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if(pbuddy_adapter != NULL && + padapter->DualMacConcurrent == _TRUE) { -- DBG_871X("unknown OUI type!\n"); -- } -- -- +- update_bcn_p2p_ie(padapter); + pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; + pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv); + @@ -23482,7 +22735,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + issue_nulldata(pbuddy_adapter, NULL, 1, 0, 0); + } -+ } + } +- else +- { +- DBG_871X("unknown OUI type!\n"); +- } +- +- + + return ret; } @@ -23708,17 +22967,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - int op_mode_changes = 0; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv; -+ PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; -+ struct mlme_priv *pbuddy_mlmepriv = NULL; - +- - if(pmlmepriv->htpriv.ht_option == _TRUE) - return 0; - - //if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed) - // return 0; -+ if(padapter->pbuddy_adapter != NULL && -+ padapter->DualMacConcurrent == _TRUE) - +- - DBG_871X("%s current operation mode=0x%X\n", - __FUNCTION__, pmlmepriv->ht_op_mode); - @@ -23762,13 +23017,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - new_op_mode = OP_MODE_MAY_BE_LEGACY_STAS; - else - new_op_mode = OP_MODE_PURE; -- ++ PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; ++ struct mlme_priv *pbuddy_mlmepriv = NULL; + - cur_op_mode = pmlmepriv->ht_op_mode & HT_INFO_OPERATION_MODE_OP_MODE_MASK; - if (cur_op_mode != new_op_mode) { - pmlmepriv->ht_op_mode &= ~HT_INFO_OPERATION_MODE_OP_MODE_MASK; - pmlmepriv->ht_op_mode |= new_op_mode; - op_mode_changes++; - } ++ if(padapter->pbuddy_adapter != NULL && ++ padapter->DualMacConcurrent == _TRUE) ++ + { + pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv); @@ -23858,19 +23118,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -#endif +} - -- if(!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT)) -- { -- if(!psta->no_short_slot_time_set) -- { -- psta->no_short_slot_time_set = 1; -- -- pmlmepriv->num_sta_no_short_slot_time++; -- -- if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && -- (pmlmepriv->num_sta_no_short_slot_time == 1)) -- update_beacon(padapter, 0xFF, NULL, _TRUE); -- ++ +void dc_set_channel_bwmode_survey_done(_adapter *padapter) +{ + struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -23882,16 +23130,26 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + u8 cur_channel; + u8 cur_bwmode; + u8 cur_ch_offset; -+ + +- if(!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT)) + if(pbuddy_adapter != NULL && + padapter->DualMacConcurrent == _TRUE) -+ { + { +- if(!psta->no_short_slot_time_set) + pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv); + pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; + pbuddy_mlmeinfo = &(pbuddy_mlmeext->mlmext_info); + + if(check_fwstate(pbuddy_mlmepriv, _FW_LINKED)) -+ { + { +- psta->no_short_slot_time_set = 1; +- +- pmlmepriv->num_sta_no_short_slot_time++; +- +- if ((pmlmeext->cur_wireless_mode > WIRELESS_11B) && +- (pmlmepriv->num_sta_no_short_slot_time == 1)) +- update_beacon(padapter, 0xFF, NULL, _TRUE); +- + if(check_fwstate(pmlmepriv, _FW_LINKED) && + (pmlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40)) + { @@ -23983,7 +23241,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); } +} - ++ +void dc_set_ap_channel_bandwidth(_adapter *padapter, u8 channel, u8 channel_offset, u8 bwmode) +{ + u8 *p; @@ -23998,16 +23256,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + _adapter *pbuddy_adapter = padapter->pbuddy_adapter; + struct mlme_priv *pbuddy_mlmepriv = NULL; + struct mlme_ext_priv *pbuddy_mlmeext = NULL; -+ + + DBG_871X("dualmac_concurrent_ap_set_channel_bwmode ==>\n"); -+ + +-#ifdef CONFIG_80211N_HT + cur_channel = channel; + cur_bwmode = bwmode; + cur_ch_offset = channel_offset; + change_band = _FALSE; --#ifdef CONFIG_80211N_HT -- - if (psta->flags & WLAN_STA_HT) + p = rtw_get_ie((pnetwork->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _HT_ADD_INFO_IE_, &ie_len, (pnetwork->IELength - sizeof(NDIS_802_11_FIXED_IEs))); + if( p && ie_len) @@ -24080,10 +23337,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + if(pht_info) + pht_info->infos[0] &= ~(BIT(0)|BIT(1)); -+ -+ if(pbuddy_mlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40) -+ { -+ cur_ch_offset = pbuddy_mlmeext->cur_ch_offset; - if (rtw_ht_operation_update(padapter) > 0) - { @@ -24092,6 +23345,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - -#endif /* CONFIG_80211N_HT */ ++ if(pbuddy_mlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40) ++ { ++ cur_ch_offset = pbuddy_mlmeext->cur_ch_offset; + +-} + //to update cur_ch_offset value in beacon + if(pht_info) + { @@ -24114,40 +23372,38 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + cur_bwmode = HT_CHANNEL_WIDTH_20; + cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; --} -+ if(cur_channel>0 && cur_channel<5) -+ { -+ if(pht_info) -+ pht_info->infos[0] |= 0x1; - -void ap_free_sta(_adapter *padapter, struct sta_info *psta) -{ - _irqL irqL; - struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); - struct sta_priv *pstapriv = &padapter->stapriv; ++ if(cur_channel>0 && cur_channel<5) ++ { ++ if(pht_info) ++ pht_info->infos[0] |= 0x1; + +- if(!psta) +- return; + cur_bwmode = HT_CHANNEL_WIDTH_40; + cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER; + } -- if(!psta) -- return; + if(cur_channel>7 && cur_channel<(14+1)) + { + if(pht_info) + pht_info->infos[0] |= 0x3; -+ cur_bwmode = HT_CHANNEL_WIDTH_40; -+ cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER; -+ } - - if (psta->nonerp_set) { - psta->nonerp_set = 0; - pmlmepriv->num_sta_non_erp--; - if (pmlmepriv->num_sta_non_erp == 0) - update_beacon(padapter, _ERPINFO_IE_, NULL, _TRUE); - } -- ++ cur_bwmode = HT_CHANNEL_WIDTH_40; ++ cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER; ++ } + - if (psta->no_short_slot_time_set) { - psta->no_short_slot_time_set = 0; - pmlmepriv->num_sta_no_short_slot_time--; @@ -24155,7 +23411,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - && pmlmepriv->num_sta_no_short_slot_time == 0) - update_beacon(padapter, 0xFF, NULL, _TRUE); - } -- ++ set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode); ++ } ++ } + - if (psta->no_short_preamble_set) { - psta->no_short_preamble_set = 0; - pmlmepriv->num_sta_no_short_preamble--; @@ -24165,39 +23424,35 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - -#ifdef CONFIG_80211N_HT -+ set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode); -+ } -+ } - -- if (psta->no_ht_gf_set) { -- psta->no_ht_gf_set = 0; -- pmlmepriv->num_sta_ht_no_gf--; -- } + // to update channel value in beacon + pnetwork->Configuration.DSConfig = cur_channel; + p = rtw_get_ie((pnetwork->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _DSSET_IE_, &ie_len, (pnetwork->IELength - sizeof(NDIS_802_11_FIXED_IEs))); + if(p && ie_len>0) + *(p + 2) = cur_channel; -- if (psta->no_ht_set) { -- psta->no_ht_set = 0; -- pmlmepriv->num_sta_no_ht--; +- if (psta->no_ht_gf_set) { +- psta->no_ht_gf_set = 0; +- pmlmepriv->num_sta_ht_no_gf--; + if(pht_info) + pht_info->primary_channel = cur_channel; + } } - -- if (psta->ht_20mhz_set) { -- psta->ht_20mhz_set = 0; -- pmlmepriv->num_sta_ht_20mhz--; +- if (psta->no_ht_set) { +- psta->no_ht_set = 0; +- pmlmepriv->num_sta_no_ht--; + else + { + set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode); } -- if (rtw_ht_operation_update(padapter) > 0) +- if (psta->ht_20mhz_set) { +- psta->ht_20mhz_set = 0; +- pmlmepriv->num_sta_ht_20mhz--; +- } + DBG_871X("CH=%d, BW=%d, offset=%d\n", cur_channel, cur_bwmode, cur_ch_offset); -+ + +- if (rtw_ht_operation_update(padapter) > 0) + if((channel <= 14 && cur_channel >= 36) || + (channel >= 36 && cur_channel <= 14)) { @@ -24316,19 +23571,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - plist = get_next(plist); - - rtw_list_delete(&psta->asoc_list); -+ pbuddy_adapter = padapter->pbuddy_adapter; - +- - //_exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); - ap_free_sta(padapter, psta); - //_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); - } - _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); ++ pbuddy_adapter = padapter->pbuddy_adapter; + + if(pbuddy_adapter == NULL) + return _FALSE; - - issue_deauth(padapter, bc_addr, WLAN_REASON_DEAUTH_LEAVING); -- + - return ret; + pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; + pbuddy_mlmeinfo = &(pbuddy_mlmeext->mlmext_info); @@ -24371,61 +23626,50 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#ifdef CONFIG_80211N_HT - //update 802.11n ht cap. - if(WLAN_STA_HT&flags) -- { -- psta->htpriv.ht_option = _TRUE; -- psta->qos_option = 1; -- } -- else + + if(!rtw_buddy_adapter_up(padapter)) { -- psta->htpriv.ht_option = _FALSE; +- psta->htpriv.ht_option = _TRUE; +- psta->qos_option = 1; + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); + return; } -- -- if(pmlmepriv->htpriv.ht_option == _FALSE) -- psta->htpriv.ht_option = _FALSE; --#endif - +- else ++ + pbuddy_adapter = padapter->pbuddy_adapter; + pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv); + pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; + pbuddy_mlmeinfo = &(pbuddy_mlmeext->mlmext_info); + pbuddy_network_mlmeext = &(pbuddy_mlmeinfo->network); - -- update_sta_info_apmode(padapter, psta); -- ++ + if(((pbuddy_mlmeinfo->state&0x03) == WIFI_FW_AP_STATE) && + check_fwstate(pbuddy_mlmepriv, _FW_LINKED)) -+ { + { +- psta->htpriv.ht_option = _FALSE; +- } + //restart and update beacon - --} ++ + DBG_871X("after join,primary adapter, CH=%d, BW=%d, offset=%d\n" + , pmlmeext->cur_channel, pmlmeext->cur_bwmode, pmlmeext->cur_ch_offset); -+ + +- if(pmlmepriv->htpriv.ht_option == _FALSE) +- psta->htpriv.ht_option = _FALSE; +-#endif --/* called >= TSR LEVEL for USB or SDIO Interface*/ --void ap_sta_info_defer_update(_adapter *padapter, struct sta_info *psta) --{ -- if(psta->state & _FW_LINKED) -- { -- //add ratid -- add_RATid(padapter, psta); -- } --} + if(join_res >= 0) + { + u8 *p; + int ie_len; + u8 change_band = _FALSE; + struct HT_info_element *pht_info=NULL; -+ + +- update_sta_info_apmode(padapter, psta); +- + if((pmlmeext->cur_channel <= 14 && pbuddy_mlmeext->cur_channel >= 36) || + (pmlmeext->cur_channel >= 36 && pbuddy_mlmeext->cur_channel <= 14)) + change_band = _TRUE; -+ + +-} + //sync channel/bwmode/ch_offset with primary adapter + pbuddy_mlmeext->cur_channel = pmlmeext->cur_channel; + if(pbuddy_mlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40) @@ -24441,17 +23685,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + pbuddy_mlmeext->cur_ch_offset = pmlmeext->cur_ch_offset; --void start_ap_mode(_adapter *padapter) +-/* called >= TSR LEVEL for USB or SDIO Interface*/ +-void ap_sta_info_defer_update(_adapter *padapter, struct sta_info *psta) -{ -- int i; -- struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); -- struct sta_priv *pstapriv = &padapter->stapriv; -- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; -- -- pmlmepriv->update_bcn = _FALSE; -- -- //init_mlme_ap_info(padapter); -- pmlmeext->bstart_bss = _FALSE; +- if(psta->state & _FW_LINKED) +- { +- //add ratid +- add_RATid(padapter, psta); +- } +-} + //to update cur_ch_offset value in beacon + if( pht_info ) + { @@ -24478,7 +23720,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if(pht_info) + pht_info->infos[0] |= HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE; -- pmlmepriv->num_sta_non_erp = 0; +-void start_ap_mode(_adapter *padapter) +-{ +- int i; +- struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); +- struct sta_priv *pstapriv = &padapter->stapriv; +- struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; +- +- pmlmepriv->update_bcn = _FALSE; +- +- //init_mlme_ap_info(padapter); +- pmlmeext->bstart_bss = _FALSE; + pbuddy_mlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40; + pbuddy_mlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER; + } @@ -24538,15 +23790,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + pbuddy_mlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE; + break; -- pmlmepriv->num_sta_no_short_slot_time = 0; +- pmlmepriv->num_sta_non_erp = 0; + } + + } -- pmlmepriv->num_sta_no_short_preamble = 0; +- pmlmepriv->num_sta_no_short_slot_time = 0; + } -- pmlmepriv->num_sta_ht_no_gf = 0; +- pmlmepriv->num_sta_no_short_preamble = 0; + set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode); + + } @@ -24555,24 +23807,30 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); + } +- pmlmepriv->num_sta_ht_no_gf = 0; + - pmlmepriv->num_sta_no_ht = 0; - - pmlmepriv->num_sta_ht_20mhz = 0; - -- pmlmepriv->olbc = _FALSE; + // to update channel value in beacon + pbuddy_network_mlmeext->Configuration.DSConfig = pmlmeext->cur_channel; + p = rtw_get_ie((pbuddy_network_mlmeext->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _DSSET_IE_, &ie_len, (pbuddy_network_mlmeext->IELength - sizeof(NDIS_802_11_FIXED_IEs))); + if(p && ie_len>0) + *(p + 2) = pmlmeext->cur_channel; -+ + +- pmlmepriv->olbc = _FALSE; + p = rtw_get_ie((pbuddy_network_mlmeext->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _HT_ADD_INFO_IE_, &ie_len, (pbuddy_network_mlmeext->IELength - sizeof(NDIS_802_11_FIXED_IEs))); + if( p && ie_len) + { + pht_info = (struct HT_info_element *)(p+2); + pht_info->primary_channel = pmlmeext->cur_channel; + } -+ + +- pmlmepriv->olbc_ht = _FALSE; +- +-#ifdef CONFIG_80211N_HT +- pmlmepriv->ht_op_mode = 0; +-#endif + //buddy interface band is different from current interface, update ERP, support rate, ext support rate IE + if(change_band == _TRUE) + change_band_update_ie(pbuddy_adapter, pbuddy_network_mlmeext); @@ -24583,22 +23841,20 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode); + } -- pmlmepriv->olbc_ht = _FALSE; -- --#ifdef CONFIG_80211N_HT -- pmlmepriv->ht_op_mode = 0; --#endif -+ DBG_871X("after join, second adapter, CH=%d, BW=%d, offset=%d\n", pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_bwmode, pbuddy_mlmeext->cur_ch_offset); - - for(i=0; ista_aid[i] = NULL; -+ DBG_871X("update pbuddy_adapter's beacon\n"); -+ -+ update_beacon(pbuddy_adapter, 0, NULL, _TRUE); ++ DBG_871X("after join, second adapter, CH=%d, BW=%d, offset=%d\n", pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_bwmode, pbuddy_mlmeext->cur_ch_offset); - pmlmepriv->wps_beacon_ie = NULL; - pmlmepriv->wps_probe_resp_ie = NULL; - pmlmepriv->wps_assoc_resp_ie = NULL; +- +- pmlmepriv->p2p_beacon_ie = NULL; +- pmlmepriv->p2p_probe_resp_ie = NULL; ++ DBG_871X("update pbuddy_adapter's beacon\n"); ++ ++ update_beacon(pbuddy_adapter, 0, NULL, _TRUE); + + } + else if(((pbuddy_mlmeinfo->state&0x03) == WIFI_FW_STATION_STATE) && + check_fwstate(pbuddy_mlmepriv, _FW_LINKED)) @@ -24623,10 +23879,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode); + } - -- pmlmepriv->p2p_beacon_ie = NULL; -- pmlmepriv->p2p_probe_resp_ie = NULL; -- ++ } +#endif //CONFIG_CONCURRENT_MODE @@ -24902,7 +24155,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf) { -@@ -12038,6 +13361,7 @@ u8 set_chplan_hdl(_adapter *padapter, un +@@ -12038,6 +13361,7 @@ u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf) setChannelPlan_param = (struct SetChannelPlan_param *)pbuf; pmlmeext->max_chan_nums = init_channel_set(padapter, setChannelPlan_param->channel_plan, pmlmeext->channel_set); @@ -24910,7 +24163,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return H2C_SUCCESS; } -@@ -12062,6 +13386,7 @@ u8 set_csa_hdl(_adapter *padapter, unsig +@@ -12062,6 +13386,7 @@ u8 set_csa_hdl(_adapter *padapter, unsigned char *pbuf) { #ifdef CONFIG_DFS struct SetChannelSwitch_param *setChannelSwitch_param; @@ -24918,7 +24171,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; -@@ -12073,22 +13398,22 @@ u8 set_csa_hdl(_adapter *padapter, unsig +@@ -12073,22 +13398,22 @@ u8 set_csa_hdl(_adapter *padapter, unsigned char *pbuf) setChannelSwitch_param = (struct SetChannelSwitch_param *)pbuf; new_ch_no = setChannelSwitch_param->new_ch_no; @@ -24949,7 +24202,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return H2C_SUCCESS; #else -@@ -12136,14 +13461,18 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12136,14 +13461,18 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) } //_enter_critical_bh(&(ptdlsinfo->hdl_lock), &irqL); @@ -24971,7 +24224,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case TDLS_SD_PTI: issue_tdls_peer_traffic_indication(padapter, ptdls_sta); -@@ -12155,11 +13484,11 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12155,11 +13484,11 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) ptdls_sta->tdls_sta_state &= ~(TDLS_CH_SWITCH_ON_STATE | TDLS_PEER_AT_OFF_STATE | TDLS_AT_OFF_CH_STATE); @@ -24986,7 +24239,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pmlmeext->sitesurvey_res.channel_idx = 0; ptdls_sta->option = TDLS_DONE_CH_SEN; rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_DONE_CH_SEN); -@@ -12174,7 +13503,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12174,7 +13503,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) }else{ SelectChannel(padapter, pmlmeext->cur_channel); @@ -24995,7 +24248,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(ptdlsinfo->ch_sensing==1){ ptdlsinfo->ch_sensing=0; -@@ -12189,7 +13518,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12189,7 +13518,7 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) } ptdlsinfo->collect_pkt_num[0]=0; ptdlsinfo->candidate_ch=ptdlsinfo->cur_channel; @@ -25004,7 +24257,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ptdlsinfo->cur_channel=0; } -@@ -12198,20 +13527,20 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12198,20 +13527,20 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) ptdls_sta->tdls_sta_state |= TDLS_APSD_CHSW_STATE; }else{ //send null data with pwrbit==1 before send ch_switching_req to peer STA. @@ -25029,7 +24282,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ptdls_sta->tdls_sta_state |= TDLS_AT_OFF_CH_STATE; ptdls_sta->tdls_sta_state &= ~(TDLS_PEER_AT_OFF_STATE); _set_timer(&ptdls_sta->option_timer, (u32)ptdls_sta->ch_switch_time); -@@ -12223,21 +13552,21 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12223,21 +13552,21 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) ptdls_sta->tdls_sta_state &= ~(TDLS_CH_SWITCH_ON_STATE | TDLS_PEER_AT_OFF_STATE | TDLS_AT_OFF_CH_STATE); @@ -25057,7 +24310,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ptdls_sta->tdls_sta_state |= TDLS_AT_OFF_CH_STATE; if((ptdls_sta->tdls_sta_state & TDLS_PEER_AT_OFF_STATE) != TDLS_PEER_AT_OFF_STATE){ issue_nulldata_to_TDLS_peer_STA(padapter, ptdls_sta, 0); -@@ -12245,8 +13574,8 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12245,8 +13574,8 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) _set_timer(&ptdls_sta->base_ch_timer, TDLS_STAY_TIME); break; case TDLS_RS_RCR: @@ -25068,11 +24321,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case TDLS_CKALV_PH1: _set_timer(&ptdls_sta->alive_timer2, TDLS_ALIVE_TIMER_PH2); -@@ -12268,3 +13597,4 @@ u8 tdls_hdl(_adapter *padapter, unsigned +@@ -12268,3 +13597,4 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf) #endif //CONFIG_TDLS } + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mp.c b/drivers/net/wireless/rtl8192cu/core/rtw_mp.c +index bb76dae..9af42cd 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_mp.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mp.c @@ -1,7 +1,7 @@ @@ -25105,7 +24360,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_MP_INCLUDED -@@ -79,35 +86,34 @@ void write_macreg(_adapter *padapter, u3 +@@ -79,35 +86,34 @@ void write_macreg(_adapter *padapter, u32 addr, u32 val, u32 sz) u32 read_bbreg(_adapter *padapter, u32 addr, u32 bitmask) { @@ -25156,7 +24411,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //------------------------------------------------------------------------- // HW Initialization for 8190 MPT. -@@ -503,16 +509,22 @@ void GetPowerTracking(PADAPTER padapter, +@@ -503,16 +509,22 @@ void GetPowerTracking(PADAPTER padapter, u8 *enable) static void disable_dm(PADAPTER padapter) { @@ -25188,7 +24443,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_indicate_disconnect(padapter); rtw_free_assoc_resources(padapter, 1); } -@@ -765,7 +777,7 @@ static VOID mpt_AdjustRFRegByRateByChan9 +@@ -765,7 +777,7 @@ static VOID mpt_AdjustRFRegByRateByChan92CU(PADAPTER pAdapter, u8 RateIdx, u8 Ch static void mpt_SwitchRfSetting(PADAPTER pAdapter) { Hal_mpt_SwitchRfSetting(pAdapter); @@ -25197,7 +24452,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /*---------------------------hal\rtl8192c\MPT_Phy.c---------------------------*/ /*---------------------------hal\rtl8192c\MPT_HelperFunc.c---------------------------*/ -@@ -827,7 +839,7 @@ void SetAntennaPathPower(PADAPTER pAdapt +@@ -827,7 +839,7 @@ void SetAntennaPathPower(PADAPTER pAdapter) void SetTxPower(PADAPTER pAdapter) { Hal_SetTxPower(pAdapter); @@ -25206,7 +24461,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void SetTxAGCOffset(PADAPTER pAdapter, u32 ulTxAGCOffset) { -@@ -904,12 +916,12 @@ void SetCarrierSuppressionTx(PADAPTER pA +@@ -904,12 +916,12 @@ void SetCarrierSuppressionTx(PADAPTER pAdapter, u8 bStart) } void SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart) @@ -25221,7 +24476,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release Hal_SetOFDMContinuousTx( pAdapter, bStart); }/* mpt_StartOfdmContTx */ -@@ -919,12 +931,12 @@ void SetContinuousTx(PADAPTER pAdapter, +@@ -919,12 +931,12 @@ void SetContinuousTx(PADAPTER pAdapter, u8 bStart) } //------------------------------------------------------------------------------ @@ -25237,7 +24492,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { struct xmit_frame *pmpframe; struct xmit_buf *pxmitbuf; -@@ -936,7 +948,7 @@ struct xmit_frame *alloc_mp_xmitframe(st +@@ -936,7 +948,7 @@ struct xmit_frame *alloc_mp_xmitframe(struct xmit_priv *pxmitpriv) if ((pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv)) == NULL) { @@ -25246,7 +24501,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return NULL; } -@@ -952,7 +964,7 @@ struct xmit_frame *alloc_mp_xmitframe(st +@@ -952,7 +964,7 @@ struct xmit_frame *alloc_mp_xmitframe(struct xmit_priv *pxmitpriv) } @@ -25255,7 +24510,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { struct xmit_frame *pxmitframe; struct mp_tx *pmptx; -@@ -965,9 +977,9 @@ thread_return mp_xmit_packet_thread(thre +@@ -965,9 +977,9 @@ thread_return mp_xmit_packet_thread(thread_context context) padapter = pmp_priv->papdater; pxmitpriv = &(padapter->xmitpriv); @@ -25267,7 +24522,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release while (1) { pxmitframe = alloc_mp_xmitframe(pxmitpriv); if (pxmitframe == NULL) { -@@ -1002,7 +1014,7 @@ thread_return mp_xmit_packet_thread(thre +@@ -1002,7 +1014,7 @@ thread_return mp_xmit_packet_thread(thread_context context) } exit: @@ -25309,7 +24564,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } void SetPacketRx(PADAPTER pAdapter, u8 bStartRx) -@@ -1151,9 +1176,14 @@ void SetPacketRx(PADAPTER pAdapter, u8 b +@@ -1151,9 +1176,14 @@ void SetPacketRx(PADAPTER pAdapter, u8 bStartRx) if(bStartRx) { @@ -25326,7 +24581,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -1244,15 +1274,15 @@ static u32 GetPSDData(PADAPTER pAdapter, +@@ -1244,15 +1274,15 @@ static u32 GetPSDData(PADAPTER pAdapter, u32 point) */ u32 mp_query_psd(PADAPTER pAdapter, u8 *data) { @@ -25345,7 +24600,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (check_fwstate(&pAdapter->mlmepriv, WIFI_MP_STATE) == _FALSE) { RT_TRACE(_module_mp_, _drv_warning_, ("mp_query_psd: Fail! not in MP mode!\n")); -@@ -1290,28 +1320,5 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 * +@@ -1290,28 +1320,5 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data) return strlen(data)+1; } @@ -25374,6 +24629,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - #endif +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_mp_ioctl.c b/drivers/net/wireless/rtl8192cu/core/rtw_mp_ioctl.c +index a851568..b941e2c 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_mp_ioctl.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_mp_ioctl.c @@ -1,7 +1,7 @@ @@ -25618,7 +24875,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 bStartTest; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -@@ -820,7 +859,9 @@ NDIS_STATUS oid_rt_pro_trigger_gpio_hdl( +@@ -820,7 +859,9 @@ NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv) { PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -25637,7 +24894,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _irqlevel_changed_(&oldirql, RAISE); _func_exit_; -@@ -842,7 +883,9 @@ NDIS_STATUS oid_rt_pro8711_join_bss_hdl( +@@ -842,7 +883,9 @@ NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -25870,7 +25127,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //------------------------------------------------------------------------------ NDIS_STATUS oid_rt_pro8711_wi_poll_hdl(struct oid_par_priv *poid_par_priv) -@@ -1227,7 +1295,9 @@ NDIS_STATUS oid_rt_rd_attrib_mem_hdl(str +@@ -1227,7 +1295,9 @@ NDIS_STATUS oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv) struct io_queue *pio_queue = (struct io_queue *)Adapter->pio_queue; struct intf_hdl *pintfhdl = &pio_queue->intf; @@ -25881,7 +25138,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NDIS_STATUS status = NDIS_STATUS_SUCCESS; #ifdef CONFIG_SDIO_HCI -@@ -1268,7 +1338,9 @@ NDIS_STATUS oid_rt_wr_attrib_mem_hdl (st +@@ -1268,7 +1338,9 @@ NDIS_STATUS oid_rt_wr_attrib_mem_hdl (struct oid_par_priv *poid_par_priv) struct io_queue *pio_queue = (struct io_queue *)Adapter->pio_queue; struct intf_hdl *pintfhdl = &pio_queue->intf; @@ -25891,7 +25148,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NDIS_STATUS status = NDIS_STATUS_SUCCESS; #ifdef CONFIG_SDIO_HCI -@@ -1304,7 +1376,9 @@ NDIS_STATUS oid_rt_pro_set_rf_intfs_hdl +@@ -1304,7 +1376,9 @@ NDIS_STATUS oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -25901,7 +25158,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NDIS_STATUS status = NDIS_STATUS_SUCCESS; _func_enter_; -@@ -1404,7 +1478,9 @@ NDIS_STATUS oid_rt_pro_set_data_rate_ex_ +@@ -1404,7 +1478,9 @@ NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv) { PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -25921,7 +25178,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NDIS_STATUS status = NDIS_STATUS_SUCCESS; u8 thermal = 0; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -@@ -1460,7 +1538,9 @@ NDIS_STATUS oid_rt_pro_read_tssi_hdl(str +@@ -1460,7 +1538,9 @@ NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -25980,7 +25237,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //------------------------------------------------------------------------------ NDIS_STATUS oid_rt_pro_qry_pwrstate_hdl(struct oid_par_priv *poid_par_priv) -@@ -1646,7 +1732,9 @@ NDIS_STATUS oid_rt_pro_h2c_set_rate_tabl +@@ -1646,7 +1732,9 @@ NDIS_STATUS oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv *poid_par_priv #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -25990,7 +25247,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NDIS_STATUS status = NDIS_STATUS_SUCCESS; struct setratable_parm *prate_table; -@@ -1833,13 +1921,15 @@ NDIS_STATUS oid_rt_pro_encryption_ctrl_h +@@ -1833,13 +1921,15 @@ NDIS_STATUS oid_rt_pro_encryption_ctrl_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv) { #if 0 @@ -26011,7 +25268,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (poid_par_priv->type_of_oid != SET_OID) -@@ -1881,13 +1971,15 @@ NDIS_STATUS oid_rt_pro_add_sta_info_hdl( +@@ -1881,13 +1971,15 @@ NDIS_STATUS oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv) NDIS_STATUS oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv) { #if 0 @@ -26032,7 +25289,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (poid_par_priv->type_of_oid != SET_OID) -@@ -1914,17 +2006,17 @@ NDIS_STATUS oid_rt_pro_dele_sta_info_hdl +@@ -1914,17 +2006,17 @@ NDIS_STATUS oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv) #endif } //------------------------------------------------------------------------------ @@ -26054,7 +25311,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_mp_,_drv_err_, ("Query Information, mp_query_drv_var call recv rx\n")); // sd_recv_rxfifo(padapter); } -@@ -1973,37 +2065,37 @@ u32 mp_query_drv_var(_adapter *padapter, +@@ -1973,37 +2065,37 @@ u32 mp_query_drv_var(_adapter *padapter, u8 offset, u32 var) else if(offset >110 &&offset <116){ if(115==offset){ RT_TRACE(_module_mp_, _drv_emerg_, (" mp_query_drv_var(_drv_emerg_): offset(%d): query TRX access type: [tx_block_mode=%x,rx_block_mode=%x]\n",\ @@ -26105,7 +25362,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; default : break; -@@ -2088,20 +2180,20 @@ u32 mp_query_drv_var(_adapter *padapter, +@@ -2088,20 +2180,20 @@ u32 mp_query_drv_var(_adapter *padapter, u8 offset, u32 var) #endif return var; @@ -26133,7 +25390,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (poid_par_priv->type_of_oid != QUERY_OID) -@@ -2133,12 +2225,12 @@ NDIS_STATUS oid_rt_pro_query_dr_variable +@@ -2133,12 +2225,12 @@ NDIS_STATUS oid_rt_pro_query_dr_variable_hdl(struct oid_par_priv *poid_par_priv) //------------------------------------------------------------------------------ NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv) { @@ -26147,7 +25404,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (poid_par_priv->information_buf_len < sizeof (UCHAR)) { status = NDIS_STATUS_INVALID_LENGTH; -@@ -2178,7 +2270,9 @@ NDIS_STATUS oid_rt_pro_rx_packet_type_hd +@@ -2178,7 +2270,9 @@ NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv) //------------------------------------------------------------------------------ NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv) { @@ -26190,7 +25447,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u16 size; u8 ret; NDIS_STATUS status = NDIS_STATUS_SUCCESS; -@@ -2354,7 +2452,6 @@ NDIS_STATUS oid_rt_get_efuse_max_size_hd +@@ -2354,7 +2452,6 @@ NDIS_STATUS oid_rt_get_efuse_max_size_hdl(struct oid_par_priv *poid_par_priv) { NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -26208,7 +25465,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 *data; NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); -@@ -2461,7 +2560,9 @@ NDIS_STATUS oid_rt_set_crystal_cap_hdl(s +@@ -2461,7 +2560,9 @@ NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -26263,7 +25520,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif _irqlevel_changed_(&oldirql, RAISE); -@@ -2585,7 +2688,9 @@ NDIS_STATUS oid_rt_pro_set_tx_agc_offset +@@ -2585,7 +2688,9 @@ NDIS_STATUS oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv) #if 0 PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -26273,7 +25530,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NDIS_STATUS status = NDIS_STATUS_SUCCESS; u32 txagc; -@@ -2701,7 +2806,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(st +@@ -2701,7 +2806,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv) struct mp_xmit_packet *pmp_xmitpkt = (struct mp_xmit_packet*)param; u8 addr3[] = {0x02, 0xE0, 0x4C, 0x87, 0x66, 0x55}; @@ -26282,7 +25539,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pxframe = alloc_mp_xmitframe(&padapter->mppriv); if (pxframe == NULL) -@@ -2715,10 +2820,10 @@ unsigned int mp_ioctl_xmit_packet_hdl(st +@@ -2715,10 +2820,10 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv) pmp_pkt = (unsigned char*)pmp_xmitpkt->mem; pethhdr = (struct ethhdr *)pmp_pkt; @@ -26296,7 +25553,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //update attribute pattrib = &pxframe->attrib; -@@ -2771,10 +2876,16 @@ unsigned int mp_ioctl_xmit_packet_hdl(st +@@ -2771,10 +2876,16 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv) //------------------------------------------------------------------------------ NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv) { @@ -26324,7 +25581,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif #endif _irqlevel_changed_(&oldirql, RAISE); -@@ -2810,7 +2921,9 @@ NDIS_STATUS oid_rt_get_power_mode_hdl(st +@@ -2810,7 +2921,9 @@ NDIS_STATUS oid_rt_get_power_mode_hdl(struct oid_par_priv *poid_par_priv) #if 0 NDIS_STATUS status = NDIS_STATUS_SUCCESS; PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context); @@ -26334,6 +25591,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_p2p.c b/drivers/net/wireless/rtl8192cu/core/rtw_p2p.c +index 1df9d62..66c5f96 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_p2p.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_p2p.c @@ -25,31 +25,24 @@ @@ -26381,7 +25640,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf) -@@ -544,7 +537,7 @@ u32 build_beacon_wfd_ie(struct wifidirec +@@ -544,7 +537,7 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) u32 len=0, wfdielen = 0; _adapter *padapter = pwdinfo->padapter; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -26390,7 +25649,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -572,24 +565,24 @@ u32 build_beacon_wfd_ie(struct wifidirec +@@ -572,24 +565,24 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26422,7 +25681,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } wfdielen += 2; -@@ -634,13 +627,20 @@ u32 build_beacon_wfd_ie(struct wifidirec +@@ -634,13 +627,20 @@ u32 build_beacon_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26444,7 +25703,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -654,7 +654,7 @@ u32 build_probe_req_wfd_ie(struct wifidi +@@ -654,7 +654,7 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) u32 len=0, wfdielen = 0; _adapter *padapter = pwdinfo->padapter; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -26453,7 +25712,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -681,8 +681,23 @@ u32 build_probe_req_wfd_ie(struct wifidi +@@ -681,8 +681,23 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26479,7 +25738,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -725,13 +740,20 @@ u32 build_probe_req_wfd_ie(struct wifidi +@@ -725,13 +740,20 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26501,7 +25760,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -739,13 +761,13 @@ u32 build_probe_req_wfd_ie(struct wifidi +@@ -739,13 +761,13 @@ u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) } @@ -26517,7 +25776,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -773,25 +795,65 @@ u32 build_probe_resp_wfd_ie(struct wifid +@@ -773,25 +795,65 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26592,7 +25851,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } wfdielen += 2; -@@ -836,15 +898,22 @@ u32 build_probe_resp_wfd_ie(struct wifid +@@ -836,15 +898,22 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26617,7 +25876,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { // WFD Session Information ATTR // Type: -@@ -858,6 +927,28 @@ u32 build_probe_resp_wfd_ie(struct wifid +@@ -858,6 +927,28 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Todo: to add the list of WFD device info descriptor in WFD group. } @@ -26646,7 +25905,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -881,7 +972,7 @@ u32 build_assoc_req_wfd_ie(struct wifidi +@@ -881,7 +972,7 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) padapter = pwdinfo->padapter; pmlmepriv = &padapter->mlmepriv; @@ -26655,7 +25914,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen = 0; wfdie[ wfdielen++ ] = 0x50; -@@ -907,8 +998,8 @@ u32 build_assoc_req_wfd_ie(struct wifidi +@@ -907,8 +998,8 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26666,7 +25925,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -951,13 +1042,20 @@ u32 build_assoc_req_wfd_ie(struct wifidi +@@ -951,13 +1042,20 @@ u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26688,7 +25947,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -971,7 +1069,7 @@ u32 build_assoc_resp_wfd_ie(struct wifid +@@ -971,7 +1069,7 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) u32 len=0, wfdielen = 0; _adapter *padapter = pwdinfo->padapter; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -26697,7 +25956,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -998,8 +1096,8 @@ u32 build_assoc_resp_wfd_ie(struct wifid +@@ -998,8 +1096,8 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26708,7 +25967,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -1042,13 +1140,20 @@ u32 build_assoc_resp_wfd_ie(struct wifid +@@ -1042,13 +1140,20 @@ u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26730,7 +25989,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -1062,7 +1167,7 @@ u32 build_nego_req_wfd_ie(struct wifidir +@@ -1062,7 +1167,7 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) u32 len=0, wfdielen = 0; _adapter *padapter = pwdinfo->padapter; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -26739,7 +25998,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -1089,8 +1194,8 @@ u32 build_nego_req_wfd_ie(struct wifidir +@@ -1089,8 +1194,8 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26750,7 +26009,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -1133,13 +1238,20 @@ u32 build_nego_req_wfd_ie(struct wifidir +@@ -1133,13 +1238,20 @@ u32 build_nego_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26772,7 +26031,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -1153,7 +1265,7 @@ u32 build_nego_resp_wfd_ie(struct wifidi +@@ -1153,7 +1265,7 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) u32 len=0, wfdielen = 0; _adapter *padapter = pwdinfo->padapter; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -26781,7 +26040,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -1180,8 +1292,8 @@ u32 build_nego_resp_wfd_ie(struct wifidi +@@ -1180,8 +1292,8 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26792,7 +26051,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -1224,13 +1336,20 @@ u32 build_nego_resp_wfd_ie(struct wifidi +@@ -1224,13 +1336,20 @@ u32 build_nego_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26814,7 +26073,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -1245,7 +1364,7 @@ u32 build_nego_confirm_wfd_ie(struct wif +@@ -1245,7 +1364,7 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) u32 len=0, wfdielen = 0; _adapter *padapter = pwdinfo->padapter; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -26823,7 +26082,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -1272,8 +1391,8 @@ u32 build_nego_confirm_wfd_ie(struct wif +@@ -1272,8 +1391,8 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26834,7 +26093,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -1316,13 +1435,20 @@ u32 build_nego_confirm_wfd_ie(struct wif +@@ -1316,13 +1435,20 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26856,7 +26115,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -1331,13 +1457,13 @@ u32 build_nego_confirm_wfd_ie(struct wif +@@ -1331,13 +1457,13 @@ u32 build_nego_confirm_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) } @@ -26872,7 +26131,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -1364,8 +1490,8 @@ u32 build_provdisc_req_wfd_ie(struct wif +@@ -1364,8 +1490,8 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26883,7 +26142,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -1408,14 +1534,35 @@ u32 build_provdisc_req_wfd_ie(struct wif +@@ -1408,14 +1534,35 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26920,7 +26179,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -1423,13 +1570,13 @@ u32 build_provdisc_req_wfd_ie(struct wif +@@ -1423,13 +1570,13 @@ u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) } @@ -26936,7 +26195,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // WFD OUI wfdielen = 0; -@@ -1439,7 +1586,7 @@ u32 build_provdisc_resp_wfd_ie(struct wi +@@ -1439,7 +1586,7 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) wfdie[ wfdielen++ ] = 0x0A; // WFA WFD v1.0 // Commented by Albert 20110825 @@ -26945,7 +26204,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // 1. WFD Device Information // 2. Associated BSSID ( Optional ) // 3. Local IP Adress ( Optional ) -@@ -1456,8 +1603,8 @@ u32 build_provdisc_resp_wfd_ie(struct wi +@@ -1456,8 +1603,8 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Value1: // WFD device information @@ -26956,7 +26215,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wfdielen += 2; // Value2: -@@ -1500,13 +1647,35 @@ u32 build_provdisc_resp_wfd_ie(struct wi +@@ -1500,13 +1647,35 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // Length: // Note: In the WFD specification, the size of length field is 2. @@ -26993,7 +26252,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len); -@@ -1514,68 +1683,280 @@ u32 build_provdisc_resp_wfd_ie(struct wi +@@ -1514,68 +1683,280 @@ u32 build_provdisc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) } @@ -27318,7 +26577,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Value: // Availability Period -@@ -1606,6 +1987,17 @@ u32 build_probe_resp_p2p_ie(struct wifid +@@ -1606,6 +1987,17 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) // 21 -> P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) // + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) //*(u16*) ( p2pie + p2pielen ) = cpu_to_le16( 21 + pwdinfo->device_name_len ); @@ -27336,7 +26595,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len); p2pielen += 2; -@@ -1620,23 +2012,77 @@ u32 build_probe_resp_p2p_ie(struct wifid +@@ -1620,23 +2012,77 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->supported_wps_cm); p2pielen += 2; @@ -27362,7 +26621,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + //*(u32*) ( p2pie + p2pielen ) = cpu_to_be32( WPSOUI ); + RTW_PUT_BE32(p2pie + p2pielen, WPSOUI); + p2pielen += 4; -+ + +- // Sub Category ID +- //*(u16*) ( p2pie + p2pielen ) = cpu_to_be16( WPS_PDT_SCID_RTK_DMP ); +- RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_SCID_RTK_DMP); +- p2pielen += 2; + // Sub Category ID + //*(u16*) ( p2pie + p2pielen ) = cpu_to_be16( WPS_PDT_SCID_MEDIA_SERVER ); + RTW_PUT_BE16(p2pie + p2pielen, pmlmepriv->p2p_pdt_scid); @@ -27376,11 +26639,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + //*(u16*) ( p2pie + p2pielen ) = cpu_to_be16( WPS_PDT_CID_MULIT_MEDIA ); + RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_CID_MULIT_MEDIA); + p2pielen += 2; - -- // Sub Category ID -- //*(u16*) ( p2pie + p2pielen ) = cpu_to_be16( WPS_PDT_SCID_RTK_DMP ); -- RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_SCID_RTK_DMP); -- p2pielen += 2; ++ + // OUI + //*(u32*) ( p2pie + p2pielen ) = cpu_to_be32( WPSOUI ); + RTW_PUT_BE32(p2pie + p2pielen, WPSOUI); @@ -27427,7 +26686,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pie[ p2pielen++ ] = 0x00; // No Secondary Device Type List // Device Name -@@ -1654,7 +2100,6 @@ u32 build_probe_resp_p2p_ie(struct wifid +@@ -1654,7 +2100,6 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) _rtw_memcpy( p2pie + p2pielen, pwdinfo->device_name, pwdinfo->device_name_len ); p2pielen += pwdinfo->device_name_len; @@ -27435,7 +26694,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Group Info ATTR // Type: // Length: -@@ -1701,12 +2146,13 @@ u32 build_prov_disc_request_p2p_ie(struc +@@ -1701,12 +2146,13 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 // Value: // Device Capability Bitmap, 1 byte @@ -27453,7 +26712,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Device Info ATTR -@@ -1742,8 +2188,8 @@ u32 build_prov_disc_request_p2p_ie(struc +@@ -1742,8 +2188,8 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 // Primary Device Type // Category ID @@ -27464,7 +26723,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // OUI -@@ -1752,8 +2198,8 @@ u32 build_prov_disc_request_p2p_ie(struc +@@ -1752,8 +2198,8 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 p2pielen += 4; // Sub Category ID @@ -27475,7 +26734,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release p2pielen += 2; // Number of Secondary Device Types -@@ -1896,6 +2342,7 @@ u32 process_probe_req_p2p_ie(struct wifi +@@ -1896,6 +2342,7 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, _SSID_IE_, (int *)&ssid_len, len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_); @@ -27483,7 +26742,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE) || rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) { if((p2pie=rtw_get_p2p_ie( pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_ , len - WLAN_HDR_A3_LEN - _PROBEREQ_IE_OFFSET_ , NULL, &p2pielen))) -@@ -1907,6 +2354,10 @@ u32 process_probe_req_p2p_ie(struct wifi +@@ -1907,6 +2354,10 @@ u32 process_probe_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l //Check Device ID attribute in P2P IE ret = _TRUE; @@ -27494,7 +26753,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } else -@@ -2182,7 +2633,7 @@ u8 process_p2p_provdisc_req(struct wifid +@@ -2182,7 +2633,7 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l issue_p2p_provision_resp( pwdinfo, GetAddr2Ptr(pframe), frame_body, uconfig_method); } } @@ -27503,7 +26762,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _TRUE; } -@@ -2193,31 +2644,93 @@ u8 process_p2p_provdisc_resp(struct wifi +@@ -2193,31 +2644,93 @@ u8 process_p2p_provdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe) return _TRUE; } @@ -27607,7 +26866,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { // Commented by Kurt 20120113 // If some device wants to do p2p handshake without sending prov_disc_req -@@ -2243,12 +2756,19 @@ u8 process_p2p_group_negotation_req( str +@@ -2243,12 +2756,19 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe } else { @@ -27628,7 +26887,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ies = pframe + _PUBLIC_ACTION_IE_OFFSET_; ies_len = len - _PUBLIC_ACTION_IE_OFFSET_; -@@ -2256,7 +2776,7 @@ u8 process_p2p_group_negotation_req( str +@@ -2256,7 +2776,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe if ( !p2p_ie ) { @@ -27637,7 +26896,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release result = P2P_STATUS_FAIL_INCOMPATIBLE_PARAM; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); } -@@ -2265,12 +2785,30 @@ u8 process_p2p_group_negotation_req( str +@@ -2265,12 +2785,30 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe { u8 attr_content = 0x00; u32 attr_contentlen = 0; @@ -27670,7 +26929,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->peer_intent = attr_content; // include both intent and tie breaker values. if ( pwdinfo->intent == ( pwdinfo->peer_intent >> 1 ) ) -@@ -2320,6 +2858,64 @@ u8 process_p2p_group_negotation_req( str +@@ -2320,6 +2858,64 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe } } @@ -27735,7 +26994,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //Get the next P2P IE p2p_ie = rtw_get_p2p_ie(p2p_ie+p2p_ielen, ies_len -(p2p_ie -ies + p2p_ielen), NULL, &p2p_ielen); } -@@ -2332,12 +2928,12 @@ u8 process_p2p_group_negotation_req( str +@@ -2332,12 +2928,12 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe u8 attr_content[ 10 ] = { 0x00 }; u32 attr_contentlen = 0; @@ -27751,7 +27010,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } #endif // CONFIG_WFD -@@ -2347,6 +2943,7 @@ u8 process_p2p_group_negotation_req( str +@@ -2347,6 +2943,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pframe, uint len ) { @@ -27759,7 +27018,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 result = P2P_STATUS_SUCCESS; u32 p2p_ielen, wps_ielen; u8 * ies; -@@ -2355,7 +2952,10 @@ u8 process_p2p_group_negotation_resp( st +@@ -2355,7 +2952,10 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram #ifdef CONFIG_WFD u8 wfd_ie[ 128 ] = { 0x00 }; u32 wfd_ielen = 0; @@ -27771,7 +27030,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ies = pframe + _PUBLIC_ACTION_IE_OFFSET_; ies_len = len - _PUBLIC_ACTION_IE_OFFSET_; -@@ -2368,7 +2968,7 @@ u8 process_p2p_group_negotation_resp( st +@@ -2368,7 +2968,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram } else { @@ -27780,7 +27039,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release result = P2P_STATUS_FAIL_INCOMPATIBLE_PARAM; rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL); } -@@ -2382,28 +2982,48 @@ u8 process_p2p_group_negotation_resp( st +@@ -2382,28 +2982,48 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram } else { @@ -27833,7 +27092,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release result = attr_content; break; } -@@ -2424,7 +3044,7 @@ u8 process_p2p_group_negotation_resp( st +@@ -2424,7 +3044,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram attr_contentlen = 0; if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT , &attr_content, &attr_contentlen) ) { @@ -27842,7 +27101,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->peer_intent = attr_content; // include both intent and tie breaker values. if ( pwdinfo->intent == ( pwdinfo->peer_intent >> 1 ) ) -@@ -2439,6 +3059,7 @@ u8 process_p2p_group_negotation_resp( st +@@ -2439,6 +3059,7 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram else { rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_OK); @@ -27850,7 +27109,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( attr_content & 0x01 ) { rtw_p2p_set_role(pwdinfo, P2P_ROLE_CLIENT); -@@ -2452,11 +3073,13 @@ u8 process_p2p_group_negotation_resp( st +@@ -2452,11 +3073,13 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram else if ( pwdinfo->intent > ( pwdinfo->peer_intent >> 1 ) ) { rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_OK); @@ -27864,7 +27123,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_p2p_set_role(pwdinfo, P2P_ROLE_CLIENT); } -@@ -2474,20 +3097,74 @@ u8 process_p2p_group_negotation_resp( st +@@ -2474,20 +3097,74 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram attr_contentlen = 0; if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen)) { @@ -27945,7 +27204,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } // Try to get the group id information if peer is GO -@@ -2517,8 +3194,8 @@ u8 process_p2p_group_negotation_resp( st +@@ -2517,8 +3194,8 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, attr_content, &attr_contentlen); if ( attr_contentlen ) { @@ -27956,7 +27215,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } #endif // CONFIG_WFD -@@ -2534,7 +3211,6 @@ u8 process_p2p_group_negotation_confirm( +@@ -2534,7 +3211,6 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf u8 * p2p_ie; u32 p2p_ielen = 0; u8 result = P2P_STATUS_SUCCESS; @@ -27964,7 +27223,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ies = pframe + _PUBLIC_ACTION_IE_OFFSET_; ies_len = len - _PUBLIC_ACTION_IE_OFFSET_; -@@ -2549,7 +3225,7 @@ u8 process_p2p_group_negotation_confirm( +@@ -2549,7 +3225,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_content, &attr_contentlen); if ( attr_contentlen == 1 ) { @@ -27973,7 +27232,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release result = attr_content; if ( attr_content == P2P_STATUS_SUCCESS ) -@@ -2561,6 +3237,7 @@ u8 process_p2p_group_negotation_confirm( +@@ -2561,6 +3237,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf // Commented by Albert 20100911 // Todo: Need to handle the case which both Intents are the same. rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_OK); @@ -27981,7 +27240,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( ( pwdinfo->intent ) > ( pwdinfo->peer_intent >> 1 ) ) { rtw_p2p_set_role(pwdinfo, P2P_ROLE_GO); -@@ -2581,6 +3258,14 @@ u8 process_p2p_group_negotation_confirm( +@@ -2581,6 +3258,14 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf rtw_p2p_set_role(pwdinfo, P2P_ROLE_GO); } } @@ -27996,7 +27255,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -2595,7 +3280,7 @@ u8 process_p2p_group_negotation_confirm( +@@ -2595,7 +3280,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf _rtw_memset( groupid, 0x00, 38 ); if ( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen) ) { @@ -28005,7 +27264,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy( pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN ); _rtw_memcpy( pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN ); } -@@ -2603,7 +3288,7 @@ u8 process_p2p_group_negotation_confirm( +@@ -2603,7 +3288,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf attr_contentlen = 0; if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen) ) { @@ -28014,7 +27273,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->peer_operating_ch = operatingch_info[4]; } -@@ -2632,114 +3317,6 @@ u8 process_p2p_presence_req(struct wifid +@@ -2632,114 +3317,6 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le return _TRUE; } @@ -28146,7 +27405,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void restore_p2p_state_handler( _adapter* padapter ) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; -@@ -2771,16 +3350,56 @@ void restore_p2p_state_handler( _adapter +@@ -2771,16 +3350,56 @@ void restore_p2p_state_handler( _adapter* padapter ) _func_enter_; @@ -28203,7 +27462,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void pre_tx_provdisc_handler( _adapter* padapter ) { struct wifidirect_info *pwdinfo = &padapter->wdinfo; -@@ -2788,8 +3407,8 @@ void pre_tx_provdisc_handler( _adapter* +@@ -2788,8 +3407,8 @@ void pre_tx_provdisc_handler( _adapter* padapter ) _func_enter_; set_channel_bwmode(padapter, pwdinfo->tx_prov_disc_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); @@ -28214,7 +27473,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); _func_exit_; -@@ -2802,71 +3421,966 @@ void pre_tx_negoreq_handler( _adapter* p +@@ -2802,67 +3421,962 @@ void pre_tx_negoreq_handler( _adapter* padapter ) _func_enter_; set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); @@ -28314,10 +27573,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } -void p2p_protocol_wk_hdl(_adapter *padapter, int intCmdType) --{ -- struct wifidirect_info *pwdinfo= &(padapter->wdinfo); -- --_func_enter_; + rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN); + val8 = 1; + rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8)); @@ -29224,13 +28479,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif //CONFIG_IOCTL_CFG80211 + +void p2p_protocol_wk_hdl(_adapter *padapter, int intCmdType) -+{ -+ struct wifidirect_info *pwdinfo= &(padapter->wdinfo); -+ -+_func_enter_; - - switch(intCmdType) - { + { + struct wifidirect_info *pwdinfo= &(padapter->wdinfo); + @@ -2882,14 +4396,61 @@ _func_enter_; } case P2P_PRE_TX_PROVDISC_PROCESS_WK: @@ -29418,7 +28669,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void p2p_ps_wk_hdl(_adapter *padapter, u8 p2p_ps_state) { -@@ -2911,42 +4584,53 @@ void p2p_ps_wk_hdl(_adapter *padapter, u +@@ -2911,42 +4584,53 @@ void p2p_ps_wk_hdl(_adapter *padapter, u8 p2p_ps_state) _func_enter_; @@ -29499,7 +28750,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _func_exit_; -@@ -2962,44 +4646,41 @@ u8 p2p_ps_wk_cmd(_adapter*padapter, u8 p +@@ -2962,44 +4646,41 @@ u8 p2p_ps_wk_cmd(_adapter*padapter, u8 p2p_ps_state, u8 enqueue) _func_enter_; @@ -29617,7 +28868,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static void restore_p2p_state_timer_process (void *FunctionContext) { -@@ -3042,7 +4762,7 @@ static void pre_tx_scan_timer_process (v +@@ -3042,7 +4762,7 @@ static void pre_tx_scan_timer_process (void *FunctionContext) if ( _TRUE == pwdinfo->tx_prov_disc_info.benable ) // the provision discovery request frame is trigger to send or not { p2p_protocol_wk_cmd( adapter, P2P_PRE_TX_PROVDISC_PROCESS_WK ); @@ -29626,7 +28877,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT ); } } -@@ -3051,10 +4771,17 @@ static void pre_tx_scan_timer_process (v +@@ -3051,10 +4771,17 @@ static void pre_tx_scan_timer_process (void *FunctionContext) if ( _TRUE == pwdinfo->nego_req_info.benable ) { p2p_protocol_wk_cmd( adapter, P2P_PRE_TX_NEGOREQ_PROCESS_WK ); @@ -29645,7 +28896,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release else { DBG_8192C( "[%s] p2p_state is %d, ignore!!\n", __FUNCTION__, rtw_p2p_state(pwdinfo) ); -@@ -3076,69 +4803,167 @@ static void find_phase_timer_process (vo +@@ -3076,69 +4803,167 @@ static void find_phase_timer_process (void *FunctionContext) p2p_protocol_wk_cmd( adapter, P2P_FIND_PHASE_WK ); } @@ -29835,7 +29086,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Use the OFDM rate in the P2P probe response frame. ( 6(B), 9(B), 12, 18, 24, 36, 48, 54 ) pwdinfo->support_rate[0] = 0x8c; // 6(B) pwdinfo->support_rate[1] = 0x92; // 9(B) -@@ -3152,12 +4977,10 @@ void init_wifidirect_info( _adapter* pad +@@ -3152,12 +4977,10 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role) _rtw_memcpy( ( void* ) pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7 ); _rtw_memset( pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN ); @@ -29849,7 +29100,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memset( &pwdinfo->inviteresp_info, 0x00, sizeof( struct tx_invite_resp_info ) ); pwdinfo->inviteresp_info.token = 0; -@@ -3165,10 +4988,6 @@ void init_wifidirect_info( _adapter* pad +@@ -3165,10 +4988,6 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role) pwdinfo->profileindex = 0; _rtw_memset( &pwdinfo->profileinfo[ 0 ], 0x00, sizeof( struct profile_info ) * P2P_MAX_PERSISTENT_GROUP_NUM ); @@ -29860,7 +29111,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); pwdinfo->listen_dwell = ( u8 ) (( rtw_get_current_time() % 3 ) + 1); -@@ -3187,197 +5006,140 @@ void init_wifidirect_info( _adapter* pad +@@ -3187,197 +5006,140 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role) pwdinfo->ui_got_wps_info = P2P_NO_WPSINFO; #ifdef CONFIG_WFD @@ -30084,9 +29335,37 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return "P2P_ROLE_GO"; + default: + return "UNKNOWN"; -+ } -+} -+ + } +- +- return is_p2p_frame; + } +-#endif //CONFIG_IOCTL_CFG80211 + +-#ifdef CONFIG_DBG_P2P +-char * p2p_role_str[] = { +- "P2P_ROLE_DISABLE", +- "P2P_ROLE_DEVICE", +- "P2P_ROLE_CLIENT", +- "P2P_ROLE_GO" +-}; +- +-char * p2p_state_str[] = { +- "P2P_STATE_NONE", +- "P2P_STATE_IDLE", +- "P2P_STATE_LISTEN", +- "P2P_STATE_SCAN", +- "P2P_STATE_FIND_PHASE_LISTEN", +- "P2P_STATE_FIND_PHASE_SEARCH", +- "P2P_STATE_TX_PROVISION_DIS_REQ", +- "P2P_STATE_RX_PROVISION_DIS_RSP", +- "P2P_STATE_RX_PROVISION_DIS_REQ", +- "P2P_STATE_GONEGO_ING", +- "P2P_STATE_GONEGO_OK", +- "P2P_STATE_GONEGO_FAIL", +- "P2P_STATE_RECV_INVITE_REQ", +- "P2P_STATE_PROVISIONING_ING", +- "P2P_STATE_PROVISIONING_DONE" +-}; +/** + * rtw_p2p_state_txt - Get the p2p state name as a text string + * @state: P2P state @@ -30143,41 +29422,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return "P2P_STATE_TX_INFOR_NOREADY"; + default: + return "UNKNOWN"; - } -- -- return is_p2p_frame; - } --#endif //CONFIG_IOCTL_CFG80211 -- --#ifdef CONFIG_DBG_P2P --char * p2p_role_str[] = { -- "P2P_ROLE_DISABLE", -- "P2P_ROLE_DEVICE", -- "P2P_ROLE_CLIENT", -- "P2P_ROLE_GO" --}; -- --char * p2p_state_str[] = { -- "P2P_STATE_NONE", -- "P2P_STATE_IDLE", -- "P2P_STATE_LISTEN", -- "P2P_STATE_SCAN", -- "P2P_STATE_FIND_PHASE_LISTEN", -- "P2P_STATE_FIND_PHASE_SEARCH", -- "P2P_STATE_TX_PROVISION_DIS_REQ", -- "P2P_STATE_RX_PROVISION_DIS_RSP", -- "P2P_STATE_RX_PROVISION_DIS_REQ", -- "P2P_STATE_GONEGO_ING", -- "P2P_STATE_GONEGO_OK", -- "P2P_STATE_GONEGO_FAIL", -- "P2P_STATE_RECV_INVITE_REQ", -- "P2P_STATE_PROVISIONING_ING", -- "P2P_STATE_PROVISIONING_DONE" --}; ++ } ++} void dbg_rtw_p2p_set_state(struct wifidirect_info *wdinfo, enum P2P_STATE state, const char *caller, int line) { -@@ -3385,11 +5147,11 @@ void dbg_rtw_p2p_set_state(struct wifidi +@@ -3385,11 +5147,11 @@ void dbg_rtw_p2p_set_state(struct wifidirect_info *wdinfo, enum P2P_STATE state, enum P2P_STATE old_state = _rtw_p2p_state(wdinfo); _rtw_p2p_set_state(wdinfo, state); DBG_871X("[CONFIG_DBG_P2P]%s:%d set_state from %s to %s\n", caller, line @@ -30191,7 +29441,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ); } } -@@ -3399,11 +5161,11 @@ void dbg_rtw_p2p_set_pre_state(struct wi +@@ -3399,11 +5161,11 @@ void dbg_rtw_p2p_set_pre_state(struct wifidirect_info *wdinfo, enum P2P_STATE st enum P2P_STATE old_state = _rtw_p2p_pre_state(wdinfo); _rtw_p2p_set_pre_state(wdinfo, state); DBG_871X("[CONFIG_DBG_P2P]%s:%d set_pre_state from %s to %s\n", caller, line @@ -30205,7 +29455,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ); } } -@@ -3428,11 +5190,11 @@ void dbg_rtw_p2p_set_role(struct wifidir +@@ -3428,11 +5190,11 @@ void dbg_rtw_p2p_set_role(struct wifidirect_info *wdinfo, enum P2P_ROLE role, co enum P2P_ROLE old_role = wdinfo->role; _rtw_p2p_set_role(wdinfo, role); DBG_871X("[CONFIG_DBG_P2P]%s:%d set_role from %s to %s\n", caller, line @@ -30219,7 +29469,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ); } } -@@ -3450,29 +5212,45 @@ int rtw_p2p_enable(_adapter *padapter, e +@@ -3450,29 +5212,45 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role) u8 channel, ch_offset; u16 bwmode; @@ -30278,7 +29528,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //Disable P2P function if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) -@@ -3480,16 +5258,34 @@ int rtw_p2p_enable(_adapter *padapter, e +@@ -3480,16 +5258,34 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role) _cancel_timer_ex( &pwdinfo->find_phase_timer ); _cancel_timer_ex( &pwdinfo->restore_p2p_state_timer ); _cancel_timer_ex( &pwdinfo->pre_tx_scan_timer); @@ -30318,6 +29568,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release exit: return ret; } +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_pwrctrl.c b/drivers/net/wireless/rtl8192cu/core/rtw_pwrctrl.c +index 92b3cb8..d1c11fa 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_pwrctrl.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_pwrctrl.c @@ -16,8 +16,7 @@ @@ -31848,7 +31100,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif static void resume_workitem_callback(struct work_struct *work) { -@@ -991,9 +1164,8 @@ static void resume_workitem_callback(str +@@ -991,9 +1164,8 @@ static void resume_workitem_callback(struct work_struct *work) DBG_871X("%s\n",__FUNCTION__); @@ -31860,7 +31112,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif } -@@ -1011,17 +1183,33 @@ void rtw_resume_in_workqueue(struct pwrc +@@ -1011,17 +1183,33 @@ void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv) } #endif //CONFIG_RESUME_IN_WORKQUEUE @@ -31899,7 +31151,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void rtw_late_resume(struct early_suspend *h) -@@ -1031,16 +1219,22 @@ static void rtw_late_resume(struct early +@@ -1031,16 +1219,22 @@ static void rtw_late_resume(struct early_suspend *h) DBG_871X("%s\n",__FUNCTION__); if(pwrpriv->do_late_resume) { @@ -31926,7 +31178,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("%s\n", __FUNCTION__); //jeff: set the early suspend level before blank screen, so we wll do late resume after scree is lit -@@ -1054,9 +1248,16 @@ void rtw_register_early_suspend(struct p +@@ -1054,9 +1248,16 @@ void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv) void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) { @@ -31944,7 +31196,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (pwrpriv->early_suspend.suspend) unregister_early_suspend(&pwrpriv->early_suspend); -@@ -1067,16 +1268,15 @@ void rtw_unregister_early_suspend(struct +@@ -1067,16 +1268,15 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) #endif //CONFIG_HAS_EARLYSUSPEND #ifdef CONFIG_ANDROID_POWER @@ -31965,7 +31217,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void rtw_late_resume(android_early_suspend_t *h) -@@ -1086,16 +1286,22 @@ static void rtw_late_resume(android_earl +@@ -1086,16 +1286,22 @@ static void rtw_late_resume(android_early_suspend_t *h) DBG_871X("%s\n",__FUNCTION__); if(pwrpriv->do_late_resume) { @@ -31992,7 +31244,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("%s\n", __FUNCTION__); //jeff: set the early suspend level before blank screen, so we wll do late resume after scree is lit -@@ -1107,9 +1313,16 @@ void rtw_register_early_suspend(struct p +@@ -1107,9 +1313,16 @@ void rtw_register_early_suspend(struct pwrctrl_priv *pwrpriv) void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) { @@ -32010,7 +31262,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (pwrpriv->early_suspend.suspend) android_unregister_early_suspend(&pwrpriv->early_suspend); -@@ -1122,24 +1335,81 @@ void rtw_unregister_early_suspend(struct +@@ -1122,24 +1335,81 @@ void rtw_unregister_early_suspend(struct pwrctrl_priv *pwrpriv) u8 rtw_interface_ps_func(_adapter *padapter,HAL_INTF_PS_FUNC efunc_id,u8* val) { u8 bResult = _TRUE; @@ -32098,7 +31350,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //System suspend is not allowed to wakeup if((pwrpriv->bInternalAutoSuspend == _FALSE) && (_TRUE == pwrpriv->bInSuspend )){ -@@ -1147,11 +1417,6 @@ int _rtw_pwr_wakeup(_adapter *padapter, +@@ -1147,11 +1417,6 @@ int _rtw_pwr_wakeup(_adapter *padapter, const char *caller) goto exit; } @@ -32110,7 +31362,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //block??? if((pwrpriv->bInternalAutoSuspend == _TRUE) && (padapter->net_closed == _TRUE)) { ret = _FAIL; -@@ -1164,7 +1429,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, +@@ -1164,7 +1429,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, const char *caller) ret = _SUCCESS; goto exit; } @@ -32119,7 +31371,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(rf_off == pwrpriv->rf_pwrstate ) { #ifdef CONFIG_USB_HCI -@@ -1177,7 +1442,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, +@@ -1177,7 +1442,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, const char *caller) } else if(padapter->registrypriv.usbss_enable) { @@ -32128,7 +31380,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(_FAIL == autoresume_enter(padapter)) { DBG_8192C("======> autoresume fail.............\n"); -@@ -1190,7 +1455,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, +@@ -1190,7 +1455,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, const char *caller) #endif { #ifdef CONFIG_IPS @@ -32137,7 +31389,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(_FAIL == ips_leave(padapter)) { DBG_8192C("======> ips_leave fail.............\n"); -@@ -1199,10 +1464,6 @@ int _rtw_pwr_wakeup(_adapter *padapter, +@@ -1199,10 +1464,6 @@ int _rtw_pwr_wakeup(_adapter *padapter, const char *caller) } #endif } @@ -32148,7 +31400,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //TODO: the following checking need to be merged... -@@ -1220,8 +1481,60 @@ int _rtw_pwr_wakeup(_adapter *padapter, +@@ -1220,8 +1481,60 @@ int _rtw_pwr_wakeup(_adapter *padapter, const char *caller) } exit: @@ -32209,6 +31461,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_recv.c b/drivers/net/wireless/rtl8192cu/core/rtw_recv.c +index 0d5143b..2cc8faa 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_recv.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_recv.c @@ -16,7 +16,7 @@ @@ -32250,7 +31504,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv) { _rtw_spinlock_free(&precvpriv->lock); -@@ -171,6 +178,8 @@ void _rtw_free_recv_priv (struct recv_pr +@@ -171,6 +178,8 @@ void _rtw_free_recv_priv (struct recv_priv *precvpriv) _func_enter_; @@ -32328,7 +31582,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue) { _irqL irqL; -@@ -247,41 +260,34 @@ int rtw_free_recvframe(union recv_frame +@@ -247,41 +260,34 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue) _func_enter_; @@ -32479,7 +31733,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue) { _irqL irqL; -@@ -435,14 +471,16 @@ struct recv_buf *rtw_dequeue_recvbuf (_q +@@ -435,14 +471,16 @@ struct recv_buf *rtw_dequeue_recvbuf (_queue *queue) } @@ -32611,7 +31865,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { #ifdef CONFIG_AP_MODE unsigned char pwrbit; -@@ -826,11 +866,11 @@ static void process_pwrbit_data(_adapter +@@ -826,11 +866,11 @@ static void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_fram { //psta->state |= WIFI_SLEEP_STATE; //pstapriv->sta_dz_bitmap |= BIT(psta->aid); @@ -32626,36 +31880,33 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -838,897 +878,118 @@ static void process_pwrbit_data(_adapter +@@ -838,10 +878,10 @@ static void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_fram { //psta->state ^= WIFI_SLEEP_STATE; //pstapriv->sta_dz_bitmap &= ~BIT(psta->aid); - -- wakeup_sta_to_xmit(padapter, psta); -- ++ + wakeup_sta_to_xmit(padapter, psta); + - //DBG_871X("to wakeup, sta_dz_bitmap=%x\n", pstapriv->sta_dz_bitmap); -- } -- } -- -- } -- --#endif --} -- ++ //DBG_871X("to wakeup, sta_dz_bitmap=%x\n", pstapriv->sta_dz_bitmap); + } + } + +@@ -850,7 +890,8 @@ static void process_pwrbit_data(_adapter *padapter, union recv_frame *precv_fram + #endif + } + -static void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame) --{ --#ifdef CONFIG_AP_MODE -- struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; -- struct sta_priv *pstapriv = &padapter->stapriv; -- struct sta_info *psta=NULL; -- -- psta = rtw_get_stainfo(pstapriv, pattrib->src); -- -- if(!psta) return; -- --#ifdef CONFIG_TDLS -- if( !(psta->tdls_sta_state & TDLS_LINKED_STATE ) ) -- { ++void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame); ++void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame) + { + #ifdef CONFIG_AP_MODE + struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; +@@ -864,871 +905,91 @@ static void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame + #ifdef CONFIG_TDLS + if( !(psta->tdls_sta_state & TDLS_LINKED_STATE ) ) + { -#endif //CONFIG_TDLS - - if(!psta->qos_option) @@ -33398,17 +32649,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _rtw_memcpy(&ptdls_sta->ch_switch_timeout, pIE->data+2, 2); - default: - break; -+ -+ wakeup_sta_to_xmit(padapter, psta); -+ -+ //DBG_871X("to wakeup, sta_dz_bitmap=%x\n", pstapriv->sta_dz_bitmap); -+ } - } - +- } +- - j += (pIE->Length + 2); - - } - +- } +- - //todo: check status - ptdls_sta->stat_code=0; - ptdls_sta->tdls_sta_state |= TDLS_CH_SWITCH_ON_STATE; @@ -33428,13 +32674,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtw_tdls_cmd(adapter, ptdls_sta->hwaddr, TDLS_OFF_CH); - } - return _FAIL; -+#endif - } - +-} +- -sint On_TDLS_Ch_Switch_Rsp(_adapter *adapter, union recv_frame *precv_frame) -+void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame); -+void process_wmmps_data(_adapter *padapter, union recv_frame *precv_frame) - { +-{ - struct sta_info *ptdls_sta= NULL; - struct sta_priv *pstapriv = &adapter->stapriv; - u8 *ptr = precv_frame->u.hdr.rx_data; @@ -33445,7 +32688,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - u8 FIXED_IE =4; - u16 stat_code, j, switch_time, switch_timeout; - struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; -- ++#endif //CONFIG_TDLS + - psa = get_sa(ptr); - ptdls_sta = rtw_get_stainfo(pstapriv, psa); - @@ -33463,16 +32707,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - return _FAIL; - } -+#ifdef CONFIG_AP_MODE -+ struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; -+ struct sta_priv *pstapriv = &padapter->stapriv; -+ struct sta_info *psta=NULL; ++ if(!psta->qos_option) ++ return; - //avoiding duplicated or unconditional ch. switch. rsp - if((ptdls_sta->tdls_sta_state & TDLS_CH_SW_INITIATOR_STATE) != TDLS_CH_SW_INITIATOR_STATE) - return _FAIL; -+ psta = rtw_get_stainfo(pstapriv, pattrib->src); - +- - //[+1]: payload type - ptr +=prx_pkt_attrib->hdrlen + prx_pkt_attrib->iv_len+LLC_HEADER_SIZE+TYPE_LENGTH_FIELD_SIZE+1; - parsing_length= ((union recv_frame *)precv_frame)->u.hdr.len @@ -33483,29 +32724,21 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -TYPE_LENGTH_FIELD_SIZE - -1 - -FIXED_IE; -+ if(!psta) return; - +- - _rtw_memcpy(&stat_code, ptr+2, 2); -+#ifdef CONFIG_TDLS -+ if( !(psta->tdls_sta_state & TDLS_LINKED_STATE ) ) -+ { -+#endif //CONFIG_TDLS - +- - if(stat_code!=0){ - return _FAIL; -- } -- -- //parsing information element -- for(j=FIXED_IE; jqos_option) -+ return; - -- pIE = (PNDIS_802_11_VARIABLE_IEs)(ptr+ j); + if(!(psta->qos_info&0xf)) + return; + +#ifdef CONFIG_TDLS -+ } + } +- +- //parsing information element +- for(j=FIXED_IE; jElementID) @@ -33581,6 +32814,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib; sint ret = _SUCCESS; u8 *paction = get_recvframe_data(precv_frame); +- +- //point to action field, [+8]: snap+ether_type, [+1]: payload_type, [+1]: category field +- paction+=pattrib->hdrlen + pattrib->iv_len+8+1+1; + u8 category_field = 1; +#ifdef CONFIG_WFD + u8 WFA_OUI[3] = { 0x50, 0x6f, 0x9a }; @@ -33594,9 +32830,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + ETH_TYPE_LEN + + PAYLOAD_TYPE_LEN + + category_field; - -- //point to action field, [+8]: snap+ether_type, [+1]: payload_type, [+1]: category field -- paction+=pattrib->hdrlen + pattrib->iv_len+8+1+1; ++ + if(ptdlsinfo->enable == 0) + { + DBG_871X("recv tdls frame, " @@ -33607,7 +32841,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch(*paction){ case TDLS_SETUP_REQUEST: -@@ -1763,6 +1024,26 @@ sint OnTDLS(_adapter *adapter, union rec +@@ -1763,6 +1024,26 @@ sint OnTDLS(_adapter *adapter, union recv_frame *precv_frame) DBG_871X("recv tdls channel switch response frame\n"); ret=On_TDLS_Ch_Switch_Rsp(adapter, precv_frame); break; @@ -33647,7 +32881,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { int sz; struct sta_info *psta = NULL; -@@ -1791,7 +1073,7 @@ static void count_rx_stats(_adapter *pad +@@ -1791,7 +1073,7 @@ static void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct if( (!MacAddr_isBcst(pattrib->dst)) && (!IS_MCAST(pattrib->dst))){ padapter->mlmepriv.LinkDetectInfo.NumRxUnicastOkInPeriod++; } @@ -33656,7 +32890,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(sta) psta = sta; else -@@ -1807,7 +1089,12 @@ static void count_rx_stats(_adapter *pad +@@ -1807,7 +1089,12 @@ static void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct } @@ -34054,7 +33288,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { #ifdef CONFIG_AP_MODE struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib; -@@ -2346,13 +1602,22 @@ static sint validate_recv_ctrl_frame(_ad +@@ -2346,13 +1602,22 @@ static sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv if(wmmps_ac) return _FAIL; @@ -34078,7 +33312,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_plist = get_next(xmitframe_phead); -@@ -2376,10 +1641,15 @@ static sint validate_recv_ctrl_frame(_ad +@@ -2376,10 +1641,15 @@ static sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv //DBG_871X("handling ps-poll, q_len=%d, tim=%x\n", psta->sleepq_len, pstapriv->tim_bitmap); @@ -34095,7 +33329,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(psta->sleepq_len==0) { -@@ -2392,15 +1662,24 @@ static sint validate_recv_ctrl_frame(_ad +@@ -2392,15 +1662,24 @@ static sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv update_beacon(padapter, _TIM_IE_, NULL, _FALSE); } @@ -34120,7 +33354,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -2415,9 +1694,7 @@ static sint validate_recv_ctrl_frame(_ad +@@ -2415,9 +1694,7 @@ static sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv update_beacon(padapter, _TIM_IE_, NULL, _FALSE); } @@ -34131,7 +33365,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -2429,37 +1706,58 @@ static sint validate_recv_ctrl_frame(_ad +@@ -2429,37 +1706,58 @@ static sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv } @@ -34201,7 +33435,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { struct rx_pkt_attrib * pattrib=&precv_frame->u.hdr.attrib; struct recv_stat* prxstat=( struct recv_stat * ) precv_frame->u.hdr.rx_head ; -@@ -2505,32 +1803,28 @@ static sint validate_recv_mgnt_frame(_ad +@@ -2505,32 +1803,28 @@ static sint validate_recv_mgnt_frame(_adapter *adapter, union recv_frame *precv_ pattrib->priority=0; pattrib->hdrlen = pattrib->to_fr_ds==3 ? 30 : 24; @@ -34735,7 +33969,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release nr_subframes = 0; pattrib = &prframe->u.hdr.attrib; -@@ -3271,26 +2787,29 @@ static int amsdu_to_msdu(_adapter *padap +@@ -3271,26 +2787,29 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) while(a_len > ETH_HLEN) { /* Offset 12 denote 2 mac address */ @@ -34771,7 +34005,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(sub_skb) { skb_reserve(sub_skb, 12); -@@ -3298,26 +2817,43 @@ static int amsdu_to_msdu(_adapter *padap +@@ -3298,26 +2817,43 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) _rtw_memcpy(data_ptr, pdata, nSubframe_Length); } else @@ -34820,7 +34054,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; } -@@ -3338,11 +2874,15 @@ static int amsdu_to_msdu(_adapter *padap +@@ -3338,11 +2874,15 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) } for(i=0; ilen >= 8 && ((_rtw_memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || -@@ -3378,7 +2918,7 @@ static int amsdu_to_msdu(_adapter *padap +@@ -3378,7 +2918,7 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) #endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) @@ -34846,7 +34080,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { int nat25_handle_frame(_adapter *priv, struct sk_buff *skb); if (nat25_handle_frame(padapter, sub_skb) == -1) { -@@ -3389,7 +2929,7 @@ static int amsdu_to_msdu(_adapter *padap +@@ -3389,7 +2929,7 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) #if 1 // bypass this frame to upper layer!! #else @@ -34855,7 +34089,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release continue; #endif } -@@ -3407,10 +2947,74 @@ static int amsdu_to_msdu(_adapter *padap +@@ -3407,10 +2947,74 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe) } #else /* !CONFIG_TCP_CSUM_OFFLOAD_RX */ sub_skb->ip_summed = CHECKSUM_NONE; @@ -35049,7 +34283,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { u8 wsize = preorder_ctrl->wsize_b; u16 wend = (preorder_ctrl->indicate_seq + wsize -1) & 0xFFF;//% 4096; -@@ -3740,7 +3345,7 @@ static int check_indicate_seq(struct rec +@@ -3740,7 +3345,7 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n //DbgPrint("CheckRxTsIndicateSeq(): Packet Drop! IndicateSeq: %d, NewSeq: %d\n", precvpriv->indicate_seq, seq_num); #ifdef DBG_RX_DROP_FRAME @@ -35058,7 +34292,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release preorder_ctrl->indicate_seq, seq_num); #endif -@@ -3783,8 +3388,8 @@ static int check_indicate_seq(struct rec +@@ -3783,8 +3388,8 @@ static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_n return _TRUE; } @@ -35069,7 +34303,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib; _queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -@@ -3845,10 +3450,10 @@ static int enqueue_reorder_recvframe(str +@@ -3845,10 +3450,10 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un } @@ -35083,7 +34317,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //u8 bcancelled; _list *phead, *plist; union recv_frame *prframe; -@@ -3894,7 +3499,7 @@ static int recv_indicatepkts_in_order(_a +@@ -3894,7 +3499,7 @@ static int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ct // Prepare indication list and indication. // Check if there is any packet need indicate. while(!rtw_is_list_empty(phead)) @@ -35092,7 +34326,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release prframe = LIST_CONTAINOR(plist, union recv_frame, u); pattrib = &prframe->u.hdr.attrib; -@@ -3935,7 +3540,7 @@ static int recv_indicatepkts_in_order(_a +@@ -3935,7 +3540,7 @@ static int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ct //PlatformCancelTimer(Adapter, &pTS->RxPktPendingTimer); if(bforced!=_TRUE) { @@ -35101,7 +34335,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _cancel_timer(&preorder_ctrl->reordering_ctrl_timer, &bcancelled); } } -@@ -3952,14 +3557,14 @@ static int recv_indicatepkts_in_order(_a +@@ -3952,14 +3557,14 @@ static int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ct //DbgPrint("recv_indicatepkts_in_order, indicate_seq=%d, seq_num=%d\n", precvpriv->indicate_seq, pattrib->seq_num); if(!pattrib->amsdu) { @@ -35120,7 +34354,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } else if(pattrib->amsdu==1) -@@ -3999,7 +3604,7 @@ static int recv_indicatepkts_in_order(_a +@@ -3999,7 +3604,7 @@ static int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ct // Set new pending timer. //pTS->RxIndicateState = RXTS_INDICATE_REORDER; //PlatformSetTimer(Adapter, &pTS->RxPktPendingTimer, pHTInfo->RxReorderPendingTime); @@ -35129,7 +34363,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME); } else -@@ -4014,12 +3619,11 @@ static int recv_indicatepkts_in_order(_a +@@ -4014,12 +3619,11 @@ static int recv_indicatepkts_in_order(_adapter *padapter, struct recv_reorder_ct } @@ -35144,7 +34378,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib; struct recv_reorder_ctrl *preorder_ctrl = prframe->u.hdr.preorder_ctrl; _queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; -@@ -4029,7 +3633,9 @@ static int recv_indicatepkt_reorder(_ada +@@ -4029,7 +3633,9 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram //s1. wlanhdr_to_ethhdr(prframe); @@ -35155,7 +34389,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if ((padapter->bDriverStopped == _FALSE) && (padapter->bSurpriseRemoved == _FALSE)) -@@ -4126,7 +3732,15 @@ static int recv_indicatepkt_reorder(_ada +@@ -4126,7 +3732,15 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s check_indicate_seq fail\n", __FUNCTION__); #endif @@ -35171,7 +34405,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -4166,6 +3780,8 @@ static int recv_indicatepkt_reorder(_ada +@@ -4166,6 +3780,8 @@ static int recv_indicatepkt_reorder(_adapter *padapter, union recv_frame *prfram } @@ -35180,7 +34414,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _SUCCESS; _err_exit: -@@ -4189,7 +3805,7 @@ void rtw_reordering_ctrl_timeout_handler +@@ -4189,7 +3805,7 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext) return; } @@ -35189,7 +34423,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _enter_critical_bh(&ppending_recvframe_queue->lock, &irql); -@@ -4202,19 +3818,29 @@ void rtw_reordering_ctrl_timeout_handler +@@ -4202,19 +3818,29 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext) } @@ -35224,7 +34458,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { //prframe->u.hdr.preorder_ctrl = &precvpriv->recvreorder_ctrl[pattrib->priority]; -@@ -4267,24 +3893,17 @@ static int process_recv_indicatepkts(_ad +@@ -4267,24 +3893,17 @@ static int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prfra return retval; } @@ -35256,7 +34490,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_MP_INCLUDED if ((check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE))//&&(padapter->mppriv.check_mp_pkt == 0)) -@@ -4296,21 +3915,44 @@ static int recv_func(_adapter *padapter, +@@ -4296,21 +3915,44 @@ static int recv_func(_adapter *padapter, void *pcontext) if (check_fwstate(pmlmepriv, WIFI_MP_LPBK_STATE) == _FALSE) { RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("MP - Not in loopback mode , drop pkt \n")); @@ -35308,7 +34542,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // DATA FRAME rtw_led_control(padapter, LED_CTL_RX); -@@ -4320,22 +3962,38 @@ static int recv_func(_adapter *padapter, +@@ -4320,22 +3962,38 @@ static int recv_func(_adapter *padapter, void *pcontext) #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s decryptor: drop pkt\n", __FUNCTION__); #endif @@ -35354,7 +34588,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release prframe = recvframe_chk_defrag(padapter, prframe); if(prframe==NULL) { -@@ -4352,16 +4010,22 @@ static int recv_func(_adapter *padapter, +@@ -4352,16 +4010,22 @@ static int recv_func(_adapter *padapter, void *pcontext) #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s portctrl: drop pkt\n", __FUNCTION__); #endif @@ -35380,7 +34614,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("recv_func: process_recv_indicatepkts fail! \n")); #ifdef DBG_RX_DROP_FRAME -@@ -4371,12 +4035,12 @@ static int recv_func(_adapter *padapter, +@@ -4371,12 +4035,12 @@ static int recv_func(_adapter *padapter, void *pcontext) goto _recv_data_drop; } @@ -35396,7 +34630,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("wlanhdr_to_ethhdr: drop pkt \n")); #ifdef DBG_RX_DROP_FRAME -@@ -4390,8 +4054,8 @@ static int recv_func(_adapter *padapter, +@@ -4390,8 +4054,8 @@ static int recv_func(_adapter *padapter, void *pcontext) { RT_TRACE(_module_rtl871x_recv_c_, _drv_alert_, ("@@@@ recv_func: recv_func rtw_recv_indicatepkt\n" )); //indicate this recv_frame @@ -35407,7 +34641,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s rtw_recv_indicatepkt fail!\n", __FUNCTION__); -@@ -4407,7 +4071,7 @@ static int recv_func(_adapter *padapter, +@@ -4407,7 +4071,7 @@ static int recv_func(_adapter *padapter, void *pcontext) DBG_871X("DBG_RX_DROP_FRAME %s ecv_func:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n", __FUNCTION__, padapter->bDriverStopped, padapter->bSurpriseRemoved); #endif @@ -35416,7 +34650,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_free_recvframe(orig_prframe, pfree_recv_queue); //free this recv_frame } -@@ -4415,8 +4079,8 @@ static int recv_func(_adapter *padapter, +@@ -4415,8 +4079,8 @@ static int recv_func(_adapter *padapter, void *pcontext) else if(pattrib->amsdu==1) { @@ -35427,7 +34661,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s amsdu_to_msdu fail\n", __FUNCTION__); -@@ -4430,14 +4094,60 @@ static int recv_func(_adapter *padapter, +@@ -4430,14 +4094,60 @@ static int recv_func(_adapter *padapter, void *pcontext) #ifdef DBG_RX_DROP_FRAME DBG_871X("DBG_RX_DROP_FRAME %s what is this condition??\n", __FUNCTION__); #endif @@ -35491,7 +34725,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -4445,59 +4155,23 @@ s32 rtw_recv_entry(union recv_frame *pre +@@ -4445,59 +4155,23 @@ s32 rtw_recv_entry(union recv_frame *precvframe) { _adapter *padapter; struct recv_priv *precvpriv; @@ -35562,7 +34796,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_MP_INCLUDED padapter->mppriv.rx_pktloss = precvpriv->rx_drop; #endif -@@ -4541,53 +4212,74 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER +@@ -4541,53 +4212,74 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){ if(recvpriv->signal_strength_data.update_req == 0) {// update_req is clear, means we got rx avg_signal_strength = recvpriv->signal_strength_data.avg_val; @@ -35593,7 +34827,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - tmp_s = tmp_s/_alpha; - if(tmp_s>100) - tmp_s = 100; -- ++ if (num_signal_strength == 0) { ++ if (rtw_get_on_cur_ch_time(adapter) == 0 ++ || rtw_get_passing_time_ms(rtw_get_on_cur_ch_time(adapter)) < 2 * adapter->mlmeextpriv.mlmext_info.bcn_interval ++ ) { ++ goto set_timer; ++ } ++ } + - tmp_q = (avg_signal_qual+(_alpha-1)*recvpriv->signal_qual); - if(tmp_q %_alpha) - tmp_q = tmp_q/_alpha + 1; @@ -35617,14 +34858,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - , num_signal_strength, num_signal_qual - ); - #endif -+ if (num_signal_strength == 0) { -+ if (rtw_get_on_cur_ch_time(adapter) == 0 -+ || rtw_get_passing_time_ms(rtw_get_on_cur_ch_time(adapter)) < 2 * adapter->mlmeextpriv.mlmext_info.bcn_interval -+ ) { -+ goto set_timer; -+ } -+ } -+ + if(check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _TRUE + || check_fwstate(&adapter->mlmepriv, _FW_LINKED) == _FALSE + ) { @@ -35676,6 +34909,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_set_signal_stat_timer(recvpriv); } +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_rf.c b/drivers/net/wireless/rtl8192cu/core/rtw_rf.c +index 665c7e5..7ae8635 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_rf.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_rf.c @@ -16,8 +16,7 @@ @@ -35688,6 +34923,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTW_RF_C_ #include +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_security.c b/drivers/net/wireless/rtl8192cu/core/rtw_security.c +index 58601b6..8fa8ed5 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_security.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_security.c @@ -16,8 +16,7 @@ @@ -35834,7 +35071,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static void xor_128(u8 *a, u8 *b, u8 *out); static void xor_32(u8 *a, u8 *b, u8 *out); static u8 sbox(u8 a); -@@ -922,11 +960,13 @@ static void next_key(u8 *key, sint round +@@ -922,11 +960,13 @@ static void next_key(u8 *key, sint round); static void byte_sub(u8 *in, u8 *out); static void shift_row(u8 *in, u8 *out); static void mix_column(u8 *in, u8 *out); @@ -36023,7 +35260,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for (j = 0; j < 16; j++) padded_buffer[j] = 0x00; for (j = 0; j < 8; j++) -@@ -1508,7 +1578,7 @@ u32 rtw_aes_encrypt(_adapter *padapter, +@@ -1508,7 +1578,7 @@ u32 rtw_aes_encrypt(_adapter *padapter, u8 *pxmitframe) sint curfragnum,length; u32 prwskeylen; u8 *pframe,*prwskey; //, *payload,*iv @@ -36078,7 +35315,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release res=_FAIL; } -@@ -1591,7 +1682,6 @@ static sint aes_decipher(u8 *key, uint h +@@ -1591,7 +1682,6 @@ static sint aes_decipher(u8 *key, uint hdrlen, static u8 message[MAX_MSG_SIZE]; uint qc_exists, a4_exists, i, j, payload_remainder, num_blocks, payload_index; @@ -36204,7 +35441,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + i,pframe[hdrlen+8+plen-8+i],message[hdrlen+8+plen-8+i]); + res = _FAIL; + } - } ++ } + + if(res == _FAIL) + { @@ -36212,12 +35449,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + for(gg=0; gg < 32; gg++) + DBG_871X(" [%d]=%02x ", gg, pframe[gg]); + DBG_871X("error packet header \n"); -+ } + } + _func_exit_; return res; } -@@ -1861,7 +1971,6 @@ u32 rtw_aes_decrypt(_adapter *padapter, +@@ -1861,7 +1971,6 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe) sint length; @@ -36405,7 +35642,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* compress 512-bits */ static int sha256_compress(struct sha256_state *md, unsigned char *buf) { -@@ -2179,7 +2417,7 @@ static void hmac_sha256_vector(u8 *key, +@@ -2179,7 +2417,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem, _len[1] = 32; sha256_vector(2, _addr, _len, mac); } @@ -36414,7 +35651,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /** * sha256_prf - SHA256-based Pseudo-Random Function (IEEE 802.11r, 8.5.1.5.2) * @key: Key for PRF -@@ -2193,6 +2431,7 @@ static void hmac_sha256_vector(u8 *key, +@@ -2193,6 +2431,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem, * This function is used to derive new, cryptographically separate keys from a * given key. */ @@ -36422,7 +35659,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static void sha256_prf(u8 *key, size_t key_len, char *label, u8 *data, size_t data_len, u8 *buf, size_t buf_len) { -@@ -2229,6 +2468,7 @@ static void sha256_prf(u8 *key, size_t k +@@ -2229,6 +2468,7 @@ static void sha256_prf(u8 *key, size_t key_len, char *label, counter++; } } @@ -36438,7 +35675,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static void rijndaelKeySetupEnc(u32 rk[/*44*/], const u8 cipherKey[]) { int i; -@@ -2617,11 +2858,12 @@ static int omac1_aes_128_vector(u8 *key, +@@ -2617,11 +2858,12 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem, * This is a mode for using block cipher (AES in this case) for authentication. * OMAC1 was standardized with the name CMAC by NIST in a Special Publication * (SP) 800-38B. @@ -36453,7 +35690,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_TDLS void wpa_tdls_generate_tpk(_adapter *padapter, struct sta_info *psta) -@@ -2695,7 +2937,7 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_ +@@ -2695,7 +2937,7 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq, 2 + timeoutie[1] + 2 + ftie[1]; buf = rtw_zmalloc(len); if (!buf) { @@ -36462,7 +35699,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -1; } -@@ -2741,7 +2983,6 @@ int tdls_verify_mic(u8 *kck, u8 trans_se +@@ -2741,7 +2983,6 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq, if (lnkid == NULL || rsnie == NULL || timeoutie == NULL || ftie == NULL){ @@ -36470,7 +35707,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -2783,16 +3024,16 @@ int tdls_verify_mic(u8 *kck, u8 trans_se +@@ -2783,16 +3024,16 @@ int tdls_verify_mic(u8 *kck, u8 trans_seq, rx_ftie = ftie+4; if (os_memcmp(mic, rx_ftie, 16) == 0) { @@ -36545,6 +35782,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return status; +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_sreset.c b/drivers/net/wireless/rtl8192cu/core/rtw_sreset.c +new file mode 100644 +index 0000000..e08b1f7 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_sreset.c @@ -0,0 +1,352 @@ @@ -36900,6 +36140,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_sta_mgt.c b/drivers/net/wireless/rtl8192cu/core/rtw_sta_mgt.c +index 70b25c9..f818a0c 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_sta_mgt.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_sta_mgt.c @@ -15,8 +15,8 @@ @@ -36931,7 +36173,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif // CONFIG_AP_MODE _func_exit_; -@@ -94,7 +96,7 @@ u32 _rtw_init_sta_priv(struct sta_priv * +@@ -94,7 +96,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv) { struct sta_info *psta; s32 i; @@ -37034,7 +36276,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_mfree_all_stainfo(pstapriv); //be done before free sta_hash_lock _rtw_spinlock_free(&pstapriv->free_sta_queue.lock); -@@ -235,15 +268,46 @@ void rtw_mfree_sta_priv_lock(struct sta_ +@@ -235,15 +268,46 @@ void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv) #ifdef CONFIG_AP_MODE _rtw_spinlock_free(&pstapriv->asoc_list_lock); @@ -37156,7 +36398,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return psta; -@@ -388,6 +458,7 @@ u32 rtw_free_stainfo(_adapter *padapter +@@ -388,6 +458,7 @@ u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta) struct sta_xmit_priv *pstaxmitpriv; struct xmit_priv *pxmitpriv= &padapter->xmitpriv; struct sta_priv *pstapriv = &padapter->stapriv; @@ -37357,6 +36599,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_tdls.c b/drivers/net/wireless/rtl8192cu/core/rtw_tdls.c +new file mode 100644 +index 0000000..e8c4d4c --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/core/rtw_tdls.c @@ -0,0 +1,2941 @@ @@ -40301,6 +39546,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif //CONFIG_TDLS + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_wlan_util.c b/drivers/net/wireless/rtl8192cu/core/rtw_wlan_util.c +index 539b74f..56dac60d 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_wlan_util.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_wlan_util.c @@ -16,8 +16,7 @@ @@ -40313,7 +39560,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTW_WLAN_UTIL_C_ #include -@@ -42,8 +41,11 @@ unsigned char AIRGOCAP_OUI[] = {0x00, 0x +@@ -42,8 +41,11 @@ unsigned char AIRGOCAP_OUI[] = {0x00, 0x0a, 0xf5}; unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20}; extern unsigned char MCS_rate_2R[16]; @@ -40350,7 +39597,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int cckrates_included(unsigned char *rate, int ratelen) { -@@ -160,6 +179,7 @@ int judge_network_type(_adapter *padapte +@@ -160,6 +179,7 @@ int judge_network_type(_adapter *padapter, unsigned char *rate, int ratelen) return network_type; } @@ -40358,7 +39605,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned char ratetbl_val_2wifirate(unsigned char rate) { unsigned char val = 0; -@@ -220,6 +240,7 @@ unsigned char ratetbl_val_2wifirate(unsi +@@ -220,6 +240,7 @@ unsigned char ratetbl_val_2wifirate(unsigned char rate) } @@ -40366,7 +39613,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int is_basicrate(_adapter *padapter, unsigned char rate) { int i; -@@ -242,7 +263,7 @@ int is_basicrate(_adapter *padapter, uns +@@ -242,7 +263,7 @@ int is_basicrate(_adapter *padapter, unsigned char rate) return _FALSE; } @@ -40375,7 +39622,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned int ratetbl2rateset(_adapter *padapter, unsigned char *rateset) { int i; -@@ -288,29 +309,101 @@ void get_rate_set(_adapter *padapter, un +@@ -288,29 +309,101 @@ void get_rate_set(_adapter *padapter, unsigned char *pbssrate, int *bssrate_len) _rtw_memcpy(pbssrate, supportedrates, *bssrate_len); } @@ -40482,26 +39729,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #if 0 -@@ -330,54 +423,176 @@ void Switch_DM_Func(_adapter *padapter, +@@ -330,54 +423,176 @@ void Switch_DM_Func(_adapter *padapter, u8 mode, u8 enable) } -void Set_NETYPE1_MSR(_adapter *padapter, u8 type) +static void Set_NETYPE1_MSR(_adapter *padapter, u8 type) - { -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MEDIA_STATUS1, (u8 *)(&type)); ++{ + rtw_hal_set_hwreg(padapter, HW_VAR_MEDIA_STATUS1, (u8 *)(&type)); - } - --void Set_NETYPE0_MSR(_adapter *padapter, u8 type) ++} ++ +static void Set_NETYPE0_MSR(_adapter *padapter, u8 type) - { -- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MEDIA_STATUS, (u8 *)(&type)); ++{ + rtw_hal_set_hwreg(padapter, HW_VAR_MEDIA_STATUS, (u8 *)(&type)); +} + +void Set_MSR(_adapter *padapter, u8 type) -+{ + { +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MEDIA_STATUS1, (u8 *)(&type)); +#ifdef CONFIG_CONCURRENT_MODE + if(padapter->iface_type == IFACE_PORT1) + { @@ -40512,10 +39757,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + Set_NETYPE0_MSR(padapter, type); + } -+} -+ + } + +-void Set_NETYPE0_MSR(_adapter *padapter, u8 type) +inline u8 rtw_get_oper_ch(_adapter *adapter) -+{ + { +- padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MEDIA_STATUS, (u8 *)(&type)); + return adapter_to_dvobj(adapter)->oper_channel; +} + @@ -40673,7 +39920,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release SetBWMode(padapter, bwmode, channel_offset); } -@@ -414,8 +629,14 @@ u16 get_beacon_interval(WLAN_BSSID_EX *b +@@ -414,8 +629,14 @@ u16 get_beacon_interval(WLAN_BSSID_EX *bss) int is_client_associated_to_ap(_adapter *padapter) { @@ -40702,7 +39949,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_CAM_INVALID_ALL, 0); + rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, 0); -+} + } +#if 0 +static u32 _ReadCAM(_adapter *padapter ,u32 addr) +{ @@ -40730,7 +39977,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + printk("offset:0x%02x => 0x%08x \n",addr+j,cmd); + } + printk("*********************************\n"); - } ++} +#endif void write_cam(_adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key) @@ -40741,7 +39988,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int j; u32 cam_val[2]; -@@ -519,14 +770,14 @@ void write_cam(_adapter *padapter, u8 en +@@ -519,14 +770,14 @@ void write_cam(_adapter *padapter, u8 entry, u16 ctrl, u8 *mac, u8 *key) cam_val[0] = val; cam_val[1] = addr + (unsigned int)j; @@ -40758,7 +40005,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -544,14 +795,14 @@ void clear_cam_entry(_adapter *padapter, +@@ -544,14 +795,14 @@ void clear_cam_entry(_adapter *padapter, u8 entry) cam_val[0] = val; cam_val[1] = addr + (unsigned int)0; @@ -40775,7 +40022,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #else unsigned char null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -@@ -586,21 +837,54 @@ void flush_all_cam_entry(_adapter *padap +@@ -586,21 +837,54 @@ void flush_all_cam_entry(_adapter *padapter) { struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -40839,7 +40086,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int WFD_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) { struct registry_priv *pregpriv = &padapter->registrypriv; -@@ -622,8 +906,8 @@ int WFD_info_handler(_adapter *padapter, +@@ -622,8 +906,8 @@ int WFD_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, attr_content, &attr_contentlen); if ( attr_contentlen ) { @@ -40850,7 +40097,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return( _TRUE ); } } -@@ -638,7 +922,7 @@ int WFD_info_handler(_adapter *padapter, +@@ -638,7 +922,7 @@ int WFD_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) { @@ -40903,7 +40150,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release else padapter->mlmepriv.acm_mask = acm_mask; -@@ -751,18 +1034,35 @@ static void bwmode_update_check(_adapter +@@ -751,18 +1034,35 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI unsigned char new_bwmode; unsigned char new_ch_offset; struct HT_info_element *pHT_info; @@ -40941,7 +40188,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch (pHT_info->infos[0] & 0x3) { case 1: -@@ -791,6 +1091,9 @@ static void bwmode_update_check(_adapter +@@ -791,6 +1091,9 @@ static void bwmode_update_check(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pI pmlmeext->cur_bwmode = new_bwmode; pmlmeext->cur_ch_offset = new_ch_offset; @@ -40951,7 +40198,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -842,7 +1145,8 @@ void HT_caps_handler(_adapter *padapter, +@@ -842,7 +1145,8 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv; @@ -40961,7 +40208,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pIE==NULL) return; if(phtpriv->ht_option == _FALSE) return; -@@ -855,57 +1159,68 @@ void HT_caps_handler(_adapter *padapter, +@@ -855,57 +1159,68 @@ void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE) { // Commented by Albert 2010/07/12 // Got the endian issue here. @@ -41091,7 +40338,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } // -@@ -1081,6 +1395,24 @@ void VCS_update(_adapter *padapter, stru +@@ -1081,6 +1395,24 @@ void VCS_update(_adapter *padapter, struct sta_info *psta) } } @@ -41116,7 +40363,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta_info *psta) { unsigned int i; -@@ -1090,8 +1422,8 @@ void update_beacon_info(_adapter *padapt +@@ -1090,8 +1422,8 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta #ifdef CONFIG_TDLS struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; u8 tdls_prohibited[] = { 0x00, 0x00, 0x00, 0x00, 0x10 }; //bit(38): TDLS_prohibited @@ -41127,7 +40374,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release len = pkt_len - (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN); for (i = 0; i < len;) -@@ -1122,10 +1454,10 @@ void update_beacon_info(_adapter *padapt +@@ -1122,10 +1454,10 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta #ifdef CONFIG_TDLS case _EXT_CAP_IE_: @@ -41140,7 +40387,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release default: break; } -@@ -1181,7 +1513,7 @@ unsigned int is_ap_in_tkip(_adapter *pad +@@ -1181,7 +1513,7 @@ unsigned int is_ap_in_tkip(_adapter *padapter) switch (pIE->ElementID) { case _VENDOR_SPECIFIC_IE_: @@ -41149,7 +40396,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { return _TRUE; } -@@ -1209,6 +1541,7 @@ unsigned int is_ap_in_tkip(_adapter *pad +@@ -1209,6 +1541,7 @@ unsigned int is_ap_in_tkip(_adapter *padapter) } @@ -41157,7 +40404,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int wifirate2_ratetbl_inx(unsigned char rate) { int inx = 0; -@@ -1303,7 +1636,7 @@ unsigned int update_MSC_rate(struct HT_c +@@ -1303,7 +1636,7 @@ unsigned int update_MSC_rate(struct HT_caps_element *pHT_caps) { unsigned int mask = 0; @@ -41166,7 +40413,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return mask; } -@@ -1322,7 +1655,7 @@ int support_short_GI(_adapter *padapter, +@@ -1322,7 +1655,7 @@ int support_short_GI(_adapter *padapter, struct HT_caps_element *pHT_caps) bit_offset = (pmlmeext->cur_bwmode & HT_CHANNEL_WIDTH_40)? 6: 5; @@ -41175,7 +40422,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { return _SUCCESS; } -@@ -1349,11 +1682,12 @@ unsigned char get_highest_rate_idx(u32 m +@@ -1349,11 +1682,12 @@ unsigned char get_highest_rate_idx(u32 mask) return rate_idx; } @@ -41189,7 +40436,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for (i = 15; i >= 0; i--) { -@@ -1368,9 +1702,10 @@ unsigned char get_highest_mcs_rate(struc +@@ -1368,9 +1702,10 @@ unsigned char get_highest_mcs_rate(struct HT_caps_element *pHT_caps) void Update_RA_Entry(_adapter *padapter, u32 mac_id) { @@ -41201,7 +40448,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void enable_rate_adaptive(_adapter *padapter, u32 mac_id) { Update_RA_Entry(padapter, mac_id); -@@ -1382,6 +1717,47 @@ void set_sta_rate(_adapter *padapter, st +@@ -1382,6 +1717,47 @@ void set_sta_rate(_adapter *padapter, struct sta_info *psta) enable_rate_adaptive(padapter, psta->mac_id); } @@ -41249,7 +40496,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned char check_assoc_AP(u8 *pframe, uint len) { unsigned int i; -@@ -1496,7 +1872,7 @@ void update_capinfo(PADAPTER Adapter, u1 +@@ -1496,7 +1872,7 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap) { ShortPreamble = _TRUE; pmlmeinfo->preamble_mode = PREAMBLE_SHORT; @@ -41258,7 +40505,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } else -@@ -1505,7 +1881,7 @@ void update_capinfo(PADAPTER Adapter, u1 +@@ -1505,7 +1881,7 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap) { ShortPreamble = _FALSE; pmlmeinfo->preamble_mode = PREAMBLE_LONG; @@ -41267,7 +40514,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } } -@@ -1545,18 +1921,22 @@ void update_capinfo(PADAPTER Adapter, u1 +@@ -1545,18 +1921,22 @@ void update_capinfo(PADAPTER Adapter, u16 updateCap) } } @@ -41293,7 +40540,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ratelen = rtw_get_rateset_len(cur_network->SupportedRates); -@@ -1596,16 +1976,39 @@ void update_wireless_mode(_adapter *pada +@@ -1596,16 +1976,39 @@ void update_wireless_mode(_adapter *padapter) } pmlmeext->cur_wireless_mode = network_type & padapter->registrypriv.wireless_mode; @@ -41337,7 +40584,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void fire_write_MAC_cmd(_adapter *padapter, unsigned int addr, unsigned int value) { #if 0 -@@ -1633,13 +2036,6 @@ void fire_write_MAC_cmd(_adapter *padapt +@@ -1633,13 +2036,6 @@ void fire_write_MAC_cmd(_adapter *padapter, unsigned int addr, unsigned int valu #endif } @@ -41351,7 +40598,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void update_bmc_sta_support_rate(_adapter *padapter, u32 mac_id) { struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); -@@ -1648,11 +2044,11 @@ void update_bmc_sta_support_rate(_adapte +@@ -1648,11 +2044,11 @@ void update_bmc_sta_support_rate(_adapter *padapter, u32 mac_id) if(pmlmeext->cur_wireless_mode & WIRELESS_11B) { // Only B, B/G, and B/G/N AP could use CCK rate @@ -41365,7 +40612,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } -@@ -1736,12 +2132,12 @@ void update_TSF(struct mlme_ext_priv *pm +@@ -1736,12 +2132,12 @@ void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len) void correct_TSF(_adapter *padapter, struct mlme_ext_priv *pmlmeext) { @@ -41380,7 +40627,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #if 0 -@@ -1818,7 +2214,7 @@ unsigned int setup_beacon_frame(_adapter +@@ -1818,7 +2214,7 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame) if ((len + TXDESC_SIZE) > 256) { @@ -41389,7 +40636,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -1846,3 +2242,64 @@ unsigned int setup_beacon_frame(_adapter +@@ -1846,3 +2242,64 @@ unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame) } #endif @@ -41454,6 +40701,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return status; +} + +diff --git a/drivers/net/wireless/rtl8192cu/core/rtw_xmit.c b/drivers/net/wireless/rtl8192cu/core/rtw_xmit.c +index 178a5b7..18f1fdb 100644 --- a/drivers/net/wireless/rtl8192cu/core/rtw_xmit.c +++ b/drivers/net/wireless/rtl8192cu/core/rtw_xmit.c @@ -15,8 +15,8 @@ @@ -41604,7 +40853,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_mfree_xmit_priv_lock (struct xmit_priv *pxmitpriv) { _rtw_spinlock_free(&pxmitpriv->lock); -@@ -327,7 +370,7 @@ void _rtw_free_xmit_priv (struct xmit_pr +@@ -327,7 +370,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) _func_enter_; @@ -41613,7 +40862,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_mfree_xmit_priv_lock(pxmitpriv); -@@ -336,7 +379,7 @@ void _rtw_free_xmit_priv (struct xmit_pr +@@ -336,7 +379,7 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) for(i=0; ipallocated_xmitbuf, NR_XMITBUFF * sizeof(struct xmit_buf) + 4); } @@ -41640,7 +40889,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // free xmit extension buff _rtw_spinlock_free(&pxmitpriv->free_xmit_extbuf_queue.lock); -@@ -380,6 +434,10 @@ void _rtw_free_xmit_priv (struct xmit_pr +@@ -380,6 +434,10 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) rtw_free_hwxmits(padapter); @@ -41651,7 +40900,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release out: _func_exit_; -@@ -394,6 +452,27 @@ static void update_attrib_vcs_info(_adap +@@ -394,6 +452,27 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -41679,7 +40928,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (pattrib->nr_frags != 1) { -@@ -496,8 +575,6 @@ static void update_attrib_vcs_info(_adap +@@ -496,8 +575,6 @@ static void update_attrib_vcs_info(_adapter *padapter, struct xmit_frame *pxmitf break; } } @@ -41688,7 +40937,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void update_attrib_phy_info(struct pkt_attrib *pattrib, struct sta_info *psta) -@@ -527,20 +604,22 @@ static void update_attrib_phy_info(struc +@@ -527,20 +604,22 @@ static void update_attrib_phy_info(struct pkt_attrib *pattrib, struct sta_info * // if(psta->htpriv.agg_enable_bitmap & BIT(pattrib->priority)) // pattrib->ampdu_en = _TRUE; //} @@ -41716,7 +40965,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case 1: case 2: -@@ -548,17 +627,19 @@ static void qos_acm(u8 acm_mask, struct +@@ -548,17 +627,19 @@ static void qos_acm(u8 acm_mask, struct pkt_attrib *pattrib) case 4: case 5: if(acm_mask & BIT(2)) @@ -41739,7 +40988,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib) -@@ -628,7 +709,7 @@ static s32 update_attrib(_adapter *padap +@@ -628,7 +709,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr _rtw_memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN); } @@ -41748,7 +40997,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (ETH_P_IP == pattrib->ether_type) { -@@ -659,12 +740,10 @@ static s32 update_attrib(_adapter *padap +@@ -659,12 +740,10 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr } } @@ -41762,7 +41011,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_LPS // If EAPOL , ARP , OR DHCP packet, driver must be in active mode. -@@ -730,9 +809,10 @@ static s32 update_attrib(_adapter *padap +@@ -730,9 +809,10 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr if(pqospriv->qos_option) { set_qos(&pktfile, pattrib); @@ -41774,7 +41023,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } } -@@ -831,6 +911,13 @@ static s32 update_attrib(_adapter *padap +@@ -831,6 +911,13 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=_FALSE\n")); } @@ -41788,7 +41037,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_set_tx_chksum_offload(pkt, pattrib); update_attrib_phy_info(pattrib, psta); -@@ -860,10 +947,21 @@ static s32 xmitframe_addmic(_adapter *pa +@@ -860,10 +947,21 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe){ } else { @@ -41819,7 +41068,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_rtl871x_xmit_c_,_drv_alert_,("### xmitframe_swencrypt\n")); switch(pattrib->encrypt){ case _WEP40_: -@@ -1015,17 +1113,13 @@ s32 rtw_make_wlanhdr (_adapter *padapter +@@ -1015,17 +1113,13 @@ s32 rtw_make_wlanhdr (_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib) struct rtw_ieee80211_hdr *pwlanhdr = (struct rtw_ieee80211_hdr *)hdr; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv; @@ -41986,7 +41235,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } -@@ -1235,7 +1346,27 @@ s32 rtw_txframes_sta_ac_pending(_adapter +@@ -1235,7 +1346,27 @@ s32 rtw_txframes_sta_ac_pending(_adapter *padapter, struct pkt_attrib *pattrib) struct tx_servq *ptxservq; int priority = pattrib->priority; @@ -42014,7 +41263,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch(priority) { -@@ -1263,871 +1394,121 @@ s32 rtw_txframes_sta_ac_pending(_adapter +@@ -1263,871 +1394,121 @@ s32 rtw_txframes_sta_ac_pending(_adapter *padapter, struct pkt_attrib *pattrib) } #ifdef CONFIG_TDLS @@ -42158,10 +41407,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - //extended capabilities - pframe = rtw_set_ie(pframe, _EXT_CAP_IE_ , 5, TDLS_EXT_CAPIE, &(pattrib->pktlen)); - +- - //QoS capability(WMM_IE) - pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 7, TDLS_WMMIE, &(pattrib->pktlen)); -- + - //FTIE(optional) - if(pattrib->encrypt){ - _rtw_memset(pframe, 0, 84); //All fields except SNonce shall be set to 0 @@ -42265,7 +41514,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - pframe = rtw_set_ie(pframe, _HT_CAPABILITY_IE_, - sizeof(struct rtw_ieee80211_ht_cap), (unsigned char*)&ht_capie, &(pattrib->pktlen)); -- + - //20/40 BSS coexistence - if(pmlmepriv->num_FortyMHzIntolerant>0) - iedata |= BIT(2);//20 MHz BSS Width Request @@ -42278,7 +41527,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pframe = rtw_set_ie(pframe, _LINK_ID_IE_, 18, link_id_addr, &(pattrib->pktlen)); - -} -- ++ if (pattrib->encrypt) ++ SetPrivacy(fctrl); + -void rtw_tdls_setup_rsp_fr(_adapter * padapter, struct xmit_frame * pxmitframe, u8 *pframe) -{ - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); @@ -42306,11 +41557,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - u8 k; //for random ANonce - u8 *pftie, *ptimeout_ie, *plinkid_ie, *prsnie, *pftie_mic; - u32 time; - +- - ptdls_sta = rtw_get_stainfo( &(padapter->stapriv) , pattrib->dst); -+ if (pattrib->encrypt) -+ SetPrivacy(fctrl); - +- - if(ptdls_sta == NULL ) + if (pqospriv->qos_option) { @@ -43024,7 +42273,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* -@@ -2311,17 +1709,33 @@ s32 rtw_xmitframe_coalesce(_adapter *pad +@@ -2311,17 +1709,33 @@ s32 rtw_xmitframe_coalesce(_adapter *padapter, _pkt *pkt, struct xmit_frame *pxm _func_enter_; @@ -43051,12 +42300,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if(!(psta->state &_FW_LINKED)) + { + DBG_871X("%s, psta->state(0x%x) != _FW_LINKED\n", __func__, psta->state); -+ return _FAIL; + return _FAIL; + } + + if (pxmitframe->buf_addr == NULL){ + DBG_8192C("==> %s buf_addr==NULL \n",__FUNCTION__); - return _FAIL; ++ return _FAIL; + } pbuf_start = pxmitframe->buf_addr; @@ -43371,7 +42620,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _exit_critical(&pfree_queue->lock, &irqL); -@@ -2690,7 +2328,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struc +@@ -2690,7 +2328,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv) _func_enter_; @@ -43406,7 +42655,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #ifdef DBG_XMIT_BUF else -@@ -2747,13 +2389,18 @@ s32 rtw_free_xmitbuf(struct xmit_priv *p +@@ -2747,13 +2389,18 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf) _func_enter_; @@ -43476,7 +42725,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* Calling context: 1. OS_TXENTRY -@@ -2790,7 +2471,6 @@ Otherwise, we must use _enter/_exit crit +@@ -2790,7 +2471,6 @@ Otherwise, we must use _enter/_exit critical to protect free_xmit_queue... Must be very very cautious... */ @@ -43484,7 +42733,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)//(_queue *pfree_xmit_queue) { /* -@@ -2803,7 +2483,9 @@ struct xmit_frame *rtw_alloc_xmitframe(s +@@ -2803,7 +2483,9 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)//(_queue *pf struct xmit_frame *pxframe = NULL; _list *plist, *phead; _queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue; @@ -43521,9 +42770,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pxframe->buf_addr = NULL; - pxframe->pxmitbuf = NULL; + rtw_init_xmitframe(pxframe); - -- _rtw_memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib)); -- //pxframe->attrib.psta = NULL; ++ +_func_exit_; + + return pxframe; @@ -43557,24 +42804,25 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + rtw_init_xmitframe(pxframe); -- pxframe->frame_tag = DATA_FRAMETAG; +- _rtw_memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib)); +- //pxframe->attrib.psta = NULL; +_func_exit_; --#ifdef CONFIG_USB_HCI -- pxframe->pkt = NULL; -- pxframe->pkt_offset = 1;//default use pkt_offset to fill tx desc +- pxframe->frame_tag = DATA_FRAMETAG; + return pxframe; +} --#ifdef CONFIG_USB_TX_AGGREGATION -- pxframe->agg_num = 1; --#endif +-#ifdef CONFIG_USB_HCI +- pxframe->pkt = NULL; +- pxframe->pkt_offset = 1;//default use pkt_offset to fill tx desc +struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv) +{ + struct xmit_frame *pxframe = NULL; + u8 *alloc_addr; --#endif //#ifdef CONFIG_USB_HCI +-#ifdef CONFIG_USB_TX_AGGREGATION +- pxframe->agg_num = 1; +-#endif + alloc_addr = rtw_zmalloc(sizeof(struct xmit_frame) + 4); + + if (alloc_addr == NULL) @@ -43583,6 +42831,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + pxframe = (struct xmit_frame *)N_BYTE_ALIGMENT((SIZE_PTR)(alloc_addr), 4); + pxframe->alloc_addr = alloc_addr; +-#endif //#ifdef CONFIG_USB_HCI ++ pxframe->padapter = pxmitpriv->adapter; ++ pxframe->frame_tag = NULL_FRAMETAG; + -#ifdef PLATFORM_LINUX - if(pxmitpriv->free_xmitframe_cnt==1) - { @@ -43590,21 +42842,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - netif_stop_queue(padapter->pnetdev); - } -#endif -+ pxframe->padapter = pxmitpriv->adapter; -+ pxframe->frame_tag = NULL_FRAMETAG; - -- } + pxframe->pkt = NULL; -- _exit_critical_bh(&pfree_xmit_queue->lock, &irqL); +- } + pxframe->buf_addr = NULL; + pxframe->pxmitbuf = NULL; --_func_exit_; +- _exit_critical_bh(&pfree_xmit_queue->lock, &irqL); + rtw_init_xmitframe(pxframe); +-_func_exit_; + DBG_871X("################## %s ##################\n", __func__); -+ + +exit: return pxframe; } @@ -43659,9 +42908,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xframe_ext_cnt=%d\n", pxmitpriv->free_xframe_ext_cnt)); + } else { + } -+ -+ _exit_critical_bh(&queue->lock, &irqL); ++ _exit_critical_bh(&queue->lock, &irqL); ++ +check_pkt_complete: if(pndis_pkt) @@ -43693,7 +42942,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue) { _irqL irqL; -@@ -2995,11 +2717,7 @@ static struct xmit_frame *dequeue_one_xm +@@ -2995,11 +2717,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str ptxservq->qcnt--; @@ -43748,7 +42997,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_BR_EXT int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb) { -@@ -3411,7 +3135,7 @@ int rtw_br_client_tx(_adapter *padapter, +@@ -3411,7 +3135,7 @@ int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb) *((unsigned short *)(skb->data+MACADDRLEN*2+2-i*2)) = *((unsigned short *)(skb->data+MACADDRLEN*2-2-i*2)); skb_pull(skb, 4); } @@ -43757,7 +43006,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (!memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) && (*((unsigned short *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP))) memcpy(padapter->br_ip, skb->data+WLAN_ETHHDR_LEN+12, 4); -@@ -3455,14 +3179,14 @@ int rtw_br_client_tx(_adapter *padapter, +@@ -3455,14 +3179,14 @@ int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb) *((unsigned short *)(skb->data+MACADDRLEN*2+2)) = vlan_hdr; } @@ -43775,7 +43024,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release *pskb = skb = newskb; if (is_vlan_tag) { -@@ -3498,7 +3222,7 @@ int rtw_br_client_tx(_adapter *padapter, +@@ -3498,7 +3222,7 @@ int rtw_br_client_tx(_adapter *padapter, struct sk_buff **pskb) } // we just print warning message and let it go @@ -43784,7 +43033,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //return -1; // return -1 will cause system crash on 2011/08/30! return 0; } -@@ -3556,8 +3280,8 @@ static void do_queue_select(_adapter *pa +@@ -3556,8 +3280,8 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib) RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("### do_queue_select priority=%d ,qsel = %d\n",pattrib->priority ,qsel)); #ifdef CONFIG_CONCURRENT_MODE @@ -43795,7 +43044,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif pattrib->qsel = qsel; -@@ -3573,6 +3297,8 @@ static void do_queue_select(_adapter *pa +@@ -3573,6 +3297,8 @@ static void do_queue_select(_adapter *padapter, struct pkt_attrib *pattrib) */ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) { @@ -43804,7 +43053,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_AP_MODE _irqL irqL0; #endif -@@ -3585,13 +3311,21 @@ s32 rtw_xmit(_adapter *padapter, _pkt ** +@@ -3585,13 +3311,21 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) s32 res; @@ -43829,7 +43078,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -1; } -@@ -3605,11 +3339,14 @@ s32 rtw_xmit(_adapter *padapter, _pkt ** +@@ -3605,11 +3339,14 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) rcu_read_unlock(); #endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) @@ -43845,7 +43094,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif // CONFIG_BR_EXT -@@ -3629,7 +3366,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt ** +@@ -3629,7 +3366,7 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) do_queue_select(padapter, &pxmitframe->attrib); @@ -43854,7 +43103,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _enter_critical_bh(&pxmitpriv->lock, &irqL0); if(xmitframe_enqueue_for_sleeping_sta(padapter, pxmitframe) == _TRUE) { -@@ -3637,57 +3374,15 @@ s32 rtw_xmit(_adapter *padapter, _pkt ** +@@ -3637,57 +3374,15 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt) return 1; } _exit_critical_bh(&pxmitpriv->lock, &irqL0); @@ -43914,7 +43163,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe) { sint ret=_FALSE; -@@ -3697,7 +3392,6 @@ sint xmitframe_enqueue_for_tdls_sleeping +@@ -3697,7 +3392,6 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra struct sta_priv *pstapriv = &padapter->stapriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); @@ -43922,7 +43171,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int i; ptdls_sta=rtw_get_stainfo(pstapriv, pattrib->dst); -@@ -3709,7 +3403,7 @@ sint xmitframe_enqueue_for_tdls_sleeping +@@ -3709,7 +3403,7 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra { ret = _TRUE; return ret; @@ -43931,7 +43180,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _enter_critical_bh(&ptdls_sta->sleep_q.lock, &irqL); -@@ -3749,7 +3443,6 @@ sint xmitframe_enqueue_for_tdls_sleeping +@@ -3749,7 +3443,6 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra if(ptdls_sta->sleepq_len==1) { //transmit TDLS PTI via AP @@ -43939,7 +43188,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_SD_PTI); } ret = _TRUE; -@@ -3762,9 +3455,9 @@ sint xmitframe_enqueue_for_tdls_sleeping +@@ -3762,9 +3455,9 @@ sint xmitframe_enqueue_for_tdls_sleeping_sta(_adapter *padapter, struct xmit_fra return ret; } @@ -43951,7 +43200,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe) { -@@ -3778,7 +3471,7 @@ sint xmitframe_enqueue_for_sleeping_sta( +@@ -3778,7 +3471,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p #ifdef CONFIG_TDLS struct tdls_info *ptdlsinfo = &padapter->tdlsinfo; @@ -43960,7 +43209,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { ret = xmitframe_enqueue_for_tdls_sleeping_sta(padapter, pxmitframe); return ret; -@@ -3794,11 +3487,21 @@ sint xmitframe_enqueue_for_sleeping_sta( +@@ -3794,11 +3487,21 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p } else { @@ -43983,7 +43232,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pattrib->triggered==1) { -@@ -3925,6 +3628,7 @@ sint xmitframe_enqueue_for_sleeping_sta( +@@ -3925,6 +3628,7 @@ sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *p static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_info *psta, _queue *pframequeue) { @@ -43991,7 +43240,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _list *plist, *phead; u8 ac_index; struct tx_servq *ptxservq; -@@ -3941,8 +3645,10 @@ static void dequeue_xmitframes_to_sleepi +@@ -3941,8 +3645,10 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_ plist = get_next(plist); @@ -44003,7 +43252,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pattrib = &pxmitframe->attrib; ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index)); -@@ -3950,6 +3656,12 @@ static void dequeue_xmitframes_to_sleepi +@@ -3950,6 +3656,12 @@ static void dequeue_xmitframes_to_sleeping_queue(_adapter *padapter, struct sta_ ptxservq->qcnt--; phwxmits[ac_index].accnt--; } @@ -44016,7 +43265,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -3973,7 +3685,7 @@ void stop_sta_xmit(_adapter *padapter, s +@@ -3973,7 +3685,7 @@ void stop_sta_xmit(_adapter *padapter, struct sta_info *psta) #ifdef CONFIG_TDLS if( !(psta->tdls_sta_state & TDLS_LINKED_STATE) ) @@ -44025,7 +43274,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pstapriv->sta_dz_bitmap |= BIT(psta->aid); -@@ -4014,7 +3726,7 @@ void stop_sta_xmit(_adapter *padapter, s +@@ -4014,7 +3726,7 @@ void stop_sta_xmit(_adapter *padapter, struct sta_info *psta) _exit_critical_bh(&pxmitpriv->lock, &irqL0); @@ -44034,7 +43283,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta) { -@@ -4024,8 +3736,13 @@ void wakeup_sta_to_xmit(_adapter *padapt +@@ -4024,8 +3736,13 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta) _list *xmitframe_plist, *xmitframe_phead; struct xmit_frame *pxmitframe=NULL; struct sta_priv *pstapriv = &padapter->stapriv; @@ -44049,7 +43298,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_plist = get_next(xmitframe_phead); -@@ -4082,53 +3799,25 @@ void wakeup_sta_to_xmit(_adapter *padapt +@@ -4082,53 +3799,25 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta) pxmitframe->attrib.triggered = 1; @@ -44108,7 +43357,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release xmitframe_phead = get_list_head(&psta_bmc->sleep_q); xmitframe_plist = get_next(xmitframe_phead); -@@ -4148,36 +3837,71 @@ void wakeup_sta_to_xmit(_adapter *padapt +@@ -4148,36 +3837,71 @@ void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta) pxmitframe->attrib.triggered = 1; @@ -44151,7 +43400,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + + } - ++ + if(psta->sleepq_len==0) + { +#ifdef CONFIG_TDLS @@ -44159,12 +43408,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + if(psta->state&WIFI_SLEEP_STATE) + psta->state ^= WIFI_SLEEP_STATE; -+ + + goto _exit; } +#endif //CONFIG_TDLS + pstapriv->tim_bitmap &= ~BIT(psta->aid); -+ + + //DBG_871X("wakeup to xmit, qlen==0, update_BCNTIM, tim=%x\n", pstapriv->tim_bitmap); + //upate BCN for TIM IE + //update_BCNTIM(padapter); @@ -44183,7 +43432,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + +_exit: - ++ + //_exit_critical_bh(&psta_bmc->sleep_q.lock, &irqL); + _exit_critical_bh(&pxmitpriv->lock, &irqL); @@ -44194,7 +43443,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release update_beacon(padapter, _TIM_IE_, NULL, _FALSE); } -@@ -4190,8 +3914,11 @@ void xmit_delivery_enabled_frames(_adapt +@@ -4190,8 +3914,11 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta) _list *xmitframe_plist, *xmitframe_phead; struct xmit_frame *pxmitframe=NULL; struct sta_priv *pstapriv = &padapter->stapriv; @@ -44207,7 +43456,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release xmitframe_phead = get_list_head(&psta->sleep_q); xmitframe_plist = get_next(xmitframe_phead); -@@ -4244,17 +3971,21 @@ void xmit_delivery_enabled_frames(_adapt +@@ -4244,17 +3971,21 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta) pxmitframe->attrib.triggered = 1; @@ -44231,7 +43480,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return; } #endif //CONFIG_TDLS -@@ -4267,11 +3998,159 @@ void xmit_delivery_enabled_frames(_adapt +@@ -4267,11 +3998,159 @@ void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta) //update_mask = BIT(0); } @@ -44241,11 +43490,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _exit_critical_bh(&psta->sleep_q.lock, &irqL); + //_exit_critical_bh(&psta->sleep_q.lock, &irqL); + _exit_critical_bh(&pxmitpriv->lock, &irqL); - - } - - #endif - ++ ++} ++ ++#endif ++ +void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms) +{ + sctx->timeout_ms = timeout_ms; @@ -44353,7 +43602,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + rtw_msleep_os(10); + } while (rtw_get_passing_time_ms(pack_tx_ops->submit_time) < timeout_ms); -+ + + if (pack_tx_ops->status == RTW_SCTX_SUBMITTED) { + pack_tx_ops->status = RTW_SCTX_DONE_TIMEOUT; + DBG_871X("%s timeout\n", __func__); @@ -44363,7 +43612,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + ret = _SUCCESS; + + return ret; -+} + } +#endif + +int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms) @@ -44372,13 +43621,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return rtw_ack_tx_polling(pxmitpriv, timeout_ms); +#else + struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops; -+ + + pack_tx_ops->submit_time = rtw_get_current_time(); + pack_tx_ops->timeout_ms = timeout_ms; + pack_tx_ops->status = RTW_SCTX_SUBMITTED; + + return rtw_sctx_wait(pack_tx_ops); -+#endif + #endif +} + +void rtw_ack_tx_done(struct xmit_priv *pxmitpriv, int status) @@ -44392,7 +43641,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +} +#endif //CONFIG_XMIT_ACK -+ + +diff --git a/drivers/net/wireless/rtl8192cu/hal/HalPwrSeqCmd.c b/drivers/net/wireless/rtl8192cu/hal/HalPwrSeqCmd.c +new file mode 100644 +index 0000000..c59bb66 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/HalPwrSeqCmd.c @@ -0,0 +1,177 @@ @@ -44573,6 +43825,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +} + + +diff --git a/drivers/net/wireless/rtl8192cu/hal/dm.c b/drivers/net/wireless/rtl8192cu/hal/dm.c +new file mode 100644 +index 0000000..465ca82 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/dm.c @@ -0,0 +1,314 @@ @@ -44890,6 +44145,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif /* CONFIG_DM_ADAPTIVITY */ +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/dm.h b/drivers/net/wireless/rtl8192cu/hal/dm.h +new file mode 100644 +index 0000000..dd9a57d --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/dm.h @@ -0,0 +1,30 @@ @@ -44923,6 +44181,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +void dm_adaptivity(_adapter *pAdapter); + +#endif /* __DM_H__ */ +diff --git a/drivers/net/wireless/rtl8192cu/hal/hal_com.c b/drivers/net/wireless/rtl8192cu/hal/hal_com.c +new file mode 100644 +index 0000000..4dcafd6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/hal_com.c @@ -0,0 +1,371 @@ @@ -45297,6 +44558,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return ret; +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/hal_init.c b/drivers/net/wireless/rtl8192cu/hal/hal_init.c +deleted file mode 100644 +index edef678..0000000 --- a/drivers/net/wireless/rtl8192cu/hal/hal_init.c +++ /dev/null @@ -1,120 +0,0 @@ @@ -45420,6 +44684,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - padapter->HalFunc.sreset_init_value(padapter); -} -#endif +diff --git a/drivers/net/wireless/rtl8192cu/hal/hal_intf.c b/drivers/net/wireless/rtl8192cu/hal/hal_intf.c +new file mode 100644 +index 0000000..6c56e72 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/hal_intf.c @@ -0,0 +1,546 @@ @@ -45969,6 +45236,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return adapter->HalFunc.c2h_id_filter_ccx; +} + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_cmd.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_cmd.c +index 971ef6c..33921e2 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_cmd.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_cmd.c @@ -16,8 +16,7 @@ @@ -46050,7 +45319,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { u8 read_down = _FALSE; int retry_cnts = 100; -@@ -103,17 +47,10 @@ static u8 _is_fw_read_cmd_down(_adapter* +@@ -103,17 +47,10 @@ static u8 _is_fw_read_cmd_down(_adapter* padapter, u8 isvern, u8 msgbox_num) // DBG_8192C(" _is_fw_read_cmd_down ,isnormal_chip(%x),reg_1cc(%x),msg_box(%d)...\n",isvern,rtw_read8(padapter,REG_HMETFR),msgbox_num); do{ @@ -46072,7 +45341,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }while( (!read_down) && (retry_cnts--)); return read_down; -@@ -129,19 +66,28 @@ static u8 _is_fw_read_cmd_down(_adapter* +@@ -129,19 +66,28 @@ static u8 _is_fw_read_cmd_down(_adapter* padapter, u8 isvern, u8 msgbox_num) ******************************************/ int rtl8192c_FillH2CCmd(_adapter* padapter, u8 ElementID, u32 CmdLen, u8* pCmdBuffer) { @@ -46104,7 +45373,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(!pCmdBuffer){ goto exit; -@@ -153,7 +99,7 @@ int rtl8192c_FillH2CCmd(_adapter* padapt +@@ -153,7 +99,7 @@ int rtl8192c_FillH2CCmd(_adapter* padapter, u8 ElementID, u32 CmdLen, u8* pCmdBu do{ h2c_box_num = pHalData->LastHMEBoxNum; @@ -46113,7 +45382,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_8192C(" fw read cmd failed...\n"); goto exit; } -@@ -179,14 +125,6 @@ int rtl8192c_FillH2CCmd(_adapter* padapt +@@ -179,14 +125,6 @@ int rtl8192c_FillH2CCmd(_adapter* padapter, u8 ElementID, u32 CmdLen, u8* pCmdBu h2c_cmd = cpu_to_le32( h2c_cmd ); rtw_write32(padapter,msgbox_addr, h2c_cmd); @@ -46128,7 +45397,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release bcmd_down = _TRUE; // DBG_8192C("MSG_BOX:%d,CmdLen(%d), reg:0x%x =>h2c_cmd:0x%x, reg:0x%x =>h2c_cmd_ex:0x%x ..\n" -@@ -202,178 +140,13 @@ int rtl8192c_FillH2CCmd(_adapter* padapt +@@ -202,178 +140,13 @@ int rtl8192c_FillH2CCmd(_adapter* padapter, u8 ElementID, u32 CmdLen, u8* pCmdBu DBG_8192C("H2C Cmd exe failed. \n" ); */ ret = _SUCCESS; @@ -46379,7 +45648,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -976,7 +700,7 @@ static void SetFwRsvdPagePkt(PADAPTER Ad +@@ -976,7 +700,7 @@ static void SetFwRsvdPagePkt(PADAPTER Adapter, BOOLEAN bDLFinished) pattrib->pktlen = pattrib->last_txcmdsz = TotalPacketLen - TxDescLen; _rtw_memcpy(pmgntframe->buf_addr, ReservedPagePacket, TotalPacketLen); @@ -46525,7 +45794,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_IOL #include -@@ -1199,9 +920,8 @@ int rtl8192c_IOL_exec_cmds_sync(ADAPTER +@@ -1199,9 +920,8 @@ int rtl8192c_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit_frame, if (rtw_IOL_append_END_cmd(xmit_frame) != _SUCCESS) goto exit; @@ -46639,13 +45908,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //keep alive period = 3 * 10 BCN interval pwowlan_parm.mode =3; pwowlan_parm.gpio_index=3; -@@ -1356,6 +1155,5 @@ _func_exit_; +@@ -1358,4 +1157,3 @@ _func_exit_; - - - +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_dm.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_dm.c +index be1e800..6e5634c 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_dm.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_dm.c @@ -15,8 +15,8 @@ @@ -46776,7 +46045,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release value_IGI = DM_DIG_FA_LOWER; if(FalseAlmCnt->Cnt_all > 10000) -@@ -276,7 +319,10 @@ VOID dm_CtrlInitGainByRssi( IN PADAPTER +@@ -276,7 +319,10 @@ VOID dm_CtrlInitGainByRssi( IN PADAPTER pAdapter) HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; DIG_T *pDigTable = &pdmpriv->DM_DigTable; @@ -46788,7 +46057,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //modify DIG upper bound if((pDigTable->Rssi_val_min + 20) > DM_DIG_MAX ) -@@ -393,6 +439,22 @@ VOID dm_CtrlInitGainByRssi( IN PADAPTER +@@ -393,6 +439,22 @@ VOID dm_CtrlInitGainByRssi( IN PADAPTER pAdapter) if(pDigTable->CurIGValue < pDigTable->rx_gain_range_min) pDigTable->CurIGValue = pDigTable->rx_gain_range_min; @@ -46811,7 +46080,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //printk("%s => rx_gain_range_max(0x%02x) rx_gain_range_min(0x%02x)\n",__FUNCTION__, // pDigTable->rx_gain_range_max,pDigTable->rx_gain_range_min); //printk("%s CurIGValue(0x%02x) <====\n",__FUNCTION__,pDigTable->CurIGValue ); -@@ -408,6 +470,10 @@ static VOID dm_CtrlInitGainByRssi(IN PAD +@@ -408,6 +470,10 @@ static VOID dm_CtrlInitGainByRssi(IN PADAPTER pAdapter) struct dm_priv *pdmpriv = &pHalData->dmpriv; DIG_T *pDigTable = &pdmpriv->DM_DigTable; PFALSE_ALARM_STATISTICS FalseAlmCnt = &(pdmpriv->FalseAlmCnt); @@ -46822,7 +46091,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //modify DIG upper bound if((pDigTable->Rssi_val_min + 20) > DM_DIG_MAX ) -@@ -415,7 +481,6 @@ static VOID dm_CtrlInitGainByRssi(IN PAD +@@ -415,7 +481,6 @@ static VOID dm_CtrlInitGainByRssi(IN PADAPTER pAdapter) else pDigTable->rx_gain_range_max = pDigTable->Rssi_val_min + 20; //printk("%s Rssi_val_min(0x%02x),rx_gain_range_max(0x%02x)\n",__FUNCTION__,pDigTable->Rssi_val_min,pDigTable->rx_gain_range_max); @@ -46830,7 +46099,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //modify DIG lower bound, deal with abnorally large false alarm if(FalseAlmCnt->Cnt_all > 10000) { -@@ -515,6 +580,14 @@ static VOID dm_CtrlInitGainByRssi(IN PAD +@@ -515,6 +580,14 @@ static VOID dm_CtrlInitGainByRssi(IN PADAPTER pAdapter) } #endif @@ -46845,7 +46114,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //Check initial gain by upper/lower bound if(pDigTable->CurIGValue >pDigTable->rx_gain_range_max) pDigTable->CurIGValue = pDigTable->rx_gain_range_max; -@@ -522,6 +595,22 @@ static VOID dm_CtrlInitGainByRssi(IN PAD +@@ -522,6 +595,22 @@ static VOID dm_CtrlInitGainByRssi(IN PADAPTER pAdapter) if(pDigTable->CurIGValue < pDigTable->rx_gain_range_min) pDigTable->CurIGValue = pDigTable->rx_gain_range_min; @@ -47012,7 +46281,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //RTPRINT(FDM, DM_Monitor, ("dm_DIG() ==>\n")); if(pdmpriv->bDMInitialGainEnable == _FALSE) -@@ -854,7 +993,11 @@ static void dm_InitDynamicTxPower(IN PAD +@@ -854,7 +993,11 @@ static void dm_InitDynamicTxPower(IN PADAPTER Adapter) struct dm_priv *pdmpriv = &pHalData->dmpriv; #ifdef CONFIG_USB_HCI @@ -47024,7 +46293,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { dm_SavePowerIndex(Adapter); pdmpriv->bDynamicTxPowerEnable = _TRUE; -@@ -900,7 +1043,47 @@ static void dm_DynamicTxPower(IN PADAPTE +@@ -900,7 +1043,47 @@ static void dm_DynamicTxPower(IN PADAPTER Adapter) pdmpriv->LastDTPLvl=TxHighPwrLevel_Normal; return; } @@ -47072,7 +46341,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) // Default port { //todo: AP Mode -@@ -938,7 +1121,7 @@ static void dm_DynamicTxPower(IN PADAPTE +@@ -938,7 +1121,7 @@ static void dm_DynamicTxPower(IN PADAPTER Adapter) pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; //RT_TRACE(COMP_HIPWR, DBG_LOUD, ("TxHighPwrLevel_Normal\n")); } @@ -47132,7 +46401,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 DPK_delta_mapping[2][DPK_DELTA_MAPPING_NUM] = { {0x1c, 0x1c, 0x1d, 0x1d, 0x1e, 0x1f, 0x00, 0x00, 0x01, 0x01, -@@ -1291,14 +1470,18 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1291,14 +1470,18 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( {0x1c, 0x1d, 0x1e, 0x1e, 0x1e, 0x1f, 0x00, 0x00, 0x01, 0x02, 0x02, 0x03, 0x03}}; @@ -47153,7 +46422,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pdmpriv->TXPowerTrackingCallbackCnt++; //cosa add for debug pdmpriv->bTXPowerTrackingInit = _TRUE; -@@ -1310,12 +1493,11 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1310,12 +1493,11 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( //DBG_8192C("===>dm_TXPowerTrackingCallback_ThermalMeter_92C\n"); @@ -47167,7 +46436,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(is2T) rf = 2; -@@ -1328,7 +1510,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1328,7 +1510,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( { //Query OFDM path A default setting ele_D = PHY_QueryBBReg(Adapter, rOFDM0_XATxIQImbalance, bMaskDWord)&bMaskOFDM_D; @@ -47176,7 +46445,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if(ele_D == (OFDMSwingTable[i]&bMaskOFDM_D)) { -@@ -1342,7 +1524,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1342,7 +1524,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( if(is2T) { ele_D = PHY_QueryBBReg(Adapter, rOFDM0_XBTxIQImbalance, bMaskDWord)&bMaskOFDM_D; @@ -47185,7 +46454,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if(ele_D == (OFDMSwingTable[i]&bMaskOFDM_D)) { -@@ -1434,7 +1616,6 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1434,7 +1616,6 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( } delta_LCK = (ThermalValue > pdmpriv->ThermalValue_LCK)?(ThermalValue - pdmpriv->ThermalValue_LCK):(pdmpriv->ThermalValue_LCK - ThermalValue); delta_IQK = (ThermalValue > pdmpriv->ThermalValue_IQK)?(ThermalValue - pdmpriv->ThermalValue_IQK):(pdmpriv->ThermalValue_IQK - ThermalValue); @@ -47193,7 +46462,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //DBG_8192C("Readback Thermal Meter = 0x%lx pre thermal meter 0x%lx EEPROMthermalmeter 0x%lx delta 0x%lx delta_LCK 0x%lx delta_IQK 0x%lx\n", ThermalValue, pHalData->ThermalValue, pHalData->EEPROMThermalMeter, delta, delta_LCK, delta_IQK); -@@ -1480,29 +1661,26 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1480,29 +1661,26 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( { for(i = 0; i < rf; i++) pdmpriv->OFDM_index[i] -= delta; @@ -47228,7 +46497,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //no adjust #ifdef CONFIG_USB_HCI -@@ -1521,8 +1699,8 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1521,8 +1699,8 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( OFDM_index[i] = pdmpriv->OFDM_index[i]; CCK_index = pdmpriv->CCK_index; } @@ -47239,7 +46508,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for(i = 0; i < rf; i++) { if(TxPwrLevel[i] >=0 && TxPwrLevel[i] <=26) -@@ -1584,34 +1762,33 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1584,34 +1762,33 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( for(i = 0; i < rf; i++) { @@ -47285,7 +46554,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release X = pdmpriv->RegE94; Y = pdmpriv->RegE9C; -@@ -1642,7 +1819,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1642,7 +1819,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( } else { @@ -47294,7 +46563,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release PHY_SetBBReg(Adapter, rOFDM0_XCTxAFE, bMaskH4Bits, 0x00); PHY_SetBBReg(Adapter, rOFDM0_ECCAThreshold, BIT31|BIT29, 0x00); } -@@ -1651,24 +1828,24 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1651,24 +1828,24 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( //Adjust CCK according to IQK result if(!pdmpriv->bCCKinCH14){ @@ -47335,7 +46604,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } if(is2T) -@@ -1704,7 +1881,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1704,7 +1881,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( } else{ @@ -47344,7 +46613,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release PHY_SetBBReg(Adapter, rOFDM0_XDTxAFE, bMaskH4Bits, 0x00); PHY_SetBBReg(Adapter, rOFDM0_ECCAThreshold, BIT27|BIT25, 0x00); } -@@ -1716,7 +1893,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1716,7 +1893,7 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( DBG_8192C("TxPwrTracking 0xc80 = 0x%x, 0xc94 = 0x%x RF 0x24 = 0x%x\n", \ PHY_QueryBBReg(Adapter, 0xc80, bMaskDWord),\ PHY_QueryBBReg(Adapter, 0xc94, bMaskDWord), \ @@ -47353,7 +46622,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release */ } -@@ -1730,20 +1907,6 @@ dm_TXPowerTrackingCallback_ThermalMeter_ +@@ -1730,20 +1907,6 @@ dm_TXPowerTrackingCallback_ThermalMeter_92C( rtl8192c_PHY_IQCalibrate(Adapter,_FALSE); } @@ -47412,7 +46681,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif } -@@ -3275,10 +3438,14 @@ static void dm_CheckPbcGPIO(_adapter *pa +@@ -3275,10 +3438,14 @@ static void dm_CheckPbcGPIO(_adapter *padapter) { u8 tmp1byte; u8 bPbcPressed = _FALSE; @@ -47427,7 +46696,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_USB_HCI tmp1byte = rtw_read8(padapter, GPIO_IO_SEL); tmp1byte |= (HAL_8192C_HW_GPIO_WPS_BIT); -@@ -3294,30 +3461,44 @@ static void dm_CheckPbcGPIO(_adapter *pa +@@ -3294,30 +3461,44 @@ static void dm_CheckPbcGPIO(_adapter *padapter) tmp1byte =rtw_read8(padapter, GPIO_IN); if (tmp1byte == 0xff) @@ -47476,7 +46745,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef RTK_DMP_PLATFORM #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)) -@@ -3336,7 +3517,7 @@ static void dm_CheckPbcGPIO(_adapter *pa +@@ -3336,7 +3517,7 @@ static void dm_CheckPbcGPIO(_adapter *padapter) rtw_signal_process(padapter->pid[0], SIGUSR1); #endif #endif @@ -47496,7 +46765,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pdmpriv->initialize == 0){ pdmpriv->rf_saving_Reg874 = (PHY_QueryBBReg(pAdapter, rFPGA0_XCD_RFInterfaceSW, bMaskDWord)&0x1CC000)>>14; pdmpriv->rf_saving_RegC70 = (PHY_QueryBBReg(pAdapter, rOFDM0_AGCParameter1, bMaskDWord)&BIT3)>>3; -@@ -4424,7 +4603,7 @@ void rtl8192c_init_dm_priv(IN PADAPTER A +@@ -4424,7 +4603,7 @@ void rtl8192c_init_dm_priv(IN PADAPTER Adapter) PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); struct dm_priv *pdmpriv = &pHalData->dmpriv; @@ -47526,6 +46795,41 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { - u8 trigger=0,evt_id=0,evt_len=0,idx=0,tmp8=0,evt_seq=0; - u8 evt_buf[15]; +- +- trigger=rtw_read8(padapter,REG_C2HEVT_CLEAR); +- while (trigger ==0xFF) +- { +- tmp8=rtw_read8(padapter,REG_C2HEVT_MSG_NORMAL); +- evt_id=tmp8&0xf; +- evt_len=(tmp8&0xf0)>>4; +- evt_seq=rtw_read8(padapter,REG_C2HEVT_MSG_NORMAL+1); +- DBG_8192C(" %s evt_id =0x%x evt_len=0x%x evt_seq=0x%x\n",__FUNCTION__,evt_id,evt_len,evt_seq); +- for(idx=0;idxstapriv; +- struct sta_info *psta=NULL; +- DBG_8192C(" %s mac_id=%d\n",__FUNCTION__,mac_id); +- for(idx=0;idxsta_aid[mac_id-2+idx]; +- if(psta !=NULL){ +- psta->init_rate=evt_buf[idx]; +- DBG_8192C(" %s mac_id=%d psta->init_rate=0x%x\n",__FUNCTION__,mac_id,psta->init_rate); +- } +- } +- +- } +- default: +- DBG_8192C(" %s evt_id =0x%x evt_len=0x%x\n",__FUNCTION__,evt_id,evt_len); +- } +- rtw_write8(padapter, REG_C2HEVT_CLEAR,0x0); +- rtw_mdelay_os(1); +- trigger=rtw_read8(padapter,REG_C2HEVT_CLEAR); + PHAL_DATA_TYPE pbuddy_HalData; + struct dm_priv *pbuddy_dmpriv; + PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter); @@ -47538,9 +46842,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + pbuddy_HalData = GET_HAL_DATA(pbuddy_adapter); + pbuddy_dmpriv = &pbuddy_HalData->dmpriv; - -- trigger=rtw_read8(padapter,REG_C2HEVT_CLEAR); -- while (trigger ==0xFF) ++ + //get min. [PWDB] when both interfaces are connected + if((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE + && Adapter->stapriv.asoc_sta_count > 2 @@ -47562,48 +46864,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + && check_buddy_fwstate(Adapter,_FW_LINKED))) + { + pdmpriv->UndecoratedSmoothedPWDB = pbuddy_dmpriv->UndecoratedSmoothedPWDB; -+ } + } +- //DBG_8192C(" %s End\n",__FUNCTION__); +-} + //secondary is not connected + else if((check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE + && Adapter->stapriv.asoc_sta_count > 2) || + (check_fwstate(pmlmepriv, WIFI_STATION_STATE) + && check_fwstate(pmlmepriv, _FW_LINKED))) - { -- tmp8=rtw_read8(padapter,REG_C2HEVT_MSG_NORMAL); -- evt_id=tmp8&0xf; -- evt_len=(tmp8&0xf0)>>4; -- evt_seq=rtw_read8(padapter,REG_C2HEVT_MSG_NORMAL+1); -- DBG_8192C(" %s evt_id =0x%x evt_len=0x%x evt_seq=0x%x\n",__FUNCTION__,evt_id,evt_len,evt_seq); -- for(idx=0;idxstapriv; -- struct sta_info *psta=NULL; -- DBG_8192C(" %s mac_id=%d\n",__FUNCTION__,mac_id); -- for(idx=0;idxsta_aid[mac_id-2+idx]; -- if(psta !=NULL){ -- psta->init_rate=evt_buf[idx]; -- DBG_8192C(" %s mac_id=%d psta->init_rate=0x%x\n",__FUNCTION__,mac_id,psta->init_rate); -- } -- } -- -- } -- default: -- DBG_8192C(" %s evt_id =0x%x evt_len=0x%x\n",__FUNCTION__,evt_id,evt_len); -- } -- rtw_write8(padapter, REG_C2HEVT_CLEAR,0x0); -- rtw_mdelay_os(1); -- trigger=rtw_read8(padapter,REG_C2HEVT_CLEAR); ++ { + pbuddy_dmpriv->UndecoratedSmoothedPWDB = 0; - } -- //DBG_8192C(" %s End\n",__FUNCTION__); --} ++ } + //both interfaces are not connected + else + { @@ -47774,6 +47045,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Check GPIO to determine current RF on/off and Pbc status. // Check Hardware Radio ON/OFF or not //if(Adapter->MgntInfo.PowerSaveControl.bGpioRfSw) +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_hal_init.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_hal_init.c +index e3e2ae9..b9e91d7 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_hal_init.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_hal_init.c @@ -16,7 +16,7 @@ @@ -47862,7 +47135,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pageNums = size / MAX_PAGE_SIZE ; - //RT_ASSERT((pageNums <= 4), ("Page numbers should not greater then 4 \n")); - remainSize = size % MAX_PAGE_SIZE; -- ++ pageNums = size / MAX_PAGE_SIZE ; ++ //RT_ASSERT((pageNums <= 4), ("Page numbers should not greater then 4 \n")); ++ remainSize = size % MAX_PAGE_SIZE; ++ ++ for(page = 0; page < pageNums; page++){ ++ offset = page *MAX_PAGE_SIZE; ++ ret = _PageWrite(Adapter,page, (bufferPtr+offset),MAX_PAGE_SIZE); + - for(page = 0; page < pageNums; page++){ - offset = page *MAX_PAGE_SIZE; - ret = _PageWrite(Adapter,page, (bufferPtr+offset),MAX_PAGE_SIZE); @@ -47879,14 +47159,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - goto exit; - } - //RT_TRACE(COMP_INIT, DBG_LOUD, ("_WriteFW Done- for Normal chip.\n")); -+ pageNums = size / MAX_PAGE_SIZE ; -+ //RT_ASSERT((pageNums <= 4), ("Page numbers should not greater then 4 \n")); -+ remainSize = size % MAX_PAGE_SIZE; -+ -+ for(page = 0; page < pageNums; page++){ -+ offset = page *MAX_PAGE_SIZE; -+ ret = _PageWrite(Adapter,page, (bufferPtr+offset),MAX_PAGE_SIZE); -+ + if(ret == _FAIL) + goto exit; } @@ -47959,7 +47231,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pFwImageFileName = R92CFwImageFileName_UMC; - FwImage = Rtl819XFwUMCACutImageArray; - FwImageLen = UMCACutImgArrayLength; --#ifdef CONFIG_WOWLAN ++ pFwImageFileName = R92CFwImageFileName_UMC; ++ FwImage = Rtl819XFwUMCACutImageArray; ++ FwImageLen = UMCACutImgArrayLength; + #ifdef CONFIG_WOWLAN - pFwImageFileName_WoWLAN = R92CFwImageFileName_UMC_WW; - FwImageWoWLAN= Rtl8192C_FwUMCWWImageArray; - FwImageWoWLANLen =UMCACutWWImgArrayLength ; @@ -47972,22 +47247,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pFwImageFileName = R92CFwImageFileName_UMC_B; - FwImage = Rtl819XFwUMCBCutImageArray; - FwImageLen = UMCBCutImgArrayLength; -+ pFwImageFileName = R92CFwImageFileName_UMC; -+ FwImage = Rtl819XFwUMCACutImageArray; -+ FwImageLen = UMCACutImgArrayLength; - #ifdef CONFIG_WOWLAN -- pFwImageFileName_WoWLAN = R92CFwImageFileName_UMC_B_WW; -- FwImageWoWLAN= Rtl8192C_FwUMCBCutWWImageArray; -- FwImageWoWLANLen =UMCBCutWWImgArrayLength ; --#endif -- -- DBG_8192C(" ===> FirmwareDownload91C() fw:Rtl819XFwImageArray_UMC_B\n"); -- } -- else -- { -- pFwImageFileName = R92CFwImageFileName_TSMC; -- FwImage = Rtl819XFwTSMCImageArray; -- FwImageLen = TSMCImgArrayLength; + pFwImageFileName_WoWLAN = R92CFwImageFileName_UMC_WW; + FwImageWoWLAN= Rtl8192C_FwUMCWWImageArray; + FwImageWoWLANLen =UMCACutWWImgArrayLength ; @@ -48001,6 +47260,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + FwImage = Rtl819XFwUMCBCutImageArray; + FwImageLen = UMCBCutImgArrayLength; #ifdef CONFIG_WOWLAN +- pFwImageFileName_WoWLAN = R92CFwImageFileName_UMC_B_WW; +- FwImageWoWLAN= Rtl8192C_FwUMCBCutWWImageArray; +- FwImageWoWLANLen =UMCBCutWWImgArrayLength ; +-#endif +- +- DBG_8192C(" ===> FirmwareDownload91C() fw:Rtl819XFwImageArray_UMC_B\n"); +- } +- else +- { +- pFwImageFileName = R92CFwImageFileName_TSMC; +- FwImage = Rtl819XFwTSMCImageArray; +- FwImageLen = TSMCImgArrayLength; +-#ifdef CONFIG_WOWLAN - pFwImageFileName_WoWLAN = R92CFwImageFileName_TSMC_WW; - FwImageWoWLAN= Rtl8192C_FwTSMCWWImageArray; - FwImageWoWLANLen =TSMCWWImgArrayLength ; @@ -48161,27 +47433,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ChipVersion; } +- +-RT_CHANNEL_DOMAIN +-_HalMapChannelPlan8192C( +- IN PADAPTER Adapter, +- IN u8 HalChannelPlan +void +rtl8192c_EfuseParseChnlPlan( + IN PADAPTER padapter, + IN u8* hwinfo, + IN BOOLEAN AutoLoadFail -+ ) -+{ -+ padapter->mlmepriv.ChannelPlan = hal_com_get_channel_plan( -+ padapter -+ , hwinfo?hwinfo[EEPROM_CHANNEL_PLAN]:0xFF -+ , padapter->registrypriv.channel_plan -+ , RT_CHANNEL_DOMAIN_WORLD_WIDE_13 -+ , AutoLoadFail -+ ); - --RT_CHANNEL_DOMAIN --_HalMapChannelPlan8192C( -- IN PADAPTER Adapter, -- IN u8 HalChannelPlan -- ) --{ + ) + { - RT_CHANNEL_DOMAIN rtChannelDomain; - - switch(HalChannelPlan) @@ -48204,6 +47467,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - return rtChannelDomain; - ++ padapter->mlmepriv.ChannelPlan = hal_com_get_channel_plan( ++ padapter ++ , hwinfo?hwinfo[EEPROM_CHANNEL_PLAN]:0xFF ++ , padapter->registrypriv.channel_plan ++ , RT_CHANNEL_DOMAIN_WORLD_WIDE_13 ++ , AutoLoadFail ++ ); ++ + DBG_871X("mlmepriv.ChannelPlan = 0x%02x\n", padapter->mlmepriv.ChannelPlan); } @@ -48318,7 +47589,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { *pu2Tmp = (u16)EFUSE_MAP_LEN_8723; } -@@ -2320,7 +2245,7 @@ hal_EfuseGetCurrentSize_8723(IN PADAPTER +@@ -2320,7 +2245,7 @@ hal_EfuseGetCurrentSize_8723(IN PADAPTER pAdapter, } else { @@ -48327,7 +47598,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //RTPRINT(FEEPROM, EFUSE_PG, ("hal_EfuseGetCurrentSize_8723(), start_efuse_addr = %d\n", efuse_addr)); -@@ -2368,7 +2293,7 @@ hal_EfuseGetCurrentSize_8723(IN PADAPTER +@@ -2368,7 +2293,7 @@ hal_EfuseGetCurrentSize_8723(IN PADAPTER pAdapter, } else { @@ -48345,7 +47616,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { ret = hal_EfuseGetCurrentSize_8723(pAdapter, bPseudoTest); } -@@ -2631,7 +2556,7 @@ Hal_EfusePgPacketRead( IN PADAPTER pAdap +@@ -2631,7 +2556,7 @@ Hal_EfusePgPacketRead( IN PADAPTER pAdapter, { ret = hal_EfusePgPacketRead_8192C(pAdapter, offset, data, bPseudoTest); } @@ -48363,7 +47634,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release startAddr%=EFUSE_REAL_CONTENT_LEN; } } -@@ -3533,7 +3458,7 @@ Hal_EfusePgPacketWrite(IN PADAPTER pAdap +@@ -3533,7 +3458,7 @@ Hal_EfusePgPacketWrite(IN PADAPTER pAdapter, { ret = hal_EfusePgPacketWrite_8192C(pAdapter, offset, word_en, data, bPseudoTest); } @@ -48372,7 +47643,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { ret = hal_EfusePgPacketWrite_8723(pAdapter, offset, word_en, data, bPseudoTest); } -@@ -3591,7 +3516,62 @@ void rtl8192c_read_chip_version(PADAPTER +@@ -3591,7 +3516,62 @@ void rtl8192c_read_chip_version(PADAPTER pAdapter) HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); pHalData->VersionID = rtl8192c_ReadChipVersion(pAdapter); } @@ -48435,7 +47706,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtl8192c_set_hal_ops(struct hal_ops *pHalFunc) { pHalFunc->free_hal_data = &rtl8192c_free_hal_data; -@@ -3608,15 +3588,15 @@ void rtl8192c_set_hal_ops(struct hal_ops +@@ -3608,15 +3588,15 @@ void rtl8192c_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Add_RateATid = &rtl8192c_Add_RateATid; #ifdef CONFIG_ANTENNA_DIVERSITY @@ -48455,7 +47726,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //Efuse related function pHalFunc->EfusePowerSwitch = &rtl8192c_EfusePowerSwitch; pHalFunc->ReadEFuse = &rtl8192c_ReadEFuse; -@@ -3627,16 +3607,22 @@ void rtl8192c_set_hal_ops(struct hal_ops +@@ -3627,16 +3607,22 @@ void rtl8192c_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->Efuse_WordEnableDataWrite = &rtl8192c_Efuse_WordEnableDataWrite; #ifdef DBG_CONFIG_ERROR_DETECT @@ -48482,9 +47753,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8192c; } +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_mp.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_mp.c +index a3021a9..a4194c4 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_mp.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_mp.c -@@ -107,7 +107,7 @@ void Hal_mpt_SwitchRfSetting(PADAPTER pA +@@ -107,7 +107,7 @@ void Hal_mpt_SwitchRfSetting(PADAPTER pAdapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); struct mp_priv *pmp = &pAdapter->mppriv; @@ -48493,7 +47766,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 ulRateIdx = pmp->rateidx; u8 ulbandwidth = pmp->bandwidth; PMPT_CONTEXT pMptCtx = &(pAdapter->mppriv.MptCtx); -@@ -340,7 +340,7 @@ void Hal_MPT_CCKTxPowerAdjustbyIndex(PAD +@@ -340,7 +340,7 @@ void Hal_MPT_CCKTxPowerAdjustbyIndex(PADAPTER pAdapter, BOOLEAN beven) PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx; @@ -48525,7 +47798,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif } -@@ -538,14 +531,6 @@ void Hal_SetOFDMTxPower(PADAPTER pAdapte +@@ -538,14 +531,6 @@ void Hal_SetOFDMTxPower(PADAPTER pAdapter, u8 *TxPower) write_bbreg(pAdapter, rTxAGC_A_Mcs11_Mcs08, bMaskDWord, TxAGC); write_bbreg(pAdapter, rTxAGC_A_Mcs15_Mcs12, bMaskDWord, TxAGC); @@ -48540,7 +47813,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // HT Tx-rf(B) tmpval = TxPower[RF_PATH_B]; TxAGC = (tmpval<<24) | (tmpval<<16) | (tmpval<<8) | tmpval; -@@ -557,14 +542,6 @@ void Hal_SetOFDMTxPower(PADAPTER pAdapte +@@ -557,14 +542,6 @@ void Hal_SetOFDMTxPower(PADAPTER pAdapter, u8 *TxPower) write_bbreg(pAdapter, rTxAGC_B_Mcs11_Mcs08, bMaskDWord, TxAGC); write_bbreg(pAdapter, rTxAGC_B_Mcs15_Mcs12, bMaskDWord, TxAGC); @@ -48564,6 +47837,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif // 2009/01/08 MH From Sd3 Willis. We need to enable RFA/B by SW control +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c +index e527028..1bae6da 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_phycfg.c @@ -16,8 +16,7 @@ @@ -49054,22 +48329,22 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // 2009/10/21 by SD1 Jong. Modified by tynli. Not in Documented in V8.1. - if(!IS_NORMAL_CHIP(pHalData->VersionID)) - { - #ifdef CONFIG_USB_HCI +-#ifdef CONFIG_USB_HCI - rtw_write8(Adapter, REG_LDOHCI12_CTRL, 0x1f); -#else - rtw_write8(Adapter, REG_LDOHCI12_CTRL, 0x1b); -+ //To Fix MAC loopback mode fail. Suggested by SD4 Johnny. 2010.03.23. -+ rtw_write8(Adapter, REG_LDOHCI12_CTRL, 0x0f); -+ rtw_write8(Adapter, 0x15, 0xe9); - #endif +-#endif - } - else - { --#ifdef CONFIG_USB_HCI + #ifdef CONFIG_USB_HCI - //To Fix MAC loopback mode fail. Suggested by SD4 Johnny. 2010.03.23. - rtw_write8(Adapter, REG_LDOHCI12_CTRL, 0x0f); - rtw_write8(Adapter, 0x15, 0xe9); --#endif ++ //To Fix MAC loopback mode fail. Suggested by SD4 Johnny. 2010.03.23. ++ rtw_write8(Adapter, REG_LDOHCI12_CTRL, 0x0f); ++ rtw_write8(Adapter, 0x15, 0xe9); + #endif - } rtw_write8(Adapter, REG_AFE_XTAL_CTRL+1, 0x80); @@ -49143,7 +48418,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); -@@ -1992,7 +1908,7 @@ u32 Rtl8192S_HighPower_RadioA_Array[High +@@ -1992,7 +1908,7 @@ u32 Rtl8192S_HighPower_RadioA_Array[HighPowerRadioAArrayLen] = { int PHY_ConfigRFExternalPA( IN PADAPTER Adapter, @@ -49333,7 +48608,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch(pHalData->CurrentChannelBW) { -@@ -3041,6 +2941,11 @@ static void _PHY_SwChnl8192C(PADAPTER Ad +@@ -3041,6 +2941,11 @@ static void _PHY_SwChnl8192C(PADAPTER Adapter, u8 channel) u32 param1, param2; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); @@ -49345,7 +48620,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //s1. pre common command - CmdID_SetTxPowerLevel PHY_SetTxPowerLevel8192C(Adapter, channel); -@@ -3050,7 +2955,7 @@ static void _PHY_SwChnl8192C(PADAPTER Ad +@@ -3050,7 +2955,7 @@ static void _PHY_SwChnl8192C(PADAPTER Adapter, u8 channel) for(eRFPath = 0; eRFPath NumTotalRFPath; eRFPath++) { pHalData->RfRegChnlVal[eRFPath] = ((pHalData->RfRegChnlVal[eRFPath] & 0xfffffc00) | param2); @@ -50016,7 +49291,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - APK_value[index] = APK_normal_value[index]; - AFE_on_off[index] = 0x6fdb25a4; - } -- + - for(index = 0; index < APK_BB_REG_NUM; index ++) - { - for(path = 0; path < pathbound; path++) @@ -50026,7 +49301,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - BB_AP_MODE[index] = BB_normal_AP_MODE[index]; - } - +- - apkbound = 6; + //settings adjust for normal chip + for(index = 0; index < PATH_NUM; index ++) @@ -50181,9 +49456,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - PHY_SetBBReg(pAdapter, 0xb28, bMaskDWord, 0x12680000); - - PHY_SetBBReg(pAdapter, 0xb98, bMaskDWord, 0x12680000); -+ PHY_SetBBReg(pAdapter, offset, bMaskDWord, APK_normal_setting_value_1[index]); -+ //RTPRINT(FINIT, INIT_IQK, ("PHY_APCalibrate() offset 0x%x value 0x%x\n", offset, PHY_QueryBBReg(pAdapter, offset, bMaskDWord))); - +- - offset = 0xb68; - index = 11; - for(; index < 13; index ++) //offset 0xb68, 0xb6c @@ -50193,7 +49466,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - offset += 0x04; - } -- ++ PHY_SetBBReg(pAdapter, offset, bMaskDWord, APK_normal_setting_value_1[index]); ++ //RTPRINT(FINIT, INIT_IQK, ("PHY_APCalibrate() offset 0x%x value 0x%x\n", offset, PHY_QueryBBReg(pAdapter, offset, bMaskDWord))); + - //page-B1 - PHY_SetBBReg(pAdapter, 0xe28, bMaskDWord, 0x40000000); + offset += 0x04; @@ -50406,9 +49681,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { - PHY_SetRFReg(pAdapter, RF90_PATH_A, 0x10, bMaskDWord, 0x1000f); - PHY_SetRFReg(pAdapter, RF90_PATH_A, 0x11, bMaskDWord, 0x20101); -+ PHY_SetRFReg(pAdapter, RF_PATH_A, RF_MODE1, bRFRegOffsetMask, 0x1000f); -+ PHY_SetRFReg(pAdapter, RF_PATH_A, RF_MODE2, bRFRegOffsetMask, 0x20101); - } +- } -#if 1 - if(!isNormal) - { @@ -50445,7 +49718,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - RTPRINT(FINIT, INIT_IQK, ("apk result %d 0x%x \t", 4, APK_result[path][4])); -#endif - -- } ++ PHY_SetRFReg(pAdapter, RF_PATH_A, RF_MODE1, bRFRegOffsetMask, 0x1000f); ++ PHY_SetRFReg(pAdapter, RF_PATH_A, RF_MODE2, bRFRegOffsetMask, 0x20101); + } -#endif + + //note no index == 0 @@ -50998,25 +50273,26 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + rOFDM0_XATxIQImbalance, rOFDM0_XBTxIQImbalance, + rOFDM0_XCTxAFE, rOFDM0_XDTxAFE, + rOFDM0_RxIQExtAnta}; - - --#if (MP_DRIVER == 1) ++ ++ +#if MP_DRIVER == 1 + bStartContTx = pAdapter->mppriv.MptCtx.bStartContTx; + bSingleTone = pAdapter->mppriv.MptCtx.bSingleTone; + bCarrierSuppression = pAdapter->mppriv.MptCtx.bCarrierSuppression; +#endif -+ + +- +-#if (MP_DRIVER == 1) //ignore IQK when continuous Tx - if (pAdapter->mppriv.MptCtx.bStartContTx == _TRUE) - return; - if (pAdapter->mppriv.MptCtx.bCarrierSuppression == _TRUE) - return; - if (pAdapter->mppriv.MptCtx.bSingleCarrier == _TRUE) +- return; +- if (pAdapter->mppriv.MptCtx.bSingleTone == _TRUE) + if(bStartContTx || bSingleTone || bCarrierSuppression) return; -- if (pAdapter->mppriv.MptCtx.bSingleTone == _TRUE) -- return; -#endif #if DISABLE_BB_RF @@ -51209,6 +50485,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -} -#endif - +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c +index 593ea09..cf46969 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c @@ -16,8 +16,7 @@ @@ -51221,7 +50499,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /****************************************************************************** * * -@@ -109,35 +108,35 @@ void rtl8192c_RF_ChangeTxPath( IN PADAPT +@@ -109,35 +108,35 @@ void rtl8192c_RF_ChangeTxPath( IN PADAPTER Adapter, if (RF_Path_Type == 2 && (DataRate&0xF) <= 0x7) { // Set TX SYNC power G2G3 loop filter @@ -51600,6 +50878,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rxdesc.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rxdesc.c +index 5aa6e61..3e0d795 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rxdesc.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_rxdesc.c @@ -16,7 +16,7 @@ @@ -51611,7 +50891,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTL8192C_REDESC_C_ #include #include -@@ -196,7 +196,7 @@ static s32 translate2dbm(u8 signal_stre +@@ -196,7 +196,7 @@ static s32 translate2dbm(u8 signal_strength_idx) return signal_power; } @@ -51620,7 +50900,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { PHY_STS_OFDM_8192CD_T *pOfdm_buf; PHY_STS_CCK_8192CD_T *pCck_buf; -@@ -383,9 +383,9 @@ void rtl8192c_query_rx_phy_status(union +@@ -383,9 +383,9 @@ void rtl8192c_query_rx_phy_status(union recv_frame *prframe, struct phy_stat *pp //continue; rx_pwr[i] = ((pOfdm_buf->trsw_gain_X[i]&0x3F)*2) - 110; @@ -51632,7 +50912,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release total_rssi += rssi; RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("RF-%d RXPWR=%x RSSI=%d\n", i, rx_pwr[i], rssi)); -@@ -733,8 +733,7 @@ static void process_link_qual(_adapter * +@@ -733,8 +733,7 @@ static void process_link_qual(_adapter *padapter,union recv_frame *prframe) }// Process_UiLinkQuality8192S @@ -51642,11 +50922,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { union recv_frame *precvframe = (union recv_frame *)prframe; -@@ -764,4 +763,114 @@ void rtl8192c_process_phy_info(_adapter - +@@ -765,3 +764,113 @@ void rtl8192c_process_phy_info(_adapter *padapter, void *prframe) } -+ + +void rtl8192c_translate_rx_signal_stuff(union recv_frame *precvframe, struct phy_stat *pphy_info) +{ + struct rx_pkt_attrib *pattrib = &precvframe->u.hdr.attrib; @@ -51756,7 +51035,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +} + - ++ +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.c +index e2817f3..1368d66 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.c @@ -16,189 +16,10 @@ @@ -51950,7 +51231,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtl8192c_sreset_xmit_status_check(_adapter *padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); -@@ -210,34 +31,44 @@ void rtl8192c_sreset_xmit_status_check(_ +@@ -210,34 +31,44 @@ void rtl8192c_sreset_xmit_status_check(_adapter *padapter) u32 txdma_status; if( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00){ DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __FUNCTION__, txdma_status); @@ -52008,7 +51289,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 regc50,regc58,reg824,reg800; regc50 = rtw_read32(padapter,0xc50); regc58 = rtw_read32(padapter,0xc58); -@@ -250,44 +81,14 @@ void rtl8192c_sreset_linked_status_check +@@ -250,44 +81,14 @@ void rtl8192c_sreset_linked_status_check(_adapter *padapter) { DBG_8192C("%s regc50:0x%08x, regc58:0x%08x, reg824:0x%08x, reg800:0x%08x,\n", __FUNCTION__, regc50, regc58, reg824, reg800); @@ -52058,6 +51339,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif -#endif +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_xmit.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_xmit.c +new file mode 100644 +index 0000000..2cfd851 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_xmit.c @@ -0,0 +1,63 @@ @@ -52124,6 +51408,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +} +#endif //CONFIG_XMIT_ACK + +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.c +index 1615b5d..b49486b 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/Hal8192CUHWImg.c @@ -24,9 +24,994 @@ @@ -53123,7 +52409,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x61,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x02,0x43,0xba,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x02,0x5a,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -@@ -99,7 +1084,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -99,7 +1084,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x00,0x41,0x9e,0xae,0x00,0x41,0x9e,0x4d,0x80,0x41,0x9e,0x4e,0x80,0x41,0x9e,0xb0, 0x00,0x00,0xf0,0x90,0x9e,0x57,0xe0,0x90,0x9e,0x8a,0xf0,0xe4,0xfb,0xfd,0x7f,0x54, 0x7e,0x01,0xd3,0x10,0xaf,0x01,0xc3,0xc0,0xd0,0x90,0x9e,0x88,0xeb,0xf0,0xa3,0xe0, @@ -53132,7 +52418,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x90,0x01,0x5f,0xe4,0xf0,0x90,0x01,0x3c,0x74,0x08,0xf0,0xe4,0x90,0x9e,0x89,0xf0, 0x90,0x9e,0x55,0xe0,0x90,0x9e,0x8a,0xf0,0xe4,0xfb,0xfd,0x7f,0x5c,0x7e,0x01,0x91, 0x62,0x90,0x01,0x5f,0x74,0x05,0xf0,0x90,0x06,0x92,0x74,0x02,0xf0,0x90,0x9e,0x5c, -@@ -111,7 +1096,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -111,7 +1096,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x22,0x22,0x00,0x02,0x60,0x8d,0x02,0x60,0x94,0xd3,0x10,0xaf,0x01,0xc3,0xc0,0xd0, 0x8b,0x1b,0x8a,0x1c,0x89,0x1d,0x90,0x9e,0x8b,0x71,0x8b,0xab,0x1e,0xaa,0x1f,0xa9, 0x20,0x90,0x9e,0x8e,0x71,0x8b,0xaf,0x21,0x15,0x21,0xef,0x60,0x1b,0x90,0x9e,0x8e, @@ -53141,7 +52427,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x01,0x71,0x74,0xef,0x51,0x4d,0x80,0xde,0xab,0x1b,0xaa,0x1c,0xa9,0x1d,0xd0,0xd0, 0x92,0xaf,0x22,0x90,0x06,0xa9,0xe0,0xf5,0x50,0x54,0xc0,0x70,0x0d,0x90,0x9e,0x63, 0xe0,0x54,0xfe,0xf0,0xe0,0x54,0xfd,0xf0,0x91,0xd3,0xe5,0x50,0x30,0xe6,0x17,0x90, -@@ -168,21 +1153,21 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -168,21 +1153,21 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x60,0x0b,0x90,0x9e,0x77,0xe0,0xb4,0x01,0x10,0xe4,0xff,0x80,0x09,0x90,0x9e,0x77, 0xe0,0xb4,0x01,0x05,0x7f,0x01,0x12,0x77,0x66,0x22,0x90,0x01,0x37,0x74,0x02,0xf0, 0x90,0x05,0x22,0x74,0xff,0xf0,0x12,0x77,0x1c,0xef,0x70,0x06,0x90,0x01,0xc8,0x74, @@ -53176,7 +52462,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x08,0xf4,0xff,0x90,0x00,0x43,0xe0,0x5f,0xf0,0xd3,0x10,0xaf,0x01,0xc3,0xc0,0xd0, 0x7f,0x10,0xdf,0xfe,0xd0,0xd0,0x92,0xaf,0x22,0xd3,0x10,0xaf,0x01,0xc3,0xc0,0xd0, 0x90,0x9e,0xad,0xed,0xf0,0x90,0x9e,0xac,0xef,0xf0,0xd3,0x94,0x07,0x50,0x63,0xe0, -@@ -205,15 +1190,15 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -205,15 +1190,15 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x02,0x61,0x7d,0x90,0x9e,0x1a,0x74,0x02,0xf0,0x90,0x00,0x48,0xe0,0x44,0x0c,0xfd, 0x7f,0x48,0x51,0xc1,0x90,0x00,0x47,0xe0,0x44,0x08,0xfd,0x7f,0x47,0x51,0xc1,0x90, 0x00,0x45,0xe0,0x44,0x10,0xfd,0x7f,0x45,0x80,0x71,0xe4,0x90,0x9e,0x1a,0xf0,0x90, @@ -53196,7 +52482,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xf0,0x90,0x05,0x60,0xe0,0x90,0x9e,0x2a,0xf0,0x90,0x05,0x61,0xe0,0x90,0x9e,0x2b, 0xf0,0x90,0x05,0x62,0xe0,0x90,0x9e,0x2c,0xf0,0x90,0x05,0x63,0xe0,0x90,0x9e,0x2d, 0xf0,0xa2,0xaf,0xe4,0x33,0x90,0x9e,0x3f,0xf0,0xc2,0xaf,0x90,0x9e,0x1b,0xe0,0xff, -@@ -222,25 +1207,25 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -222,25 +1207,25 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x81,0x84,0xa2,0xaf,0xe4,0x33,0x90,0x9e,0x3f,0xf0,0xc2,0xaf,0x90,0x9e,0x2e,0x74, 0x01,0xf0,0x90,0x9e,0x3f,0xe0,0x24,0xff,0x92,0xaf,0x51,0xb8,0x90,0x00,0x46,0xe0, 0x44,0x01,0xfd,0x7f,0x46,0x51,0xc1,0x90,0x9e,0x14,0xe0,0x60,0x15,0x90,0x9e,0x20, @@ -53231,7 +52517,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xc1,0x90,0x00,0x48,0xe0,0x44,0x0c,0xfd,0x7f,0x48,0x51,0xc1,0x90,0x00,0x46,0xe0, 0x44,0x10,0x80,0x1c,0x90,0x00,0x47,0xe0,0x54,0xf3,0xfd,0x7f,0x47,0x51,0xc1,0x90, 0x00,0x48,0xe0,0x54,0xf3,0xfd,0x7f,0x48,0x51,0xc1,0x90,0x00,0x46,0xe0,0x54,0xef, -@@ -256,13 +1241,13 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -256,13 +1241,13 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x46,0x51,0xc1,0x7f,0x02,0xf1,0xea,0x8f,0x26,0x90,0x01,0xc9,0xe5,0x26,0xf0,0xb4, 0x01,0x02,0xf1,0x2a,0x22,0x90,0x9e,0x1c,0xe0,0x64,0x01,0x60,0x02,0xc1,0xd7,0x90, 0x00,0x46,0xe0,0x44,0x01,0xfd,0x7f,0x46,0x51,0xc1,0x90,0x9e,0x2e,0xe0,0x70,0x31, @@ -53249,7 +52535,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x90,0x05,0x87,0xe0,0x64,0x80,0xf0,0x90,0x9e,0x2a,0xe0,0x90,0x05,0x84,0xf0,0x90, 0x9e,0x2b,0xe0,0x90,0x05,0x85,0xf0,0x90,0x9e,0x2c,0xe0,0x90,0x05,0x86,0xf0,0x90, 0x9e,0x2d,0xe0,0x90,0x05,0x87,0xf0,0x22,0x90,0x05,0x60,0xe0,0x90,0x9e,0x2a,0xf0, -@@ -296,7 +1281,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -296,7 +1281,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x29,0x75,0x2a,0x03,0xf5,0x2b,0x90,0x01,0x30,0xe5,0x28,0xf0,0xa3,0xe5,0x29,0xf0, 0xa3,0xe5,0x2a,0xf0,0xa3,0xe5,0x2b,0xf0,0x22,0xe4,0x90,0x9e,0x31,0xf0,0xa3,0xf0, 0x75,0x8e,0x02,0x12,0x4f,0xda,0x12,0x5f,0xa9,0x12,0x5f,0xbc,0xe4,0xf5,0x12,0x12, @@ -53258,7 +52544,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x90,0x00,0xf3,0xe0,0x30,0xe2,0x0d,0x90,0x05,0x41,0x74,0x10,0xf0,0x90,0x05,0x5a, 0xf0,0xa3,0xe4,0xf0,0x12,0x5f,0xf4,0x12,0x5f,0x91,0x12,0x44,0xfe,0x12,0x7d,0x1d, 0x90,0x9e,0x33,0xe5,0xd9,0xf0,0x12,0x4d,0x8b,0xc2,0xaf,0x90,0x00,0x80,0xe0,0x44, -@@ -353,7 +1338,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -353,7 +1338,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x43,0x6b,0x90,0x00,0x02,0x12,0x42,0x20,0xff,0x90,0x9e,0x48,0x12,0x43,0x6b,0x90, 0x00,0x01,0xef,0x12,0x42,0x5f,0x90,0x9e,0x41,0x12,0x43,0x6b,0x90,0x00,0x01,0x12, 0x42,0x20,0xff,0x90,0x9e,0x46,0xe0,0xfc,0xa3,0xe0,0xfd,0xf5,0x82,0x8c,0x83,0xef, @@ -53267,7 +52553,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x9e,0x3f,0xe0,0xff,0x24,0x82,0xf5,0x82,0xe4,0x34,0x95,0xf5,0x83,0xee,0xf0,0x90, 0x9e,0x40,0xe0,0xfe,0x75,0xf0,0x09,0xef,0x90,0x96,0x4a,0x12,0x43,0x5f,0xee,0xf0, 0x75,0xf0,0x09,0xef,0x90,0x96,0x4b,0x12,0x43,0x5f,0x74,0x01,0xf0,0x90,0x9e,0x45, -@@ -389,10 +1374,10 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -389,10 +1374,10 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0xe0,0xab,0x5d,0xaa,0x5e,0xa9,0x5f,0x12,0x42,0x4d,0x90,0x04,0x52,0xe0,0xab,0x5d, 0xaa,0x5e,0xa9,0x5f,0x90,0x00,0x01,0x12,0x42,0x5f,0x90,0x04,0x51,0xe0,0x85,0x5c, 0x82,0x85,0x5b,0x83,0xf0,0x90,0x04,0x50,0xe0,0x85,0x5c,0x82,0x85,0x5b,0x83,0xa3, @@ -53281,7 +52567,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x00,0x01,0x12,0x42,0x20,0x5f,0xd0,0x01,0xd0,0x02,0xd0,0x03,0x12,0x42,0x4d,0x85, 0x5c,0x82,0x85,0x5b,0x83,0xc0,0x83,0xc0,0x82,0xe0,0xff,0x85,0x61,0x82,0x85,0x60, 0x83,0xe0,0xfe,0xef,0x5e,0xd0,0x82,0xd0,0x83,0xf0,0x85,0x5c,0x82,0x85,0x5b,0x83, -@@ -472,7 +1457,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -472,7 +1457,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x4d,0x31,0x76,0xe5,0x74,0x14,0x24,0xfd,0x50,0x02,0x80,0x45,0x90,0x9e,0x61,0xe0, 0x60,0x37,0x90,0x01,0x5b,0xe4,0xf0,0x90,0x01,0x3c,0x74,0x04,0xf0,0xd1,0x05,0xef, 0x64,0x01,0x70,0x2d,0x90,0x9e,0x55,0xe0,0xf5,0x44,0x75,0x45,0x00,0xe4,0xfb,0xfd, @@ -53290,7 +52576,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x74,0x01,0xf0,0x90,0x9e,0x5d,0xf0,0x80,0x08,0xd1,0x05,0xbf,0x01,0x03,0x12,0x44, 0xd3,0xe5,0x2c,0x30,0xe1,0x20,0x90,0x01,0x34,0x74,0x02,0xf0,0x85,0xd1,0x13,0x85, 0xd2,0x14,0x85,0xd3,0x15,0x85,0xd4,0x16,0x85,0xd5,0x17,0x85,0xd6,0x18,0x85,0xd7, -@@ -515,12 +1500,12 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -515,12 +1500,12 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x01,0xef,0x12,0x42,0x5f,0x7f,0xaf,0x7e,0x01,0xf1,0x3b,0xef,0x60,0x49,0x90,0x9e, 0x91,0x12,0x43,0x6b,0x8b,0x1e,0x8a,0x1f,0x89,0x20,0x75,0x21,0x02,0x7b,0x01,0x7a, 0x01,0x79,0xa0,0x12,0x45,0x09,0x90,0x9e,0x94,0x12,0x43,0x6b,0x8b,0x1e,0x8a,0x1f, @@ -53305,7 +52591,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xe0,0x60,0x06,0x7d,0x01,0x7f,0x0c,0x80,0x0f,0x90,0x9e,0x5e,0xe0,0x54,0x0f,0xc3, 0x94,0x04,0x50,0x07,0x7d,0x01,0x7f,0x04,0x12,0x47,0x1a,0xe4,0xff,0x12,0x48,0x8f, 0x22,0xd1,0x05,0xef,0x64,0x01,0x60,0x08,0x90,0x01,0xb9,0x74,0x01,0xf0,0x80,0x32, -@@ -532,7 +1517,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -532,7 +1517,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x9e,0xa0,0xe0,0xfe,0xa3,0xe0,0xf5,0x82,0x8e,0x83,0xe0,0x60,0x2d,0xc3,0x90,0x9e, 0xa3,0xe0,0x94,0xe8,0x90,0x9e,0xa2,0xe0,0x94,0x03,0x40,0x0b,0x90,0x01,0xc6,0xe0, 0x44,0x10,0xf0,0x7f,0x00,0x80,0x15,0x90,0x9e,0xa2,0xe4,0x75,0xf0,0x01,0x12,0x42, @@ -53314,7 +52600,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x22,0x75,0x30,0x1f,0x75,0x31,0x01,0xe4,0xf5,0x32,0x90,0x01,0x38,0xe5,0x30,0xf0, 0xa3,0xe5,0x31,0xf0,0xa3,0xe5,0x32,0xf0,0x22,0x90,0x00,0x02,0xe0,0x54,0xe0,0x90, 0x9e,0x75,0x60,0x04,0x74,0x01,0xf0,0x22,0x74,0x02,0xf0,0x22,0x90,0x00,0xf3,0xe0, -@@ -558,7 +1543,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -558,7 +1543,7 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x9e,0x5b,0x74,0x05,0xf0,0xe4,0x90,0x9e,0x54,0xf0,0x90,0x9e,0x4f,0xf0,0x90,0x9e, 0x76,0xf0,0x22,0xe4,0x90,0x9e,0x62,0xf0,0x90,0x9e,0x51,0xf0,0x90,0x9e,0x63,0xf0, 0x22,0x8b,0x59,0x8a,0x5a,0x89,0x5b,0x31,0x03,0xab,0x59,0xaa,0x5a,0xa9,0x5b,0x12, @@ -53323,7 +52609,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x40,0x7f,0x01,0x80,0x3a,0xab,0x59,0xaa,0x5a,0xa9,0x5b,0x90,0x00,0x02,0x12,0x42, 0x20,0xfd,0xe4,0xff,0x31,0x72,0x80,0x27,0xab,0x59,0xaa,0x5a,0xa9,0x5b,0x90,0x00, 0x02,0x12,0x42,0x20,0xfd,0x7f,0x01,0x31,0x72,0x1f,0x80,0x13,0xab,0x59,0xaa,0x5a, -@@ -567,13 +1552,13 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -567,13 +1552,13 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x80,0x16,0xed,0x70,0x0a,0x90,0x9e,0x5b,0xe0,0x90,0x9e,0x5f,0xf0,0x80,0x05,0x90, 0x9e,0x5f,0xed,0xf0,0x90,0x9e,0x5f,0xe0,0x90,0x9e,0x50,0xf0,0x22,0xd3,0x10,0xaf, 0x01,0xc3,0xc0,0xd0,0x90,0x00,0x01,0x12,0x42,0x20,0x90,0x9e,0x61,0xf0,0x90,0x00, @@ -53341,7 +52627,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x90,0x9e,0x58,0xe0,0xa3,0xe0,0x90,0x05,0x58,0xf0,0xe5,0x73,0x30,0xe0,0x1b,0x90, 0x9e,0x52,0xe0,0x70,0x1a,0xe0,0x04,0xf0,0x90,0x9e,0x5e,0xe0,0x54,0x0f,0xc3,0x94, 0x04,0x50,0x0c,0x7d,0x01,0x7f,0x04,0x02,0x47,0x1a,0xe4,0x90,0x9e,0x52,0xf0,0x22, -@@ -600,17 +1585,17 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -600,17 +1585,17 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0xf0,0x22,0x90,0x9e,0xaf,0xef,0xf0,0x71,0xb0,0x90,0x9e,0xaf,0xe0,0x60,0x05,0x90, 0x05,0x22,0xe4,0xf0,0x90,0x9e,0x5e,0xe0,0x54,0xf0,0xf0,0xe0,0x44,0x04,0xf0,0x22, 0x90,0x00,0x11,0xe0,0x44,0x09,0xf0,0x12,0x49,0xb9,0x90,0x9d,0xff,0x12,0x43,0x53, @@ -53367,7 +52653,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xd3,0x90,0x9e,0xa9,0xe0,0x94,0x32,0x90,0x9e,0xa8,0xe0,0x94,0x00,0x40,0xb9,0x90, 0x01,0xc7,0xe0,0x30,0xe0,0xb2,0x22,0x90,0x9e,0x5e,0xe0,0x54,0xf0,0xf0,0xe0,0x44, 0x01,0xf0,0x12,0x44,0xff,0x12,0x45,0x00,0xe0,0x54,0xf0,0xf0,0xe0,0x44,0x02,0xf0, -@@ -717,21 +1702,21 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -717,21 +1702,21 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x93,0xff,0xd3,0x90,0x9e,0x3b,0xe0,0x9f,0x90,0x9e,0x3a,0xe0,0x94,0x00,0x40,0x09, 0xe4,0xfd,0xaf,0x59,0x12,0x67,0xb1,0xe1,0x2c,0xe5,0x59,0x25,0xe0,0x24,0xc2,0xf5, 0x82,0xe4,0x34,0x95,0xf5,0x83,0xe0,0xf5,0x61,0xa3,0xe0,0xf5,0x62,0xab,0x5b,0xaa, @@ -53396,7 +52682,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x0c,0xe5,0x62,0x9f,0xf5,0x62,0xe5,0x61,0x9e,0xf5,0x61,0x80,0x05,0xe4,0xf5,0x61, 0xf5,0x62,0xe5,0x59,0x25,0xe0,0x24,0xc2,0xf5,0x82,0xe4,0x34,0x95,0xf5,0x83,0xe5, 0x61,0xf0,0xa3,0xe5,0x62,0xf0,0x90,0x9e,0x34,0xe0,0x25,0xe0,0x24,0x66,0xf5,0x82, -@@ -766,11 +1751,11 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -766,11 +1751,11 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x5f,0xe0,0xb4,0x01,0x10,0xe4,0xf5,0x63,0x74,0xe6,0x25,0x59,0xf5,0x82,0xe4,0x34, 0x9c,0xf5,0x83,0xe4,0xf0,0xad,0x63,0xc1,0xfb,0xec,0x64,0x06,0x60,0x02,0xe1,0x00, 0xf5,0x61,0xf5,0x62,0x90,0x42,0x13,0x93,0xff,0x7e,0x00,0x90,0x9e,0x38,0xe0,0xfc, @@ -53410,7 +52696,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xe0,0x95,0x62,0x90,0x9e,0x36,0xe0,0x95,0x61,0x40,0x07,0x05,0x5a,0xe5,0x5a,0xb4, 0x05,0xbd,0xe5,0x5a,0xc3,0x13,0xf5,0x5a,0xe5,0x63,0xb4,0x01,0x06,0xe5,0x5a,0x70, 0x46,0x80,0x13,0xe5,0x63,0xb4,0x03,0x15,0xe5,0x5a,0x70,0x05,0x75,0x63,0x03,0x80, -@@ -819,36 +1804,36 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -819,36 +1804,36 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x90,0x96,0x49,0x12,0x43,0x5f,0xe4,0xf0,0xed,0xc3,0x94,0x20,0x50,0x0f,0x74,0x84, 0x2d,0xf5,0x82,0xe4,0x34,0x04,0xf5,0x83,0x74,0x13,0xf0,0x80,0x0d,0x74,0xa6,0x2d, 0xf5,0x82,0xe4,0x34,0x9c,0xf5,0x83,0x74,0x13,0xf0,0x0d,0xed,0x64,0x40,0x60,0x03, @@ -53456,7 +52742,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x90,0x9e,0x44,0xef,0xf0,0xd3,0x94,0x07,0x50,0x4f,0xa3,0xe0,0x70,0x1a,0x90,0x9e, 0x44,0xe0,0xff,0x74,0x01,0xa8,0x07,0x08,0x80,0x02,0xc3,0x33,0xd8,0xfc,0xf4,0xff, 0x90,0x00,0x47,0xe0,0x5f,0xf0,0x80,0x17,0x90,0x9e,0x44,0xe0,0xff,0x74,0x01,0xa8, -@@ -875,24 +1860,24 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -875,24 +1860,24 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x80,0x1a,0xc3,0x74,0x03,0x95,0x61,0x24,0x66,0xf8,0xe6,0xff,0xe5,0x61,0x7c,0x00, 0x25,0x65,0xfd,0xec,0x35,0x64,0x8d,0x82,0xf5,0x83,0xef,0xf0,0x05,0x61,0x80,0xba, 0xc3,0xe5,0x64,0x94,0x10,0x40,0x02,0xa1,0x93,0x90,0x9e,0x40,0xe0,0x64,0x04,0x60, @@ -53494,7 +52780,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x75,0x5a,0x80,0x80,0x05,0xe4,0xf5,0x59,0xf5,0x5a,0xe5,0x5e,0xc3,0x13,0x90,0xfd, 0x10,0xf0,0x74,0x20,0x25,0x5b,0xf5,0x5b,0xad,0x5a,0xe5,0x5b,0x2d,0xff,0x24,0x01, 0xf5,0x82,0xe4,0x34,0xfc,0xf5,0x83,0xe0,0x90,0x9e,0x6d,0xf0,0x74,0x02,0x2f,0xf5, -@@ -902,8 +1887,8 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -902,8 +1887,8 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0x83,0xe0,0xfe,0x74,0x6c,0x2f,0xf5,0x82,0xe4,0x34,0x9e,0xf5,0x83,0xee,0xf0,0x0f, 0xbf,0x08,0xe0,0x91,0x0e,0xef,0x70,0x3f,0x90,0x01,0xc3,0xe0,0x60,0x25,0xc3,0xe5, 0x60,0x94,0xe8,0xe5,0x5f,0x94,0x03,0x40,0x09,0x90,0x01,0xc6,0xe0,0x44,0x10,0xf0, @@ -53505,7 +52791,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x80,0x43,0x74,0xff,0xf0,0x80,0x3e,0xe5,0x5b,0xb4,0x78,0x23,0xe4,0xf5,0x5b,0x05, 0x5e,0xe5,0x5a,0x64,0x80,0x45,0x59,0x70,0x06,0xf5,0x59,0xf5,0x5a,0x80,0x06,0x75, 0x59,0x00,0x75,0x5a,0x80,0xe5,0x5e,0xc3,0x13,0x90,0xfd,0x10,0xf0,0x80,0x06,0x74, -@@ -912,4208 +1897,146 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayL +@@ -912,4208 +1897,146 @@ u8 Rtl8192CUFwTSMCImgArray[TSMCImgArrayLength] = { 0xe4,0xa3,0xf0,0xa3,0xf0,0xa3,0xf0,0x22,0xe4,0xf5,0x25,0x22,0xe4,0x90,0x9e,0xaa, 0xf0,0xa3,0xf0,0x90,0x05,0xf8,0xe0,0x70,0x0f,0xa3,0xe0,0x70,0x0b,0xa3,0xe0,0x70, 0x07,0xa3,0xe0,0x70,0x03,0x7f,0x01,0x22,0xd3,0x90,0x9e,0xab,0xe0,0x94,0xe8,0x90, @@ -57848,7 +57134,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x05,0x04,0x03,0x02,0x00,0x03,0x06,0x05,0x04,0x03,0x00,0x04,0x06,0x05,0x04,0x02, 0x00,0x04,0x08,0x07,0x06,0x04,0x00,0x06,0x0a,0x09,0x08,0x06,0x00,0x08,0x0a,0x09, 0x08,0x04,0x00,0x08,0x0a,0x09,0x08,0x02,0x00,0x08,0x0a,0x09,0x08,0x00,0x00,0x08, -@@ -5168,7 +2091,7 @@ u8 Rtl8192CUFwUMCBCutImgArray[UMCBCutImg +@@ -5168,7 +2091,7 @@ u8 Rtl8192CUFwUMCBCutImgArray[UMCBCutImgArrayLength] = { 0x15,0x82,0x70,0x02,0x15,0x83,0xe0,0xfa,0x38,0xf0,0x22,0xeb,0xf0,0xa3,0xea,0xf0, 0xa3,0xe9,0xf0,0x22,0xd0,0x83,0xd0,0x82,0xf8,0xe4,0x93,0x70,0x12,0x74,0x01,0x93, 0x70,0x0d,0xa3,0xa3,0x93,0xf8,0x74,0x01,0x93,0xf5,0x82,0x88,0x83,0xe4,0x73,0x74, @@ -57857,7 +57143,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xe4,0x93,0xa3,0xf8,0xe4,0x93,0xa3,0x40,0x03,0xf6,0x80,0x01,0xf2,0x08,0xdf,0xf4, 0x80,0x29,0xe4,0x93,0xa3,0xf8,0x54,0x07,0x24,0x0c,0xc8,0xc3,0x33,0xc4,0x54,0x0f, 0x44,0x20,0xc8,0x83,0x40,0x04,0xf4,0x56,0x80,0x01,0x46,0xf6,0xdf,0xe4,0x80,0x0b, -@@ -5176,833 +2099,797 @@ u8 Rtl8192CUFwUMCBCutImgArray[UMCBCutImg +@@ -5176,833 +2099,797 @@ u8 Rtl8192CUFwUMCBCutImgArray[UMCBCutImgArrayLength] = { 0xbc,0xa3,0xff,0x54,0x3f,0x30,0xe5,0x09,0x54,0x1f,0xfe,0xe4,0x93,0xa3,0x60,0x01, 0x0e,0xcf,0x54,0xc0,0x25,0xe0,0x60,0xa8,0x40,0xb8,0xe4,0x93,0xa3,0xfa,0xe4,0x93, 0xa3,0xf8,0xe4,0x93,0xa3,0xc8,0xc5,0x82,0xc8,0xca,0xc5,0x83,0xca,0xf0,0xa3,0xc8, @@ -59464,7 +58750,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x90,0x9d,0xfb,0x12,0x43,0x53,0x90,0x80,0x85,0x12,0x2a,0x7f,0x7f,0x8c,0x7e,0x08, 0x12,0x2f,0xd9,0x90,0x9d,0xa7,0x12,0x43,0x53,0x90,0x80,0x85,0x12,0x2a,0x7f,0x7f, 0x44,0x7e,0x08,0x12,0x2f,0xd9,0x90,0x9d,0xab,0x12,0x43,0x53,0x90,0x80,0x85,0x12, -@@ -6030,1114 +2917,3136 @@ u8 Rtl8192CUFwUMCBCutImgArray[UMCBCutImg +@@ -6030,1114 +2917,3136 @@ u8 Rtl8192CUFwUMCBCutImgArray[UMCBCutImgArrayLength] = { 0x43,0x53,0x90,0x80,0x85,0x12,0x2a,0x7f,0x7f,0x0c,0x7e,0x09,0x12,0x2f,0xd9,0x90, 0x9d,0xf7,0x12,0x43,0x53,0x90,0x80,0x85,0x12,0x2a,0x7f,0x7f,0x04,0x7e,0x08,0x12, 0x2f,0xd9,0x90,0x9e,0x0f,0x74,0x01,0xf0,0x22,0x90,0x9e,0x0f,0xe0,0x64,0x01,0x60, @@ -63706,7 +62992,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 Rtl8192CUPHY_REG_2TArray[PHY_REG_2TArrayLength] = { 0x024,0x0011800f, -@@ -7146,7 +6055,7 @@ u32 Rtl8192CUPHY_REG_2TArray[PHY_REG_2TA +@@ -7146,7 +6055,7 @@ u32 Rtl8192CUPHY_REG_2TArray[PHY_REG_2TArrayLength] = { 0x804,0x00000003, 0x808,0x0000fc00, 0x80c,0x0000000a, @@ -63715,7 +63001,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x814,0x020c3d10, 0x818,0x02200385, 0x81c,0x00000000, -@@ -7220,22 +6129,22 @@ u32 Rtl8192CUPHY_REG_2TArray[PHY_REG_2TA +@@ -7220,22 +6129,22 @@ u32 Rtl8192CUPHY_REG_2TArray[PHY_REG_2TArrayLength] = { 0xc44,0x000100b7, 0xc48,0xec020107, 0xc4c,0x007f037f, @@ -63742,7 +63028,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xc90,0x00121820, 0xc94,0x00000000, 0xc98,0x00121820, -@@ -7336,7 +6245,7 @@ u32 Rtl8192CUPHY_REG_1TArray[PHY_REG_1TA +@@ -7336,7 +6245,7 @@ u32 Rtl8192CUPHY_REG_1TArray[PHY_REG_1TArrayLength] = { 0x804,0x00000001, 0x808,0x0000fc00, 0x80c,0x0000000a, @@ -63751,7 +63037,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x814,0x020c3d10, 0x818,0x02200385, 0x81c,0x00000000, -@@ -7410,9 +6319,9 @@ u32 Rtl8192CUPHY_REG_1TArray[PHY_REG_1TA +@@ -7410,9 +6319,9 @@ u32 Rtl8192CUPHY_REG_1TArray[PHY_REG_1TArrayLength] = { 0xc44,0x000100b7, 0xc48,0xec020107, 0xc4c,0x007f037f, @@ -63763,7 +63049,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xc5c,0x433c0094, 0xc60,0x00000000, 0xc64,0x5116848b, -@@ -7450,7 +6359,7 @@ u32 Rtl8192CUPHY_REG_1TArray[PHY_REG_1TA +@@ -7450,7 +6359,7 @@ u32 Rtl8192CUPHY_REG_1TArray[PHY_REG_1TArrayLength] = { 0xce4,0x00000000, 0xce8,0x37644302, 0xcec,0x2f97d40c, @@ -63772,7 +63058,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xd04,0x00020401, 0xd08,0x0000907f, 0xd0c,0x20010201, -@@ -7771,7 +6680,7 @@ u32 Rtl8192CUPHY_REG_1T_HPArray[PHY_REG_ +@@ -7771,7 +6680,7 @@ u32 Rtl8192CUPHY_REG_1T_HPArray[PHY_REG_1T_HPArrayLength] = { 0x804,0x00000001, 0x808,0x0000fc00, 0x80c,0x0000000a, @@ -63781,7 +63067,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x814,0x020c3d10, 0x818,0x02200385, 0x81c,0x00000000, -@@ -7885,7 +6794,7 @@ u32 Rtl8192CUPHY_REG_1T_HPArray[PHY_REG_ +@@ -7885,7 +6794,7 @@ u32 Rtl8192CUPHY_REG_1T_HPArray[PHY_REG_1T_HPArrayLength] = { 0xce4,0x00000000, 0xce8,0x37644302, 0xcec,0x2f97d40c, @@ -63790,7 +63076,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xd04,0x00020401, 0xd08,0x0000907f, 0xd0c,0x20010201, -@@ -7962,7 +6871,7 @@ u32 Rtl8192CUPHY_REG_1T_mCardArray[PHY_R +@@ -7962,7 +6871,7 @@ u32 Rtl8192CUPHY_REG_1T_mCardArray[PHY_REG_1T_mCardArrayLength] = { 0x804,0x00000001, 0x808,0x0000fc00, 0x80c,0x0000000a, @@ -63799,7 +63085,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x814,0x020c3d10, 0x818,0x02200385, 0x81c,0x00000000, -@@ -8036,9 +6945,9 @@ u32 Rtl8192CUPHY_REG_1T_mCardArray[PHY_R +@@ -8036,9 +6945,9 @@ u32 Rtl8192CUPHY_REG_1T_mCardArray[PHY_REG_1T_mCardArrayLength] = { 0xc44,0x000100b7, 0xc48,0xec020107, 0xc4c,0x007f037f, @@ -63811,7 +63097,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xc5c,0x433c0094, 0xc60,0x00000000, 0xc64,0x5116848b, -@@ -8076,7 +6985,7 @@ u32 Rtl8192CUPHY_REG_1T_mCardArray[PHY_R +@@ -8076,7 +6985,7 @@ u32 Rtl8192CUPHY_REG_1T_mCardArray[PHY_REG_1T_mCardArrayLength] = { 0xce4,0x00000000, 0xce8,0x37644302, 0xcec,0x2f97d40c, @@ -63820,7 +63106,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xd04,0x00020401, 0xd08,0x0000907f, 0xd0c,0x20010201, -@@ -8152,7 +7061,7 @@ u32 Rtl8192CUPHY_REG_2T_mCardArray[PHY_R +@@ -8152,7 +7061,7 @@ u32 Rtl8192CUPHY_REG_2T_mCardArray[PHY_REG_2T_mCardArrayLength] = { 0x804,0x00000003, 0x808,0x0000fc00, 0x80c,0x0000000a, @@ -63829,7 +63115,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x814,0x020c3d10, 0x818,0x02200385, 0x81c,0x00000000, -@@ -8226,22 +7135,22 @@ u32 Rtl8192CUPHY_REG_2T_mCardArray[PHY_R +@@ -8226,22 +7135,22 @@ u32 Rtl8192CUPHY_REG_2T_mCardArray[PHY_REG_2T_mCardArrayLength] = { 0xc44,0x000100b7, 0xc48,0xec020107, 0xc4c,0x007f037f, @@ -63856,7 +63142,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0xc90,0x00121820, 0xc94,0x00000000, 0xc98,0x00121820, -@@ -8784,6 +7693,192 @@ u32 Rtl8192CURadioB_1TArray[RadioB_1TArr +@@ -8784,6 +7693,192 @@ u32 Rtl8192CURadioB_1TArray[RadioB_1TArrayLength] = { 0x0, }; @@ -64049,7 +63335,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 Rtl8192CURadioA_1T_mCardArray[RadioA_1T_mCardArrayLength] = { 0x000,0x00030159, 0x001,0x00031284, -@@ -9043,7 +8138,7 @@ u32 Rtl8192CURadioA_1T_HPArray[RadioA_1T +@@ -9043,7 +8138,7 @@ u32 Rtl8192CURadioA_1T_HPArray[RadioA_1T_HPArrayLength] = { 0x013,0x00028fb4, 0x013,0x00024fa8, 0x013,0x000207a4, @@ -64058,7 +63344,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x013,0x000183a4, 0x013,0x00014398, 0x013,0x000101a4, -@@ -9078,7 +8173,7 @@ u32 Rtl8192CURadioA_1T_HPArray[RadioA_1T +@@ -9078,7 +8173,7 @@ u32 Rtl8192CURadioA_1T_HPArray[RadioA_1T_HPArrayLength] = { u32 Rtl8192CURadioB_GM_Array[RadioB_GM_ArrayLength] = { 0x0, }; @@ -64067,7 +63353,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 Rtl8192CUMAC_2T_Array[MAC_2T_ArrayLength] = { 0x420,0x00000080, 0x423,0x00000000, -@@ -9153,10 +8248,11 @@ u32 Rtl8192CUMAC_2T_Array[MAC_2T_ArrayLe +@@ -9153,10 +8248,11 @@ u32 Rtl8192CUMAC_2T_Array[MAC_2T_ArrayLength] = { 0x608,0x0000000e, 0x609,0x0000002a, 0x652,0x00000020, @@ -64083,6 +63369,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release 0x66e,0x00000005, 0x700,0x00000021, 0x701,0x00000043, +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.c +index f39b4cb..0d7af4a 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.c @@ -16,8 +16,7 @@ @@ -65296,6 +64584,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.c +index 4285d60..1119cf8 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.c @@ -16,8 +16,7 @@ @@ -65308,7 +64598,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTL8192CU_RECV_C_ #include #include -@@ -150,12 +149,7 @@ int rtl8192cu_init_recv_priv(_adapter *p +@@ -150,12 +149,7 @@ int rtl8192cu_init_recv_priv(_adapter *padapter) for(i=0; ifree_recv_skb_queue)); } @@ -65340,7 +64630,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif -@@ -232,149 +226,4 @@ void rtl8192cu_free_recv_priv (_adapter +@@ -232,149 +226,4 @@ void rtl8192cu_free_recv_priv (_adapter *padapter) } @@ -65490,6 +64780,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -} +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.c +index c276b51..3a4137b 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.c @@ -16,8 +16,7 @@ @@ -65502,7 +64794,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _RTL8192C_XMIT_C_ #include #include -@@ -95,7 +94,7 @@ u32 rtw_get_ff_hwaddr(struct xmit_frame +@@ -95,7 +94,7 @@ u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe) int urb_zero_packet_chk(_adapter *padapter, int sz) { int blnSetTxDescOffset; @@ -65511,7 +64803,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( pdvobj->ishighspeed ) { -@@ -165,7 +164,7 @@ void fill_txdesc_sectype(struct pkt_attr +@@ -165,7 +164,7 @@ void fill_txdesc_sectype(struct pkt_attrib *pattrib, struct tx_desc *ptxdesc) } @@ -65520,7 +64812,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { //DBG_8192C("cvs_mode=%d\n", pattrib->vcs_mode); -@@ -182,14 +181,27 @@ void fill_txdesc_vcs(struct pkt_attrib * +@@ -182,14 +181,27 @@ void fill_txdesc_vcs(struct pkt_attrib *pattrib, u32 *pdw) break; } @@ -65530,12 +64822,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } + if(pattrib->vcs_mode) { + *pdw |= cpu_to_le32(BIT(13)); -+ + + // Set RTS BW + if(pattrib->ht_en) + { + *pdw |= (pattrib->bwmode&HT_CHANNEL_WIDTH_40)? cpu_to_le32(BIT(27)):0; - ++ + if(pattrib->ch_offset == HAL_PRIME_CHNL_OFFSET_LOWER) + *pdw |= cpu_to_le32((0x01<<28)&0x30000000); + else if(pattrib->ch_offset == HAL_PRIME_CHNL_OFFSET_UPPER) @@ -65553,7 +64845,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { //DBG_8192C("bwmode=%d, ch_off=%d\n", pattrib->bwmode, pattrib->ch_offset); -@@ -198,220 +210,17 @@ void fill_txdesc_phy(struct pkt_attrib * +@@ -198,220 +210,17 @@ void fill_txdesc_phy(struct pkt_attrib *pattrib, u32 *pdw) *pdw |= (pattrib->bwmode&HT_CHANNEL_WIDTH_40)? cpu_to_le32(BIT(25)):0; if(pattrib->ch_offset == HAL_PRIME_CHNL_OFFSET_LOWER) @@ -65566,10 +64858,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release *pdw |= 0; else - *pdw |= cpu_to_le32((0x03<<20)&0x003f0000); -+ *pdw |= cpu_to_le32((0x03<<20)&0x00300000); - } - } - +- } +-} +- -#ifdef CONFIG_USB_TX_AGGREGATION -static void _update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, int sz) -{ @@ -65767,18 +65058,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { - ptxdesc->txdw4 |= cpu_to_le32(BIT(7)); // Hw set sequence number - ptxdesc->txdw3 |= cpu_to_le32((8 <<28)); //set bit3 to 1. Suugested by TimChen. 2009.12.29. -- } ++ *pdw |= cpu_to_le32((0x03<<20)&0x00300000); + } - - rtl8192cu_cal_txdesc_chksum(ptxdesc); --} + } -#endif -- + -static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) +static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bagg_pkt) { int pull=0; uint qsel; -@@ -422,17 +231,19 @@ static s32 update_txdesc(struct xmit_fra +@@ -422,17 +231,19 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) struct dm_priv *pdmpriv = &pHalData->dmpriv; struct tx_desc *ptxdesc = (struct tx_desc *)pmem; struct ht_priv *phtpriv = &pmlmepriv->htpriv; @@ -65800,7 +65092,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif // CONFIG_USE_USB_BUFFER_ALLOC_TX -@@ -452,14 +263,13 @@ static s32 update_txdesc(struct xmit_fra +@@ -452,14 +263,13 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) fill_txdesc_sectype(pattrib, ptxdesc); @@ -65816,7 +65108,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //offset 12 ptxdesc->txdw3 |= cpu_to_le32((pattrib->seqnum<<16)&0xffff0000); -@@ -480,26 +290,9 @@ static s32 update_txdesc(struct xmit_fra +@@ -480,26 +290,9 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) ptxdesc->txdw5 |= cpu_to_le32(0x0001ff00);// //ptxdesc->txdw5 |= cpu_to_le32(0x0000000b);//DataRate - 54M @@ -65844,7 +65136,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(0)//for driver dbg { ptxdesc->txdw4 |= cpu_to_le32(BIT(8));//driver uses rate -@@ -521,20 +314,13 @@ static s32 update_txdesc(struct xmit_fra +@@ -521,20 +314,13 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) ptxdesc->txdw4 |= cpu_to_le32(BIT(8));//driver uses rate @@ -65868,7 +65160,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_TCP_CSUM_OFFLOAD_TX if ( pattrib->hw_tcp_csum == 1 ) { // ptxdesc->txdw6 = 0; // clear TCP_CHECKSUM and IP_CHECKSUM. It's zero already!! -@@ -559,6 +345,15 @@ static s32 update_txdesc(struct xmit_fra +@@ -559,6 +345,15 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) //fill_txdesc_sectype(pattrib, ptxdesc); //offset 8 @@ -65884,7 +65176,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //offset 12 ptxdesc->txdw3 |= cpu_to_le32((pattrib->seqnum<<16)&0xffff0000); -@@ -569,26 +364,34 @@ static s32 update_txdesc(struct xmit_fra +@@ -569,26 +364,34 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) //offset 20 ptxdesc->txdw5 |= cpu_to_le32(BIT(17));//retry limit enable if(pattrib->retry_ctrl == _TRUE) @@ -65930,7 +65222,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else if((pxmitframe->frame_tag&0x0f) == TXAGG_FRAMETAG) { -@@ -618,6 +421,7 @@ static s32 update_txdesc(struct xmit_fra +@@ -618,6 +421,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) ptxdesc->txdw4 |= cpu_to_le32(BIT(8));//driver uses rate //offset 20 @@ -65938,7 +65230,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } // 2009.11.05. tynli_test. Suggested by SD4 Filen for FW LPS. -@@ -647,7 +451,14 @@ static s32 update_txdesc(struct xmit_fra +@@ -647,7 +451,14 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("offset0-txdesc=0x%x\n", ptxdesc->txdw0)); //offset 4 @@ -65954,7 +65246,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtl8192cu_cal_txdesc_chksum(ptxdesc); -@@ -655,8 +466,10 @@ static s32 update_txdesc(struct xmit_fra +@@ -655,8 +466,10 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) } @@ -65966,7 +65258,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int t, sz, w_sz, pull=0; u8 *mem_addr; u32 ff_hwaddr; -@@ -679,6 +492,9 @@ static void _rtw_dump_xframe(_adapter *p +@@ -679,6 +492,9 @@ static void _rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe, for (t = 0; t < pattrib->nr_frags; t++) { @@ -65976,7 +65268,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (t != (pattrib->nr_frags - 1)) { RT_TRACE(_module_rtl871x_xmit_c_,_drv_err_,("pattrib->nr_frags=%d\n", pattrib->nr_frags)); -@@ -691,7 +507,7 @@ static void _rtw_dump_xframe(_adapter *p +@@ -691,7 +507,7 @@ static void _rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe, sz = pattrib->last_txcmdsz; } @@ -65985,7 +65277,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pull) { -@@ -709,10 +525,7 @@ static void _rtw_dump_xframe(_adapter *p +@@ -709,10 +525,7 @@ static void _rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe, ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe); @@ -65997,7 +65289,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_count_tx_stats(padapter, pxmitframe, sz); -@@ -726,18 +539,12 @@ static void _rtw_dump_xframe(_adapter *p +@@ -726,18 +539,12 @@ static void _rtw_dump_xframe(_adapter *padapter, struct xmit_frame *pxmitframe, } @@ -66020,7 +65312,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #ifdef CONFIG_USB_TX_AGGREGATION -@@ -767,7 +574,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -767,7 +574,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv struct xmit_frame *pfirstframe = NULL; // aggregate variable @@ -66029,7 +65321,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct sta_info *psta = NULL; struct tx_servq *ptxservq = NULL; -@@ -801,7 +608,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -801,7 +608,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv //3 1. pick up first frame do { @@ -66038,7 +65330,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pxmitframe = rtw_dequeue_xframe(pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); if (pxmitframe == NULL) { -@@ -816,7 +623,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -816,7 +623,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_, ("xmitframe_complete: frame tag(%d) is not DATA_FRAMETAG(%d)!\n", pxmitframe->frame_tag, DATA_FRAMETAG)); @@ -66047,7 +65339,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release continue; } -@@ -826,7 +633,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -826,7 +633,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_, ("xmitframe_complete: TID(%d) should be 0~15!\n", pxmitframe->attrib.priority)); @@ -66056,7 +65348,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release continue; } #endif -@@ -838,15 +645,12 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -838,15 +645,12 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv //pxmitframe->agg_num = 1; // alloc xmitframe should assign to 1. pxmitframe->pkt_offset = 1; // first frame of aggregation, reserve offset @@ -66076,7 +65368,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // always return ndis_packet after rtw_xmitframe_coalesce rtw_os_xmit_complete(padapter, pxmitframe); -@@ -876,26 +680,26 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -876,26 +680,26 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv case 1: case 2: ptxservq = &(psta->sta_xmitpriv.bk_q); @@ -66107,7 +65399,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; } -@@ -913,6 +717,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -913,6 +717,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv rtw_list_delete(&pxmitframe->list); ptxservq->qcnt--; @@ -66115,7 +65407,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef IDEA_CONDITION // suppose only data frames would be in queue -@@ -920,7 +725,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -920,7 +725,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_, ("xmitframe_complete: frame tag(%d) is not DATA_FRAMETAG(%d)!\n", pxmitframe->frame_tag, DATA_FRAMETAG)); @@ -66124,7 +65416,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release continue; } -@@ -930,7 +735,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -930,7 +735,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv RT_TRACE(_module_rtl8192c_xmit_c_, _drv_err_, ("xmitframe_complete: TID(%d) should be 0~15!\n", pxmitframe->attrib.priority)); @@ -66133,7 +65425,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release continue; } #endif -@@ -941,24 +746,20 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -941,24 +746,20 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv pxmitframe->agg_num = 0; // not first frame of aggregation pxmitframe->pkt_offset = 0; // not first frame of aggregation, no need to reserve offset @@ -66163,7 +65455,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // handle pointer and stop condition pbuf_tail = pbuf + len; -@@ -998,7 +799,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -998,7 +799,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv pfirstframe->pkt_offset = 0; } #endif // CONFIG_USE_USB_BUFFER_ALLOC_TX @@ -66172,7 +65464,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //3 4. write xmit buffer to USB FIFO ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe); -@@ -1013,7 +814,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -1013,7 +814,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv rtw_count_tx_stats(padapter, pfirstframe, pbuf_tail); @@ -66181,7 +65473,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _TRUE; } -@@ -1063,7 +864,7 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -1063,7 +864,7 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv } rtw_os_xmit_complete(padapter, pxmitframe);//always return ndis_packet after rtw_xmitframe_coalesce @@ -66190,7 +65482,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("xmitframe_complete(): rtw_dump_xframe\n")); -@@ -1071,12 +872,12 @@ s32 rtl8192cu_xmitframe_complete(_adapte +@@ -1071,12 +872,12 @@ s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv if(res == _SUCCESS) { @@ -66205,7 +65497,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } xcnt++; -@@ -1125,15 +926,22 @@ static s32 pre_xmitframe(_adapter *padap +@@ -1125,15 +926,22 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe) struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -66230,7 +65522,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv); if (pxmitbuf == NULL) -@@ -1147,7 +955,7 @@ static s32 pre_xmitframe(_adapter *padap +@@ -1147,7 +955,7 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe) if (xmitframe_direct(padapter, pxmitframe) != _SUCCESS) { rtw_free_xmitbuf(pxmitpriv, pxmitbuf); @@ -66260,7 +65552,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } /* -@@ -1184,6 +992,30 @@ s32 rtl8192cu_hal_xmit(_adapter *padapte +@@ -1184,6 +992,30 @@ s32 rtl8192cu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe) return pre_xmitframe(padapter, pxmitframe); } @@ -66291,7 +65583,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_HOSTAPD_MLME static void rtl8192cu_hostap_mgnt_xmit_cb(struct urb *urb) -@@ -1193,7 +1025,7 @@ static void rtl8192cu_hostap_mgnt_xmit_c +@@ -1193,7 +1025,7 @@ static void rtl8192cu_hostap_mgnt_xmit_cb(struct urb *urb) //DBG_8192C("%s\n", __FUNCTION__); @@ -66300,7 +65592,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif } -@@ -1211,7 +1043,7 @@ s32 rtl8192cu_hostap_mgnt_xmit_entry(_ad +@@ -1211,7 +1043,7 @@ s32 rtl8192cu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt) struct hostapd_priv *phostapdpriv = padapter->phostapdpriv; struct net_device *pnetdev = padapter->pnetdev; HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); @@ -66309,7 +65601,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //DBG_8192C("%s\n", __FUNCTION__); -@@ -1226,11 +1058,7 @@ s32 rtl8192cu_hostap_mgnt_xmit_entry(_ad +@@ -1226,11 +1058,7 @@ s32 rtl8192cu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt) if ((fc & RTW_IEEE80211_FCTL_FTYPE) != RTW_IEEE80211_FTYPE_MGMT) goto _exit; @@ -66322,7 +65614,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(!pxmit_skb) goto _exit; -@@ -1311,7 +1139,7 @@ s32 rtl8192cu_hostap_mgnt_xmit_entry(_ad +@@ -1311,7 +1139,7 @@ s32 rtl8192cu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt) _exit: @@ -66331,6 +65623,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c +index 6cac2d5..ff89473 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_halinit.c @@ -16,7 +16,7 @@ @@ -66471,7 +65765,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if((value8 >> USB_NORMAL_SIE_EP_SHIFT) & USB_NORMAL_SIE_EP_MASK){ pHalData->OutEpQueueSel |= TX_SELE_NQ; pHalData->OutEpNumber++; -@@ -328,38 +262,18 @@ static BOOLEAN HalUsbSetQueuePipeMapping +@@ -328,38 +262,18 @@ static BOOLEAN HalUsbSetQueuePipeMapping8192CUsb( { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); BOOLEAN result = _FALSE; @@ -66515,7 +65809,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return result; -@@ -368,7 +282,7 @@ static BOOLEAN HalUsbSetQueuePipeMapping +@@ -368,7 +282,7 @@ static BOOLEAN HalUsbSetQueuePipeMapping8192CUsb( void rtl8192cu_interface_configure(_adapter *padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); @@ -66524,7 +65818,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (pdvobjpriv->ishighspeed == _TRUE) { -@@ -399,8 +313,13 @@ void rtl8192cu_interface_configure(_adap +@@ -399,8 +313,13 @@ void rtl8192cu_interface_configure(_adapter *padapter) pHalData->UsbRxAggPageTimeout = 0x4; //6, absolute time = 34ms/(2^6) #endif @@ -66540,7 +65834,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -570,7 +489,6 @@ static void _InitPABias(_adapter *padapt +@@ -570,7 +489,6 @@ static void _InitPABias(_adapter *padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); u8 pa_setting; @@ -66548,7 +65842,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release BOOLEAN is92C = IS_92C_SERIAL(pHalData->VersionID); //FIXED PA current issue -@@ -581,19 +499,19 @@ static void _InitPABias(_adapter *padapt +@@ -581,19 +499,19 @@ static void _InitPABias(_adapter *padapter) if(!(pa_setting & BIT0)) { @@ -66905,7 +66199,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 is92C = IS_92C_SERIAL(pHalData->VersionID); rt_rf_power_state eRfPowerStateToSet; #ifdef CONFIG_BT_COEXIST -@@ -2244,7 +2035,6 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOW +@@ -2244,7 +2035,6 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_DOWNLOAD_FW); //HalDetectPwrDownMode(Adapter); // 2010/08/26 MH If Efuse does not support sective suspend then disable the function. //HalDetectSelectiveSuspendMode(Adapter); @@ -66913,7 +66207,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Set RF type for BB/RF configuration _InitRFType(Adapter);//->_ReadRFType() -@@ -2258,8 +2048,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INI +@@ -2258,8 +2048,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_LLTT); boundary = TX_PAGE_BOUNDARY; } else{// for WMM @@ -66923,7 +66217,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } status = InitLLTTable(Adapter, boundary); if(status == _FAIL){ -@@ -2281,7 +2070,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MIS +@@ -2281,7 +2070,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC02); _InitDriverInfoSize(Adapter, DRVINFO_SZ); _InitInterrupt(Adapter); @@ -66932,7 +66226,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _InitNetworkType(Adapter);//set msr _InitWMACSetting(Adapter); _InitAdaptiveCtrl(Adapter); -@@ -2340,16 +2129,16 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_RF) +@@ -2340,16 +2129,16 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_RF); if(IS_VENDOR_UMC_A_CUT(pHalData->VersionID) && !IS_92C_SERIAL(pHalData->VersionID)) { @@ -66953,7 +66247,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_TURN_ON_BLOCK); _BBTurnOnBlock(Adapter); -@@ -2424,7 +2213,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MIS +@@ -2424,7 +2213,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC11); // Those action will be discard in MgntActSet_RF_State because off the same state //for(eRFPath = 0; eRFPath NumTotalRFPath; eRFPath++) @@ -66962,7 +66256,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else if(pwrctrlpriv->rfoff_reason > RF_CHANGE_BY_PS) { // H/W or S/W RF OFF before sleep. -@@ -2462,7 +2251,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MIS +@@ -2462,7 +2251,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC11); pwrctrlpriv->rfoff_reason = 0; pwrctrlpriv->b_hw_radio_off = _FALSE; pwrctrlpriv->rf_pwrstate = rf_on; @@ -66971,7 +66265,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -2478,7 +2267,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MIS +@@ -2478,7 +2267,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC11); // our HW will be set in power-down mode if PDn source from all functions are configured. // 2010.10.06. // @@ -66980,7 +66274,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //{ // u1bTmp = rtw_read8(Adapter, REG_MULTI_FUNC_CTRL); // rtw_write8(Adapter, REG_MULTI_FUNC_CTRL, (u1bTmp|WL_HWPDN_EN)); -@@ -2572,23 +2361,20 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INI +@@ -2572,23 +2361,20 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_HAL_DM); HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC31); rtw_write8(Adapter, 0x15, 0xe9);//suggest by Johnny for lower temperature @@ -67256,7 +66550,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //reset BB value16 = rtw_read16(Adapter, REG_SYS_FUNC_EN); value16 &= ~(FEN_BBRSTB | FEN_BB_GLB_RSTn); -@@ -3072,11 +2857,12 @@ e. SYS_FUNC_EN 0x02[7:0] = 0x14 //reset +@@ -3072,11 +2857,12 @@ e. SYS_FUNC_EN 0x02[7:0] = 0x14 //reset BB state machine ***************************************/ u8 eRFPath = 0,value8 = 0; rtw_write8(Adapter, REG_TXPAUSE, 0xFF); @@ -67271,7 +66565,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release value8 = 0 ; value8 |=( FEN_USBD | FEN_USBA | FEN_BB_GLB_RSTn); rtw_write8(Adapter, REG_SYS_FUNC_EN,value8 );//0x16 -@@ -3435,7 +3221,7 @@ unsigned int rtl8192cu_inirp_init(PADAPT +@@ -3435,7 +3221,7 @@ unsigned int rtl8192cu_inirp_init(PADAPTER Adapter) u8 i; struct recv_buf *precvbuf; uint status; @@ -67280,7 +66574,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct intf_hdl * pintfhdl=&Adapter->iopriv.intf; struct recv_priv *precvpriv = &(Adapter->recvpriv); u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem); -@@ -3498,69 +3284,6 @@ unsigned int rtl8192cu_inirp_deinit(PADA +@@ -3498,69 +3284,6 @@ unsigned int rtl8192cu_inirp_deinit(PADAPTER Adapter) return _SUCCESS; } @@ -67499,7 +66793,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // readAdapterInfo_8723U(Adapter); //else readAdapterInfo_8192CU(Adapter); -@@ -4287,7 +3977,7 @@ static int _ReadAdapterInfo8192CU(PADAPT +@@ -4287,7 +3977,7 @@ static int _ReadAdapterInfo8192CU(PADAPTER Adapter) //Efuse_InitSomeVar(Adapter); @@ -67508,7 +66802,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // _EfuseCellSel(Adapter); _ReadRFType(Adapter);//rf_chip -> _InitRFType() -@@ -4339,20 +4029,8 @@ static void ResumeTxBeacon(_adapter *pad +@@ -4339,20 +4029,8 @@ static void ResumeTxBeacon(_adapter *padapter) // 2010.03.01. Marked by tynli. No need to call workitem beacause we record the value // which should be read from register to a global variable. @@ -67531,7 +66825,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void StopTxBeacon(_adapter *padapter) -@@ -4362,19 +4040,8 @@ static void StopTxBeacon(_adapter *padap +@@ -4362,19 +4040,8 @@ static void StopTxBeacon(_adapter *padapter) // 2010.03.01. Marked by tynli. No need to call workitem beacause we record the value // which should be read from register to a global variable. @@ -67873,7 +67167,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release content=0; } DBG_8192C("\nrtw_wowlan_set_pattern offset[0] content 0x%x [cpu_to_le32 0x%x]\n", content,__cpu_to_le32(content)); -@@ -4624,6 +4553,374 @@ void rtw_wowlan_reload_pattern(_adapter +@@ -4624,6 +4553,374 @@ void rtw_wowlan_reload_pattern(_adapter *padapter){ } #endif //CONFIG_WOWLAN @@ -68578,11 +67872,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + case HW_VAR_ON_RCR_AM: + rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_AM); + DBG_871X("%s, %d, RCR= %x \n", __FUNCTION__,__LINE__, rtw_read32(Adapter, REG_RCR)); -+ break; + break; + case HW_VAR_OFF_RCR_AM: + rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)& (~RCR_AM)); + DBG_871X("%s, %d, RCR= %x \n", __FUNCTION__,__LINE__, rtw_read32(Adapter, REG_RCR)); - break; ++ break; + case HW_VAR_BEACON_INTERVAL: rtw_write16(Adapter, REG_BCN_INTERVAL, *((u16 *)val)); @@ -68811,7 +68105,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release default: //RT_TRACE(COMP_INIT, DBG_WARNING, ("GetHalDefVar8192CUsb(): Unkown variable: %d!\n", eVariable)); bResult = _FALSE; -@@ -5724,6 +5924,7 @@ void _update_response_rate(_adapter *pad +@@ -5724,6 +5924,7 @@ void _update_response_rate(_adapter *padapter,unsigned int mask) // Set RRSR rate table. rtw_write8(padapter, REG_RRSR, mask&0xff); rtw_write8(padapter,REG_RRSR+1, (mask>>8)&0xff); @@ -68819,7 +68113,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Set RTS initial rate while(mask > 0x1) -@@ -5766,6 +5967,9 @@ void UpdateHalRAMask8192CUsb(PADAPTER pa +@@ -5766,6 +5967,9 @@ void UpdateHalRAMask8192CUsb(PADAPTER padapter, u32 mac_id) switch (mac_id) { case 0:// for infra mode @@ -68829,7 +68123,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release supportRateNum = rtw_get_rateset_len(cur_network->SupportedRates); networkType = judge_network_type(padapter, cur_network->SupportedRates, supportRateNum) & 0xf; //pmlmeext->cur_wireless_mode = networkType; -@@ -5796,17 +6000,29 @@ void UpdateHalRAMask8192CUsb(PADAPTER pa +@@ -5796,17 +6000,29 @@ void UpdateHalRAMask8192CUsb(PADAPTER padapter, u32 mac_id) break; default: //for each sta in IBSS @@ -68869,7 +68163,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #ifdef CONFIG_BT_COEXIST -@@ -5942,6 +6158,7 @@ static void rtl8192cu_init_default_value +@@ -5942,6 +6158,7 @@ static void rtl8192cu_init_default_value(_adapter * padapter) for(i = 0; i < HP_THERMAL_NUM; i++) pdmpriv->ThermalValue_HP[i] = 0; } @@ -68877,7 +68171,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static u8 rtl8192cu_ps_func(PADAPTER Adapter,HAL_INTF_PS_FUNC efunc_id, u8 *val) { u8 bResult = _TRUE; -@@ -5949,10 +6166,10 @@ static u8 rtl8192cu_ps_func(PADAPTER Ada +@@ -5949,10 +6166,10 @@ static u8 rtl8192cu_ps_func(PADAPTER Adapter,HAL_INTF_PS_FUNC efunc_id, u8 *val) #if defined(CONFIG_AUTOSUSPEND) && defined(SUPPORT_HW_RFOFF_DETECTED) case HAL_USB_SELECT_SUSPEND: @@ -68890,7 +68184,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; #endif //CONFIG_AUTOSUSPEND && SUPPORT_HW_RFOFF_DETECTED -@@ -5961,6 +6178,7 @@ static u8 rtl8192cu_ps_func(PADAPTER Ada +@@ -5961,6 +6178,7 @@ static u8 rtl8192cu_ps_func(PADAPTER Adapter,HAL_INTF_PS_FUNC efunc_id, u8 *val) } return bResult; } @@ -68942,6 +68236,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtl8192c_set_hal_ops(pHalFunc); _func_exit_; +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_ce.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_ce.c +index 4d01b3c..9523337 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_ce.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_ce.c @@ -16,8 +16,7 @@ @@ -68963,6 +68259,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 1 +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_linux.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_linux.c +index d6f3376..2d627d3 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_linux.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_linux.c @@ -16,8 +16,7 @@ @@ -69021,7 +68319,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned int pipe; int status = 0; -@@ -84,6 +53,16 @@ static int usbctrl_vendorreq(struct dvob +@@ -84,6 +53,16 @@ static int usbctrl_vendorreq(struct dvobj_priv *pdvobjpriv, u8 request, u16 val u8 tmp_buf[MAX_USB_IO_CTL_SIZE]; #endif @@ -69038,7 +68336,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //DBG_871X("%s %s:%d\n",__FUNCTION__, current->comm, current->pid); if((padapter->bSurpriseRemoved) ||(padapter->pwrctrlpriv.pnp_bstop_trx)){ -@@ -153,7 +132,7 @@ static int usbctrl_vendorreq(struct dvob +@@ -153,7 +132,7 @@ static int usbctrl_vendorreq(struct dvobj_priv *pdvobjpriv, u8 request, u16 val if ( status == len) // Success this control transfer. { @@ -69047,7 +68345,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( requesttype == 0x01 ) { // For Control read transfer, we have to copy the read data from pIo_buf to pdata. _rtw_memcpy( pdata, pIo_buf, len ); -@@ -186,7 +165,7 @@ static int usbctrl_vendorreq(struct dvob +@@ -186,7 +165,7 @@ static int usbctrl_vendorreq(struct dvobj_priv *pdvobjpriv, u8 request, u16 val } } @@ -69056,7 +68354,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->bSurpriseRemoved = _TRUE; break; } -@@ -220,8 +199,7 @@ static u8 usb_read8(struct intf_hdl *pin +@@ -220,8 +199,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) u16 wvalue; u16 index; u16 len; @@ -69066,7 +68364,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -232,7 +210,7 @@ static u8 usb_read8(struct intf_hdl *pin +@@ -232,7 +210,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr) wvalue = (u16)(addr&0x0000ffff); len = 1; @@ -69075,7 +68373,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -248,7 +226,6 @@ static u16 usb_read16(struct intf_hdl *p +@@ -248,7 +226,6 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) u16 index; u16 len; u32 data=0; @@ -69083,7 +68381,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -259,7 +236,7 @@ static u16 usb_read16(struct intf_hdl *p +@@ -259,7 +236,7 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr) wvalue = (u16)(addr&0x0000ffff); len = 2; @@ -69092,7 +68390,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -275,7 +252,6 @@ static u32 usb_read32(struct intf_hdl *p +@@ -275,7 +252,6 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) u16 index; u16 len; u32 data=0; @@ -69100,7 +68398,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -286,7 +262,7 @@ static u32 usb_read32(struct intf_hdl *p +@@ -286,7 +262,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr) wvalue = (u16)(addr&0x0000ffff); len = 4; @@ -69109,7 +68407,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -303,7 +279,6 @@ static int usb_write8(struct intf_hdl *p +@@ -303,7 +279,6 @@ static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) u16 len; u32 data; int ret; @@ -69117,7 +68415,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -317,7 +292,7 @@ static int usb_write8(struct intf_hdl *p +@@ -317,7 +292,7 @@ static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val) data = val; data = cpu_to_le32(data&0x000000ff); @@ -69126,7 +68424,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -334,7 +309,6 @@ static int usb_write16(struct intf_hdl * +@@ -334,7 +309,6 @@ static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) u16 len; u32 data; int ret; @@ -69134,7 +68432,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -348,7 +322,7 @@ static int usb_write16(struct intf_hdl * +@@ -348,7 +322,7 @@ static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val) data = val; data = cpu_to_le32(data&0x0000ffff); @@ -69143,7 +68441,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -365,7 +339,6 @@ static int usb_write32(struct intf_hdl * +@@ -365,7 +339,6 @@ static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) u16 len; u32 data; int ret; @@ -69151,7 +68449,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -378,14 +351,14 @@ static int usb_write32(struct intf_hdl * +@@ -378,14 +351,14 @@ static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val) data = cpu_to_le32(val); @@ -69168,7 +68466,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata) { u8 request; -@@ -395,7 +368,6 @@ static int usb_writeN(struct intf_hdl *p +@@ -395,7 +368,6 @@ static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata u16 len; u8 buf[VENDOR_CMD_MAX_DATA_LEN]={0}; int ret; @@ -69176,7 +68474,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -407,7 +379,7 @@ static int usb_writeN(struct intf_hdl *p +@@ -407,7 +379,7 @@ static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata len = length; _rtw_memcpy(buf, pdata, len ); @@ -69185,7 +68483,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -415,271 +387,6 @@ static int usb_writeN(struct intf_hdl *p +@@ -415,271 +387,6 @@ static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata } @@ -69457,7 +68755,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_USB_INTERRUPT_IN_PIPE static void usb_read_interrupt_complete(struct urb *purb, struct pt_regs *regs) { -@@ -731,8 +438,8 @@ static u32 usb_read_interrupt(struct int +@@ -731,8 +438,8 @@ static u32 usb_read_interrupt(struct intf_hdl *pintfhdl, u32 addr) int err; unsigned int pipe; u32 ret = _SUCCESS; @@ -69693,7 +68991,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); struct recv_priv *precvpriv = &padapter->recvpriv; _queue *pfree_recv_queue = &precvpriv->free_recv_queue; -@@ -795,28 +705,41 @@ static int recvbuf2recvframe(_adapter *p +@@ -795,28 +705,41 @@ static int recvbuf2recvframe(_adapter *padapter, struct recv_buf *precvbuf) ("recvbuf2recvframe: rxdesc=offsset 0:0x%08x, 4:0x%08x, 8:0x%08x, C:0x%08x\n", prxstat->rxdw0, prxstat->rxdw1, prxstat->rxdw2, prxstat->rxdw4)); @@ -69701,9 +68999,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pkt_len = le32_to_cpu(prxstat->rxdw0)&0x00003fff; - + prxstat = (struct recv_stat *)pbuf; - -- mf = (le32_to_cpu(prxstat->rxdw1) >> 27) & 0x1;//more fragment bit -- frag = (le32_to_cpu(prxstat->rxdw2) >> 12) & 0xf;//fragmentation number ++ + precvframe = rtw_alloc_recvframe(pfree_recv_queue); + if(precvframe==NULL) + { @@ -69716,11 +69012,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + precvframe->u.hdr.precvbuf = NULL; //can't access the precvbuf for new arch. + precvframe->u.hdr.len=0; +- mf = (le32_to_cpu(prxstat->rxdw1) >> 27) & 0x1;//more fragment bit +- frag = (le32_to_cpu(prxstat->rxdw2) >> 12) & 0xf;//fragmentation number ++ rtl8192c_query_rx_desc_status(precvframe, prxstat); + - drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16; - drvinfo_sz = drvinfo_sz << 3;//uint (2^3) = 8 bytes; REG_RX_DRVINFO_SZ - RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("recvbuf2recvframe: DRV_INFO_SIZE=%d\n", drvinfo_sz)); -+ rtl8192c_query_rx_desc_status(precvframe, prxstat); -+ + pattrib = &precvframe->u.hdr.attrib; + if(pattrib->physt) + { @@ -69747,7 +69045,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { shift_sz = 6; } -@@ -825,23 +748,11 @@ static int recvbuf2recvframe(_adapter *p +@@ -825,23 +748,11 @@ static int recvbuf2recvframe(_adapter *padapter, struct recv_buf *precvbuf) shift_sz = 0; } @@ -69773,7 +69071,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //alloc_sz = 1664; //1664 is 128 alignment. if(skb_len <= 1650) alloc_sz = 1664; -@@ -854,27 +765,24 @@ static int recvbuf2recvframe(_adapter *p +@@ -854,27 +765,24 @@ static int recvbuf2recvframe(_adapter *padapter, struct recv_buf *precvbuf) // 8 is for skb->data 4 bytes alignment. alloc_sz += 14; } @@ -69809,13 +69107,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //precvframe->u.hdr.rx_head = precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pbuf; //precvframe->u.hdr.rx_end = pbuf + (pkt_offset>1612?pkt_offset:1612); -@@ -903,13 +811,30 @@ static int recvbuf2recvframe(_adapter *p +@@ -901,15 +809,32 @@ static int recvbuf2recvframe(_adapter *padapter, struct recv_buf *precvbuf) + default: + break; } - #endif - +-#endif +- - //because the endian issue, driver avoid reference to the rxstat after calling update_recvframe_attrib_from_recvstat(); - rtl8192cu_update_recvframe_attrib_from_recvstat(precvframe, prxstat); - ++#endif ++ +#ifdef CONFIG_CONCURRENT_MODE + if(rtw_buddy_adapter_up(padapter)) + { @@ -69843,7 +69145,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pkt_cnt--; transfer_len -= pkt_offset; -@@ -924,7 +849,7 @@ static int recvbuf2recvframe(_adapter *p +@@ -924,7 +849,7 @@ static int recvbuf2recvframe(_adapter *padapter, struct recv_buf *precvbuf) _exit_recvbuf2recvframe: @@ -69852,7 +69154,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } void rtl8192cu_recv_tasklet(void *priv) -@@ -977,7 +902,7 @@ static void usb_read_port_complete(struc +@@ -977,7 +902,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) } else { @@ -69861,7 +69163,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release precvbuf->transfer_len = purb->actual_length; -@@ -993,7 +918,7 @@ static void usb_read_port_complete(struc +@@ -993,7 +918,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) DBG_8192C("###=> usb_read_port_complete => urb status(%d)\n", purb->status); @@ -69870,7 +69172,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->bSurpriseRemoved = _TRUE; } -@@ -1009,6 +934,10 @@ static void usb_read_port_complete(struc +@@ -1009,6 +934,10 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n")); break; case -EPROTO: @@ -69881,7 +69183,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef DBG_CONFIG_ERROR_DETECT { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); -@@ -1037,10 +966,10 @@ static u32 usb_read_port(struct intf_hdl +@@ -1037,10 +966,10 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) int err; unsigned int pipe; u32 ret = _SUCCESS; @@ -69914,7 +69216,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); struct recv_priv *precvpriv = &padapter->recvpriv; _queue *pfree_recv_queue = &precvpriv->free_recv_queue; -@@ -1116,7 +1047,7 @@ static int recvbuf2recvframe(_adapter *p +@@ -1116,7 +1047,7 @@ static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb) prxstat = (struct recv_stat *)pbuf; pkt_cnt = (le32_to_cpu(prxstat->rxdw2)>>16) & 0xff; @@ -69923,7 +69225,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 0 //temp remove when disable usb rx aggregation if((pkt_cnt > 10) || (pkt_cnt < 1) || (transfer_lenrxdw0, prxstat->rxdw1, prxstat->rxdw2, prxstat->rxdw4)); @@ -69976,7 +69278,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { shift_sz = 6; } -@@ -1158,23 +1103,11 @@ static int recvbuf2recvframe(_adapter *p +@@ -1158,23 +1103,11 @@ static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb) shift_sz = 0; } @@ -70002,7 +69304,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //alloc_sz = 1664; //1664 is 128 alignment. if(skb_len <= 1650) alloc_sz = 1664; -@@ -1187,26 +1120,24 @@ static int recvbuf2recvframe(_adapter *p +@@ -1187,26 +1120,24 @@ static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb) // 8 is for skb->data 4 bytes alignment. alloc_sz += 14; } @@ -70037,7 +69339,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pkt_copy) { precvframe->u.hdr.rx_head = precvframe->u.hdr.rx_data = precvframe->u.hdr.rx_tail = pbuf; -@@ -1214,7 +1145,8 @@ static int recvbuf2recvframe(_adapter *p +@@ -1214,7 +1145,8 @@ static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb) } else { @@ -70047,7 +69349,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto _exit_recvbuf2recvframe; } } -@@ -1238,13 +1170,30 @@ static int recvbuf2recvframe(_adapter *p +@@ -1238,13 +1170,30 @@ static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb) } #endif @@ -70110,7 +69412,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif } -@@ -1331,10 +1277,11 @@ static void usb_read_port_complete(struc +@@ -1331,10 +1277,11 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) #else if(precvbuf->pskb){ DBG_8192C("==> free skb(%p)\n",precvbuf->pskb); @@ -70124,7 +69426,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit; } -@@ -1345,10 +1292,11 @@ static void usb_read_port_complete(struc +@@ -1345,10 +1292,11 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete: (purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)\n")); precvbuf->reuse = _TRUE; rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); @@ -70137,7 +69439,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release precvbuf->transfer_len = purb->actual_length; skb_put(precvbuf->pskb, purb->actual_length); -@@ -1368,7 +1316,7 @@ static void usb_read_port_complete(struc +@@ -1368,7 +1316,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) DBG_8192C("###=> usb_read_port_complete => urb status(%d)\n", purb->status); @@ -70146,7 +69448,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->bSurpriseRemoved = _TRUE; } -@@ -1384,6 +1332,10 @@ static void usb_read_port_complete(struc +@@ -1384,6 +1332,10 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usb_read_port_complete:bDriverStopped=TRUE\n")); break; case -EPROTO: @@ -70157,7 +69459,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef DBG_CONFIG_ERROR_DETECT { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); -@@ -1394,9 +1346,11 @@ static void usb_read_port_complete(struc +@@ -1394,9 +1346,11 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); break; case -EINPROGRESS: @@ -70169,7 +69471,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; } -@@ -1418,12 +1372,11 @@ static u32 usb_read_port(struct intf_hdl +@@ -1418,12 +1372,11 @@ static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem) u32 ret = _SUCCESS; PURB purb = NULL; struct recv_buf *precvbuf = (struct recv_buf *)rmem; @@ -70705,7 +70007,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtl8192cu_set_intf_ops(struct _io_ops *pops) { _func_enter_; -@@ -2029,8 +1521,7 @@ void rtl8192cu_set_intf_ops(struct _io_o +@@ -2029,8 +1521,7 @@ void rtl8192cu_set_intf_ops(struct _io_ops *pops) pops->_write32_async = &usb_async_write32; #endif pops->_write_mem = &usb_write_mem; @@ -70715,6 +70017,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pops->_read_port_cancel = &usb_read_port_cancel; pops->_write_port_cancel = &usb_write_port_cancel; +diff --git a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_xp.c b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_xp.c +index 82adeff..32ff645 100644 --- a/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_xp.c +++ b/drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/usb_ops_xp.c @@ -16,8 +16,7 @@ @@ -70745,6 +70049,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif +diff --git a/drivers/net/wireless/rtl8192cu/ifcfg-wlan0 b/drivers/net/wireless/rtl8192cu/ifcfg-wlan0 +old mode 100644 +new mode 100755 +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CEHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CEHWImg.h +index 2ecb65d..4ae3630 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192CEHWImg.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CEHWImg.h @@ -25,26 +25,29 @@ @@ -70782,7 +70091,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define PHY_REG_2TArrayLength 374 extern u32 Rtl8192CEPHY_REG_2TArray[PHY_REG_2TArrayLength]; #define PHY_REG_1TArrayLength 374 -@@ -69,7 +72,8 @@ extern u32 Rtl8192CERadioA_1TArray[Radio +@@ -69,7 +72,8 @@ extern u32 Rtl8192CERadioA_1TArray[RadioA_1TArrayLength]; extern u32 Rtl8192CERadioB_1TArray[RadioB_1TArrayLength]; #define RadioB_GM_ArrayLength 1 extern u32 Rtl8192CERadioB_GM_Array[RadioB_GM_ArrayLength]; @@ -70792,6 +70101,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern u32 Rtl8192CEMAC_2T_Array[MAC_2T_ArrayLength]; #define MACPHY_Array_PGLength 1 extern u32 Rtl8192CEMACPHY_Array_PG[MACPHY_Array_PGLength]; +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyCfg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyCfg.h +index 6ecb754..3afb292 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyCfg.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyCfg.h @@ -111,15 +111,7 @@ typedef enum _HW90_BLOCK{ @@ -70831,7 +70142,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release typedef struct _BB_REGISTER_DEFINITION{ u32 rfintfs; // set software control: // 0x870~0x877[8 bytes] -@@ -294,11 +273,11 @@ void rtl8192c_PHY_SetBBReg( IN PADAPTER +@@ -294,11 +273,11 @@ void rtl8192c_PHY_SetBBReg( IN PADAPTER Adapter, IN u32 BitMask, IN u32 Data ); u32 rtl8192c_PHY_QueryRFReg( IN PADAPTER Adapter, @@ -70845,7 +70156,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release IN u32 RegAddr, IN u32 BitMask, IN u32 Data ); -@@ -313,14 +292,14 @@ int PHY_RFConfig8192C( IN PADAPTER Adapt +@@ -313,14 +292,14 @@ int PHY_RFConfig8192C( IN PADAPTER Adapter ); /* RF config */ int rtl8192c_PHY_ConfigRFWithParaFile( IN PADAPTER Adapter, IN u8* pFileName, @@ -70863,7 +70174,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* Read initi reg value for tx power setting. */ void rtl8192c_PHY_GetHWRegOriginalValue( IN PADAPTER Adapter ); -@@ -409,8 +388,6 @@ VOID rtl8192c_PHY_LCCalibrate(IN PADAPTE +@@ -409,8 +388,6 @@ VOID rtl8192c_PHY_LCCalibrate(IN PADAPTER pAdapter); // VOID rtl8192c_PHY_APCalibrate(IN PADAPTER pAdapter, IN char delta); @@ -70872,6 +70183,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release VOID rtl8192c_PHY_SetRFPathSwitch(IN PADAPTER pAdapter, IN BOOLEAN bMain); // +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyReg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyReg.h +index 1f9f330..6364166 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyReg.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CPhyReg.h @@ -197,6 +197,19 @@ @@ -70915,6 +70228,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define RF_BS_IQGEN 0x0F // #define RF_MODE1 0x10 // +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg.h +index 254a060..ba3c282 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192CUHWImg.h @@ -20,31 +20,31 @@ @@ -70958,7 +70273,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define PHY_REG_2TArrayLength 374 extern u32 Rtl8192CUPHY_REG_2TArray[PHY_REG_2TArrayLength]; #define PHY_REG_1TArrayLength 374 -@@ -77,6 +77,10 @@ extern u32 Rtl8192CURadioB_2TArray[Radio +@@ -77,6 +77,10 @@ extern u32 Rtl8192CURadioB_2TArray[RadioB_2TArrayLength]; extern u32 Rtl8192CURadioA_1TArray[RadioA_1TArrayLength]; #define RadioB_1TArrayLength 1 extern u32 Rtl8192CURadioB_1TArray[RadioB_1TArrayLength]; @@ -70969,7 +70284,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define RadioA_1T_mCardArrayLength 282 extern u32 Rtl8192CURadioA_1T_mCardArray[RadioA_1T_mCardArrayLength]; #define RadioB_1T_mCardArrayLength 1 -@@ -85,7 +89,9 @@ extern u32 Rtl8192CURadioB_1T_mCardArray +@@ -85,7 +89,9 @@ extern u32 Rtl8192CURadioB_1T_mCardArray[RadioB_1T_mCardArrayLength]; extern u32 Rtl8192CURadioA_1T_HPArray[RadioA_1T_HPArrayLength]; #define RadioB_GM_ArrayLength 1 extern u32 Rtl8192CURadioB_GM_Array[RadioB_GM_ArrayLength]; @@ -70980,6 +70295,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern u32 Rtl8192CUMAC_2T_Array[MAC_2T_ArrayLength]; #define MACPHY_Array_PGLength 1 extern u32 Rtl8192CUMACPHY_Array_PG[MACPHY_Array_PGLength]; +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DEHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DEHWImg.h +index dc2bc17..0639775 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192DEHWImg.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DEHWImg.h @@ -17,50 +17,50 @@ @@ -71074,6 +70391,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +extern const u32 Rtl8192DEAGCTAB_1TArray[Rtl8192DEAGCTAB_1TArrayLength]; #endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DETestHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DETestHWImg.h +deleted file mode 100644 +index 2432bcd..0000000 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192DETestHWImg.h +++ /dev/null @@ -1,54 +0,0 @@ @@ -71131,6 +70451,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -extern u32 Rtl8192DTestAGCTAB_2GArray[Rtl8192DTestAGCTAB_2GArrayLength]; - -#endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyCfg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyCfg.h +index 475cf36..624fbda 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyCfg.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DPhyCfg.h @@ -157,6 +157,16 @@ typedef enum _MACPHY_MODE_8192D{ @@ -71180,6 +70502,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /*--------------------------Exported Function prototype---------------------*/ #define PHY_SetBBReg1Byte(Adapter, RegAddr, BitMask, Data) rtl8192d_PHY_SetBBReg1Byte((Adapter), (RegAddr), (BitMask), (Data)) +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg.h +index d931001..d6c66d9 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg.h @@ -24,7 +24,7 @@ @@ -71191,7 +70515,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern const u8 Rtl8192DUFwImgArray[Rtl8192DUImgArrayLength]; #define Rtl8192DUMainArrayLength 1 extern const u8 Rtl8192DUFwMainArray[Rtl8192DUMainArrayLength]; -@@ -36,7 +36,7 @@ extern const u32 Rtl8192DUPHY_REG_2TArra +@@ -36,7 +36,7 @@ extern const u32 Rtl8192DUPHY_REG_2TArray[Rtl8192DUPHY_REG_2TArrayLength]; extern const u32 Rtl8192DUPHY_REG_1TArray[Rtl8192DUPHY_REG_1TArrayLength]; #define Rtl8192DUPHY_REG_Array_PGLength 624 extern const u32 Rtl8192DUPHY_REG_Array_PG[Rtl8192DUPHY_REG_Array_PGLength]; @@ -71200,6 +70524,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern const u32 Rtl8192DUPHY_REG_Array_MP[Rtl8192DUPHY_REG_Array_MPLength]; #define Rtl8192DURadioA_2TArrayLength 378 extern const u32 Rtl8192DURadioA_2TArray[Rtl8192DURadioA_2TArrayLength]; +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg_wowlan.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg_wowlan.h +index a297e76..cc27a77 100644 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg_wowlan.h +++ b/drivers/net/wireless/rtl8192cu/include/Hal8192DUHWImg_wowlan.h @@ -23,7 +23,7 @@ @@ -71211,6 +70537,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern u8 Rtl8192DUFwWWImgArray[DUWWImgArrayLength]; #endif //__INC_HAL8192DU_FW_IMG_WOWLAN_H +diff --git a/drivers/net/wireless/rtl8192cu/include/Hal8192DUTestHWImg.h b/drivers/net/wireless/rtl8192cu/include/Hal8192DUTestHWImg.h +deleted file mode 100644 +index e0491ff..0000000 --- a/drivers/net/wireless/rtl8192cu/include/Hal8192DUTestHWImg.h +++ /dev/null @@ -1,54 +0,0 @@ @@ -71268,6 +70597,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -extern u32 Rtl8192DTestAGCTAB_2GArray[Rtl8192DTestAGCTAB_2GArrayLength]; - -#endif //__INC_HAL8192CU_FW_IMG_H +diff --git a/drivers/net/wireless/rtl8192cu/include/HalPwrSeqCmd.h b/drivers/net/wireless/rtl8192cu/include/HalPwrSeqCmd.h +new file mode 100644 +index 0000000..e5d151c --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/HalPwrSeqCmd.h @@ -0,0 +1,137 @@ @@ -71408,6 +70740,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + WLAN_PWR_CFG PwrCfgCmd[]); + +#endif +diff --git a/drivers/net/wireless/rtl8192cu/include/autoconf.h b/drivers/net/wireless/rtl8192cu/include/autoconf.h +index 7d6db40..12294df 100644 --- a/drivers/net/wireless/rtl8192cu/include/autoconf.h +++ b/drivers/net/wireless/rtl8192cu/include/autoconf.h @@ -31,11 +31,13 @@ @@ -71489,7 +70823,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Added by Albert 20110314 #define CONFIG_P2P 1 -+#ifdef CONFIG_P2P +- +- + #ifdef CONFIG_P2P +-// Added by Albert 20110812 +-// The CONFIG_WFD is for supporting the Wi-Fi display +-//#define CONFIG_WFD 1 +- +-// Unmarked if there is low p2p scanned ratio; Kurt +-//#define CONFIG_P2P_AGAINST_NOISE 1 +-#define CONFIG_P2P_REMOVE_GROUP_INFO +-//#define CONFIG_DBG_P2P + //Added by Albert 20110812 + //The CONFIG_WFD is for supporting the Wi-Fi display + #define CONFIG_WFD @@ -71498,19 +70842,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #define CONFIG_P2P_REMOVE_GROUP_INFO + #endif + //#define CONFIG_DBG_P2P - ++ + //#define CONFIG_P2P_PS + //#define CONFIG_P2P_IPS - --#ifdef CONFIG_P2P --// Added by Albert 20110812 --// The CONFIG_WFD is for supporting the Wi-Fi display --//#define CONFIG_WFD 1 -- --// Unmarked if there is low p2p scanned ratio; Kurt --//#define CONFIG_P2P_AGAINST_NOISE 1 --#define CONFIG_P2P_REMOVE_GROUP_INFO --//#define CONFIG_DBG_P2P ++ + #define P2P_OP_CHECK_SOCIAL_CH + // Added comment by Borg 2013/06/21 + // Issue: Nexus 4 is hard to do miracast. @@ -71623,6 +70958,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +//turn off power tracking when traffic is busy +//#define CONFIG_BUSY_TRAFFIC_SKIP_PWR_TRACK +diff --git a/drivers/net/wireless/rtl8192cu/include/basic_types.h b/drivers/net/wireless/rtl8192cu/include/basic_types.h +index f880224..f76e68f 100644 --- a/drivers/net/wireless/rtl8192cu/include/basic_types.h +++ b/drivers/net/wireless/rtl8192cu/include/basic_types.h @@ -106,6 +106,51 @@ @@ -71677,6 +71014,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T)) #define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1) +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/generic.h b/drivers/net/wireless/rtl8192cu/include/byteorder/generic.h +index 246ba89..7c8d4d7 100644 --- a/drivers/net/wireless/rtl8192cu/include/byteorder/generic.h +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/generic.h @@ -98,7 +98,7 @@ @@ -71707,6 +71046,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) || defined(PLATFORM_MPIXEL) +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/swab.h b/drivers/net/wireless/rtl8192cu/include/byteorder/swab.h +index 117c84d..a3ca9ea 100644 --- a/drivers/net/wireless/rtl8192cu/include/byteorder/swab.h +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/swab.h @@ -16,12 +16,11 @@ @@ -71724,7 +71065,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __u16 typedef unsigned short __u16; #endif -@@ -74,7 +73,7 @@ __inline static __u64 ___swab64(__u64 x +@@ -74,7 +73,7 @@ __inline static __u64 ___swab64(__u64 x) (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \ (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \ } @@ -71733,7 +71074,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __arch__swab16 __inline static __u16 __arch__swab16(__u16 x) -@@ -109,11 +108,19 @@ __inline static __u64 __arch__swab64(__u +@@ -109,11 +108,19 @@ __inline static __u64 __arch__swab64(__u64 x) #define __swab64(x) __fswab64(x) #endif // __swab16 @@ -71753,6 +71094,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { return __arch__swab32(x); } +diff --git a/drivers/net/wireless/rtl8192cu/include/byteorder/swabb.h b/drivers/net/wireless/rtl8192cu/include/byteorder/swabb.h +index 1735349..7e2a118 100644 --- a/drivers/net/wireless/rtl8192cu/include/byteorder/swabb.h +++ b/drivers/net/wireless/rtl8192cu/include/byteorder/swabb.h @@ -16,8 +16,7 @@ @@ -71765,6 +71108,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _LINUX_BYTEORDER_SWABB_H #define _LINUX_BYTEORDER_SWABB_H +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_conf.h b/drivers/net/wireless/rtl8192cu/include/drv_conf.h +index a2b6cc4..1317687 100644 --- a/drivers/net/wireless/rtl8192cu/include/drv_conf.h +++ b/drivers/net/wireless/rtl8192cu/include/drv_conf.h @@ -38,7 +38,7 @@ @@ -71776,6 +71121,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //Android expect dbm as the rx signal strength unit #define CONFIG_SIGNAL_DISPLAY_DBM +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_types.h b/drivers/net/wireless/rtl8192cu/include/drv_types.h +index 95e20cc..0ac34f2 100644 --- a/drivers/net/wireless/rtl8192cu/include/drv_types.h +++ b/drivers/net/wireless/rtl8192cu/include/drv_types.h @@ -1,7 +1,7 @@ @@ -71817,7 +71164,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; typedef struct _ADAPTER _adapter, ADAPTER,*PADAPTER; -@@ -65,11 +65,12 @@ typedef struct _ADAPTER _adapter, ADAPTE +@@ -65,11 +65,12 @@ typedef struct _ADAPTER _adapter, ADAPTER,*PADAPTER; #include #include @@ -71832,7 +71179,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #include #include #include -@@ -81,6 +82,8 @@ typedef struct _ADAPTER _adapter, ADAPTE +@@ -81,6 +82,8 @@ typedef struct _ADAPTER _adapter, ADAPTER,*PADAPTER; #include #include #include @@ -71841,7 +71188,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_DRVEXT_MODULE #include -@@ -106,23 +109,23 @@ typedef struct _ADAPTER _adapter, ADAPTE +@@ -106,23 +109,23 @@ typedef struct _ADAPTER _adapter, ADAPTER,*PADAPTER; #define SPEC_DEV_ID_ASSIGN_IFNAME BIT(5) struct specific_device_id{ @@ -71929,7 +71276,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif + u8 special_rf_path; //0: 2T2R ,1: only turn on path A 1T1R, 2: only turn on path B 1T1R + u8 mac_phy_mode; //0:by efuse, 1:smsp, 2:dmdp, 3:dmsp. -+ + +-#ifdef SUPPORT_64_STA +- u8 bcmc_rate; +#ifdef CONFIG_80211D + u8 enable80211d; +#endif @@ -71938,9 +71287,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + u8 if2name[16]; + + u8 notch_filter; - --#ifdef SUPPORT_64_STA -- u8 bcmc_rate; ++ +#ifdef CONFIG_MULTI_VIR_IFACES + u8 ext_iface_num;//primary/secondary iface is excluded #endif @@ -72004,7 +71351,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + _mutex h2c_fwcmd_mutex; + _mutex setch_mutex; + _mutex setbw_mutex; -+ + +-#ifdef PLATFORM_LINUX +- struct sdio_func *func; +-#endif//PLATFORM_LINUX + unsigned char oper_channel; //saved channel info when call set_channel_bw + unsigned char oper_bwmode; + unsigned char oper_ch_offset;//PRIME_CHNL_OFFSET @@ -72015,17 +71365,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + //padapters[IFACE_ID1] == if2 + _adapter *padapters[IFACE_ID_MAX]; + u8 iface_nums; // total number of ifaces used runtime - --#ifdef PLATFORM_LINUX -- struct sdio_func *func; --#endif//PLATFORM_LINUX ++ + //For 92D, DMDP have 2 interface. + u8 InterfaceNumber; + u8 NumInterfaces; + u8 DualMacMode; + u8 irq_alloc; -+ -+/*-------- below is for SDIO INTERFACE --------*/ - u8 func_number;//unsigned char FunctionNumber; - u32 block_transfer_len;//unsigned long BLOCK_TRANSFER_LEN; @@ -72041,6 +71386,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - u16 sdio_hisr; - u16 sdio_himr; -#endif// CONFIG_SDIO_HCI ++/*-------- below is for SDIO INTERFACE --------*/ ++ +#ifdef INTF_DATA + INTF_DATA intf_data; +#endif @@ -72258,15 +71605,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - _thread_hdl_ evtThread; - _thread_hdl_ xmitThread; - _thread_hdl_ recvThread; -- -- NDIS_STATUS (*dvobj_init)(_adapter * adapter); -- void (*dvobj_deinit)(_adapter * adapter); + _thread_hdl_ cmdThread; + _thread_hdl_ evtThread; + _thread_hdl_ xmitThread; + _thread_hdl_ recvThread; -+ + +- NDIS_STATUS (*dvobj_init)(_adapter * adapter); +- void (*dvobj_deinit)(_adapter * adapter); +#ifndef PLATFORM_LINUX + NDIS_STATUS (*dvobj_init)(struct dvobj_priv *dvobj); + void (*dvobj_deinit)(struct dvobj_priv *dvobj); @@ -72386,6 +71732,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release __inline static u8 *myid(struct eeprom_priv *peepriv) { return (peepriv->mac_addr); +diff --git a/drivers/net/wireless/rtl8192cu/include/drv_types_sdio.h b/drivers/net/wireless/rtl8192cu/include/drv_types_sdio.h +new file mode 100644 +index 0000000..fd467ca --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/drv_types_sdio.h @@ -0,0 +1,70 @@ @@ -72459,6 +71808,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/farray.h b/drivers/net/wireless/rtl8192cu/include/farray.h +deleted file mode 100644 +index 79d2a42..0000000 --- a/drivers/net/wireless/rtl8192cu/include/farray.h +++ /dev/null @@ -1,31480 +0,0 @@ @@ -103942,6 +103294,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -0x08,0xFB,0x90,0xB8, -0xFF,0xFF,0xFF,0xFF, -}; +diff --git a/drivers/net/wireless/rtl8192cu/include/hal_com.h b/drivers/net/wireless/rtl8192cu/include/hal_com.h +new file mode 100644 +index 0000000..42aae0e --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/hal_com.h @@ -0,0 +1,146 @@ @@ -104091,6 +103446,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif //__HAL_COMMON_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/hal_init.h b/drivers/net/wireless/rtl8192cu/include/hal_init.h +deleted file mode 100644 +index ec48f83..0000000 --- a/drivers/net/wireless/rtl8192cu/include/hal_init.h +++ /dev/null @@ -1,305 +0,0 @@ @@ -104399,6 +103757,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -#endif //__HAL_INIT_H__ - +diff --git a/drivers/net/wireless/rtl8192cu/include/hal_intf.h b/drivers/net/wireless/rtl8192cu/include/hal_intf.h +new file mode 100644 +index 0000000..dd82662 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/hal_intf.h @@ -0,0 +1,432 @@ @@ -104834,6 +104195,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif //__HAL_INTF_H__ + +diff --git a/drivers/net/wireless/rtl8192cu/include/ieee80211.h b/drivers/net/wireless/rtl8192cu/include/ieee80211.h +index 5c17a28..e283a5f 100644 --- a/drivers/net/wireless/rtl8192cu/include/ieee80211.h +++ b/drivers/net/wireless/rtl8192cu/include/ieee80211.h @@ -43,6 +43,8 @@ @@ -105060,9 +104423,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define RTW_IEEE80211_STYPE_CFACKPOLL 0x0070 -#define RTW_IEEE80211_QOS_DATAGRP 0x0080 -#define RTW_IEEE80211_QoS_DATAGRP RTW_IEEE80211_QOS_DATAGRP -- --#define RTW_IEEE80211_SCTL_FRAG 0x000F --#define RTW_IEEE80211_SCTL_SEQ 0xFFF0 +#define RTW_IEEE80211_STYPE_QOS_DATA 0x0080 +#define RTW_IEEE80211_STYPE_QOS_DATA_CFACK 0x0090 +#define RTW_IEEE80211_STYPE_QOS_DATA_CFPOLL 0x00A0 @@ -105075,7 +104435,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +/* sequence control field */ +#define RTW_IEEE80211_SCTL_FRAG 0x000F +#define RTW_IEEE80211_SCTL_SEQ 0xFFF0 -+ + +-#define RTW_IEEE80211_SCTL_FRAG 0x000F +-#define RTW_IEEE80211_SCTL_SEQ 0xFFF0 + +#define RTW_ERP_INFO_NON_ERP_PRESENT BIT(0) +#define RTW_ERP_INFO_USE_PROTECTION BIT(1) @@ -105220,7 +104582,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern __inline int is_multicast_mac_addr(const u8 *addr) { return ((addr[0] != 0xff) && (0x01 & addr[0])); -@@ -1175,6 +1205,13 @@ extern __inline int is_broadcast_mac_add +@@ -1175,6 +1205,13 @@ extern __inline int is_broadcast_mac_addr(const u8 *addr) (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); } @@ -105296,7 +104658,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RTW_WLAN_CATEGORY_WMM = 17, RTW_WLAN_CATEGORY_P2P = 0x7f,//P2P action frames }; -@@ -1276,8 +1276,22 @@ enum rtw_ieee80211_spectrum_mgmt_actionc +@@ -1276,8 +1276,22 @@ enum rtw_ieee80211_spectrum_mgmt_actioncode { enum _PUBLIC_ACTION{ ACT_PUBLIC_BSSCOEXIST = 0, // 20/40 BSS Coexistence @@ -105450,7 +104812,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_set_supported_rate(u8* SupportedRates, uint mode) ; unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit); -@@ -1426,19 +1527,31 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_le +@@ -1426,19 +1527,31 @@ u8 *rtw_get_wps_ie(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen); u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_attr, u32 *len_attr); u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content, uint *len_content); @@ -105487,7 +104849,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int rtw_get_wfd_attr_content(u8 *wfd_ie, uint wfd_ielen, u8 target_attr_id ,u8 *attr_content, uint *attr_contentlen); #endif // CONFIG_WFD -@@ -1457,5 +1570,11 @@ uint rtw_is_cckratesonly_included(u8 *ra +@@ -1457,5 +1570,11 @@ uint rtw_is_cckratesonly_included(u8 *rate); int rtw_check_network_type(unsigned char *rate, int ratelen, int channel); void rtw_macaddr_cfg(u8 *mac_addr); @@ -105499,6 +104861,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #endif /* IEEE80211_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/if_ether.h b/drivers/net/wireless/rtl8192cu/include/if_ether.h +index 045c067..9e36d7f 100644 --- a/drivers/net/wireless/rtl8192cu/include/if_ether.h +++ b/drivers/net/wireless/rtl8192cu/include/if_ether.h @@ -1,22 +1,22 @@ @@ -105539,6 +104903,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _LINUX_IF_ETHER_H #define _LINUX_IF_ETHER_H +diff --git a/drivers/net/wireless/rtl8192cu/include/ioctl_cfg80211.h b/drivers/net/wireless/rtl8192cu/include/ioctl_cfg80211.h +index 7846927..ceb0db8 100644 --- a/drivers/net/wireless/rtl8192cu/include/ioctl_cfg80211.h +++ b/drivers/net/wireless/rtl8192cu/include/ioctl_cfg80211.h @@ -27,6 +27,62 @@ @@ -105641,7 +105007,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_cfg80211_indicate_connect(_adapter *padapter); void rtw_cfg80211_indicate_disconnect(_adapter *padapter); void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool aborted); -@@ -74,8 +139,42 @@ void rtw_cfg80211_indicate_sta_disassoc( +@@ -74,8 +139,42 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, unsigned char *da, u void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, size_t len); void rtw_cfg80211_rx_p2p_action_public(_adapter *padapter, u8 *pmgmt_frame, uint frame_len); void rtw_cfg80211_rx_action_p2p(_adapter *padapter, u8 *pmgmt_frame, uint frame_len); @@ -105684,6 +105050,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #endif //__IOCTL_CFG80211_H__ +diff --git a/drivers/net/wireless/rtl8192cu/include/ip.h b/drivers/net/wireless/rtl8192cu/include/ip.h +index 5846347..d7f723d 100644 --- a/drivers/net/wireless/rtl8192cu/include/ip.h +++ b/drivers/net/wireless/rtl8192cu/include/ip.h @@ -1,19 +1,22 @@ @@ -105721,6 +105089,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _LINUX_IP_H #define _LINUX_IP_H #include +diff --git a/drivers/net/wireless/rtl8192cu/include/linux/wireless.h b/drivers/net/wireless/rtl8192cu/include/linux/wireless.h +new file mode 100644 +index 0000000..24a22d6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/linux/wireless.h @@ -0,0 +1,90 @@ @@ -105814,9 +105185,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +}; + +#endif /* _LINUX_WIRELESS_H */ +diff --git a/drivers/net/wireless/rtl8192cu/include/mlme_osdep.h b/drivers/net/wireless/rtl8192cu/include/mlme_osdep.h +index 1583053..75754db 100644 --- a/drivers/net/wireless/rtl8192cu/include/mlme_osdep.h +++ b/drivers/net/wireless/rtl8192cu/include/mlme_osdep.h -@@ -34,10 +34,6 @@ extern void rtw_os_indicate_connect( _ad +@@ -34,10 +34,6 @@ extern void rtw_os_indicate_connect( _adapter *adapter ); void rtw_os_indicate_scan_done( _adapter *padapter, bool aborted); extern void rtw_report_sec_ie(_adapter *adapter,u8 authmode,u8 *sec_ie); @@ -105827,6 +105200,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_reset_securitypriv( _adapter *adapter ); #endif //_MLME_OSDEP_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/osdep_intf.h b/drivers/net/wireless/rtl8192cu/include/osdep_intf.h +index 86b3f1f..3cd1659 100644 --- a/drivers/net/wireless/rtl8192cu/include/osdep_intf.h +++ b/drivers/net/wireless/rtl8192cu/include/osdep_intf.h @@ -1,7 +1,7 @@ @@ -105864,7 +105239,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* Under Sync. IRP (SDIO/USB) -@@ -53,9 +50,9 @@ The protection mechanism is through the +@@ -53,9 +50,9 @@ The protection mechanism is through the pending queue. _mutex ioctl_mutex; @@ -105877,7 +105252,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // when in USB, IO is through interrupt in/out endpoints struct usb_device *udev; PURB piorw_urb; -@@ -70,7 +67,7 @@ The protection mechanism is through the +@@ -70,7 +67,7 @@ The protection mechanism is through the pending queue. #ifdef PLATFORM_OS_XP #ifdef CONFIG_SDIO_HCI @@ -105886,7 +105261,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release PMDL pmdl; PSDBUS_REQUEST_PACKET sdrp; PSDBUS_REQUEST_PACKET recv_sdrp; -@@ -84,11 +81,11 @@ The protection mechanism is through the +@@ -84,11 +81,11 @@ The protection mechanism is through the pending queue. PIRP piorw_irp; u8 io_irp_cnt; u8 bio_irp_pending; @@ -105901,7 +105276,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_R871X_TEST -@@ -96,6 +93,9 @@ int rtw_start_pseudo_adhoc(_adapter *pad +@@ -96,6 +93,9 @@ int rtw_start_pseudo_adhoc(_adapter *padapter); int rtw_stop_pseudo_adhoc(_adapter *padapter); #endif @@ -105911,7 +105286,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 rtw_init_drv_sw(_adapter *padapter); u8 rtw_free_drv_sw(_adapter *padapter); u8 rtw_reset_drv_sw(_adapter *padapter); -@@ -109,20 +109,47 @@ int rtw_ioctl(struct net_device *dev, st +@@ -109,20 +109,47 @@ int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname); struct net_device *rtw_init_netdev(_adapter *padapter); @@ -105961,6 +105336,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //_OSDEP_INTF_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/osdep_service.h b/drivers/net/wireless/rtl8192cu/include/osdep_service.h +index 6fedff4..c5c465e 100644 --- a/drivers/net/wireless/rtl8192cu/include/osdep_service.h +++ b/drivers/net/wireless/rtl8192cu/include/osdep_service.h @@ -24,8 +24,9 @@ @@ -106777,7 +106154,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif __inline static _list *get_next(_list *list) -@@ -271,6 +994,15 @@ __inline static void _set_workitem(_work +@@ -271,6 +994,15 @@ __inline static void _set_workitem(_workitem *pwork) schedule_work(pwork); } @@ -106793,7 +106170,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // // Global Mutex: can only be used at PASSIVE level. // -@@ -289,6 +1021,45 @@ __inline static void _set_workitem(_work +@@ -289,6 +1021,45 @@ __inline static void _set_workitem(_workitem *pwork) atomic_dec((atomic_t *)&(_MutexCounter)); \ } @@ -106839,7 +106216,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif // PLATFORM_LINUX -@@ -296,7 +1067,6 @@ __inline static void _set_workitem(_work +@@ -296,7 +1067,6 @@ __inline static void _set_workitem(_workitem *pwork) #include #include @@ -106847,7 +106224,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #include #include -@@ -470,46 +1240,160 @@ extern int RTW_STATUS_CODE(int error_cod +@@ -470,46 +1240,160 @@ extern int RTW_STATUS_CODE(int error_code); #define CONFIG_USE_VMALLOC @@ -107036,7 +106413,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern void _rtw_memcpy(void* dec, void* sour, u32 sz); extern int _rtw_memcmp(void *dst, void *src, u32 sz); -@@ -517,8 +1401,11 @@ extern void _rtw_memset(void *pbuf, int +@@ -517,8 +1401,11 @@ extern void _rtw_memset(void *pbuf, int c, u32 sz); extern void _rtw_init_listhead(_list *list); extern u32 rtw_is_list_empty(_list *phead); @@ -107058,7 +106435,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern void _rtw_spinlock_free(_lock *plock); extern void _rtw_spinlock(_lock *plock); extern void _rtw_spinunlock(_lock *plock); -@@ -539,6 +1428,7 @@ extern u32 rtw_end_of_queue_search(_list +@@ -539,6 +1428,7 @@ extern u32 rtw_end_of_queue_search(_list *queue, _list *pelement); extern u32 rtw_get_current_time(void); extern u32 rtw_systime_to_ms(u32 systime); @@ -107066,7 +106443,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern s32 rtw_get_passing_time_ms(u32 start); extern s32 rtw_get_time_interval_ms(u32 start, u32 end); -@@ -547,6 +1437,8 @@ extern void rtw_sleep_schedulable(int ms +@@ -547,6 +1437,8 @@ extern void rtw_sleep_schedulable(int ms); extern void rtw_msleep_os(int ms); extern void rtw_usleep_os(int us); @@ -107083,7 +106460,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release __inline static unsigned char _cancel_timer_ex(_timer *ptimer) -@@ -564,7 +1457,10 @@ __inline static unsigned char _cancel_ti +@@ -564,7 +1457,10 @@ __inline static unsigned char _cancel_timer_ex(_timer *ptimer) #ifdef PLATFORM_LINUX return del_timer_sync(ptimer); #endif @@ -107095,7 +106472,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef PLATFORM_WINDOWS u8 bcancelled; -@@ -574,16 +1470,25 @@ __inline static unsigned char _cancel_ti +@@ -574,16 +1470,25 @@ __inline static unsigned char _cancel_timer_ex(_timer *ptimer) #endif } @@ -107125,7 +106502,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release __inline static void flush_signals_thread(void) { #ifdef PLATFORM_LINUX -@@ -598,7 +1503,7 @@ __inline static _OS_STATUS res_to_status +@@ -598,7 +1503,7 @@ __inline static _OS_STATUS res_to_status(sint res) { @@ -107134,7 +106511,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return res; #endif -@@ -613,6 +1518,22 @@ __inline static _OS_STATUS res_to_status +@@ -613,6 +1518,22 @@ __inline static _OS_STATUS res_to_status(sint res) } @@ -107174,7 +106551,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif extern void ATOMIC_SET(ATOMIC_T *v, int i); -@@ -738,7 +1662,6 @@ extern int rtw_retrive_from_file(char *p +@@ -738,7 +1662,6 @@ extern int rtw_retrive_from_file(char *path, u8* buf, u32 sz); extern int rtw_store_to_file(char *path, u8* buf, u32 sz); @@ -107272,6 +106649,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/pci_ops.h b/drivers/net/wireless/rtl8192cu/include/pci_ops.h +index dd63f5f..9404ff4 100644 --- a/drivers/net/wireless/rtl8192cu/include/pci_ops.h +++ b/drivers/net/wireless/rtl8192cu/include/pci_ops.h @@ -37,6 +37,7 @@ void rtl8192ce_xmit_tasklet(void *priv); @@ -107290,6 +106669,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 MpReadPCIDwordDBI8192D(IN PADAPTER Adapter, IN u16 Offset, IN u8 Direct); void MpWritePCIDwordDBI8192D(IN PADAPTER Adapter, IN u16 Offset, IN u32 Value, IN u8 Direct); #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_cmd.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_cmd.h +index 1689c54..c54cc31 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_cmd.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_cmd.h @@ -16,8 +16,7 @@ @@ -107368,7 +106749,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct H2C_SS_RFOFF_PARAM{ u8 ROFOn; // 1: on, 0:off -@@ -132,8 +122,7 @@ void rtl8192c_set_FwPwrMode_cmd(_adapter +@@ -132,8 +122,7 @@ void rtl8192c_set_FwPwrMode_cmd(_adapter*padapter, u8 Mode); void rtl8192c_set_FwJoinBssReport_cmd(_adapter* padapter, u8 mstatus); u8 rtl8192c_set_rssi_cmd(_adapter*padapter, u8 *param); u8 rtl8192c_set_raid_cmd(_adapter*padapter, u32 mask, u8 arg); @@ -107399,6 +106780,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif // __RTL8192C_CMD_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_dm.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_dm.h +index 80b4a67..9d06540 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_dm.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_dm.h @@ -16,8 +16,7 @@ @@ -107539,7 +106922,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //============================================================ // structure and define //============================================================ -@@ -211,6 +95,7 @@ typedef struct _Dynamic_Initial_Gain_Thr +@@ -211,6 +95,7 @@ typedef struct _Dynamic_Initial_Gain_Threshold_ u8 LargeFAHit; u8 ForbiddenIGI; u32 Recover_cnt; @@ -107578,6 +106961,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_event.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_event.h +index 131b658..1013f74 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_event.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_event.h @@ -16,8 +16,7 @@ @@ -107590,6 +106975,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _RTL8192C_EVENT_H_ #define _RTL8192C_EVENT_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_hal.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_hal.h +index cddd998..3348971 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_hal.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_hal.h @@ -16,11 +16,11 @@ @@ -107698,7 +107085,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 LegacyHTTxPowerDiff;// Legacy to HT rate power diff -@@ -672,7 +689,7 @@ typedef struct hal_data_8192ce HAL_DATA_ +@@ -672,7 +689,7 @@ typedef struct hal_data_8192ce HAL_DATA_TYPE, *PHAL_DATA_TYPE; #define IS_MULTI_FUNC_CHIP(_Adapter) (((((PHAL_DATA_TYPE)(_Adapter->HalData))->MultiFunc) & (RT_MULTI_FUNC_BT|RT_MULTI_FUNC_GPS)) ? _TRUE : _FALSE) void InterruptRecognized8192CE(PADAPTER Adapter, PRT_ISR_CONTENT pIsrContent); @@ -107729,7 +107116,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 LegacyHTTxPowerDiff;// Legacy to HT rate power diff -@@ -876,12 +893,45 @@ VOID rtl8192c_FirmwareSelfReset(IN PADAP +@@ -876,12 +893,45 @@ VOID rtl8192c_FirmwareSelfReset(IN PADAPTER Adapter); int FirmwareDownload92C(IN PADAPTER Adapter,IN BOOLEAN bUsedWoWLANFw); VOID InitializeFirmwareVars92C(PADAPTER Adapter); u8 GetEEPROMSize8192C(PADAPTER Adapter); @@ -107777,6 +107164,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_led.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_led.h +index b361ba5..1ccf935 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_led.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_led.h @@ -16,8 +16,7 @@ @@ -107789,6 +107178,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __RTL8192C_LED_H_ #define __RTL8192C_LED_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_recv.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_recv.h +index b532a59..d5656f5 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_recv.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_recv.h @@ -16,8 +16,7 @@ @@ -107850,6 +107241,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_rf.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_rf.h +index d3c4b67..26c678a 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_rf.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_rf.h @@ -16,8 +16,7 @@ @@ -107862,6 +107255,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /****************************************************************************** * * +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_spec.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_spec.h +index 27e0f0e..8ff13a7 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_spec.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_spec.h @@ -16,8 +16,7 @@ @@ -107995,6 +107390,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // The same function but different bit field. #define DIS_TSF_UDT0_NORMAL_CHIP BIT(4) #define DIS_TSF_UDT0_TEST_CHIP BIT(5) +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_sreset.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_sreset.h +index dace413..20e88b5 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_sreset.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_sreset.h @@ -16,39 +16,17 @@ @@ -108039,6 +107436,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -extern u8 rtl8192c_sreset_get_wifi_status(_adapter *padapter); #endif #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192c_xmit.h b/drivers/net/wireless/rtl8192cu/include/rtl8192c_xmit.h +index efb5f99..7d2059d 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192c_xmit.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192c_xmit.h @@ -16,22 +16,10 @@ @@ -108117,7 +107516,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_USB_HCI #ifdef CONFIG_USB_TX_AGGREGATION -@@ -58,10 +91,12 @@ void rtl8192cu_cal_txdesc_chksum(struct +@@ -58,10 +91,12 @@ void rtl8192cu_cal_txdesc_chksum(struct tx_desc *ptxdesc); s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf); @@ -108131,7 +107530,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_HOSTAPD_MLME s32 rtl8192cu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt); #endif -@@ -77,10 +112,13 @@ struct xmit_buf *rtl8192ce_dequeue_xmitb +@@ -77,10 +112,13 @@ struct xmit_buf *rtl8192ce_dequeue_xmitbuf(struct rtw_tx_ring *ring); void rtl8192ce_xmitframe_resume(_adapter *padapter); @@ -108146,6 +107545,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_HOSTAPD_MLME s32 rtl8192ce_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt); #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_cmd.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_cmd.h +index cb414a1..ad7e783 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_cmd.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_cmd.h @@ -16,8 +16,7 @@ @@ -108177,7 +107578,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release H2C_CMD_MAX }RTL8192D_H2C_CMD; -@@ -98,12 +103,14 @@ void rtl8192d_set_FwPwrMode_cmd(_adapter +@@ -98,12 +103,14 @@ void rtl8192d_set_FwPwrMode_cmd(_adapter*padapter, u8 Mode); void rtl8192d_set_FwJoinBssReport_cmd(_adapter* padapter, u8 mstatus); u8 rtl8192d_set_rssi_cmd(_adapter*padapter, u8 *param); u8 rtl8192d_set_raid_cmd(_adapter*padapter, u32 mask, u8 arg); @@ -108194,13 +107595,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_WOWLAN typedef struct _SETWOWLAN_PARM{ -@@ -130,4 +137,6 @@ void rtl8192d_set_wowlan_cmd(_adapter* p +@@ -130,4 +137,6 @@ void rtl8192d_set_wowlan_cmd(_adapter* padapter); void SetFwRelatedForWoWLAN8192DU(_adapter* padapter,u8 bHostIsGoingtoSleep); #endif // CONFIG_WOWLAN +#endif // __RTL8192D_CMD_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_dm.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_dm.h +index ce674f8..ab5e5f7 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_dm.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_dm.h @@ -16,7 +16,7 @@ @@ -108228,7 +107631,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //============================================================ // structure and define //============================================================ -@@ -101,7 +92,9 @@ typedef struct _Dynamic_Initial_Gain_Thr +@@ -101,7 +92,9 @@ typedef struct _Dynamic_Initial_Gain_Threshold_ u8 LargeFAHit; u8 ForbiddenIGI; u32 Recover_cnt; @@ -108305,6 +107708,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_hal.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_hal.h +index 30f2955..1ab5f98 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_hal.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_hal.h @@ -20,6 +20,7 @@ @@ -108544,7 +107949,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 1 IQK_MATRIX_REGS_SETTING IQKMatrixRegSetting[IQK_Matrix_Settings_NUM]; #else -@@ -935,11 +1079,10 @@ typedef struct hal_data_8192du HAL_DATA_ +@@ -935,11 +1079,10 @@ typedef struct hal_data_8192du HAL_DATA_TYPE, *PHAL_DATA_TYPE; int FirmwareDownload92D(IN PADAPTER Adapter,IN BOOLEAN bUsedWoWLANFw); VOID rtl8192d_FirmwareSelfReset(IN PADAPTER Adapter); void rtl8192d_ReadChipVersion(IN PADAPTER Adapter); @@ -108557,6 +107962,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release BOOLEAN PHY_CheckPowerOffFor8192D(PADAPTER Adapter); VOID PHY_SetPowerOnFor8192D(PADAPTER Adapter); //void PHY_ConfigMacPhyMode92D(PADAPTER Adapter); +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_led.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_led.h +index 454a1b8..d736bda4 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_led.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_led.h @@ -16,8 +16,7 @@ @@ -108569,6 +107976,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __RTL8192D_LED_H_ #define __RTL8192D_LED_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_recv.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_recv.h +index 3ffc646..36cc232 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_recv.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_recv.h @@ -61,7 +61,11 @@ @@ -108584,6 +107993,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #else #define MAX_RECVBUF_SZ (4000) // about 4K #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_rf.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_rf.h +index 6995464..0b439a3 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_rf.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_rf.h @@ -16,8 +16,7 @@ @@ -108596,6 +108007,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /****************************************************************************** * * +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_spec.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_spec.h +index 9bba78a..bef7184 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_spec.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_spec.h @@ -113,7 +113,9 @@ @@ -108694,6 +108107,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // The same function but different bit field. #define DIS_TSF_UDT0_NORMAL_CHIP BIT(4) #define DIS_TSF_UDT0_TEST_CHIP BIT(5) +diff --git a/drivers/net/wireless/rtl8192cu/include/rtl8192d_xmit.h b/drivers/net/wireless/rtl8192cu/include/rtl8192d_xmit.h +index 0babb27..d01fb4a 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtl8192d_xmit.h +++ b/drivers/net/wireless/rtl8192cu/include/rtl8192d_xmit.h @@ -16,22 +16,10 @@ @@ -108773,7 +108188,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_USB_HCI #ifdef CONFIG_USB_TX_AGGREGATION -@@ -72,10 +106,13 @@ void rtl8192du_cal_txdesc_chksum(struct +@@ -72,10 +106,13 @@ void rtl8192du_cal_txdesc_chksum(struct tx_desc *ptxdesc); s32 rtl8192du_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf); @@ -108788,7 +108203,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_HOSTAPD_MLME s32 rtl8192du_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt); #endif -@@ -91,10 +128,12 @@ struct xmit_buf *rtl8192de_dequeue_xmitb +@@ -91,10 +128,12 @@ struct xmit_buf *rtl8192de_dequeue_xmitbuf(struct rtw_tx_ring *ring); void rtl8192de_xmitframe_resume(_adapter *padapter); @@ -108802,6 +108217,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_HOSTAPD_MLME s32 rtl8192de_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt); #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_android.h b/drivers/net/wireless/rtl8192cu/include/rtw_android.h +index e1a0432..f9214c2 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_android.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_android.h @@ -59,22 +59,32 @@ enum ANDROID_WIFI_CMD { @@ -108841,6 +108258,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //__RTW_ANDROID_H__ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ap.h b/drivers/net/wireless/rtl8192cu/include/rtw_ap.h +new file mode 100644 +index 0000000..42be4c6 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ap.h @@ -0,0 +1,64 @@ @@ -108908,6 +108328,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h b/drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h +index 1313a25..0f06b7a 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_byteorder.h @@ -16,8 +16,7 @@ @@ -108920,6 +108342,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _RTL871X_BYTEORDER_H_ #define _RTL871X_BYTEORDER_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_cmd.h b/drivers/net/wireless/rtl8192cu/include/rtw_cmd.h +index 0556d0b..ab115c5 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_cmd.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_cmd.h @@ -16,8 +16,7 @@ @@ -108981,7 +108405,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj); extern struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv); extern void rtw_free_cmd_obj(struct cmd_obj *pcmd); -@@ -131,6 +149,7 @@ extern struct evt_obj *rtw_dequeue_evt(_ +@@ -131,6 +149,7 @@ extern struct evt_obj *rtw_dequeue_evt(_queue *queue); extern void rtw_free_evt_obj(struct evt_obj *pcmd); #endif @@ -109065,7 +108489,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern u8 rtw_setopmode_cmd(_adapter *padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype); extern u8 rtw_setdatarate_cmd(_adapter *padapter, u8 *rateset); extern u8 rtw_setbasicrate_cmd(_adapter *padapter, u8 *rateset); -@@ -931,7 +960,9 @@ extern u8 rtw_setfwdig_cmd(_adapter*pada +@@ -931,7 +960,9 @@ extern u8 rtw_setfwdig_cmd(_adapter*padapter, u8 type); extern u8 rtw_setfwra_cmd(_adapter*padapter, u8 type); extern u8 rtw_addbareq_cmd(_adapter*padapter, u8 tid, u8 *addr); @@ -109101,7 +108525,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release GEN_CMD_CODE(_SetChannelSwitch), /*61*/ GEN_CMD_CODE(_TDLS), /*62*/ -@@ -1123,6 +1157,7 @@ struct _cmd_callback rtw_cmd_callback[] +@@ -1123,6 +1157,7 @@ struct _cmd_callback rtw_cmd_callback[] = {GEN_CMD_CODE(_Set_H2C_MSG), NULL},/*58*/ {GEN_CMD_CODE(_SetChannelPlan), NULL},/*59*/ {GEN_CMD_CODE(_LedBlink), NULL},/*60*/ @@ -109109,6 +108533,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release {GEN_CMD_CODE(_SetChannelSwitch), NULL},/*61*/ {GEN_CMD_CODE(_TDLS), NULL},/*62*/ }; +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_debug.h b/drivers/net/wireless/rtl8192cu/include/rtw_debug.h +index eca6692..0ccf220 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_debug.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_debug.h @@ -1,7 +1,7 @@ @@ -109132,8 +108558,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _drv_info_ 7 #define _drv_dump_ 8 #define _drv_debug_ 9 -+#define _drv_always_ _drv_emerg_ - +- - -#define _module_rtl871x_xmit_c_ BIT(0) -#define _module_xmit_osdep_c_ BIT(1) @@ -109158,6 +108583,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#define _module_hci_intfs_c_ BIT(20) -#define _module_hci_ops_c_ BIT(21) -#define _module_osdep_service_c_ BIT(22) ++#define _drv_always_ _drv_emerg_ ++ +#define _module_rtl871x_xmit_c_ BIT(0) +#define _module_xmit_osdep_c_ BIT(1) +#define _module_rtl871x_recv_c_ BIT(2) @@ -109269,38 +108696,38 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #elif defined _RTL8712_RECV_C_ #define _MODULE_DEFINE_ _module_rtl8712_recv_c_ #elif defined _RTL8192CU_RECV_C_ -@@ -161,19 +171,23 @@ extern void rtl871x_cedbg(const char *fm +@@ -161,19 +171,23 @@ extern void rtl871x_cedbg(const char *fmt, ...); #ifdef PLATFORM_WINDOWS - #ifdef PLATFORM_OS_XP + #ifdef PLATFORM_OS_XP -+ -+ #define _dbgdump DbgPrint - #define _dbgdump DbgPrint -+ #elif defined PLATFORM_OS_CE ++ #define _dbgdump DbgPrint - #elif defined PLATFORM_OS_CE -+ #define _dbgdump rtl871x_cedbg ++ #elif defined PLATFORM_OS_CE - #define _dbgdump rtl871x_cedbg -+ #endif -+ -+#elif defined PLATFORM_LINUX ++ #define _dbgdump rtl871x_cedbg - #endif -+ #define _dbgdump printk ++ #endif - #elif defined PLATFORM_LINUX -+#elif defined PLATFORM_FREEBSD ++#elif defined PLATFORM_LINUX - #define _dbgdump printk ++ #define _dbgdump printk ++ ++#elif defined PLATFORM_FREEBSD ++ + #define _dbgdump printf #endif -@@ -186,8 +200,8 @@ extern void rtl871x_cedbg(const char *fm +@@ -186,8 +200,8 @@ extern void rtl871x_cedbg(const char *fmt, ...); #define RT_TRACE(_Comp, _Level, Fmt)\ do {\ if((_Comp & GlobalDebugComponents) && (_Level <= GlobalDebugLevel)) {\ @@ -109311,7 +108738,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }\ }while(0) -@@ -233,21 +247,34 @@ extern void rtl871x_cedbg(const char *fm +@@ -233,21 +247,34 @@ extern void rtl871x_cedbg(const char *fmt, ...); #ifdef CONFIG_DEBUG_RTL819X @@ -109355,7 +108782,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef PLATFORM_WINDOWS #define DBG_871X do {} while(0) #define MSG_8192C do {} while(0) -@@ -264,15 +291,38 @@ extern void rtl871x_cedbg(const char *fm +@@ -264,15 +291,38 @@ extern void rtl871x_cedbg(const char *fmt, ...); #define ERR_8192C(x,...) do {} while(0) #endif @@ -109370,9 +108797,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #define WRN_8192C(x,...) do {} while(0) + #define ERR_8192C(x,...) do {} while(0) +#endif - -- #undef MSG_8192C -- #define MSG_8192C _dbgdump ++ +extern u32 GlobalDebugLevel; +#define LOG_LEVEL(level, ...)\ + do {\ @@ -109382,7 +108807,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + }while(0) + +#define DBG_871X_LEVEL LOG_LEVEL -+ + +- #undef MSG_8192C +- #define MSG_8192C _dbgdump +#if defined (_dbgdump) + #undef DBG_871X +// #define DBG_871X _dbgdump @@ -109401,7 +108828,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #undef WRN_8192C #define WRN_8192C _dbgdump -@@ -282,13 +332,25 @@ extern void rtl871x_cedbg(const char *fm +@@ -282,13 +332,25 @@ extern void rtl871x_cedbg(const char *fmt, ...); #endif @@ -109428,7 +108855,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int proc_get_write_reg(char *page, char **start, off_t offset, int count, int *eof, void *data); -@@ -340,6 +402,45 @@ extern void rtl871x_cedbg(const char *fm +@@ -340,6 +402,45 @@ extern void rtl871x_cedbg(const char *fmt, ...); off_t offset, int count, int *eof, void *data); @@ -109474,7 +108901,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_AP_MODE -@@ -359,6 +460,8 @@ extern void rtl871x_cedbg(const char *fm +@@ -359,6 +460,8 @@ extern void rtl871x_cedbg(const char *fmt, ...); int proc_get_best_channel(char *page, char **start, off_t offset, int count, int *eof, void *data); @@ -109483,7 +108910,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif int proc_get_rx_signal(char *page, char **start, -@@ -367,13 +470,47 @@ extern void rtl871x_cedbg(const char *fm +@@ -367,13 +470,47 @@ extern void rtl871x_cedbg(const char *fmt, ...); int proc_set_rx_signal(struct file *file, const char *buffer, unsigned long count, void *data); @@ -109531,7 +108958,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int proc_get_rssi_disp(char *page, char **start, off_t offset, int count, -@@ -381,7 +518,19 @@ extern void rtl871x_cedbg(const char *fm +@@ -381,7 +518,19 @@ extern void rtl871x_cedbg(const char *fmt, ...); int proc_set_rssi_disp(struct file *file, const char *buffer, unsigned long count, void *data); @@ -109552,6 +108979,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //CONFIG_PROC_DEBUG +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_eeprom.h b/drivers/net/wireless/rtl8192cu/include/rtw_eeprom.h +index 9d31998..ce834dd 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_eeprom.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_eeprom.h @@ -16,8 +16,7 @@ @@ -109564,6 +108993,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __RTW_EEPROM_H__ #define __RTW_EEPROM_H__ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_efuse.h b/drivers/net/wireless/rtl8192cu/include/rtw_efuse.h +index 66be910..224aa4f 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_efuse.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_efuse.h @@ -1,7 +1,7 @@ @@ -109575,7 +109006,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. -@@ -106,7 +106,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter +@@ -106,7 +106,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data); u16 Efuse_GetCurrentSize(PADAPTER pAdapter, u8 efuseType, BOOLEAN bPseudoTest); u8 Efuse_CalculateWordCnts(u8 word_en); void ReadEFuseByte(PADAPTER Adapter, u16 _offset, u8 *pbuf, BOOLEAN bPseudoTest) ; @@ -109584,11 +109015,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 efuse_OneByteRead(PADAPTER pAdapter, u16 addr, u8 *data, BOOLEAN bPseudoTest); u8 efuse_OneByteWrite(PADAPTER pAdapter, u16 addr, u8 data, BOOLEAN bPseudoTest); -@@ -121,3 +121,4 @@ void EFUSE_ShadowMapUpdate(PADAPTER pAda +@@ -121,3 +121,4 @@ void EFUSE_ShadowMapUpdate(PADAPTER pAdapter, u8 efuseType, BOOLEAN bPseudoTest) void EFUSE_ShadowRead(PADAPTER pAdapter, u8 Type, u16 Offset, u32 *Value); #endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_event.h b/drivers/net/wireless/rtl8192cu/include/rtw_event.h +index dd9f097..4299ddc 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_event.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_event.h @@ -16,8 +16,7 @@ @@ -109611,6 +109044,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; struct addba_event +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ht.h b/drivers/net/wireless/rtl8192cu/include/rtw_ht.h +index 4dcad2b..3cd904d 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_ht.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ht.h @@ -16,8 +16,7 @@ @@ -109623,6 +109058,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _RTW_HT_H_ #define _RTW_HT_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_io.h b/drivers/net/wireless/rtl8192cu/include/rtw_io.h +index b1f57c1..c66845c 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_io.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_io.h @@ -16,8 +16,8 @@ @@ -109731,7 +109168,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; struct io_req { -@@ -424,26 +381,30 @@ extern int _rtw_write16_async(_adapter * +@@ -424,26 +381,30 @@ extern int _rtw_write16_async(_adapter *adapter, u32 addr, u16 val); extern int _rtw_write32_async(_adapter *adapter, u32 addr, u32 val); extern void _rtw_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem); @@ -109770,7 +109207,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define rtw_write8(adapter, addr, val) dbg_rtw_write8((adapter), (addr), (val), __FUNCTION__, __LINE__) #define rtw_write16(adapter, addr, val) dbg_rtw_write16((adapter), (addr), (val), __FUNCTION__, __LINE__) #define rtw_write32(adapter, addr, val) dbg_rtw_write32((adapter), (addr), (val), __FUNCTION__, __LINE__) -@@ -455,7 +416,7 @@ extern int dbg_rtw_writeN(_adapter *adap +@@ -455,7 +416,7 @@ extern int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, co #define rtw_write_mem(adapter, addr, cnt, mem) _rtw_write_mem((adapter), addr, cnt, mem) #define rtw_write_port(adapter, addr, cnt, mem) _rtw_write_port(adapter, addr, cnt, mem) @@ -109779,7 +109216,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel(adapter) #else //DBG_IO #define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr)) -@@ -476,7 +437,7 @@ extern int dbg_rtw_writeN(_adapter *adap +@@ -476,7 +437,7 @@ extern int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, co #define rtw_write_mem(adapter, addr, cnt, mem) _rtw_write_mem((adapter), (addr), (cnt), (mem)) #define rtw_write_port(adapter, addr, cnt, mem) _rtw_write_port((adapter), (addr), (cnt), (mem)) @@ -109788,7 +109225,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter)) #endif //DBG_IO -@@ -512,7 +473,7 @@ extern void async_write_mem(_adapter *ad +@@ -512,7 +473,7 @@ extern void async_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem); extern void async_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem); @@ -109797,6 +109234,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern uint alloc_io_queue(_adapter *adapter); +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl.h +index e6d34f0..c4da301 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl.h @@ -16,8 +16,7 @@ @@ -109840,7 +109279,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static NDIS_STATUS oid_null_function(struct oid_par_priv* poid_par_priv) { _func_enter_; -@@ -243,10 +243,8 @@ void Set_802_3_MULTICAST_LIST(ADAPTER *p +@@ -243,10 +243,8 @@ void Set_802_3_MULTICAST_LIST(ADAPTER *pAdapter, UCHAR *MCListbuf, ULONG MCListl #endif// end of PLATFORM_WINDOWS @@ -109852,6 +109291,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif extern NDIS_STATUS drv_query_info( +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_query.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_query.h +index e9ad16f1..5b6018a 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_query.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_query.h @@ -16,8 +16,7 @@ @@ -109864,6 +109305,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _RTW_IOCTL_QUERY_H_ #define _RTW_IOCTL_QUERY_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_rtl.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_rtl.h +index 1ea8f21..3bff766 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_rtl.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_rtl.h @@ -16,8 +16,7 @@ @@ -109876,6 +109319,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _RTW_IOCTL_RTL_H_ #define _RTW_IOCTL_RTL_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_set.h b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_set.h +index 577af51..82f9810 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_set.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_ioctl_set.h @@ -16,8 +16,7 @@ @@ -109888,7 +109333,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __RTW_IOCTL_SET_H_ #define __RTW_IOCTL_SET_H_ -@@ -60,19 +59,21 @@ u8 rtw_set_802_11_authentication_mode(_a +@@ -60,19 +59,21 @@ u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICAT u8 rtw_set_802_11_bssid(_adapter* padapter, u8 *bssid); u8 rtw_set_802_11_add_wep(_adapter * padapter, NDIS_802_11_WEP * wep); u8 rtw_set_802_11_disassociate(_adapter * padapter); @@ -109913,6 +109358,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_led.h b/drivers/net/wireless/rtl8192cu/include/rtw_led.h +index 72634f8..b5365ba 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_led.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_led.h @@ -16,8 +16,7 @@ @@ -109983,6 +109430,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } LED_871x, *PLED_871x; +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mlme.h b/drivers/net/wireless/rtl8192cu/include/rtw_mlme.h +index 0beca93..d9d6456 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_mlme.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mlme.h @@ -16,18 +16,21 @@ @@ -110442,7 +109891,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern int event_thread(void *context); extern void rtw_join_timeout_handler(void* FunctionContext); extern void _rtw_scan_timeout_handler(void* FunctionContext); -@@ -563,6 +721,11 @@ __inline static void up_scanned_network( +@@ -563,6 +721,11 @@ __inline static void up_scanned_network(struct mlme_priv *pmlmepriv) _exit_critical_bh(&pmlmepriv->lock, &irqL); } @@ -110454,7 +109903,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release __inline static void down_scanned_network(struct mlme_priv *pmlmepriv) { _irqL irqL; -@@ -592,6 +755,7 @@ extern void rtw_free_assoc_resources(_ad +@@ -592,6 +755,7 @@ extern void rtw_free_assoc_resources(_adapter* adapter, int lock_scanned_queue); extern void rtw_indicate_disconnect(_adapter* adapter); extern void rtw_indicate_connect(_adapter* adapter); void rtw_indicate_scan_done( _adapter *padapter, bool aborted); @@ -110462,7 +109911,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern int rtw_restruct_sec_ie(_adapter *adapter,u8 *in_ie,u8 *out_ie,uint in_len); extern int rtw_restruct_wmm_ie(_adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len, uint initial_out_len); -@@ -606,8 +770,15 @@ extern void rtw_scan_timeout_handler(_ad +@@ -606,8 +770,15 @@ extern void rtw_scan_timeout_handler(_adapter *adapter); extern void rtw_dynamic_check_timer_handlder(_adapter *adapter); #ifdef CONFIG_SET_SCAN_DENY_TIMER @@ -110480,7 +109929,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif -@@ -643,16 +814,24 @@ u8 *rtw_get_beacon_interval_from_ie(u8 * +@@ -643,16 +814,24 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie); void rtw_joinbss_reset(_adapter *padapter); #ifdef CONFIG_80211N_HT @@ -110509,6 +109958,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h b/drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h +index d9a203f..5cddca4 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mlme_ext.h @@ -16,8 +16,7 @@ @@ -110789,7 +110240,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; int init_mlme_ext_priv(_adapter* padapter); -@@ -444,26 +515,34 @@ int init_hw_mlme_ext(_adapter *padapter) +@@ -444,26 +515,34 @@ int init_hw_mlme_ext(_adapter *padapter); void free_mlme_ext_priv (struct mlme_ext_priv *pmlmeext); extern void init_mlme_ext_timer(_adapter *padapter); extern void init_addba_retry_timer(_adapter *padapter, struct sta_info *psta); @@ -110832,7 +110283,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char channel_offset, unsigned short bwmode); void SelectChannel(_adapter *padapter, unsigned char channel); -@@ -500,7 +579,6 @@ int WMM_param_handler(_adapter *padapter +@@ -500,7 +579,6 @@ int WMM_param_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE); #ifdef CONFIG_WFD int WFD_info_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE); #endif @@ -110840,7 +110291,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void WMMOnAssocRsp(_adapter *padapter); void HT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE); -@@ -517,6 +595,7 @@ void process_csa_ie(_adapter *padapter, +@@ -517,6 +595,7 @@ void process_csa_ie(_adapter *padapter, u8 *pframe, uint len); void update_IOT_info(_adapter *padapter); void update_capinfo(PADAPTER Adapter, u16 updateCap); void update_wireless_mode(_adapter * padapter); @@ -110848,7 +110299,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void update_bmc_sta_support_rate(_adapter *padapter, u32 mac_id); int update_sta_support_rate(_adapter *padapter, u8* pvar_ie, uint var_ie_len, int cam_idx); -@@ -544,50 +623,37 @@ void report_add_sta_event(_adapter *pada +@@ -544,50 +623,37 @@ void report_add_sta_event(_adapter *padapter, unsigned char* MacAddr, int cam_id void beacon_timing_control(_adapter *padapter); extern u8 set_tx_beacon_cmd(_adapter*padapter); unsigned int setup_beacon_frame(_adapter *padapter, unsigned char *beacon_frame); @@ -110915,7 +110366,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned int send_delba(_adapter *padapter, u8 initiator, u8 *addr); unsigned int send_beacon(_adapter *padapter); -@@ -609,11 +675,15 @@ unsigned int OnAuthClient(_adapter *pada +@@ -609,11 +675,15 @@ unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame); unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame); unsigned int OnAction(_adapter *padapter, union recv_frame *precv_frame); @@ -110932,7 +110383,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release unsigned int OnAction_wmm(_adapter *padapter, union recv_frame *precv_frame); unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame); -@@ -627,6 +697,9 @@ void linked_status_chk(_adapter *padapte +@@ -627,6 +697,9 @@ void linked_status_chk(_adapter *padapter); void survey_timer_hdl (_adapter *padapter); void link_timer_hdl (_adapter *padapter); void addba_timer_hdl(struct sta_info *psta); @@ -110942,7 +110393,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //void reauth_timer_hdl(_adapter *padapter); //void reassoc_timer_hdl(_adapter *padapter); -@@ -641,7 +714,13 @@ void addba_timer_hdl(struct sta_info *ps +@@ -641,7 +714,13 @@ void addba_timer_hdl(struct sta_info *psta); /*DBG_871X("%s set_link_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms));*/ \ _set_timer(&(mlmeext)->link_timer, (ms)); \ } while(0) @@ -110957,7 +110408,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern int cckrates_included(unsigned char *rate, int ratelen); extern int cckratesonly_included(unsigned char *rate, int ratelen); -@@ -650,24 +729,29 @@ extern void process_addba_req(_adapter * +@@ -650,24 +729,29 @@ extern void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr); extern void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len); extern void correct_TSF(_adapter *padapter, struct mlme_ext_priv *pmlmeext); @@ -111004,7 +110455,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct cmd_hdl { uint parmsize; -@@ -699,6 +783,7 @@ u8 add_ba_hdl(_adapter *padapter, unsign +@@ -699,6 +783,7 @@ u8 add_ba_hdl(_adapter *padapter, unsigned char *pbuf); u8 mlme_evt_hdl(_adapter *padapter, unsigned char *pbuf); u8 h2c_msg_hdl(_adapter *padapter, unsigned char *pbuf); u8 tx_beacon_hdl(_adapter *padapter, unsigned char *pbuf); @@ -111021,6 +110472,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release GEN_MLME_EXT_HANDLER(0, NULL) GEN_MLME_EXT_HANDLER(0, NULL) GEN_MLME_EXT_HANDLER(0, NULL) +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mp.h b/drivers/net/wireless/rtl8192cu/include/rtw_mp.h +index a468714..0ebb1ba 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_mp.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mp.h @@ -192,7 +192,7 @@ struct mp_tx @@ -111045,7 +110498,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //======================================================================= //extern struct mp_xmit_frame *alloc_mp_xmitframe(struct mp_priv *pmp_priv); -@@ -673,8 +679,6 @@ extern void GetPowerTracking(PADAPTER pa +@@ -673,8 +679,6 @@ extern void GetPowerTracking(PADAPTER padapter, u8 *enable); extern u32 mp_query_psd(PADAPTER pAdapter, u8 *data); @@ -111054,6 +110507,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern void Hal_SetAntenna(PADAPTER pAdapter); extern void Hal_SetBandwidth(PADAPTER pAdapter); +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mp_ioctl.h b/drivers/net/wireless/rtl8192cu/include/rtw_mp_ioctl.h +index e16df40..962bc38 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_mp_ioctl.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mp_ioctl.h @@ -1,7 +1,7 @@ @@ -111065,6 +110520,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_mp_phy_regdef.h b/drivers/net/wireless/rtl8192cu/include/rtw_mp_phy_regdef.h +index 4906005..0b47cb5 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_mp_phy_regdef.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_mp_phy_regdef.h @@ -16,8 +16,7 @@ @@ -111077,9 +110534,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /***************************************************************************** * * Module: __RTW_MP_PHY_REGDEF_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_p2p.h b/drivers/net/wireless/rtl8192cu/include/rtw_p2p.h +index a29ceaa..4249bc9 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_p2p.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_p2p.h -@@ -29,11 +29,13 @@ u32 build_assoc_resp_p2p_ie(struct wifid +@@ -29,11 +29,13 @@ u32 build_assoc_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 status u32 build_deauth_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf); #ifdef CONFIG_WFD u32 build_probe_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf); @@ -111094,7 +110553,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 build_assoc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf); u32 build_assoc_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf); u32 build_provdisc_req_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf); -@@ -51,16 +53,24 @@ u8 process_p2p_group_negotation_resp( st +@@ -51,16 +53,24 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pframe, uint len ); u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint len); @@ -111122,6 +110581,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role); int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role); +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_pwrctrl.h b/drivers/net/wireless/rtl8192cu/include/rtw_pwrctrl.h +index 2b00beb..a4cb292 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_pwrctrl.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_pwrctrl.h @@ -16,8 +16,7 @@ @@ -111144,50 +110605,45 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#define PS_ALL_ON BIT(2) -#define PS_ST_ACTIVE BIT(3) -#define PS_LP BIT(4) // low performance -- --#define PS_STATE_MASK (0x0F) --#define PS_STATE_HW_MASK (0x07) --#define PS_SEQ_MASK (0xc0) -- --#define PS_STATE(x) (PS_STATE_MASK & (x)) --#define PS_STATE_HW(x) (PS_STATE_HW_MASK & (x)) --#define PS_SEQ(x) (PS_SEQ_MASK & (x)) -- --#define PS_STATE_S0 (PS_DPS) --#define PS_STATE_S1 (PS_LCLK) --#define PS_STATE_S2 (PS_RF_OFF) --#define PS_STATE_S3 (PS_ALL_ON) --#define PS_STATE_S4 ((PS_ST_ACTIVE) | (PS_ALL_ON)) -- -- --#define PS_IS_RF_ON(x) ((x) & (PS_ALL_ON)) --#define PS_IS_ACTIVE(x) ((x) & (PS_ST_ACTIVE)) --#define CLR_PS_STATE(x) ((x) = ((x) & (0xF0))) +#define PS_DPS BIT(0) +#define PS_LCLK (PS_DPS) +#define PS_RF_OFF BIT(1) +#define PS_ALL_ON BIT(2) +#define PS_ST_ACTIVE BIT(3) -+ + +-#define PS_STATE_MASK (0x0F) +-#define PS_STATE_HW_MASK (0x07) +-#define PS_SEQ_MASK (0xc0) +#define PS_ISR_ENABLE BIT(4) +#define PS_IMR_ENABLE BIT(5) +#define PS_ACK BIT(6) +#define PS_TOGGLE BIT(7) -+ + +-#define PS_STATE(x) (PS_STATE_MASK & (x)) +-#define PS_STATE_HW(x) (PS_STATE_HW_MASK & (x)) +-#define PS_SEQ(x) (PS_SEQ_MASK & (x)) +#define PS_STATE_MASK (0x0F) +#define PS_STATE_HW_MASK (0x07) +#define PS_SEQ_MASK (0xc0) -+ + +-#define PS_STATE_S0 (PS_DPS) +-#define PS_STATE_S1 (PS_LCLK) +-#define PS_STATE_S2 (PS_RF_OFF) +-#define PS_STATE_S3 (PS_ALL_ON) +-#define PS_STATE_S4 ((PS_ST_ACTIVE) | (PS_ALL_ON)) +#define PS_STATE(x) (PS_STATE_MASK & (x)) +#define PS_STATE_HW(x) (PS_STATE_HW_MASK & (x)) +#define PS_SEQ(x) (PS_SEQ_MASK & (x)) -+ + +#define PS_STATE_S0 (PS_DPS) +#define PS_STATE_S1 (PS_LCLK) +#define PS_STATE_S2 (PS_RF_OFF) +#define PS_STATE_S3 (PS_ALL_ON) +#define PS_STATE_S4 ((PS_ST_ACTIVE) | (PS_ALL_ON)) -+ + +-#define PS_IS_RF_ON(x) ((x) & (PS_ALL_ON)) +-#define PS_IS_ACTIVE(x) ((x) & (PS_ST_ACTIVE)) +-#define CLR_PS_STATE(x) ((x) = ((x) & (0xF0))) + +#define PS_IS_RF_ON(x) ((x) & (PS_ALL_ON)) +#define PS_IS_ACTIVE(x) ((x) & (PS_ST_ACTIVE)) @@ -111341,7 +110797,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int ips_leave(_adapter * padapter); #endif -@@ -331,13 +338,25 @@ void rtw_resume_in_workqueue(struct pwrc +@@ -331,13 +338,25 @@ void rtw_resume_in_workqueue(struct pwrctrl_priv *pwrpriv); #endif //CONFIG_RESUME_IN_WORKQUEUE #if defined(CONFIG_HAS_EARLYSUSPEND ) || defined(CONFIG_ANDROID_POWER) @@ -111371,6 +110827,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +int rtw_pm_set_lps(_adapter *padapter, u8 mode); #endif //__RTL871X_PWRCTRL_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_qos.h b/drivers/net/wireless/rtl8192cu/include/rtw_qos.h +index e35b77f..a359c5f 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_qos.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_qos.h @@ -16,8 +16,7 @@ @@ -111383,6 +110841,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _RTW_QOS_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_recv.h b/drivers/net/wireless/rtl8192cu/include/rtw_recv.h +index e204ef3..3a4b14b 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_recv.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_recv.h @@ -1,7 +1,7 @@ @@ -111511,7 +110971,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct rtw_rx_ring { struct recv_stat *desc; -@@ -207,27 +210,28 @@ accesser of recv_priv: rtw_recv_entry(di +@@ -207,27 +210,28 @@ accesser of recv_priv: rtw_recv_entry(dispatch / passive level); recv_thread(pas using enter_critical section to protect */ @@ -111763,7 +111223,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue); struct recv_buf *rtw_dequeue_recvbuf (_queue *queue); -@@ -479,32 +502,32 @@ __inline static u8 *get_rxmem(union recv +@@ -479,32 +502,32 @@ __inline static u8 *get_rxmem(union recv_frame *precvframe) __inline static u8 *get_rx_status(union recv_frame *precvframe) { @@ -111804,7 +111264,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(precvframe==NULL) return NULL; -@@ -519,7 +542,7 @@ __inline static u8 *recvframe_push(union +@@ -519,7 +542,7 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz) precvframe->u.hdr.len +=sz; return precvframe->u.hdr.rx_data; @@ -111813,7 +111273,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -533,7 +556,7 @@ __inline static u8 *recvframe_pull(union +@@ -533,7 +556,7 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz) if(precvframe==NULL) return NULL; @@ -111822,7 +111282,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release precvframe->u.hdr.rx_data += sz; if(precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) -@@ -543,9 +566,9 @@ __inline static u8 *recvframe_pull(union +@@ -543,9 +566,9 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz) } precvframe->u.hdr.len -=sz; @@ -111834,7 +111294,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz) -@@ -553,16 +576,16 @@ __inline static u8 *recvframe_put(union +@@ -553,16 +576,16 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz) // rx_tai += sz; move rx_tail sz bytes hereafter //used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller @@ -111854,7 +111314,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end) { precvframe->u.hdr.rx_tail -= sz; -@@ -580,7 +603,7 @@ __inline static u8 *recvframe_put(union +@@ -580,7 +603,7 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz) __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz) { // rmv data from rx_tail (by yitsen) @@ -111863,7 +111323,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //used for extract sz bytes from rx_end, update rx_end and return the updated rx_end to the caller //after pulling, rx_end must be still larger than rx_data. -@@ -606,10 +629,10 @@ __inline static u8 *recvframe_pull_tail( +@@ -606,10 +629,10 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz) __inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe) { _buffer * buf_desc; @@ -111876,7 +111336,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NdisQueryPacket(precvframe->u.hdr.pkt, NULL, NULL, &buf_desc, NULL); #endif -@@ -619,18 +642,17 @@ __inline static _buffer * get_rxbuf_desc +@@ -619,18 +642,17 @@ __inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe) __inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem) { @@ -111900,7 +111360,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 * buf_star; union recv_frame * precv_frame; #ifdef PLATFORM_WINDOWS -@@ -648,7 +670,7 @@ __inline static union recv_frame *pkt_to +@@ -648,7 +670,7 @@ __inline static union recv_frame *pkt_to_recvframe(_pkt *pkt) __inline static u8 *pkt_to_recvmem(_pkt *pkt) { // return the rx_head @@ -111909,7 +111369,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release union recv_frame * precv_frame = pkt_to_recvframe(pkt); return precv_frame->u.hdr.rx_head; -@@ -662,7 +684,7 @@ __inline static u8 *pkt_to_recvdata(_pkt +@@ -662,7 +684,7 @@ __inline static u8 *pkt_to_recvdata(_pkt *pkt) union recv_frame * precv_frame =pkt_to_recvframe(pkt); return precv_frame->u.hdr.rx_data; @@ -111918,7 +111378,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -686,13 +708,14 @@ __inline static u8 query_rx_pwr_percenta +@@ -686,13 +708,14 @@ __inline static u8 query_rx_pwr_percentage(s8 antpower ) return (100+antpower); } } @@ -111935,6 +111395,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return SignalPower; } +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_rf.h b/drivers/net/wireless/rtl8192cu/include/rtw_rf.h +index 7414c1b6..697dd4e 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_rf.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_rf.h @@ -16,7 +16,7 @@ @@ -111946,6 +111408,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __RTW_RF_H_ #define __RTW_RF_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_security.h b/drivers/net/wireless/rtl8192cu/include/rtw_security.h +index 02ef9b0..835677c3 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_security.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_security.h @@ -16,8 +16,7 @@ @@ -112026,7 +111490,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_secmicsetkey(struct mic_data *pmicdata, u8 * key ); void rtw_secmicappendbyte(struct mic_data *pmicdata, u8 b ); void rtw_secmicappend(struct mic_data *pmicdata, u8 * src, u32 nBytes ); -@@ -398,7 +412,9 @@ void rtw_wep_encrypt(_adapter *padapter, +@@ -398,7 +412,9 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe); u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe); u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe); void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe); @@ -112037,7 +111501,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_TDLS void wpa_tdls_generate_tpk(_adapter *padapter, struct sta_info *psta); int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq, -@@ -406,7 +422,7 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_ +@@ -406,7 +422,7 @@ int wpa_tdls_ftie_mic(u8 *kck, u8 trans_seq, u8 *mic); int tdls_verify_mic(u8 *kck, u8 trans_seq, u8 *lnkid, u8 *rsnie, u8 *timeoutie, u8 *ftie); @@ -112060,6 +111524,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #endif //__RTL871X_SECURITY_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_sreset.h b/drivers/net/wireless/rtl8192cu/include/rtw_sreset.h +new file mode 100644 +index 0000000..45dd2bf --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_sreset.h @@ -0,0 +1,74 @@ @@ -112137,6 +111604,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_tdls.h b/drivers/net/wireless/rtl8192cu/include/rtw_tdls.h +new file mode 100644 +index 0000000..1005331 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/rtw_tdls.h @@ -0,0 +1,143 @@ @@ -112283,11 +111753,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_version.h b/drivers/net/wireless/rtl8192cu/include/rtw_version.h +index f88ea77..4fb9dd4 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_version.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_version.h @@ -1 +1 @@ -#define DRIVERVERSION "v3.4.4_4749.20121105" +#define DRIVERVERSION "v4.0.2_9000.20130911" +diff --git a/drivers/net/wireless/rtl8192cu/include/rtw_xmit.h b/drivers/net/wireless/rtl8192cu/include/rtw_xmit.h +index 54e0b2d..f7eaf4a 100644 --- a/drivers/net/wireless/rtl8192cu/include/rtw_xmit.h +++ b/drivers/net/wireless/rtl8192cu/include/rtw_xmit.h @@ -1,7 +1,7 @@ @@ -112786,7 +112260,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; extern struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv); -@@ -622,6 +694,8 @@ extern s32 rtw_make_wlanhdr(_adapter *pa +@@ -622,6 +694,8 @@ extern s32 rtw_make_wlanhdr(_adapter *padapter, u8 *hdr, struct pkt_attrib *patt extern s32 rtw_put_snap(u8 *data, u16 h_proto); extern struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv); @@ -112795,7 +112269,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe); extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue); struct tx_servq *rtw_get_sta_pending(_adapter *padapter, struct sta_info *psta, sint up, u8 *ac); -@@ -630,15 +704,15 @@ extern struct xmit_frame* rtw_dequeue_xf +@@ -630,15 +704,15 @@ extern struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct extern s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe); extern thread_return rtw_xmit_thread(thread_context context); @@ -112818,7 +112292,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag); void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv); -@@ -655,20 +729,26 @@ void _rtw_free_xmit_priv (struct xmit_pr +@@ -655,20 +729,26 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv); void rtw_alloc_hwxmits(_adapter *padapter); void rtw_free_hwxmits(_adapter *padapter); @@ -112851,6 +112325,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #endif //_RTL871X_XMIT_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_hal.h b/drivers/net/wireless/rtl8192cu/include/sdio_hal.h +deleted file mode 100644 +index 51139bb..0000000 --- a/drivers/net/wireless/rtl8192cu/include/sdio_hal.h +++ /dev/null @@ -1,34 +0,0 @@ @@ -112888,6 +112365,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -#endif //__SDIO_HAL_H__ - +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops.h +deleted file mode 100644 +index b1e9b63..0000000 --- a/drivers/net/wireless/rtl8192cu/include/sdio_ops.h +++ /dev/null @@ -1,80 +0,0 @@ @@ -112971,6 +112451,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -#endif - +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops_ce.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops_ce.h +deleted file mode 100644 +index 81687c9..0000000 --- a/drivers/net/wireless/rtl8192cu/include/sdio_ops_ce.h +++ /dev/null @@ -1,56 +0,0 @@ @@ -113030,6 +112513,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -#endif - +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops_linux.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops_linux.h +deleted file mode 100644 +index c58ab08..0000000 --- a/drivers/net/wireless/rtl8192cu/include/sdio_ops_linux.h +++ /dev/null @@ -1,55 +0,0 @@ @@ -113088,6 +112574,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -#endif - +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_ops_xp.h b/drivers/net/wireless/rtl8192cu/include/sdio_ops_xp.h +deleted file mode 100644 +index 3569611..0000000 --- a/drivers/net/wireless/rtl8192cu/include/sdio_ops_xp.h +++ /dev/null @@ -1,56 +0,0 @@ @@ -113147,6 +112636,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -#endif - +diff --git a/drivers/net/wireless/rtl8192cu/include/sdio_osintf.h b/drivers/net/wireless/rtl8192cu/include/sdio_osintf.h +deleted file mode 100644 +index 099262b..0000000 --- a/drivers/net/wireless/rtl8192cu/include/sdio_osintf.h +++ /dev/null @@ -1,48 +0,0 @@ @@ -113198,6 +112690,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -#endif - +diff --git a/drivers/net/wireless/rtl8192cu/include/sta_info.h b/drivers/net/wireless/rtl8192cu/include/sta_info.h +index 8f01f21..75763db 100644 --- a/drivers/net/wireless/rtl8192cu/include/sta_info.h +++ b/drivers/net/wireless/rtl8192cu/include/sta_info.h @@ -15,8 +15,8 @@ @@ -113419,7 +112913,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif }; -@@ -342,12 +415,18 @@ __inline static u32 wifi_mac_hash(u8 *ma +@@ -342,12 +415,18 @@ __inline static u32 wifi_mac_hash(u8 *mac) extern u32 _rtw_init_sta_priv(struct sta_priv *pstapriv); extern u32 _rtw_free_sta_priv(struct sta_priv *pstapriv); @@ -113439,6 +112933,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //_STA_INFO_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_hal.h b/drivers/net/wireless/rtl8192cu/include/usb_hal.h +index 9cd21f3..d765b82 100644 --- a/drivers/net/wireless/rtl8192cu/include/usb_hal.h +++ b/drivers/net/wireless/rtl8192cu/include/usb_hal.h @@ -16,8 +16,7 @@ @@ -113451,7 +112947,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __USB_HAL_H__ #define __USB_HAL_H__ -@@ -28,5 +27,11 @@ void rtl8192du_set_hal_ops(_adapter * pa +@@ -28,5 +27,11 @@ void rtl8192du_set_hal_ops(_adapter * padapter); #ifdef CONFIG_INTEL_PROXIM extern _adapter *rtw_usb_get_sw_pointer(void); #endif //CONFIG_INTEL_PROXIM @@ -113463,6 +112959,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif //CONFIG_WOWLAN #endif //__USB_HAL_H__ +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_ops.h b/drivers/net/wireless/rtl8192cu/include/usb_ops.h +index 3868bc0..8bbec2d 100644 --- a/drivers/net/wireless/rtl8192cu/include/usb_ops.h +++ b/drivers/net/wireless/rtl8192cu/include/usb_ops.h @@ -16,8 +16,7 @@ @@ -113525,7 +113023,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } return ret; } -@@ -92,9 +101,10 @@ static inline int rtw_inc_and_chk_contin +@@ -92,9 +101,10 @@ static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobjpr /* * Set the continual_urb_error of this @param dvobjprive to 0 */ @@ -113538,6 +113036,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //__USB_OPS_H_ + +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_ops_linux.h b/drivers/net/wireless/rtl8192cu/include/usb_ops_linux.h +new file mode 100644 +index 0000000..d418ba2 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/include/usb_ops_linux.h @@ -0,0 +1,63 @@ @@ -113604,6 +113105,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif + +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_osintf.h b/drivers/net/wireless/rtl8192cu/include/usb_osintf.h +index 8642aa2..753013d 100644 --- a/drivers/net/wireless/rtl8192cu/include/usb_osintf.h +++ b/drivers/net/wireless/rtl8192cu/include/usb_osintf.h @@ -16,8 +16,7 @@ @@ -113616,6 +113119,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef __USB_OSINTF_H #define __USB_OSINTF_H +diff --git a/drivers/net/wireless/rtl8192cu/include/usb_vendor_req.h b/drivers/net/wireless/rtl8192cu/include/usb_vendor_req.h +index 72864de..f33e982 100644 --- a/drivers/net/wireless/rtl8192cu/include/usb_vendor_req.h +++ b/drivers/net/wireless/rtl8192cu/include/usb_vendor_req.h @@ -16,8 +16,7 @@ @@ -113628,6 +113133,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _USB_VENDOR_REQUEST_H_ #define _USB_VENDOR_REQUEST_H_ +diff --git a/drivers/net/wireless/rtl8192cu/include/wifi.h b/drivers/net/wireless/rtl8192cu/include/wifi.h +index a80a805..0bb55bb 100644 --- a/drivers/net/wireless/rtl8192cu/include/wifi.h +++ b/drivers/net/wireless/rtl8192cu/include/wifi.h @@ -16,8 +16,7 @@ @@ -113640,7 +113147,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifndef _WIFI_H_ #define _WIFI_H_ -@@ -551,6 +550,7 @@ __inline static int IsFrameTypeCtrl(unsi +@@ -551,6 +550,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe) #define _IBSS_PARA_IE_ 6 #define _COUNTRY_IE_ 7 #define _CHLGETXT_IE_ 16 @@ -113648,7 +113155,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _SUPPORTED_CH_IE_ 36 #define _CH_SWTICH_ANNOUNCE_ 37 //Secondary Channel Offset #define _RSN_IE_2_ 48 -@@ -561,6 +561,7 @@ __inline static int IsFrameTypeCtrl(unsi +@@ -561,6 +561,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe) #define _HT_CAPABILITY_IE_ 45 #define _FTIE_ 55 #define _TIMEOUT_ITVL_IE_ 56 @@ -113656,7 +113163,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _HT_EXTRA_INFO_IE_ 61 #define _HT_ADD_INFO_IE_ 61 //_HT_EXTRA_INFO_IE_ -@@ -568,6 +569,9 @@ __inline static int IsFrameTypeCtrl(unsi +@@ -568,6 +569,9 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe) #define EID_BSSIntolerantChlReport 73 #define _RIC_Descriptor_IE_ 75 @@ -113666,7 +113173,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _LINK_ID_IE_ 101 #define _CH_SWITCH_TIMING_ 104 #define _PTI_BUFFER_STATUS_ 106 -@@ -624,7 +628,10 @@ __inline static int IsFrameTypeCtrl(unsi +@@ -624,7 +628,10 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe) #define _WEP_104_PRIVACY_ 5 #define _WEP_WPA_MIXED_PRIVACY_ 6 // WEP + WPA */ @@ -113678,7 +113185,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /*----------------------------------------------------------------------------- Below is the definition for WMM ------------------------------------------------------------------------------*/ -@@ -654,7 +661,7 @@ __inline static int IsFrameTypeCtrl(unsi +@@ -654,7 +661,7 @@ __inline static int IsFrameTypeCtrl(unsigned char *pframe) /** @@ -113856,11 +113363,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + P2P_PRE_TX_INVITEREQ_PROCESS_WK = 4, + P2P_AP_P2P_CH_SWITCH_PROCESS_WK =5, + P2P_RO_CH_WK = 6, -+}; -+ + }; + +-enum P2P_PS +#ifdef CONFIG_P2P_PS +enum P2P_PS_STATE -+{ + { +- P2P_PS_DISABLE=0, +- P2P_PS_ENABLE=1, +- P2P_PS_SCAN=2, +- P2P_PS_SCAN_DONE=3, +- P2P_PS_ALLSTASLEEP=4, // for owner + P2P_PS_DISABLE = 0, + P2P_PS_ENABLE = 1, + P2P_PS_SCAN = 2, @@ -113868,21 +113381,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + P2P_PS_ALLSTASLEEP = 4, // for P2P GO }; --enum P2P_PS +enum P2P_PS_MODE - { -- P2P_PS_DISABLE=0, -- P2P_PS_ENABLE=1, -- P2P_PS_SCAN=2, -- P2P_PS_SCAN_DONE=3, -- P2P_PS_ALLSTASLEEP=4, // for owner ++{ + P2P_PS_NONE = 0, + P2P_PS_CTWINDOW = 1, + P2P_PS_NOA = 2, + P2P_PS_MIX = 3, // CTWindow and NoA - }; ++}; +#endif // CONFIG_P2P_PS - ++ // =====================WFD Section===================== // For Wi-Fi Display #define WFD_ATTR_DEVICE_INFO 0x00 @@ -113912,6 +113419,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_TX_MCAST2UNI #define IP_MCAST_MAC(mac) ((mac[0]==0x01)&&(mac[1]==0x00)&&(mac[2]==0x5e)) +diff --git a/drivers/net/wireless/rtl8192cu/include/wlan_bssdef.h b/drivers/net/wireless/rtl8192cu/include/wlan_bssdef.h +index fe555c6..1cf93dc 100644 --- a/drivers/net/wireless/rtl8192cu/include/wlan_bssdef.h +++ b/drivers/net/wireless/rtl8192cu/include/wlan_bssdef.h @@ -16,8 +16,7 @@ @@ -114227,6 +113736,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } struct wlan_network { +diff --git a/drivers/net/wireless/rtl8192cu/include/xmit_osdep.h b/drivers/net/wireless/rtl8192cu/include/xmit_osdep.h +index 7d28d43..e5848ec 100644 --- a/drivers/net/wireless/rtl8192cu/include/xmit_osdep.h +++ b/drivers/net/wireless/rtl8192cu/include/xmit_osdep.h @@ -16,8 +16,7 @@ @@ -114259,13 +113770,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev); #endif -@@ -86,5 +91,5 @@ extern sint rtw_endofpktfile (struct pkt +@@ -86,5 +91,5 @@ extern sint rtw_endofpktfile (struct pkt_file *pfile); extern void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt); extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe); -#endif // +#endif //__XMIT_OSDEP_H_ +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_cfg80211.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_cfg80211.c +index b592e27..5975d1e 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_cfg80211.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_cfg80211.c @@ -1,6 +1,6 @@ @@ -114295,7 +113808,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; #define RATETAB_ENT(_rate, _rateid, _flags) \ -@@ -85,9 +90,12 @@ static struct ieee80211_rate rtw_rates[] +@@ -85,9 +90,12 @@ static struct ieee80211_rate rtw_rates[] = { }; #define rtw_a_rates (rtw_rates + 4) @@ -114310,7 +113823,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static struct ieee80211_channel rtw_2ghz_channels[] = { CHAN2G(1, 2412, 0), -@@ -106,8 +114,6 @@ static struct ieee80211_channel rtw_2ghz +@@ -106,8 +114,6 @@ static struct ieee80211_channel rtw_2ghz_channels[] = { CHAN2G(14, 2484, 0), }; @@ -114319,7 +113832,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static struct ieee80211_channel rtw_5ghz_a_channels[] = { CHAN5G(34, 0), CHAN5G(36, 0), CHAN5G(38, 0), CHAN5G(40, 0), -@@ -130,23 +136,116 @@ static struct ieee80211_channel rtw_5ghz +@@ -130,23 +136,116 @@ static struct ieee80211_channel rtw_5ghz_a_channels[] = { CHAN5G(216, 0), }; @@ -114451,7 +113964,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static const struct ieee80211_txrx_stypes rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { [NL80211_IFTYPE_ADHOC] = { -@@ -217,6 +316,7 @@ static int rtw_ieee80211_channel_to_freq +@@ -217,6 +316,7 @@ static int rtw_ieee80211_channel_to_frequency(int chan, int band) } } @@ -114459,7 +113972,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_network *pnetwork) { int ret=0; -@@ -231,30 +331,102 @@ static int rtw_cfg80211_inform_bss(_adap +@@ -231,30 +331,102 @@ static int rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_network *pnet u8 *notify_ie; size_t notify_ielen; s32 notify_signal; @@ -114479,7 +113992,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - //printk("%s\n", __func__); - + //DBG_8192C("%s\n", __func__); -+ + +- channel = pnetwork->network.Configuration.DSConfig; +- if (channel <= RTW_CH_MAX_2G_CHANNEL) + bssinf_len = pnetwork->network.IELength+sizeof (struct rtw_ieee80211_hdr_3addr); + if(bssinf_len > MAX_BSSINFO_LEN){ + DBG_871X("%s IE Length too long > %d byte \n",__FUNCTION__,MAX_BSSINFO_LEN); @@ -114489,7 +114004,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + //To reduce PBC Overlap rate + //_enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL); + if(wdev_to_priv(wdev)->scan_request != NULL) -+ { + { +- //band = wiphy->bands[IEEE80211_BAND_2GHZ]; + u8 *psr=NULL, sr = 0; + NDIS_802_11_SSID *pssid = &pnetwork->network.Ssid; + struct cfg80211_scan_request *request = wdev_to_priv(wdev)->scan_request; @@ -114557,12 +114073,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + } + //_exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); - -- channel = pnetwork->network.Configuration.DSConfig; ++ + channel = pnetwork->network.Configuration.DSConfig; - if (channel <= RTW_CH_MAX_2G_CHANNEL) -- { -- //band = wiphy->bands[IEEE80211_BAND_2GHZ]; ++ if (channel <= RTW_CH_MAX_2G_CHANNEL) freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); - } else @@ -114573,7 +114086,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release notify_channel = ieee80211_get_channel(wiphy, freq); -@@ -267,53 +439,59 @@ static int rtw_cfg80211_inform_bss(_adap +@@ -267,53 +439,59 @@ static int rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_network *pnet notify_ie = pnetwork->network.IEs+_FIXED_IE_LENGTH_; notify_ielen = pnetwork->network.IELength-_FIXED_IE_LENGTH_; @@ -114652,7 +114165,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 1 -@@ -327,26 +505,96 @@ static int rtw_cfg80211_inform_bss(_adap +@@ -327,26 +505,96 @@ static int rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_network *pnet #endif if (unlikely(!bss)) { @@ -114754,7 +114267,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release && pwdev->iftype != NL80211_IFTYPE_P2P_CLIENT #endif ) { -@@ -355,33 +603,59 @@ void rtw_cfg80211_indicate_connect(_adap +@@ -355,33 +603,59 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter) if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) return; @@ -114831,7 +114344,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } -@@ -389,12 +663,14 @@ void rtw_cfg80211_indicate_disconnect(_a +@@ -389,12 +663,14 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter) { struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wireless_dev *pwdev = padapter->rtw_wdev; @@ -114848,7 +114361,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release && pwdev->iftype != NL80211_IFTYPE_P2P_CLIENT #endif ) { -@@ -404,28 +680,36 @@ void rtw_cfg80211_indicate_disconnect(_a +@@ -404,28 +680,36 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter) if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) return; @@ -114887,7 +114400,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - printk("pwdev->sme_state=%d\n", pwdev->sme_state); + if (!padapter->mlmepriv.not_indic_disco) { + DBG_8192C("pwdev->sme_state(b)=%d\n", pwdev->sme_state); -+ + + if(pwdev->sme_state==CFG80211_SME_CONNECTING) + cfg80211_connect_result(padapter->pnetdev, NULL, NULL, 0, NULL, 0, + WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_ATOMIC/*GFP_KERNEL*/); @@ -114895,13 +114408,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC); + //else + //DBG_8192C("pwdev->sme_state=%d\n", pwdev->sme_state); - ++ + DBG_8192C("pwdev->sme_state(a)=%d\n", pwdev->sme_state); + } } -@@ -493,6 +777,8 @@ static int set_group_key(_adapter *padap +@@ -493,6 +777,8 @@ static int set_group_key(_adapter *padapter, u8 *key, u8 alg, int keyid) _rtw_memset(psetkeyparm, 0, sizeof(struct setkey_parm)); psetkeyparm->keyid=(u8)keyid; @@ -114910,7 +114423,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psetkeyparm->algorithm = alg; -@@ -558,7 +844,6 @@ static int rtw_cfg80211_ap_set_encryptio +@@ -558,7 +844,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa { int ret = 0; u32 wep_key_idx, wep_key_len,wep_total_len; @@ -114918,7 +114431,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct sta_info *psta = NULL, *pbcmc_sta = NULL; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -@@ -624,67 +909,33 @@ static int rtw_cfg80211_ap_set_encryptio +@@ -624,67 +909,33 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa goto exit; } @@ -114981,10 +114494,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + _rtw_memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), param->u.crypt.key, wep_key_len); - _rtw_memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength); -- -- psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; + psecuritypriv->dot11DefKeylen[wep_key_idx] = wep_key_len; +- psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength; +- - set_wep_key(padapter, pwep->KeyMaterial, pwep->KeyLength, wep_key_idx); - - } @@ -114992,7 +114505,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit; -@@ -693,8 +944,7 @@ static int rtw_cfg80211_ap_set_encryptio +@@ -693,8 +944,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa if(!psta && check_fwstate(pmlmepriv, WIFI_AP_STATE)) // //group key { @@ -115002,7 +114515,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if(strcmp(param->u.crypt.alg, "WEP") == 0) { -@@ -765,7 +1015,7 @@ static int rtw_cfg80211_ap_set_encryptio +@@ -765,7 +1015,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa { if(check_fwstate(pmlmepriv, WIFI_AP_STATE)) { @@ -115011,7 +114524,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { _rtw_memcpy(psta->dot118021x_UncstKey.skey, param->u.crypt.key, (param->u.crypt.key_len>16 ?16:param->u.crypt.key_len)); -@@ -874,11 +1124,6 @@ static int rtw_cfg80211_ap_set_encryptio +@@ -874,11 +1124,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa exit: @@ -115023,7 +114536,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -888,7 +1133,6 @@ static int rtw_cfg80211_set_encryption(s +@@ -888,7 +1133,6 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param { int ret = 0; u32 wep_key_idx, wep_key_len,wep_total_len; @@ -115031,7 +114544,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; -@@ -898,7 +1142,7 @@ static int rtw_cfg80211_set_encryption(s +@@ -898,7 +1142,7 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param _func_enter_; @@ -115266,7 +114779,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 key_index, bool pairwise, const u8 *mac_addr, #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) u8 key_index, const u8 *mac_addr, -@@ -1128,22 +1355,15 @@ static int cfg80211_rtw_add_key(struct w +@@ -1128,22 +1355,15 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, _adapter *padapter = wiphy_to_adapter(wiphy); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -115296,7 +114809,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release param_len = sizeof(struct ieee_param) + params->key_len; param = (struct ieee_param *)rtw_malloc(param_len); if (param == NULL) -@@ -1170,6 +1390,11 @@ static int cfg80211_rtw_add_key(struct w +@@ -1170,6 +1390,11 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, case WLAN_CIPHER_SUITE_CCMP: alg_name = "CCMP"; break; @@ -115308,7 +114821,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release default: return -ENOTSUPP; } -@@ -1179,9 +1404,9 @@ static int cfg80211_rtw_add_key(struct w +@@ -1179,9 +1404,9 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, if (!mac_addr || is_broadcast_ether_addr(mac_addr)) { @@ -115320,7 +114833,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -1199,12 +1424,11 @@ static int cfg80211_rtw_add_key(struct w +@@ -1199,12 +1424,11 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, _rtw_memcpy(param->u.crypt.key, params->key, params->key_len); } @@ -115334,7 +114847,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { #ifdef CONFIG_AP_MODE if(mac_addr) -@@ -1215,7 +1439,7 @@ static int cfg80211_rtw_add_key(struct w +@@ -1215,7 +1439,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, } else { @@ -115343,7 +114856,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -1229,7 +1453,7 @@ static int cfg80211_rtw_add_key(struct w +@@ -1229,7 +1453,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev, } static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev, @@ -115352,7 +114865,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 key_index, bool pairwise, const u8 *mac_addr, #else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) u8 key_index, const u8 *mac_addr, -@@ -1256,123 +1480,165 @@ static int cfg80211_rtw_get_key(struct w +@@ -1256,123 +1480,165 @@ static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev, callback(cookie, ¶ms); return key->key_len ? 0 : -ENOENT; @@ -115414,7 +114927,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct iwm_priv *iwm = ndev_to_iwm(ndev); + _adapter *padapter = (_adapter *)rtw_netdev_priv(ndev); + struct security_priv *psecuritypriv = &padapter->securitypriv; -+ + +- IWM_DBG_WEXT(iwm, DBG, "Default key index is: %d\n", key_index); + DBG_871X(FUNC_NDEV_FMT" key_index=%d" + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE) + ", unicast=%d, multicast=%d" @@ -115425,18 +114939,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #endif + ); -- IWM_DBG_WEXT(iwm, DBG, "Default key index is: %d\n", key_index); -+ if ((key_index < WEP_KEYS) && ((psecuritypriv->dot11PrivacyAlgrthm == _WEP40_) || (psecuritypriv->dot11PrivacyAlgrthm == _WEP104_))) //set wep default key -+ { -+ psecuritypriv->ndisencryptstatus = Ndis802_11Encryption1Enabled; - - if (!iwm->keys[key_index].key_len) { - IWM_ERR(iwm, "Key %d not used\n", key_index); - return -EINVAL; - } -+ psecuritypriv->dot11PrivacyKeyIndex = key_index; ++ if ((key_index < WEP_KEYS) && ((psecuritypriv->dot11PrivacyAlgrthm == _WEP40_) || (psecuritypriv->dot11PrivacyAlgrthm == _WEP104_))) //set wep default key ++ { ++ psecuritypriv->ndisencryptstatus = Ndis802_11Encryption1Enabled; - iwm->default_key = key_index; ++ psecuritypriv->dot11PrivacyKeyIndex = key_index; ++ + psecuritypriv->dot11PrivacyAlgrthm = _WEP40_; + psecuritypriv->dot118021XGrpPrivacy = _WEP40_; + if (psecuritypriv->dot11DefKeylen[key_index] == 13) @@ -115574,7 +115087,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int cfg80211_rtw_change_iface(struct wiphy *wiphy, struct net_device *ndev, enum nl80211_iftype type, u32 *flags, -@@ -1381,60 +1647,99 @@ static int cfg80211_rtw_change_iface(str +@@ -1381,60 +1647,99 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, enum nl80211_iftype old_type; NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ; _adapter *padapter = wiphy_to_adapter(wiphy); @@ -115696,7 +115209,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; default: return -EOPNOTSUPP; -@@ -1442,12 +1747,19 @@ static int cfg80211_rtw_change_iface(str +@@ -1442,12 +1747,19 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, rtw_wdev->iftype = type; @@ -115716,7 +115229,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_setopmode_cmd(padapter, networkType); -@@ -1465,18 +1777,27 @@ void rtw_cfg80211_indicate_scan_done(str +@@ -1465,18 +1777,27 @@ void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool abor { //struct cfg80211_scan_request *scan_request = pwdev_priv->scan_request; @@ -115748,7 +115261,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); } -@@ -1498,46 +1819,7 @@ void rtw_cfg80211_surveydone_event_callb +@@ -1498,46 +1819,7 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter) struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; #ifdef CONFIG_DEBUG_CFG80211 @@ -115796,7 +115309,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); -@@ -1553,10 +1835,9 @@ void rtw_cfg80211_surveydone_event_callb +@@ -1553,10 +1835,9 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter) pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); //report network only if the current channel set contains the channel to which this network belongs @@ -115809,7 +115322,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ) { //ev=translate_scan(padapter, a, pnetwork, ev, stop); -@@ -1568,44 +1849,24 @@ void rtw_cfg80211_surveydone_event_callb +@@ -1568,44 +1849,24 @@ void rtw_cfg80211_surveydone_event_callback(_adapter *padapter) } _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); @@ -115860,7 +115373,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif if(len>0) -@@ -1613,7 +1874,7 @@ static int rtw_cfg80211_set_probe_req_wp +@@ -1613,7 +1874,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct net_device *net, char *buf if((wps_ie = rtw_get_wps_ie(buf, len, NULL, &wps_ielen))) { #ifdef CONFIG_DEBUG_CFG80211 @@ -115869,7 +115382,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif if(pmlmepriv->wps_probe_req_ie) -@@ -1626,7 +1887,7 @@ static int rtw_cfg80211_set_probe_req_wp +@@ -1626,7 +1887,7 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct net_device *net, char *buf pmlmepriv->wps_probe_req_ie = rtw_malloc(wps_ielen); if ( pmlmepriv->wps_probe_req_ie == NULL) { @@ -115878,7 +115391,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -1634,12 +1895,18 @@ static int rtw_cfg80211_set_probe_req_wp +@@ -1634,12 +1895,18 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct net_device *net, char *buf pmlmepriv->wps_probe_req_ie_len = wps_ielen; } @@ -115900,7 +115413,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif if(pmlmepriv->p2p_probe_req_ie) -@@ -1650,58 +1917,67 @@ static int rtw_cfg80211_set_probe_req_wp +@@ -1650,58 +1917,67 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct net_device *net, char *buf pmlmepriv->p2p_probe_req_ie = NULL; } @@ -116005,7 +115518,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { int i; u8 _status = _FALSE; -@@ -1709,11 +1985,14 @@ static int cfg80211_rtw_scan(struct wiph +@@ -1709,11 +1985,14 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev, _adapter *padapter = wiphy_to_adapter(wiphy); struct mlme_priv *pmlmepriv= &padapter->mlmepriv; NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT]; @@ -116020,7 +115533,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_P2P struct wifidirect_info *pwdinfo= &(padapter->wdinfo); #endif //CONFIG_P2P -@@ -1721,10 +2000,21 @@ static int cfg80211_rtw_scan(struct wiph +@@ -1721,10 +2000,21 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_ssid *ssids = request->ssids; int social_channel = 0, j = 0; bool need_indicate_scan_done = _FALSE; @@ -116046,7 +115559,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_MP_INCLUDED if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == _TRUE) -@@ -1740,8 +2030,22 @@ static int cfg80211_rtw_scan(struct wiph +@@ -1740,8 +2030,22 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev, if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) { @@ -116071,7 +115584,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } if(_FAIL == rtw_pwr_wakeup(padapter)) { -@@ -1749,26 +2053,31 @@ static int cfg80211_rtw_scan(struct wiph +@@ -1749,26 +2053,31 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev, goto check_need_indicate_scan_done; } @@ -116107,7 +115620,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(request->n_channels == 3 && request->channels[0]->hw_value == 1 && request->channels[1]->hw_value == 6 && -@@ -1779,37 +2088,72 @@ static int cfg80211_rtw_scan(struct wiph +@@ -1779,37 +2088,72 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev, } } } @@ -116191,7 +115704,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif //CONFIG_P2P -@@ -1818,20 +2162,38 @@ static int cfg80211_rtw_scan(struct wiph +@@ -1818,20 +2162,38 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev, //parsing request ssids, n_ssids for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) { #ifdef CONFIG_DEBUG_CFG80211 @@ -116237,7 +115750,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _exit_critical_bh(&pmlmepriv->lock, &irqL); -@@ -1881,11 +2243,11 @@ static int cfg80211_rtw_set_wiphy_params +@@ -1881,11 +2243,11 @@ static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed) return ret; } #endif @@ -116251,7 +115764,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct cfg80211_ibss_params *params) { #if 0 -@@ -1908,11 +2270,11 @@ static int cfg80211_rtw_join_ibss(struct +@@ -1908,11 +2270,11 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *dev, return iwm_send_mlme_profile(iwm); #endif @@ -116265,7 +115778,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { #if 0 struct iwm_priv *iwm = wiphy_to_iwm(wiphy); -@@ -1920,14 +2282,13 @@ static int cfg80211_rtw_leave_ibss(struc +@@ -1920,14 +2282,13 @@ static int cfg80211_rtw_leave_ibss(struct wiphy *wiphy, struct net_device *dev) if (iwm->umac_profile_active) return iwm_invalidate_mlme_profile(iwm); #endif @@ -116282,7 +115795,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (!wpa_version) { psecuritypriv->ndisauthtype = Ndis802_11AuthModeOpen; -@@ -1954,7 +2315,7 @@ static int rtw_cfg80211_set_wpa_version( +@@ -1954,7 +2315,7 @@ static int rtw_cfg80211_set_wpa_version(struct security_priv *psecuritypriv, u32 static int rtw_cfg80211_set_auth_type(struct security_priv *psecuritypriv, enum nl80211_auth_type sme_auth_type) { @@ -116291,7 +115804,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch (sme_auth_type) { -@@ -1995,7 +2356,7 @@ static int rtw_cfg80211_set_cipher(struc +@@ -1995,7 +2356,7 @@ static int rtw_cfg80211_set_cipher(struct security_priv *psecuritypriv, u32 ciph u32 *profile_cipher = ucast ? &psecuritypriv->dot11PrivacyAlgrthm : &psecuritypriv->dot118021XGrpPrivacy; @@ -116300,7 +115813,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (!cipher) { -@@ -2026,7 +2387,7 @@ static int rtw_cfg80211_set_cipher(struc +@@ -2026,7 +2387,7 @@ static int rtw_cfg80211_set_cipher(struct security_priv *psecuritypriv, u32 ciph ndisencryptstatus = Ndis802_11Encryption3Enabled; break; default: @@ -116309,7 +115822,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -ENOTSUPP; } -@@ -2043,7 +2404,7 @@ static int rtw_cfg80211_set_cipher(struc +@@ -2043,7 +2404,7 @@ static int rtw_cfg80211_set_cipher(struct security_priv *psecuritypriv, u32 ciph static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 key_mgt) { @@ -116318,7 +115831,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (key_mgt == WLAN_AKM_SUITE_8021X) //*auth_type = UMAC_AUTH_TYPE_8021X; -@@ -2051,7 +2412,7 @@ static int rtw_cfg80211_set_key_mgt(stru +@@ -2051,7 +2412,7 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 key else if (key_mgt == WLAN_AKM_SUITE_PSK) { psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X; } else { @@ -116327,7 +115840,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //return -EINVAL; } -@@ -2064,230 +2425,225 @@ static int rtw_cfg80211_set_wpa_ie(_adap +@@ -2064,230 +2425,225 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen) u32 left; int group_cipher = 0, pairwise_cipher = 0; int ret = 0; @@ -116744,7 +116257,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct cfg80211_connect_params *sme) { int ret=0; -@@ -2306,10 +2662,9 @@ static int cfg80211_rtw_connect(struct w +@@ -2306,10 +2662,9 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *dev, struct security_priv *psecuritypriv = &padapter->securitypriv; _queue *queue = &pmlmepriv->scanned_queue; @@ -116758,7 +116271,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(wdev_to_priv(padapter->rtw_wdev)->block == _TRUE) -@@ -2319,6 +2674,22 @@ static int cfg80211_rtw_connect(struct w +@@ -2319,6 +2674,22 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *dev, goto exit; } @@ -116781,7 +116294,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(_FAIL == rtw_pwr_wakeup(padapter)) { ret= -EPERM; goto exit; -@@ -2329,6 +2700,17 @@ static int cfg80211_rtw_connect(struct w +@@ -2329,6 +2700,17 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *dev, goto exit; } @@ -116799,7 +116312,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (!sme->ssid || !sme->ssid_len) { ret = -EINVAL; -@@ -2341,104 +2723,25 @@ static int cfg80211_rtw_connect(struct w +@@ -2341,104 +2723,25 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *dev, goto exit; } @@ -116910,7 +116423,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psecuritypriv->ndisencryptstatus = Ndis802_11EncryptionDisabled; psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_; -@@ -2455,6 +2758,11 @@ static int cfg80211_rtw_connect(struct w +@@ -2455,6 +2758,11 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *dev, if (ret < 0) goto exit; @@ -116922,7 +116435,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (sme->crypto.n_ciphers_pairwise) { ret = rtw_cfg80211_set_cipher(psecuritypriv, sme->crypto.ciphers_pairwise[0], _TRUE); -@@ -2534,24 +2842,17 @@ static int cfg80211_rtw_connect(struct w +@@ -2534,24 +2842,17 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *dev, goto exit; } @@ -116980,7 +116493,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_free_assoc_resources(padapter, 1); } -@@ -2582,11 +2889,14 @@ static int cfg80211_rtw_disconnect(struc +@@ -2582,11 +2889,14 @@ static int cfg80211_rtw_disconnect(struct wiphy *wiphy, struct net_device *dev, } static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, @@ -117000,7 +116513,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { #if 0 struct iwm_priv *iwm = wiphy_to_iwm(wiphy); -@@ -2614,44 +2924,47 @@ static int cfg80211_rtw_set_txpower(stru +@@ -2614,44 +2924,47 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy, return -EOPNOTSUPP; } #endif @@ -117069,7 +116582,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -2660,12 +2973,52 @@ static int cfg80211_rtw_set_pmksa(struct +@@ -2660,12 +2973,52 @@ static int cfg80211_rtw_set_pmksa(struct wiphy *wiphy, struct net_device *netdev, struct cfg80211_pmksa *pmksa) { @@ -117103,14 +116616,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + break; + } + } -+ + +- printk("%s\n", __func__); + if(!blInserted) + { + // Find a new entry + DBG_871X(FUNC_NDEV_FMT" Use the new entry index = %d for this PMKID.\n", + FUNC_NDEV_ARG(netdev), psecuritypriv->PMKIDIndex ); - -- printk("%s\n", __func__); ++ + _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, pmksa->bssid, ETH_ALEN); + _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmksa->pmkid, WLAN_PMKID_LEN); + @@ -117126,7 +116639,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -2673,28 +3026,45 @@ static int cfg80211_rtw_del_pmksa(struct +@@ -2673,28 +3026,45 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy, struct net_device *netdev, struct cfg80211_pmksa *pmksa) { @@ -117183,7 +116696,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -2705,30 +3075,50 @@ void rtw_cfg80211_indicate_sta_assoc(_ad +@@ -2705,30 +3075,50 @@ void rtw_cfg80211_indicate_sta_assoc(_adapter *padapter, u8 *pmgmt_frame, uint f int channel; struct wireless_dev *pwdev = padapter->rtw_wdev; struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); @@ -117218,8 +116731,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - { freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ); - } -- +- -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) && !defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER) - cfg80211_rx_mgmt(padapter->pnetdev, freq, pmgmt_frame, frame_len, GFP_ATOMIC); -#else @@ -117250,7 +116763,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -2743,21 +3133,18 @@ void rtw_cfg80211_indicate_sta_disassoc( +@@ -2743,21 +3133,18 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, unsigned char *da, u u8 mgmt_buf[128] = {0}; struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -117277,7 +116790,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pmgmt_frame = mgmt_buf; pwlanhdr = (struct rtw_ieee80211_hdr *)pmgmt_frame; -@@ -2781,20 +3168,22 @@ void rtw_cfg80211_indicate_sta_disassoc( +@@ -2781,20 +3168,22 @@ void rtw_cfg80211_indicate_sta_disassoc(_adapter *padapter, unsigned char *da, u reason = cpu_to_le16(reason); pmgmt_frame = rtw_set_fixed_ie(pmgmt_frame, _RSON_CODE_ , (unsigned char *)&reason, &frame_len); @@ -117306,7 +116819,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -2803,7 +3192,7 @@ static int rtw_cfg80211_monitor_if_close +@@ -2803,7 +3192,7 @@ static int rtw_cfg80211_monitor_if_close(struct net_device *ndev) { int ret = 0; @@ -117315,7 +116828,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -2816,14 +3205,17 @@ static int rtw_cfg80211_monitor_if_xmit_ +@@ -2816,14 +3205,17 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de int dot11_hdr_len = 24; int snap_len = 6; unsigned char *pdata; @@ -117335,7 +116848,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (unlikely(skb->len < sizeof(struct ieee80211_radiotap_header))) goto fail; -@@ -2838,7 +3230,7 @@ static int rtw_cfg80211_monitor_if_xmit_ +@@ -2838,7 +3230,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de if(rtap_len != 14) { @@ -117344,7 +116857,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto fail; } -@@ -2848,7 +3240,7 @@ static int rtw_cfg80211_monitor_if_xmit_ +@@ -2848,7 +3240,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de dot11_hdr = (struct ieee80211_hdr *)skb->data; frame_ctl = le16_to_cpu(dot11_hdr->frame_control); /* Check if the QoS bit is set */ @@ -117353,7 +116866,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* Check if this ia a Wireless Distribution System (WDS) frame * which has 4 MAC addresses */ -@@ -2868,15 +3260,17 @@ static int rtw_cfg80211_monitor_if_xmit_ +@@ -2868,15 +3260,17 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de memcpy(pdata, dst_mac_addr, sizeof(dst_mac_addr)); memcpy(pdata + sizeof(dst_mac_addr), src_mac_addr, sizeof(src_mac_addr)); @@ -117374,7 +116887,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { //only for action frames struct xmit_frame *pmgntframe; -@@ -2889,50 +3283,27 @@ static int rtw_cfg80211_monitor_if_xmit_ +@@ -2889,50 +3283,27 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); u8 *buf = skb->data; u32 len = skb->len; @@ -117442,7 +116955,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //starting alloc mgmt frame to dump it if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) { -@@ -2949,6 +3320,19 @@ static int rtw_cfg80211_monitor_if_xmit_ +@@ -2949,6 +3320,19 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _rtw_memcpy(pframe, (void*)buf, len); @@ -117462,7 +116975,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pattrib->pktlen = len; pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; -@@ -2961,12 +3345,11 @@ static int rtw_cfg80211_monitor_if_xmit_ +@@ -2961,12 +3345,11 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de pattrib->last_txcmdsz = pattrib->pktlen; dump_mgntframe(padapter, pmgntframe); @@ -117493,7 +117006,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -2997,181 +3380,210 @@ static const struct net_device_ops rtw_c +@@ -2997,181 +3380,210 @@ static const struct net_device_ops rtw_cfg80211_monitor_if_ops = { .ndo_open = rtw_cfg80211_monitor_if_open, .ndo_stop = rtw_cfg80211_monitor_if_close, .ndo_start_xmit = rtw_cfg80211_monitor_if_xmit_entry, @@ -117728,17 +117241,23 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + struct net_device *ndev; + ndev = wdev ? wdev->netdev : NULL; +#endif - -- printk("%s\n", __func__); ++ + if (!ndev) + goto exit; +- printk("%s\n", __func__); ++ unregister_netdevice(ndev); + - if(dev) - { - unregister_netdev(dev); - - free_netdev(dev); -+ unregister_netdevice(ndev); ++ if (ndev == pwdev_priv->pmon_ndev) { ++ pwdev_priv->pmon_ndev = NULL; ++ pwdev_priv->ifname_mon[0] = '\0'; ++ DBG_871X(FUNC_NDEV_FMT" remove monitor interface\n", FUNC_NDEV_ARG(ndev)); ++ } - if(dev == pwdev_priv->pmon_ndev) - { @@ -117748,12 +117267,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - } - -+ if (ndev == pwdev_priv->pmon_ndev) { -+ pwdev_priv->pmon_ndev = NULL; -+ pwdev_priv->ifname_mon[0] = '\0'; -+ DBG_871X(FUNC_NDEV_FMT" remove monitor interface\n", FUNC_NDEV_ARG(ndev)); -+ } -+ +exit: return 0; } @@ -117791,7 +117304,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(!pbuf) return -ENOMEM; -@@ -3182,38 +3594,33 @@ static int cfg80211_rtw_add_beacon(struc +@@ -3182,38 +3594,33 @@ static int cfg80211_rtw_add_beacon(struct wiphy *wiphy, struct net_device *dev, // pstapriv->max_num_sta = NUM_STA; @@ -117846,7 +117359,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -3221,20 +3628,32 @@ static int cfg80211_rtw_add_beacon(struc +@@ -3221,20 +3628,32 @@ static int cfg80211_rtw_add_beacon(struct wiphy *wiphy, struct net_device *dev, _cancel_timer_ex( &pwdinfo->restore_p2p_state_timer ); _cancel_timer_ex( &pwdinfo->pre_tx_scan_timer); @@ -117861,11 +117374,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + } +#endif // CONFIG_P2P - ++ + /* pbss_network->IEs will not include p2p_ie, wfd ie */ + rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_, P2P_OUI, 4); + rtw_ies_remove_ie(pbuf, &len, _BEACON_IE_OFFSET_, _VENDOR_SPECIFIC_IE_, WFD_OUI, 4); -+ + + if (rtw_check_beacon_data(adapter, pbuf, len) == _SUCCESS) + { +#ifdef CONFIG_P2P @@ -117884,7 +117397,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -3242,66 +3661,136 @@ static int cfg80211_rtw_add_beacon(struc +@@ -3242,66 +3661,136 @@ static int cfg80211_rtw_add_beacon(struct wiphy *wiphy, struct net_device *dev, } @@ -117931,16 +117444,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { - printk("%s\n", __func__); + DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); - - return 0; - } ++ ++ return 0; ++} +#else +static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_ap_settings *settings) +{ + int ret = 0; + _adapter *adapter = wiphy_to_adapter(wiphy); -+ + + DBG_871X(FUNC_NDEV_FMT" hidden_ssid:%d, auth_type:%d\n", FUNC_NDEV_ARG(ndev), + settings->hidden_ssid, settings->auth_type); + @@ -117977,10 +117490,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +{ + int ret = 0; + _adapter *adapter = wiphy_to_adapter(wiphy); - ++ + DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); - --static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *dev, ++ + ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len); + + return ret; @@ -117989,11 +117501,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev) +{ + DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); -+ return 0; -+} -+ + return 0; + } + +#endif //(LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) -+ + +-static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *dev, +static int cfg80211_rtw_add_station(struct wiphy *wiphy, struct net_device *ndev, u8 *mac, struct station_parameters *params) { @@ -118035,7 +117548,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release flush_all_cam_entry(padapter); //clear CAM -@@ -3311,7 +3800,7 @@ static int cfg80211_rtw_del_station(stru +@@ -3311,7 +3800,7 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *dev, } @@ -118044,7 +117557,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (mac[0] == 0xff && mac[1] == 0xff && mac[2] == 0xff && mac[3] == 0xff && -@@ -3344,9 +3833,10 @@ static int cfg80211_rtw_del_station(stru +@@ -3344,9 +3833,10 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *dev, DBG_8192C("free psta=%p, aid=%d\n", psta, psta->aid); rtw_list_delete(&psta->asoc_list); @@ -118056,7 +117569,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); psta = NULL; -@@ -3360,73 +3850,48 @@ static int cfg80211_rtw_del_station(stru +@@ -3360,73 +3850,48 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *dev, _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL); @@ -118144,7 +117657,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } */ -@@ -3434,27 +3899,31 @@ static int cfg80211_rtw_change_bss(struc +@@ -3434,27 +3899,31 @@ static int cfg80211_rtw_change_bss(struct wiphy *wiphy, struct net_device *dev, } @@ -118184,7 +117697,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -3462,66 +3931,108 @@ static int cfg80211_rtw_assoc(struct wip +@@ -3462,66 +3931,108 @@ static int cfg80211_rtw_assoc(struct wiphy *wiphy, struct net_device *dev, void rtw_cfg80211_rx_action_p2p(_adapter *padapter, u8 *pmgmt_frame, uint frame_len) { @@ -118241,13 +117754,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); + u8 category, action; - --#ifdef CONFIG_DEBUG_CFG80211 -- printk("%s\n", __func__); --#endif ++ + channel = rtw_get_oper_ch(padapter); - -- rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, _FALSE); ++ + DBG_8192C("RTW_Rx:cur_ch=%d\n", channel); + #ifdef CONFIG_P2P + type = rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, _FALSE); @@ -118265,27 +117774,22 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + rtw_action_frame_parse(pmgmt_frame, frame_len, &category, &action); + DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action); -- channel = pmlmeext->cur_channel; -- +-#ifdef CONFIG_DEBUG_CFG80211 +- printk("%s\n", __func__); +indicate: - if (channel <= RTW_CH_MAX_2G_CHANNEL) -- { - freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); -- } - else -- { - freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ); -- } - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -- cfg80211_rx_mgmt(padapter->pnetdev, freq, pmgmt_frame, frame_len, GFP_ATOMIC); ++ if (channel <= RTW_CH_MAX_2G_CHANNEL) ++ freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); ++ else ++ freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ); ++ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) + rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC); - #else - cfg80211_rx_action(padapter->pnetdev, freq, pmgmt_frame, frame_len, GFP_ATOMIC); ++#else ++ cfg80211_rx_action(padapter->pnetdev, freq, pmgmt_frame, frame_len, GFP_ATOMIC); #endif +} -+ + +- rtw_p2p_check_frames(padapter, pmgmt_frame, frame_len, _FALSE); +void rtw_cfg80211_rx_action(_adapter *adapter, u8 *frame, uint frame_len, const char*msg) +{ + s32 freq; @@ -118303,17 +117807,26 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + DBG_871X("RTW_Rx:%s\n", msg); + else + DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action); -+ -+ if (channel <= RTW_CH_MAX_2G_CHANNEL) -+ freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); -+ else -+ freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ); -+ + +- channel = pmlmeext->cur_channel; +- + if (channel <= RTW_CH_MAX_2G_CHANNEL) +- { + freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); +- } + else +- { + freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ); +- } + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) +- cfg80211_rx_mgmt(padapter->pnetdev, freq, pmgmt_frame, frame_len, GFP_ATOMIC); +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE) + rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC); -+#else + #else +- cfg80211_rx_action(padapter->pnetdev, freq, pmgmt_frame, frame_len, GFP_ATOMIC); + cfg80211_rx_action(adapter->pnetdev, freq, frame, frame_len, GFP_ATOMIC); -+#endif + #endif } @@ -118321,7 +117834,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, size_t len) { u16 wps_devicepassword_id = 0x0000; -@@ -3625,9 +4136,9 @@ void rtw_cfg80211_issue_p2p_provision_re +@@ -3625,9 +4136,9 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, fctrl = &(pwlanhdr->frame_ctl); *(fctrl) = 0; @@ -118333,7 +117846,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; -@@ -3668,8 +4179,7 @@ void rtw_cfg80211_issue_p2p_provision_re +@@ -3668,8 +4179,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, // Value: // Device Capability Bitmap, 1 byte @@ -118343,7 +117856,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy(p2p_ie + p2pielen, &capability, 2); p2pielen += 2; -@@ -3736,344 +4246,528 @@ void rtw_cfg80211_issue_p2p_provision_re +@@ -3736,344 +4246,528 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, pattrib->last_txcmdsz = pattrib->pktlen; @@ -118417,37 +117930,37 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + DBG_8192C("%s, cancel ro ch timer\n", __func__); + + _cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer); - ++ +#ifdef CONFIG_CONCURRENT_MODE + ATOMIC_SET(&pwdev_priv->ro_ch_to, 1); +#endif //CONFIG_CONCURRENT_MODE - -- printk("%s, len=%d, ch=%d, ch_type=%d\n", __func__, len, -- ieee80211_frequency_to_channel(chan->center_freq), channel_type); ++ + p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK); + } + + pcfg80211_wdinfo->is_ro_ch = _TRUE; - --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -- printk("channel_type_valid=%d\n", channel_type_valid); ++ + if(_FAIL == rtw_pwr_wakeup(padapter)) { + err = -EFAULT; + goto exit; + } -+ + + _rtw_memcpy(&pcfg80211_wdinfo->remain_on_ch_channel, channel, sizeof(struct ieee80211_channel)); + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)) + pcfg80211_wdinfo->remain_on_ch_type= channel_type; + #endif + pcfg80211_wdinfo->remain_on_ch_cookie= *cookie; -+ + +- printk("%s, len=%d, ch=%d, ch_type=%d\n", __func__, len, +- ieee80211_frequency_to_channel(chan->center_freq), channel_type); + rtw_scan_abort(padapter); +#ifdef CONFIG_CONCURRENT_MODE + if(rtw_buddy_adapter_up(padapter)) + rtw_scan_abort(padapter->pbuddy_adapter); +#endif //CONFIG_CONCURRENT_MODE -+ + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) +- printk("channel_type_valid=%d\n", channel_type_valid); + //if(!rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT) && !rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)) + if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) + { @@ -118468,20 +117981,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + if(duration < 400) + duration = duration*3;//extend from exper. -+ - mgmt = (const struct ieee80211_mgmt *) buf; - fc = mgmt->frame_control; - if (fc != IEEE80211_STYPE_ACTION) ++ +#ifdef CONFIG_CONCURRENT_MODE + if(check_buddy_fwstate(padapter, _FW_LINKED) && + (durationext_listen_interval)) { - if (fc == IEEE80211_STYPE_PROBE_RESP) -- { -- printk("%s, fc == IEEE80211_STYPE_PROBE_RESP\n", __func__); -- } -- else + duration = duration + pwdinfo->ext_listen_interval; + } +#endif @@ -118492,12 +118001,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#ifdef CONFIG_CONCURRENT_MODE + if ( check_buddy_fwstate(padapter, _FW_LINKED ) ) { -- printk("%s, frame_control == 0x%x\n", __func__, fc); +- printk("%s, fc == IEEE80211_STYPE_PROBE_RESP\n", __func__); - } -- -- //cfg80211_mgmt_tx_status(dev, *cookie, buf, len, ack, GFP_KERNEL); -- -- goto exit; +- else + PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; + struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; + @@ -118515,38 +118021,54 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + _set_timer(&pwdinfo->ap_p2p_switch_timer, duration-pwdinfo->ext_listen_interval); + } + } - -- } -- else -- { -- u32 cnt=0; -- u32 wait_for_surveydone; -- struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); ++ + ready_on_channel = _TRUE; + //pmlmeext->cur_channel = remain_ch; + //set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); + }else +#endif //CONFIG_CONCURRENT_MODE + if(remain_ch != pmlmeext->cur_channel ) -+ { + { +- printk("%s, frame_control == 0x%x\n", __func__, fc); + ready_on_channel = _TRUE; + //pmlmeext->cur_channel = remain_ch; + //set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); -+ } + } +- +- //cfg80211_mgmt_tx_status(dev, *cookie, buf, len, ack, GFP_KERNEL); +- +- goto exit; +- +- } +- else + } else { + DBG_871X("%s remain_ch:%u not in channel plan!!!!\n", __FUNCTION__, remain_ch); + } + - --#ifdef CONFIG_DEBUG_CFG80211 -- printk("%s, do: scan_abort\n", __func__); ++ + //call this after other things have been done +#ifdef CONFIG_CONCURRENT_MODE + if(ATOMIC_READ(&pwdev_priv->ro_ch_to)==1 || + (remain_ch != pmlmeext->cur_channel)) -+ { + { +- u32 cnt=0; +- u32 wait_for_surveydone; +- struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); + u8 co_channel = 0xff; + ATOMIC_SET(&pwdev_priv->ro_ch_to, 0); ++#endif + +-#ifdef CONFIG_DEBUG_CFG80211 +- printk("%s, do: scan_abort\n", __func__); ++ if(ready_on_channel == _TRUE) ++ { ++ if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) ) ++ pmlmeext->cur_channel = remain_ch; ++ ++#ifdef CONFIG_CONCURRENT_MODE ++ co_channel = rtw_get_oper_ch(padapter); ++ ++ if(co_channel !=remain_ch) #endif - - /* Abort the dwell time of any previous off-channel action frame that may @@ -118555,7 +118077,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - * still in progress (including the dwell time), then this new action - * frame will not be sent out. - */ - +- - rtw_cfg80211_scan_abort(padapter); - } -#if 0 @@ -118575,16 +118097,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - wldev_iovar_setint(dev, "mpc", 1); - } else if (act_frm->subtype == P2P_PAF_DEVDIS_REQ) { - af_params->dwell_time = WL_LONG_DWELL_TIME; -+ if(ready_on_channel == _TRUE) -+ { -+ if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) ) -+ pmlmeext->cur_channel = remain_ch; -+ -+#ifdef CONFIG_CONCURRENT_MODE -+ co_channel = rtw_get_oper_ch(padapter); -+ -+ if(co_channel !=remain_ch) -+#endif + { + if (!padapter->mlmepriv.LinkDetectInfo.bBusyTraffic) + set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); @@ -118747,7 +118259,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if(rtw_buddy_adapter_up(padapter)) + rtw_scan_abort(padapter->pbuddy_adapter); + #endif /* CONFIG_CONCURRENT_MODE */ -+ + +- pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; + if (padapter->cfg80211_wdinfo.is_ro_ch == _TRUE) { + //DBG_8192C("%s, cancel ro ch timer\n", __func__); + //_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer); @@ -118761,13 +118274,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #endif //CONFIG_CONCURRENT_MODE + } -- pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; -+#ifdef CONFIG_CONCURRENT_MODE -+ if (check_buddy_fwstate(padapter, _FW_LINKED )) { -+ u8 co_channel=0xff; -+ PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; -+ struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; - - _rtw_memcpy(pframe, (void*)buf, len); - pattrib->pktlen = len; - @@ -118776,7 +118282,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pmlmeext->mgnt_seq = GetSequence(pwlanhdr); - pattrib->seqnum = pmlmeext->mgnt_seq; - pmlmeext->mgnt_seq++; -+ co_channel = rtw_get_oper_ch(padapter); ++#ifdef CONFIG_CONCURRENT_MODE ++ if (check_buddy_fwstate(padapter, _FW_LINKED )) { ++ u8 co_channel=0xff; ++ PADAPTER pbuddy_adapter = padapter->pbuddy_adapter; ++ struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv; - - pattrib->last_txcmdsz = pattrib->pktlen; @@ -118784,7 +118294,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#ifdef CONFIG_DEBUG_CFG80211 - printk("%s, ack=%d, ok!\n", __func__, ack ); -#endif -+ if (tx_ch != pbuddy_mlmeext->cur_channel) { ++ co_channel = rtw_get_oper_ch(padapter); - //indicate ack before issue frame to avoid racing with rsp frame -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) @@ -118800,7 +118310,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -exit: - - printk("%s, ack=%d \n", __func__, ack ); -+ u16 ext_listen_period; ++ if (tx_ch != pbuddy_mlmeext->cur_channel) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - cfg80211_mgmt_tx_status(dev, *cookie, buf, len, ack, GFP_KERNEL); @@ -118809,13 +118319,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#endif - - return ret; ++ u16 ext_listen_period; + +-} + if (ATOMIC_READ(&pwdev_priv->switch_ch_to)==1) { + DBG_8192C("%s, issue nulldata pwrbit=1\n", __func__); + issue_nulldata(padapter->pbuddy_adapter, NULL, 1, 3, 500); --} -+ ATOMIC_SET(&pwdev_priv->switch_ch_to, 0); - -static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device *dev, - struct ieee80211_channel * channel, - enum nl80211_channel_type channel_type, @@ -118827,6 +118337,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - struct wifidirect_info *pwdinfo = &padapter->wdinfo; - struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo; - u8 remain_ch = (u8) ieee80211_frequency_to_channel(channel->center_freq); ++ ATOMIC_SET(&pwdev_priv->switch_ch_to, 0); ++ + //DBG_8192C("%s, set switch ch timer, period=%d\n", __func__, pwdinfo->ext_listen_period); + //_set_timer(&pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_period); + } @@ -118848,9 +118360,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - printk("%s channel %02u duration %d\n", __func__, remain_ch, duration); + if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED )) + pmlmeext->cur_channel = tx_ch; - -- if(_FAIL == rtw_pwr_wakeup(padapter)) { -- err = -EFAULT; ++ + if (tx_ch != co_channel) + set_channel_bwmode(padapter, tx_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); + }else @@ -118861,7 +118371,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + pmlmeext->cur_channel = tx_ch; + set_channel_bwmode(padapter, tx_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); + } -+ + +- if(_FAIL == rtw_pwr_wakeup(padapter)) { +- err = -EFAULT; + //starting alloc mgmt frame to dump it + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) + { @@ -119129,7 +118641,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif if (frame_type != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ)) -@@ -4082,7 +4776,7 @@ static void cfg80211_rtw_mgmt_frame_regi +@@ -4082,7 +4776,7 @@ static void cfg80211_rtw_mgmt_frame_register(struct wiphy *wiphy, struct net_dev return; } @@ -119138,7 +118650,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { int ret = 0; uint wps_ielen = 0; -@@ -4090,18 +4784,20 @@ static int rtw_cfg80211_set_beacon_wpsp2 +@@ -4090,18 +4784,20 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *net, char *buf, i u32 p2p_ielen = 0; u8 wps_oui[8]={0x0,0x50,0xf2,0x04}; u8 *p2p_ie; @@ -119162,7 +118674,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif if(pmlmepriv->wps_beacon_ie) -@@ -4114,7 +4810,7 @@ static int rtw_cfg80211_set_beacon_wpsp2 +@@ -4114,7 +4810,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *net, char *buf, i pmlmepriv->wps_beacon_ie = rtw_malloc(wps_ielen); if ( pmlmepriv->wps_beacon_ie == NULL) { @@ -119171,7 +118683,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -4126,13 +4822,14 @@ static int rtw_cfg80211_set_beacon_wpsp2 +@@ -4126,13 +4822,14 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *net, char *buf, i } @@ -119190,7 +118702,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif if(pmlmepriv->p2p_beacon_ie) -@@ -4145,7 +4842,7 @@ static int rtw_cfg80211_set_beacon_wpsp2 +@@ -4145,7 +4842,7 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *net, char *buf, i pmlmepriv->p2p_beacon_ie = rtw_malloc(p2p_ielen); if ( pmlmepriv->p2p_beacon_ie == NULL) { @@ -119199,7 +118711,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -4154,6 +4851,35 @@ static int rtw_cfg80211_set_beacon_wpsp2 +@@ -4154,6 +4851,35 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *net, char *buf, i pmlmepriv->p2p_beacon_ie_len = p2p_ielen; } @@ -119235,7 +118747,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pmlmeext->bstart_bss = _TRUE; -@@ -4170,11 +4896,13 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4170,11 +4896,13 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu u8 *wps_ie; u32 p2p_ielen = 0; u8 *p2p_ie; @@ -119250,7 +118762,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif if(len>0) -@@ -4185,9 +4913,25 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4185,9 +4913,25 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu u16 uconfig_method, *puconfig_method = NULL; #ifdef CONFIG_DEBUG_CFG80211 @@ -119278,7 +118790,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pmlmepriv->wps_probe_resp_ie) { u32 free_len = pmlmepriv->wps_probe_resp_ie_len; -@@ -4198,7 +4942,7 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4198,7 +4942,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu pmlmepriv->wps_probe_resp_ie = rtw_malloc(wps_ielen); if ( pmlmepriv->wps_probe_resp_ie == NULL) { @@ -119287,7 +118799,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -4221,9 +4965,10 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4221,9 +4965,10 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu } @@ -119301,7 +118813,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if((p2p_ie=rtw_get_p2p_ie(buf, len, NULL, &p2p_ielen))) { u8 is_GO = _FALSE; -@@ -4231,7 +4976,7 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4231,7 +4976,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu u16 cap_attr=0; #ifdef CONFIG_DEBUG_CFG80211 @@ -119310,7 +118822,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //Check P2P Capability ATTR -@@ -4245,7 +4990,7 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4245,7 +4990,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu is_GO = (grp_cap&BIT(0)) ? _TRUE:_FALSE; if(is_GO) @@ -119319,7 +118831,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -4261,7 +5006,7 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4261,7 +5006,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu pmlmepriv->p2p_probe_resp_ie = rtw_malloc(p2p_ielen); if ( pmlmepriv->p2p_probe_resp_ie == NULL) { @@ -119328,7 +118840,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -4280,7 +5025,7 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4280,7 +5025,7 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu pmlmepriv->p2p_go_probe_resp_ie = rtw_malloc(p2p_ielen); if ( pmlmepriv->p2p_go_probe_resp_ie == NULL) { @@ -119337,7 +118849,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -4288,7 +5033,36 @@ static int rtw_cfg80211_set_probe_resp_w +@@ -4288,7 +5033,36 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu pmlmepriv->p2p_go_probe_resp_ie_len = p2p_ielen; } @@ -119375,7 +118887,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -4302,7 +5076,7 @@ static int rtw_cfg80211_set_assoc_resp_w +@@ -4302,7 +5076,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu _adapter *padapter = (_adapter *)rtw_netdev_priv(net); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -119384,7 +118896,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(len>0) { -@@ -4316,7 +5090,7 @@ static int rtw_cfg80211_set_assoc_resp_w +@@ -4316,7 +5090,7 @@ static int rtw_cfg80211_set_assoc_resp_wpsp2pie(struct net_device *net, char *bu pmlmepriv->wps_assoc_resp_ie = rtw_malloc(len); if ( pmlmepriv->wps_assoc_resp_ie == NULL) { @@ -119393,7 +118905,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -4336,11 +5110,14 @@ int rtw_cfg80211_set_mgnt_wpsp2pie(struc +@@ -4336,11 +5110,14 @@ int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len, u32 p2p_ielen = 0; #ifdef CONFIG_DEBUG_CFG80211 @@ -119411,7 +118923,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if (net != NULL) { -@@ -4382,24 +5159,39 @@ static struct cfg80211_ops rtw_cfg80211_ +@@ -4382,24 +5159,39 @@ static struct cfg80211_ops rtw_cfg80211_ops = { .set_pmksa = cfg80211_rtw_set_pmksa, .del_pmksa = cfg80211_rtw_del_pmksa, .flush_pmksa = cfg80211_rtw_flush_pmksa, @@ -119453,7 +118965,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release .mgmt_tx = cfg80211_rtw_mgmt_tx, .mgmt_frame_register = cfg80211_rtw_mgmt_frame_register, #elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,34) && LINUX_VERSION_CODE<=KERNEL_VERSION(2,6,35)) -@@ -4458,7 +5250,7 @@ static void rtw_cfg80211_init_ht_capab(s +@@ -4458,7 +5250,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum } else { @@ -119462,7 +118974,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } -@@ -4470,18 +5262,48 @@ void rtw_cfg80211_init_wiphy(_adapter *p +@@ -4470,18 +5262,48 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter) struct wireless_dev *pwdev = padapter->rtw_wdev; struct wiphy *wiphy = pwdev->wiphy; @@ -119518,7 +119030,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static void rtw_cfg80211_preinit_wiphy(_adapter *padapter, struct wiphy *wiphy) { -@@ -4491,95 +5313,134 @@ static void rtw_cfg80211_preinit_wiphy(_ +@@ -4491,95 +5313,134 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *padapter, struct wiphy *wiphy) wiphy->max_scan_ie_len = RTW_SCAN_IE_LEN_MAX; wiphy->max_num_pmkids = RTW_MAX_NUM_PMKIDS; @@ -119696,7 +119208,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -4588,30 +5449,40 @@ void rtw_wdev_free(struct wireless_dev * +@@ -4588,30 +5449,40 @@ void rtw_wdev_free(struct wireless_dev *wdev) { struct rtw_wdev_priv *pwdev_priv; @@ -119751,6 +119263,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif //CONFIG_IOCTL_CFG80211 +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c +index f999502..9adbeaf 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/ioctl_linux.c @@ -34,7 +34,7 @@ @@ -119772,7 +119286,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u32 rtw_rates[] = {1000000,2000000,5500000,11000000, 6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000}; -@@ -139,11 +138,12 @@ static int hwaddr_aton_i(const char *txt +@@ -139,11 +138,12 @@ static int hwaddr_aton_i(const char *txt, u8 *addr) static void indicate_wx_custom_event(_adapter *padapter, char *msg) { @@ -119787,7 +119301,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return; } -@@ -152,90 +152,96 @@ static void indicate_wx_custom_event(_ad +@@ -152,90 +152,96 @@ static void indicate_wx_custom_event(_adapter *padapter, char *msg) return; _rtw_memcpy(buff, msg, strlen(msg)); @@ -119909,7 +119423,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } /* -@@ -291,36 +297,87 @@ static char *translate_scan(_adapter *pa +@@ -291,36 +297,87 @@ static char *translate_scan(_adapter *padapter, #endif //CONFIG_P2P #ifdef CONFIG_P2P @@ -120012,7 +119526,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* AP MAC address */ iwe.cmd = SIOCGIWAP; iwe.u.ap_addr.sa_family = ARPHRD_ETHER; -@@ -335,7 +392,7 @@ static char *translate_scan(_adapter *pa +@@ -335,7 +392,7 @@ static char *translate_scan(_adapter *padapter, start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.Ssid.Ssid); //parsing HT_CAP_IE @@ -120021,7 +119535,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(p && ht_ielen>0) { -@@ -445,7 +502,7 @@ static char *translate_scan(_adapter *pa +@@ -445,7 +502,7 @@ static char *translate_scan(_adapter *padapter, } else//default MCS7 { @@ -120030,7 +119544,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release max_rate = (bw_40MHz) ? ((short_GI)?150:135):((short_GI)?72:65); } -@@ -508,58 +565,56 @@ static char *translate_scan(_adapter *pa +@@ -508,58 +565,56 @@ static char *translate_scan(_adapter *padapter, } { //parsing WPS IE @@ -120118,7 +119632,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_PLATFORM_ROCKCHIPS iwe.u.qual.noise = -100; // noise level suggest by zhf@rockchips -@@ -567,14 +622,10 @@ static char *translate_scan(_adapter *pa +@@ -567,14 +622,10 @@ static char *translate_scan(_adapter *padapter, iwe.u.qual.noise = 0; // noise level #endif //CONFIG_PLATFORM_ROCKCHIPS @@ -120135,7 +119649,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return start; } -@@ -586,14 +637,14 @@ static int wpa_set_auth_algs(struct net_ +@@ -586,14 +637,14 @@ static int wpa_set_auth_algs(struct net_device *dev, u32 value) if ((value & AUTH_ALG_SHARED_KEY)&&(value & AUTH_ALG_OPEN_SYSTEM)) { @@ -120152,7 +119666,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; #ifdef CONFIG_PLATFORM_MT53XX -@@ -606,7 +657,7 @@ static int wpa_set_auth_algs(struct net_ +@@ -606,7 +657,7 @@ static int wpa_set_auth_algs(struct net_device *dev, u32 value) } else if(value & AUTH_ALG_OPEN_SYSTEM) { @@ -120161,7 +119675,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; if(padapter->securitypriv.ndisauthtype < Ndis802_11AuthModeWPAPSK) { -@@ -622,11 +673,11 @@ static int wpa_set_auth_algs(struct net_ +@@ -622,11 +673,11 @@ static int wpa_set_auth_algs(struct net_device *dev, u32 value) } else if(value & AUTH_ALG_LEAP) { @@ -120299,7 +119813,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _func_exit_; -@@ -857,12 +941,13 @@ static int rtw_set_wpa_ie(_adapter *pada +@@ -857,12 +941,13 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) u32 left; int group_cipher = 0, pairwise_cipher = 0; int ret = 0; @@ -120314,7 +119828,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pie == NULL) return ret; else -@@ -882,9 +967,9 @@ static int rtw_set_wpa_ie(_adapter *pada +@@ -882,9 +967,9 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) //dump { int i; @@ -120326,7 +119840,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } pos = buf; -@@ -923,6 +1008,15 @@ static int rtw_set_wpa_ie(_adapter *pada +@@ -923,6 +1008,15 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) _rtw_memcpy(padapter->securitypriv.supplicant_ie, &buf[0], ielen); } @@ -120342,7 +119856,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch(group_cipher) { case WPA_CIPHER_NONE: -@@ -971,7 +1065,7 @@ static int rtw_set_wpa_ie(_adapter *pada +@@ -971,7 +1065,7 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) break; } @@ -120351,7 +119865,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release {//set wps_ie u16 cnt = 0; u8 eid, wps_oui[4]={0x0,0x50,0xf2,0x04}; -@@ -982,13 +1076,13 @@ static int rtw_set_wpa_ie(_adapter *pada +@@ -982,13 +1076,13 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) if((eid==_VENDOR_SPECIFIC_IE_)&&(_rtw_memcmp(&buf[cnt+2], wps_oui, 4)==_TRUE)) { @@ -120367,7 +119881,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_P2P if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_OK)) -@@ -996,8 +1090,6 @@ static int rtw_set_wpa_ie(_adapter *pada +@@ -996,8 +1090,6 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) rtw_p2p_set_state(pwdinfo, P2P_STATE_PROVISIONING_ING); } #endif //CONFIG_P2P @@ -120376,7 +119890,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release cnt += buf[cnt+1]+2; break; -@@ -1007,7 +1099,15 @@ static int rtw_set_wpa_ie(_adapter *pada +@@ -1007,7 +1099,15 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen) } } } @@ -120393,7 +119907,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_set_wpa_ie: pairwise_cipher=0x%08x padapter->securitypriv.ndisencryptstatus=%d padapter->securitypriv.ndisauthtype=%d\n", pairwise_cipher, padapter->securitypriv.ndisencryptstatus, padapter->securitypriv.ndisauthtype)); -@@ -1135,10 +1235,12 @@ static int rtw_wx_set_mode(struct net_de +@@ -1135,10 +1235,12 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); NDIS_802_11_NETWORK_INFRASTRUCTURE networkType ; int ret = 0; @@ -120408,7 +119922,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret= -EPERM; goto exit; } -@@ -1152,20 +1254,20 @@ static int rtw_wx_set_mode(struct net_de +@@ -1152,20 +1254,20 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, { case IW_MODE_AUTO: networkType = Ndis802_11AutoUnknown; @@ -120433,7 +119947,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; default : -@@ -1184,14 +1286,18 @@ static int rtw_wx_set_mode(struct net_de +@@ -1184,14 +1286,18 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, rtw_setopmode_cmd(padapter, Ndis802_11AutoUnknown); } */ @@ -120454,7 +119968,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_setopmode_cmd(padapter, networkType); exit: -@@ -1267,7 +1373,7 @@ static int rtw_wx_set_pmkid(struct net_d +@@ -1267,7 +1373,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, _rtw_memcpy( strIssueBssid, pPMK->bssid.sa_data, ETH_ALEN); if ( pPMK->cmd == IW_PMKSA_ADD ) { @@ -120463,7 +119977,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( _rtw_memcmp( strIssueBssid, strZeroMacAddress, ETH_ALEN ) == _TRUE ) { return( intReturn ); -@@ -1284,7 +1390,7 @@ static int rtw_wx_set_pmkid(struct net_d +@@ -1284,7 +1390,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, if( _rtw_memcmp( psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN) ==_TRUE ) { // BSSID is matched, the same AP => rewrite with new PMKID. @@ -120472,7 +119986,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy( psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid, IW_PMKID_LEN); psecuritypriv->PMKIDList[ j ].bUsed = _TRUE; -@@ -1297,7 +1403,7 @@ static int rtw_wx_set_pmkid(struct net_d +@@ -1297,7 +1403,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, if(!blInserted) { // Find a new entry @@ -120481,7 +119995,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psecuritypriv->PMKIDIndex ); _rtw_memcpy(psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid, ETH_ALEN); -@@ -1313,7 +1419,7 @@ static int rtw_wx_set_pmkid(struct net_d +@@ -1313,7 +1419,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, } else if ( pPMK->cmd == IW_PMKSA_REMOVE ) { @@ -120490,7 +120004,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release intReturn = _TRUE; for(j=0 ; jcmd == IW_PMKSA_FLUSH ) { @@ -120499,7 +120013,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memset( &psecuritypriv->PMKIDList[ 0 ], 0x00, sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE ); psecuritypriv->PMKIDIndex = 0; intReturn = _TRUE; -@@ -1509,10 +1615,39 @@ static int rtw_wx_set_wap(struct net_dev +@@ -1509,10 +1615,39 @@ static int rtw_wx_set_wap(struct net_device *dev, _queue *queue = &(pmlmepriv->scanned_queue); struct wlan_network *pnetwork = NULL; NDIS_802_11_AUTHENTICATION_MODE authmode; @@ -120542,7 +120056,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { ret= -1; goto exit; -@@ -1530,6 +1665,7 @@ static int rtw_wx_set_wap(struct net_dev +@@ -1530,6 +1665,7 @@ static int rtw_wx_set_wap(struct net_device *dev, } authmode = padapter->securitypriv.ndisauthtype; @@ -120550,7 +120064,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _enter_critical_bh(&queue->lock, &irqL); phead = get_list_head(queue); pmlmepriv->pscanned = get_next(phead); -@@ -1572,6 +1708,7 @@ static int rtw_wx_set_wap(struct net_dev +@@ -1572,6 +1708,7 @@ static int rtw_wx_set_wap(struct net_device *dev, { ret = -1; _exit_critical_bh(&queue->lock, &irqL); @@ -120558,7 +120072,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit; } -@@ -1580,7 +1717,7 @@ static int rtw_wx_set_wap(struct net_dev +@@ -1580,7 +1717,7 @@ static int rtw_wx_set_wap(struct net_device *dev, } _exit_critical_bh(&queue->lock, &irqL); @@ -120659,7 +120173,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, union iwreq_data *wrqu, char *extra) { -@@ -1756,7 +1827,6 @@ static int rtw_wx_set_scan(struct net_de +@@ -1756,7 +1827,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, struct mlme_priv *pmlmepriv= &padapter->mlmepriv; NDIS_802_11_SSID ssid[RTW_SSID_SCAN_AMOUNT]; _irqL irqL; @@ -120791,7 +120305,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } if(_status == _FALSE) -@@ -1972,7 +2074,7 @@ static int rtw_wx_get_scan(struct net_de +@@ -1972,7 +2074,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, _irqL irqL; _list *plist, *phead; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); @@ -120800,7 +120314,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _queue *queue = &(pmlmepriv->scanned_queue); struct wlan_network *pnetwork = NULL; char *ev = extra; -@@ -1981,6 +2083,10 @@ static int rtw_wx_get_scan(struct net_de +@@ -1981,6 +2083,10 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, u32 cnt=0; u32 wait_for_surveydone; sint wait_status; @@ -120811,7 +120325,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_P2P struct wifidirect_info* pwdinfo = &padapter->wdinfo; #endif //CONFIG_P2P -@@ -1993,6 +2099,15 @@ static int rtw_wx_get_scan(struct net_de +@@ -1993,6 +2099,15 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, DBG_871X("DBG_IOCTL %s:%d\n",__FUNCTION__, __LINE__); #endif @@ -120827,7 +120341,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(padapter->pwrctrlpriv.brfoffbyhw && padapter->bDriverStopped) { ret = -EINVAL; -@@ -2003,7 +2118,10 @@ static int rtw_wx_get_scan(struct net_de +@@ -2003,7 +2118,10 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) { // P2P is enabled @@ -120839,7 +120353,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -2016,14 +2134,39 @@ static int rtw_wx_get_scan(struct net_de +@@ -2016,14 +2134,39 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, } #endif //CONFIG_P2P @@ -120881,7 +120395,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_msleep_os(30); cnt++; if(cnt > wait_for_surveydone ) -@@ -2048,10 +2191,9 @@ static int rtw_wx_get_scan(struct net_de +@@ -2048,10 +2191,9 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); //report network only if the current channel set contains the channel to which this network belongs @@ -120894,7 +120408,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ) { ev=translate_scan(padapter, a, pnetwork, ev, stop); -@@ -2095,7 +2237,6 @@ static int rtw_wx_set_essid(struct net_d +@@ -2095,7 +2237,6 @@ static int rtw_wx_set_essid(struct net_device *dev, _list *phead; s8 status = _TRUE; struct wlan_network *pnetwork = NULL; @@ -120902,7 +120416,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release NDIS_802_11_AUTHENTICATION_MODE authmode; NDIS_802_11_SSID ndis_ssid; u8 *dst_ssid, *src_ssid; -@@ -2108,9 +2249,39 @@ static int rtw_wx_set_essid(struct net_d +@@ -2108,9 +2249,39 @@ static int rtw_wx_set_essid(struct net_device *dev, DBG_871X("DBG_IOCTL %s:%d\n",__FUNCTION__, __LINE__); #endif @@ -120943,7 +120457,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { ret = -1; goto exit; -@@ -2136,7 +2307,7 @@ static int rtw_wx_set_essid(struct net_d +@@ -2136,7 +2307,7 @@ static int rtw_wx_set_essid(struct net_device *dev, } authmode = padapter->securitypriv.ndisauthtype; @@ -120952,7 +120466,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (wrqu->essid.flags && wrqu->essid.length) { // Commented by Albert 20100519 -@@ -2153,7 +2324,8 @@ static int rtw_wx_set_essid(struct net_d +@@ -2153,7 +2324,8 @@ static int rtw_wx_set_essid(struct net_device *dev, len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ? wrqu->essid.length : IW_ESSID_MAX_SIZE; #endif @@ -120962,7 +120476,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID)); ndis_ssid.SsidLength = len; -@@ -2161,6 +2333,7 @@ static int rtw_wx_set_essid(struct net_d +@@ -2161,6 +2333,7 @@ static int rtw_wx_set_essid(struct net_device *dev, src_ssid = ndis_ssid.Ssid; RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("rtw_wx_set_essid: ssid=[%s]\n", src_ssid)); @@ -120970,7 +120484,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _enter_critical_bh(&queue->lock, &irqL); phead = get_list_head(queue); pmlmepriv->pscanned = get_next(phead); -@@ -2215,6 +2388,7 @@ static int rtw_wx_set_essid(struct net_d +@@ -2215,6 +2388,7 @@ static int rtw_wx_set_essid(struct net_device *dev, { ret = -1; _exit_critical_bh(&queue->lock, &irqL); @@ -120978,7 +120492,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit; } -@@ -2222,6 +2396,7 @@ static int rtw_wx_set_essid(struct net_d +@@ -2222,6 +2396,7 @@ static int rtw_wx_set_essid(struct net_device *dev, } } _exit_critical_bh(&queue->lock, &irqL); @@ -120986,7 +120500,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("set ssid: set_802_11_auth. mode=%d\n", authmode)); rtw_set_802_11_authentication_mode(padapter, authmode); -@@ -2234,7 +2409,7 @@ static int rtw_wx_set_essid(struct net_d +@@ -2234,7 +2409,7 @@ static int rtw_wx_set_essid(struct net_device *dev, exit: @@ -120995,7 +120509,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef DBG_IOCTL DBG_871X("DBG_IOCTL %s:%d return %d\n",__FUNCTION__, __LINE__, ret); -@@ -2379,94 +2554,43 @@ static int rtw_wx_get_rate(struct net_de +@@ -2379,94 +2554,43 @@ static int rtw_wx_get_rate(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { @@ -121118,7 +120632,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static int rtw_wx_get_rts(struct net_device *dev, -@@ -2476,7 +2600,8 @@ static int rtw_wx_get_rts(struct net_dev +@@ -2476,7 +2600,8 @@ static int rtw_wx_get_rts(struct net_device *dev, _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); _func_enter_; @@ -121128,7 +120642,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wrqu->rts.value = padapter->registrypriv.rts_thresh; wrqu->rts.fixed = 0; /* no auto select */ -@@ -2504,6 +2629,8 @@ static int rtw_wx_set_frag(struct net_de +@@ -2504,6 +2629,8 @@ static int rtw_wx_set_frag(struct net_device *dev, padapter->xmitpriv.frag_len = wrqu->frag.value & ~0x1; } @@ -121137,7 +120651,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -2511,7 +2638,6 @@ static int rtw_wx_set_frag(struct net_de +@@ -2511,7 +2638,6 @@ static int rtw_wx_set_frag(struct net_device *dev, } @@ -121145,7 +120659,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_wx_get_frag(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) -@@ -2519,6 +2645,8 @@ static int rtw_wx_get_frag(struct net_de +@@ -2519,6 +2645,8 @@ static int rtw_wx_get_frag(struct net_device *dev, _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); _func_enter_; @@ -121154,7 +120668,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wrqu->frag.value = padapter->xmitpriv.frag_len; wrqu->frag.fixed = 0; /* no auto select */ -@@ -2579,7 +2707,7 @@ static int rtw_wx_set_enc(struct net_dev +@@ -2579,7 +2707,7 @@ static int rtw_wx_set_enc(struct net_device *dev, struct iw_point *erq = &(wrqu->encoding); _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; @@ -121163,7 +120677,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memset(&wep, 0, sizeof(NDIS_802_11_WEP)); -@@ -2589,7 +2717,7 @@ static int rtw_wx_set_enc(struct net_dev +@@ -2589,7 +2717,7 @@ static int rtw_wx_set_enc(struct net_device *dev, if (erq->flags & IW_ENCODE_DISABLED) { @@ -121172,7 +120686,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled; padapter->securitypriv.dot11PrivacyAlgrthm=_NO_PRIVACY_; padapter->securitypriv.dot118021XGrpPrivacy=_NO_PRIVACY_; -@@ -2610,13 +2738,13 @@ static int rtw_wx_set_enc(struct net_dev +@@ -2610,13 +2738,13 @@ static int rtw_wx_set_enc(struct net_device *dev, { keyindex_provided = 0; key = padapter->securitypriv.dot11PrivacyKeyIndex; @@ -121188,7 +120702,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;//Ndis802_11EncryptionDisabled; #ifdef CONFIG_PLATFORM_MT53XX -@@ -2632,7 +2760,7 @@ static int rtw_wx_set_enc(struct net_dev +@@ -2632,7 +2760,7 @@ static int rtw_wx_set_enc(struct net_device *dev, } else if(erq->flags & IW_ENCODE_RESTRICTED) { @@ -121197,7 +120711,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled; #ifdef CONFIG_PLATFORM_MT53XX -@@ -2648,7 +2776,7 @@ static int rtw_wx_set_enc(struct net_dev +@@ -2648,7 +2776,7 @@ static int rtw_wx_set_enc(struct net_device *dev, } else { @@ -121206,7 +120720,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;//Ndis802_11EncryptionDisabled; padapter->securitypriv.dot11AuthAlgrthm= dot11AuthAlgrthm_Open; //open system -@@ -2673,7 +2801,7 @@ static int rtw_wx_set_enc(struct net_dev +@@ -2673,7 +2801,7 @@ static int rtw_wx_set_enc(struct net_device *dev, { padapter->securitypriv.dot11PrivacyKeyIndex = key; @@ -121215,7 +120729,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch(padapter->securitypriv.dot11DefKeylen[key]) { -@@ -2910,7 +3038,8 @@ static int rtw_wx_set_auth(struct net_de +@@ -2910,7 +3038,8 @@ static int rtw_wx_set_auth(struct net_device *dev, * It's the starting point of a link layer connection using wpa_supplicant */ if(check_fwstate(&padapter->mlmepriv, _FW_LINKED)) { @@ -121225,7 +120739,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release DBG_871X("%s...call rtw_indicate_disconnect\n ",__FUNCTION__); rtw_indicate_disconnect(padapter); rtw_free_assoc_resources(padapter, 1); -@@ -2987,6 +3116,11 @@ static int rtw_wx_set_enc_ext(struct net +@@ -2987,6 +3116,11 @@ static int rtw_wx_set_enc_ext(struct net_device *dev, case IW_ENCODE_ALG_CCMP: alg_name = "CCMP"; break; @@ -121237,7 +120751,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release default: return -1; } -@@ -2994,7 +3128,11 @@ static int rtw_wx_set_enc_ext(struct net +@@ -2994,7 +3128,11 @@ static int rtw_wx_set_enc_ext(struct net_device *dev, strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN); @@ -121250,7 +120764,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { param->u.crypt.set_tx = 0; } -@@ -3065,40 +3203,40 @@ static int rtw_wx_get_nick(struct net_de +@@ -3065,40 +3203,40 @@ static int rtw_wx_get_nick(struct net_device *dev, u32 ndisencryptstatus; */ @@ -121312,7 +120826,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif return 0; -@@ -3109,15 +3247,51 @@ static int rtw_wx_read32(struct net_devi +@@ -3109,15 +3247,51 @@ static int rtw_wx_read32(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { @@ -121369,7 +120883,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -3126,15 +3300,35 @@ static int rtw_wx_write32(struct net_dev +@@ -3126,15 +3300,35 @@ static int rtw_wx_write32(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { @@ -121409,7 +120923,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -3149,8 +3343,8 @@ static int rtw_wx_read_rf(struct net_dev +@@ -3149,8 +3343,8 @@ static int rtw_wx_read_rf(struct net_device *dev, path = *(u32*)extra; addr = *((u32*)extra + 1); @@ -121420,7 +120934,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* * IMPORTANT!! * Only when wireless private ioctl is at odd order, -@@ -3172,8 +3366,8 @@ static int rtw_wx_write_rf(struct net_de +@@ -3172,8 +3366,8 @@ static int rtw_wx_write_rf(struct net_device *dev, path = *(u32*)extra; addr = *((u32*)extra + 1); data32 = *((u32*)extra + 2); @@ -121431,7 +120945,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -3190,7 +3384,7 @@ static int dummy(struct net_device *dev, +@@ -3190,7 +3384,7 @@ static int dummy(struct net_device *dev, struct iw_request_info *a, //_adapter *padapter = (_adapter *)rtw_netdev_priv(dev); //struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); @@ -121440,7 +120954,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -1; -@@ -3213,7 +3407,7 @@ static int rtw_wx_set_channel_plan(struc +@@ -3213,7 +3407,7 @@ static int rtw_wx_set_channel_plan(struct net_device *dev, #endif if( _SUCCESS == rtw_set_chplan_cmd(padapter, channel_plan_req, 1) ) { @@ -121449,7 +120963,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else return -EPERM; -@@ -3245,7 +3439,7 @@ static int rtw_wx_get_sensitivity(struct +@@ -3245,7 +3439,7 @@ static int rtw_wx_get_sensitivity(struct net_device *dev, // Modified by Albert 20110914 // This is in dbm format for MTK platform. wrqu->qual.level = padapter->recvpriv.rssi; @@ -121458,7 +120972,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif return 0; } -@@ -3391,12 +3585,12 @@ static void rtw_dbg_mode_hdl(_adapter *p +@@ -3391,12 +3585,12 @@ static void rtw_dbg_mode_hdl(_adapter *padapter, u32 id, u8 *pdata, u32 len) u8 offset; u32 value; @@ -121473,7 +120987,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case GEN_MP_IOCTL_SUBCODE(READ_REG): RegRWStruct = (pRW_Reg)pdata; -@@ -3441,7 +3635,7 @@ static void rtw_dbg_mode_hdl(_adapter *p +@@ -3441,7 +3635,7 @@ static void rtw_dbg_mode_hdl(_adapter *padapter, u32 id, u8 *pdata, u32 len) path = (u8)prfreg->path; offset = (u8)prfreg->offset; @@ -121482,7 +120996,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release prfreg->value = value; -@@ -3454,27 +3648,26 @@ static void rtw_dbg_mode_hdl(_adapter *p +@@ -3454,27 +3648,26 @@ static void rtw_dbg_mode_hdl(_adapter *padapter, u32 id, u8 *pdata, u32 len) offset = (u8)prfreg->offset; value = prfreg->value; @@ -121518,7 +121032,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; #endif -@@ -3495,10 +3688,10 @@ static int rtw_mp_ioctl_hdl(struct net_d +@@ -3495,10 +3688,10 @@ static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info uint status=0; u16 len; u8 *pparmbuf = NULL, bset; @@ -121531,7 +121045,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //mutex_lock(&ioctl_mutex); -@@ -3532,7 +3725,7 @@ static int rtw_mp_ioctl_hdl(struct net_d +@@ -3532,7 +3725,7 @@ static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info goto _rtw_mp_ioctl_hdl_exit; } @@ -121540,7 +121054,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_MP_INCLUDED phandler = mp_ioctl_hdl + poidparam->subcode; -@@ -3572,7 +3765,7 @@ static int rtw_mp_ioctl_hdl(struct net_d +@@ -3572,7 +3765,7 @@ static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info //todo:check status, BytesNeeded, etc. } else { @@ -121549,7 +121063,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release poidparam->subcode, phandler->oid, phandler->handler); ret = -EFAULT; goto _rtw_mp_ioctl_hdl_exit; -@@ -3620,7 +3813,7 @@ static int rtw_get_ap_info(struct net_de +@@ -3620,7 +3813,7 @@ static int rtw_get_ap_info(struct net_device *dev, _queue *queue = &(pmlmepriv->scanned_queue); struct iw_point *pdata = &wrqu->data; @@ -121558,7 +121072,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if((padapter->bDriverStopped) || (pdata==NULL)) { -@@ -3669,7 +3862,7 @@ static int rtw_get_ap_info(struct net_de +@@ -3669,7 +3862,7 @@ static int rtw_get_ap_info(struct net_device *dev, //if(hwaddr_aton_i(pdata->pointer, bssid)) if(hwaddr_aton_i(data, bssid)) { @@ -121567,7 +121081,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); return -EINVAL; } -@@ -3677,7 +3870,7 @@ static int rtw_get_ap_info(struct net_de +@@ -3677,7 +3870,7 @@ static int rtw_get_ap_info(struct net_device *dev, if(_rtw_memcmp(bssid, pnetwork->network.MacAddress, ETH_ALEN) == _TRUE)//BSSID match, then check if supporting wpa/wpa2 { @@ -121576,7 +121090,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pbuf = rtw_get_wpa_ie(&pnetwork->network.IEs[12], &wpa_ielen, pnetwork->network.IELength-12); if(pbuf && (wpa_ielen>0)) -@@ -3768,17 +3961,17 @@ static int rtw_wps_start(struct net_devi +@@ -3768,17 +3961,17 @@ static int rtw_wps_start(struct net_device *dev, goto exit; } @@ -121602,7 +121116,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release else if ( u32wps_start == 2 ) // WPS Stop because of wps success { rtw_led_control(padapter, LED_CTL_STOP_WPS); -@@ -3787,6 +3980,11 @@ static int rtw_wps_start(struct net_devi +@@ -3787,6 +3980,11 @@ static int rtw_wps_start(struct net_device *dev, { rtw_led_control(padapter, LED_CTL_STOP_WPS_FAIL); } @@ -121622,7 +121136,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_wext_p2p_enable(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) -@@ -3834,9 +4031,34 @@ static int rtw_wext_p2p_enable(struct ne +@@ -3834,9 +4031,34 @@ static int rtw_wext_p2p_enable(struct net_device *dev, { // Stay at the listen state and wait for discovery. channel = pwdinfo->listen_channel; @@ -121658,7 +121172,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release else { pwdinfo->operating_channel = pmlmeext->cur_channel; -@@ -3865,7 +4087,7 @@ static int rtw_p2p_set_go_nego_ssid(stru +@@ -3865,7 +4087,7 @@ static int rtw_p2p_set_go_nego_ssid(struct net_device *dev, struct iw_point *pdata = &wrqu->data; struct wifidirect_info *pwdinfo= &(padapter->wdinfo); @@ -121667,7 +121181,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy( pwdinfo->nego_ssid, extra, strlen( extra ) ); pwdinfo->nego_ssidlen = strlen( extra ); -@@ -3878,28 +4100,15 @@ static int rtw_p2p_set_intent(struct net +@@ -3878,28 +4100,15 @@ static int rtw_p2p_set_intent(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { @@ -121703,7 +121217,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( intent <= 15 ) { pwdinfo->intent= intent; -@@ -3909,10 +4118,10 @@ static int rtw_p2p_set_intent(struct net +@@ -3909,10 +4118,10 @@ static int rtw_p2p_set_intent(struct net_device *dev, ret = -1; } @@ -121717,7 +121231,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static int rtw_p2p_set_listen_ch(struct net_device *dev, -@@ -3922,26 +4131,13 @@ static int rtw_p2p_set_listen_ch(struct +@@ -3922,26 +4131,13 @@ static int rtw_p2p_set_listen_ch(struct net_device *dev, int ret = 0; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); @@ -121747,7 +121261,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { pwdinfo->listen_channel = listen_ch; set_channel_bwmode(padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20); -@@ -3951,7 +4147,7 @@ static int rtw_p2p_set_listen_ch(struct +@@ -3951,7 +4147,7 @@ static int rtw_p2p_set_listen_ch(struct net_device *dev, ret = -1; } @@ -121756,7 +121270,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; -@@ -3966,30 +4162,13 @@ static int rtw_p2p_set_op_ch(struct net_ +@@ -3966,30 +4162,13 @@ static int rtw_p2p_set_op_ch(struct net_device *dev, int ret = 0; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); @@ -121790,7 +121304,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { pwdinfo->operating_channel = op_ch; } -@@ -3998,10 +4177,10 @@ static int rtw_p2p_set_op_ch(struct net_ +@@ -3998,10 +4177,10 @@ static int rtw_p2p_set_op_ch(struct net_device *dev, ret = -1; } @@ -121803,7 +121317,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -4012,8 +4191,6 @@ static int rtw_p2p_profilefound(struct n +@@ -4012,8 +4191,6 @@ static int rtw_p2p_profilefound(struct net_device *dev, int ret = 0; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); @@ -121812,7 +121326,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct wifidirect_info *pwdinfo= &(padapter->wdinfo); // Comment by Albert 2010/10/13 -@@ -4026,7 +4203,7 @@ static int rtw_p2p_profilefound(struct n +@@ -4026,7 +4203,7 @@ static int rtw_p2p_profilefound(struct net_device *dev, // YY => SSID Length // SSID => SSID for persistence group @@ -121821,7 +121335,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // The upper application should pass the SSID to driver by using this rtw_p2p_profilefound function. -@@ -4055,8 +4232,8 @@ static int rtw_p2p_profilefound(struct n +@@ -4055,8 +4232,8 @@ static int rtw_p2p_profilefound(struct net_device *dev, pwdinfo->profileinfo[ pwdinfo->profileindex ].peermac[ jj ] = key_2char2num(extra[ kk ], extra[ kk+ 1 ]); } @@ -121832,7 +121346,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->profileindex++; } } -@@ -4073,16 +4250,14 @@ static int rtw_p2p_setDN(struct net_devi +@@ -4073,16 +4250,14 @@ static int rtw_p2p_setDN(struct net_device *dev, int ret = 0; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); @@ -121853,7 +121367,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -4098,23 +4273,20 @@ static int rtw_p2p_get_status(struct net +@@ -4098,23 +4273,20 @@ static int rtw_p2p_get_status(struct net_device *dev, struct iw_point *pdata = &wrqu->data; struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); @@ -121884,7 +121398,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -4152,7 +4324,7 @@ static int rtw_p2p_get_role(struct net_d +@@ -4152,7 +4324,7 @@ static int rtw_p2p_get_role(struct net_device *dev, struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); @@ -121893,7 +121407,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->p2p_peer_interface_addr[ 0 ], pwdinfo->p2p_peer_interface_addr[ 1 ], pwdinfo->p2p_peer_interface_addr[ 2 ], pwdinfo->p2p_peer_interface_addr[ 3 ], pwdinfo->p2p_peer_interface_addr[ 4 ], pwdinfo->p2p_peer_interface_addr[ 5 ]); -@@ -4174,7 +4346,7 @@ static int rtw_p2p_get_peer_ifaddr(struc +@@ -4174,7 +4346,7 @@ static int rtw_p2p_get_peer_ifaddr(struct net_device *dev, struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); @@ -121902,7 +121416,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->p2p_peer_interface_addr[ 0 ], pwdinfo->p2p_peer_interface_addr[ 1 ], pwdinfo->p2p_peer_interface_addr[ 2 ], pwdinfo->p2p_peer_interface_addr[ 3 ], pwdinfo->p2p_peer_interface_addr[ 4 ], pwdinfo->p2p_peer_interface_addr[ 5 ]); -@@ -4197,7 +4369,7 @@ static int rtw_p2p_get_peer_devaddr(stru +@@ -4197,7 +4369,7 @@ static int rtw_p2p_get_peer_devaddr(struct net_device *dev, struct iw_point *pdata = &wrqu->data; struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); @@ -121911,7 +121425,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->rx_prov_disc_info.peerDevAddr[ 0 ], pwdinfo->rx_prov_disc_info.peerDevAddr[ 1 ], pwdinfo->rx_prov_disc_info.peerDevAddr[ 2 ], pwdinfo->rx_prov_disc_info.peerDevAddr[ 3 ], pwdinfo->rx_prov_disc_info.peerDevAddr[ 4 ], pwdinfo->rx_prov_disc_info.peerDevAddr[ 5 ]); -@@ -4210,6 +4382,30 @@ static int rtw_p2p_get_peer_devaddr(stru +@@ -4210,6 +4382,30 @@ static int rtw_p2p_get_peer_devaddr(struct net_device *dev, } @@ -121942,7 +121456,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_p2p_get_groupid(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) -@@ -4221,7 +4417,7 @@ static int rtw_p2p_get_groupid(struct ne +@@ -4221,7 +4417,7 @@ static int rtw_p2p_get_groupid(struct net_device *dev, struct iw_point *pdata = &wrqu->data; struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); @@ -121951,7 +121465,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->groupid_info.go_device_addr[ 0 ], pwdinfo->groupid_info.go_device_addr[ 1 ], pwdinfo->groupid_info.go_device_addr[ 2 ], pwdinfo->groupid_info.go_device_addr[ 3 ], pwdinfo->groupid_info.go_device_addr[ 4 ], pwdinfo->groupid_info.go_device_addr[ 5 ], -@@ -4231,46 +4427,551 @@ static int rtw_p2p_get_groupid(struct ne +@@ -4231,46 +4427,551 @@ static int rtw_p2p_get_groupid(struct net_device *dev, } @@ -122531,7 +122045,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); -@@ -4286,67 +4987,441 @@ static int rtw_p2p_get_wps_configmethod( +@@ -4286,67 +4987,441 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev, pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); if ( _rtw_memcmp( pnetwork->network.MacAddress, peerMAC, ETH_ALEN ) ) { @@ -122698,12 +122212,18 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + // The P2P Device ID attribute is included in the Beacon frame. + // The P2P Device Info attribute is included in the probe response frame. -+ + +- if ( (wpsie=rtw_get_wps_ie( &pnetwork->network.IEs[ 12 ], pnetwork->network.IELength - 12, NULL, &wpsie_len )) ) + if ( rtw_get_p2p_attr_content( p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen) ) -+ { + { +- rtw_get_wps_attr_content( wpsie, wpsie_len, WPS_ATTR_CONF_METHOD, ( u8* ) &attr_content, &attr_contentlen); +- if ( attr_contentlen ) + // Handle the P2P Device ID attribute of Beacon first + if ( _rtw_memcmp( attr_content, pinvite_req_info->peer_macaddr, ETH_ALEN ) ) -+ { + { +- attr_content = be16_to_cpu( attr_content ); +- sprintf( attr_content_str, "\n\nM=%.4d", attr_content ); +- blnMatch = 1; + uintPeerChannel = pnetwork->network.Configuration.DSConfig; + break; + } @@ -122736,13 +122256,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + { + u8 wfd_devinfo[ 6 ] = { 0x00 }; + uint wfd_devlen = 6; - -- if ( (wpsie=rtw_get_wps_ie( &pnetwork->network.IEs[ 12 ], pnetwork->network.IELength - 12, NULL, &wpsie_len )) ) ++ + DBG_871X( "[%s] Found WFD IE!\n", __FUNCTION__ ); + if ( rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, wfd_devinfo, &wfd_devlen ) ) - { -- rtw_get_wps_attr_content( wpsie, wpsie_len, WPS_ATTR_CONF_METHOD, ( u8* ) &attr_content, &attr_contentlen); -- if ( attr_contentlen ) ++ { + u16 wfd_devinfo_field = 0; + + // Commented by Albert 20120319 @@ -122750,10 +122267,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + // In big endian format. + wfd_devinfo_field = RTW_GET_BE16(wfd_devinfo); + if ( wfd_devinfo_field & WFD_DEVINFO_SESSION_AVAIL ) - { -- attr_content = be16_to_cpu( attr_content ); -- sprintf( attr_content_str, "\n\nM=%.4d", attr_content ); -- blnMatch = 1; ++ { + pwfd_info->peer_session_avail = _TRUE; + } + else @@ -122927,47 +122441,47 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +{ + const char *pos; + u8 *opos; -+ + +- plist = get_next(plist); +- +- } + pos = str; + opos = bin; -+ + +- _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); + if (hexstr2bin(pos, opos, 4)) + return -1; + pos += 8; + opos += 4; -+ + +- if ( !blnMatch ) +- { +- sprintf( attr_content_str, "\n\nM=0000" ); +- } + if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) + return -1; + pos += 4; + opos += 2; -- plist = get_next(plist); +- if ( copy_to_user(wrqu->data.pointer, attr_content_str, 6 + 17)) { +- return -EFAULT; +- } - -- } +- return ret; +- + if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) + return -1; + pos += 4; + opos += 2; - -- _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); ++ + if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) + return -1; + pos += 4; + opos += 2; - -- if ( !blnMatch ) -- { -- sprintf( attr_content_str, "\n\nM=0000" ); -- } ++ + if (*pos++ != '-' || hexstr2bin(pos, opos, 6)) + return -1; - -- if ( copy_to_user(wrqu->data.pointer, attr_content_str, 6 + 17)) { -- return -EFAULT; -- } -- -- return ret; -- ++ + return 0; } @@ -123016,7 +122530,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct iw_request_info *info, union iwreq_data *wrqu, char *extra) { -@@ -4357,32 +5432,37 @@ static int rtw_p2p_get_device_name(struc +@@ -4357,32 +5432,37 @@ static int rtw_p2p_get_device_name(struct net_device *dev, struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); u8 peerMAC[ ETH_ALEN ] = { 0x00 }; int jj,kk; @@ -123072,7 +122586,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); -@@ -4396,146 +5476,260 @@ static int rtw_p2p_get_device_name(struc +@@ -4396,146 +5476,260 @@ static int rtw_p2p_get_device_name(struct net_device *dev, break; pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list); @@ -123130,9 +122644,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); + printk( "[%s] channel = %d\n", __FUNCTION__, uintPeerChannel ); -+ + +- if ( !blnMatch ) + if ( uintPeerChannel ) -+ { + { +- sprintf( dev_name_str, "\n\nN=0000" ); +- } + u8 wfd_ie[ 128 ] = { 0x00 }; + uint wfd_ielen = 0; + @@ -123141,7 +122658,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + u8 wfd_devinfo[ 6 ] = { 0x00 }; + uint wfd_devlen = 6; -- if ( !blnMatch ) +- if ( copy_to_user(wrqu->data.pointer, dev_name_str, 5+ (( dev_len > 17 )? dev_len : 17) )) { +- return -EFAULT; + DBG_871X( "[%s] Found WFD IE!\n", __FUNCTION__ ); + if ( rtw_get_wfd_attr_content( wfd_ie, wfd_ielen, WFD_ATTR_DEVICE_INFO, wfd_devinfo, &wfd_devlen ) ) + { @@ -123163,14 +122681,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + } + else - { -- sprintf( dev_name_str, "\n\nN=0000" ); ++ { + DBG_871X( "[%s] NOT Found in the Scanning Queue!\n", __FUNCTION__ ); } - -- if ( copy_to_user(wrqu->data.pointer, dev_name_str, 5+ (( dev_len > 17 )? dev_len : 17) )) { -- return -EFAULT; -- } ++ +exit: return ret; @@ -123267,7 +122781,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + else if ( extra[ 0 ] == '1' ) + { + pwfd_info->scan_result_type = SCAN_RESULT_ALL; -+ } + } + else if ( extra[ 0 ] == '2' ) + { + pwfd_info->scan_result_type = SCAN_RESULT_WFD_TYPE; @@ -123275,7 +122789,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + else + { + pwfd_info->scan_result_type = SCAN_RESULT_P2P_ONLY; - } ++ } + +exit: + @@ -123418,7 +122932,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); u8 peerMAC[ ETH_ALEN ] = { 0x00 }; int jj,kk; -@@ -4545,10 +5739,19 @@ static int rtw_p2p_prov_disc(struct net_ +@@ -4545,10 +5739,19 @@ static int rtw_p2p_prov_disc(struct net_device *dev, _queue *queue = &(pmlmepriv->scanned_queue); struct wlan_network *pnetwork = NULL; uint uintPeerChannel = 0; @@ -123439,7 +122953,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Commented by Albert 20110301 // The input data contains two informations. -@@ -4559,21 +5762,28 @@ static int rtw_p2p_prov_disc(struct net_ +@@ -4559,21 +5762,28 @@ static int rtw_p2p_prov_disc(struct net_device *dev, // Format: 00:E0:4C:00:00:05_pbc // Format: 00:E0:4C:00:00:05_label @@ -123472,7 +122986,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pwdinfo->tx_prov_disc_info.benable = _FALSE; } -@@ -4600,10 +5810,11 @@ static int rtw_p2p_prov_disc(struct net_ +@@ -4600,10 +5810,11 @@ static int rtw_p2p_prov_disc(struct net_device *dev, } else { @@ -123485,7 +122999,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); phead = get_list_head(queue); -@@ -4614,37 +5825,64 @@ static int rtw_p2p_prov_disc(struct net_ +@@ -4614,37 +5825,64 @@ static int rtw_p2p_prov_disc(struct net_device *dev, if (rtw_end_of_queue_search(phead,plist)== _TRUE) break; @@ -123565,7 +123079,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release plist = get_next(plist); -@@ -4654,6 +5892,51 @@ static int rtw_p2p_prov_disc(struct net_ +@@ -4654,6 +5892,51 @@ static int rtw_p2p_prov_disc(struct net_device *dev, if ( uintPeerChannel ) { @@ -123617,7 +123131,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy( pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddress, ETH_ALEN ); _rtw_memcpy( pwdinfo->tx_prov_disc_info.peerDevAddr, peerMAC, ETH_ALEN ); pwdinfo->tx_prov_disc_info.peer_channel_num[0] = ( u16 ) uintPeerChannel; -@@ -4665,20 +5948,56 @@ static int rtw_p2p_prov_disc(struct net_ +@@ -4665,20 +5948,56 @@ static int rtw_p2p_prov_disc(struct net_device *dev, { _rtw_memcpy( &pwdinfo->tx_prov_disc_info.ssid, &pnetwork->network.Ssid, sizeof( NDIS_802_11_SSID ) ); } @@ -123676,7 +123190,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } exit: -@@ -4697,11 +6016,10 @@ static int rtw_p2p_got_wpsinfo(struct ne +@@ -4697,11 +6016,10 @@ static int rtw_p2p_got_wpsinfo(struct net_device *dev, int ret = 0; _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); @@ -123689,7 +123203,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Added by Albert 20110328 // if the input data is P2P_NO_WPSINFO -> reset the wpsinfo // if the input data is P2P_GOT_WPSINFO_PEER_DISPLAY_PIN -> the utility just input the PIN code got from the peer P2P device. -@@ -4749,7 +6067,7 @@ static int rtw_p2p_set(struct net_device +@@ -4749,7 +6067,7 @@ static int rtw_p2p_set(struct net_device *dev, struct wifidirect_info *pwdinfo= &(padapter->wdinfo); struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -123698,7 +123212,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( _rtw_memcmp( extra, "enable=", 7 ) ) { -@@ -4809,8 +6127,56 @@ static int rtw_p2p_set(struct net_device +@@ -4809,8 +6127,56 @@ static int rtw_p2p_set(struct net_device *dev, wrqu->data.length -= 7; rtw_p2p_set_op_ch( dev, info, wrqu, &extra[6] ); } @@ -123757,7 +123271,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif //CONFIG_P2P return ret; -@@ -4832,7 +6198,10 @@ static int rtw_p2p_get(struct net_device +@@ -4832,7 +6198,10 @@ static int rtw_p2p_get(struct net_device *dev, struct wifidirect_info *pwdinfo= &(padapter->wdinfo); struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -123769,7 +123283,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( _rtw_memcmp( wrqu->data.pointer, "status", 6 ) ) { -@@ -4852,16 +6221,34 @@ static int rtw_p2p_get(struct net_device +@@ -4852,16 +6221,34 @@ static int rtw_p2p_get(struct net_device *dev, } else if ( _rtw_memcmp( wrqu->data.pointer, "peer_deva", 9 ) ) { @@ -123805,7 +123319,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif // CONFIG_WFD -@@ -4872,40 +6259,64 @@ static int rtw_p2p_get(struct net_device +@@ -4872,40 +6259,64 @@ static int rtw_p2p_get(struct net_device *dev, } static int rtw_p2p_get2(struct net_device *dev, @@ -123891,7 +123405,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release extern int rtw_change_ifname(_adapter *padapter, const char *ifname); static int rtw_rereg_nd_name(struct net_device *dev, struct iw_request_info *info, -@@ -4917,7 +6328,15 @@ static int rtw_rereg_nd_name(struct net_ +@@ -4917,7 +6328,15 @@ static int rtw_rereg_nd_name(struct net_device *dev, char new_ifname[IFNAMSIZ]; if(rereg_priv->old_ifname[0] == 0) { @@ -123908,7 +123422,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rereg_priv->old_ifname[IFNAMSIZ-1] = 0; } -@@ -4940,7 +6359,7 @@ static int rtw_rereg_nd_name(struct net_ +@@ -4940,7 +6359,7 @@ static int rtw_rereg_nd_name(struct net_device *dev, if(_rtw_memcmp(rereg_priv->old_ifname, "disable%d", 9) == _TRUE) { padapter->ledpriv.bRegUseLed= rereg_priv->old_bRegUseLed; @@ -123917,7 +123431,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_ips_mode_req(&padapter->pwrctrlpriv, rereg_priv->old_ips_mode); } -@@ -4957,7 +6376,7 @@ static int rtw_rereg_nd_name(struct net_ +@@ -4957,7 +6376,7 @@ static int rtw_rereg_nd_name(struct net_device *dev, rtw_led_control(padapter, LED_CTL_POWER_OFF); rereg_priv->old_bRegUseLed = padapter->ledpriv.bRegUseLed; padapter->ledpriv.bRegUseLed= _FALSE; @@ -124073,7 +123587,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_dbg_port(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) -@@ -5111,13 +6533,13 @@ static int rtw_dbg_port(struct net_devic +@@ -5111,13 +6533,13 @@ static int rtw_dbg_port(struct net_device *dev, switch(minor_cmd) { case 1: @@ -124090,7 +123604,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; } break; -@@ -5126,31 +6548,31 @@ static int rtw_dbg_port(struct net_devic +@@ -5126,31 +6548,31 @@ static int rtw_dbg_port(struct net_device *dev, { case 1: rtw_write8(padapter, arg, extra_arg); @@ -124131,7 +123645,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case 0x76: -@@ -5315,29 +6737,33 @@ static int rtw_dbg_port(struct net_devic +@@ -5315,29 +6737,33 @@ static int rtw_dbg_port(struct net_device *dev, #endif //CONFIG_IOL } break; @@ -124173,7 +123687,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case 0x05: psta = rtw_get_stainfo(pstapriv, cur_network->network.MacAddress); -@@ -5346,41 +6772,43 @@ static int rtw_dbg_port(struct net_devic +@@ -5346,41 +6772,43 @@ static int rtw_dbg_port(struct net_device *dev, int i; struct recv_reorder_ctrl *preorder_ctrl; @@ -124231,7 +123745,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->bSurpriseRemoved, padapter->bDriverStopped); break; case 0x08: -@@ -5388,10 +6816,14 @@ static int rtw_dbg_port(struct net_devic +@@ -5388,10 +6816,14 @@ static int rtw_dbg_port(struct net_device *dev, struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct recv_priv *precvpriv = &padapter->recvpriv; @@ -124249,7 +123763,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif } break; -@@ -5402,7 +6834,7 @@ static int rtw_dbg_port(struct net_devic +@@ -5402,7 +6834,7 @@ static int rtw_dbg_port(struct net_device *dev, struct recv_reorder_ctrl *preorder_ctrl; #ifdef CONFIG_AP_MODE @@ -124258,7 +123772,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif _enter_critical_bh(&pstapriv->sta_hash_lock, &irqL); -@@ -5419,20 +6851,22 @@ static int rtw_dbg_port(struct net_devic +@@ -5419,20 +6851,22 @@ static int rtw_dbg_port(struct net_device *dev, if(extra_arg == psta->aid) { @@ -124295,7 +123809,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -@@ -5441,7 +6875,7 @@ static int rtw_dbg_port(struct net_devic +@@ -5441,7 +6875,7 @@ static int rtw_dbg_port(struct net_device *dev, preorder_ctrl = &psta->recvreorder_ctrl[j]; if(preorder_ctrl->enable) { @@ -124304,7 +123818,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } -@@ -5457,9 +6891,9 @@ static int rtw_dbg_port(struct net_devic +@@ -5457,9 +6891,9 @@ static int rtw_dbg_port(struct net_device *dev, case 0x0c://dump rx packet { @@ -124316,7 +123830,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } break; #if 0 -@@ -5477,31 +6911,88 @@ static int rtw_dbg_port(struct net_devic +@@ -5477,31 +6911,88 @@ static int rtw_dbg_port(struct net_device *dev, case 0x0f: { if(extra_arg == 0){ @@ -124412,7 +123926,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 1 case 0xdd://registers dump , 0 for mac reg,1 for bb reg, 2 for rf reg { -@@ -5523,15 +7014,15 @@ static int rtw_dbg_port(struct net_devic +@@ -5523,15 +7014,15 @@ static int rtw_dbg_port(struct net_device *dev, u8 dm_flag; if(0xf==extra_arg){ @@ -124437,7 +123951,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else{ /* extra_arg = 0 - disable all dynamic func -@@ -5539,56 +7030,56 @@ static int rtw_dbg_port(struct net_devic +@@ -5539,56 +7030,56 @@ static int rtw_dbg_port(struct net_device *dev, extra_arg = 2 - disable tx power tracking extra_arg = 3 - turn on all dynamic func */ @@ -124519,7 +124033,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; } -@@ -5688,7 +7179,7 @@ static int wpa_set_param(struct net_devi +@@ -5688,7 +7179,7 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value) case IEEE_PARAM_WPAX_SELECT: // added for WPA2 mixed mode @@ -124528,7 +124042,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* spin_lock_irqsave(&ieee->wpax_suitlist_lock,flags); ieee->wpax_type_set = 1; -@@ -5789,7 +7280,7 @@ static int wpa_supplicant_ioctl(struct n +@@ -5789,7 +7280,7 @@ static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p) break; default: @@ -124537,7 +124051,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = -EOPNOTSUPP; break; -@@ -5855,7 +7346,7 @@ static int set_group_key(_adapter *padap +@@ -5855,7 +7346,7 @@ static int set_group_key(_adapter *padapter, u8 *key, u8 alg, int keyid) struct cmd_priv *pcmdpriv=&(padapter->cmdpriv); int res=_SUCCESS; @@ -124546,7 +124060,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj)); if(pcmd==NULL){ -@@ -5872,6 +7363,8 @@ static int set_group_key(_adapter *padap +@@ -5872,6 +7363,8 @@ static int set_group_key(_adapter *padapter, u8 *key, u8 alg, int keyid) _rtw_memset(psetkeyparm, 0, sizeof(struct setkey_parm)); psetkeyparm->keyid=(u8)keyid; @@ -124555,7 +124069,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psetkeyparm->algorithm = alg; -@@ -5945,7 +7438,7 @@ static int rtw_set_encryption(struct net +@@ -5945,7 +7438,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, struct security_priv* psecuritypriv=&(padapter->securitypriv); struct sta_priv *pstapriv = &padapter->stapriv; @@ -124564,7 +124078,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release param->u.crypt.err = 0; param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; -@@ -5974,7 +7467,7 @@ static int rtw_set_encryption(struct net +@@ -5974,7 +7467,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if(!psta) { //ret = -EINVAL; @@ -124573,7 +124087,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit; } } -@@ -5983,7 +7476,7 @@ static int rtw_set_encryption(struct net +@@ -5983,7 +7476,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, { //todo:clear default encryption keys @@ -124582,7 +124096,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit; } -@@ -5991,12 +7484,12 @@ static int rtw_set_encryption(struct net +@@ -5991,12 +7484,12 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta==NULL)) { @@ -124597,7 +124111,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if((wep_key_idx >= WEP_KEYS) || (wep_key_len<=0)) { -@@ -6011,7 +7504,7 @@ static int rtw_set_encryption(struct net +@@ -6011,7 +7504,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, wep_total_len = wep_key_len + FIELD_OFFSET(NDIS_802_11_WEP, KeyMaterial); pwep =(NDIS_802_11_WEP *)rtw_malloc(wep_total_len); if(pwep == NULL){ @@ -124606,7 +124120,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit; } -@@ -6028,7 +7521,7 @@ static int rtw_set_encryption(struct net +@@ -6028,7 +7521,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if(param->u.crypt.set_tx) { @@ -124615,7 +124129,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psecuritypriv->ndisencryptstatus = Ndis802_11Encryption1Enabled; psecuritypriv->dot11PrivacyAlgrthm=_WEP40_; -@@ -6053,7 +7546,7 @@ static int rtw_set_encryption(struct net +@@ -6053,7 +7546,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } else { @@ -124624,7 +124138,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //don't update "psecuritypriv->dot11PrivacyAlgrthm" and //"psecuritypriv->dot11PrivacyKeyIndex=keyid", but can rtw_set_key to cam -@@ -6077,7 +7570,7 @@ static int rtw_set_encryption(struct net +@@ -6077,7 +7570,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, { if(strcmp(param->u.crypt.alg, "WEP") == 0) { @@ -124633,7 +124147,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memcpy(psecuritypriv->dot118021XGrpKey[param->u.crypt.idx].skey, param->u.crypt.key, (param->u.crypt.key_len>16 ?16:param->u.crypt.key_len)); -@@ -6090,7 +7583,7 @@ static int rtw_set_encryption(struct net +@@ -6090,7 +7583,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } else if(strcmp(param->u.crypt.alg, "TKIP") == 0) { @@ -124642,7 +124156,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psecuritypriv->dot118021XGrpPrivacy = _TKIP_; -@@ -6106,7 +7599,7 @@ static int rtw_set_encryption(struct net +@@ -6106,7 +7599,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } else if(strcmp(param->u.crypt.alg, "CCMP") == 0) { @@ -124651,7 +124165,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psecuritypriv->dot118021XGrpPrivacy = _AES_; -@@ -6114,7 +7607,7 @@ static int rtw_set_encryption(struct net +@@ -6114,7 +7607,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } else { @@ -124660,7 +124174,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psecuritypriv->dot118021XGrpPrivacy = _NO_PRIVACY_; } -@@ -6150,7 +7643,7 @@ static int rtw_set_encryption(struct net +@@ -6150,7 +7643,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, if(strcmp(param->u.crypt.alg, "WEP") == 0) { @@ -124669,7 +124183,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psta->dot118021XPrivacy = _WEP40_; if(param->u.crypt.key_len==13) -@@ -6160,7 +7653,7 @@ static int rtw_set_encryption(struct net +@@ -6160,7 +7653,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, } else if(strcmp(param->u.crypt.alg, "TKIP") == 0) { @@ -124678,7 +124192,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psta->dot118021XPrivacy = _TKIP_; -@@ -6175,13 +7668,13 @@ static int rtw_set_encryption(struct net +@@ -6175,13 +7668,13 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, else if(strcmp(param->u.crypt.alg, "CCMP") == 0) { @@ -124703,7 +124217,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } return ret; -@@ -6269,25 +7762,23 @@ static int rtw_set_beacon(struct net_dev +@@ -6269,25 +7762,23 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int unsigned char *pbuf = param->u.bcn_ie.buf; @@ -124733,7 +124247,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -6301,40 +7792,10 @@ static int rtw_hostapd_sta_flush(struct +@@ -6301,40 +7792,10 @@ static int rtw_hostapd_sta_flush(struct net_device *dev) _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); //struct sta_priv *pstapriv = &padapter->stapriv; @@ -124775,7 +124289,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = rtw_sta_flush(padapter); return ret; -@@ -6350,7 +7811,7 @@ static int rtw_add_sta(struct net_device +@@ -6350,7 +7811,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct sta_priv *pstapriv = &padapter->stapriv; @@ -124784,7 +124298,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != _TRUE) { -@@ -6368,7 +7829,7 @@ static int rtw_add_sta(struct net_device +@@ -6368,7 +7829,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) psta = rtw_get_stainfo(pstapriv, param->sta_addr); if(psta) { @@ -124793,7 +124307,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _enter_critical_bh(&(pstapriv->sta_hash_lock), &irqL); rtw_free_stainfo(padapter, psta); _exit_critical_bh(&(pstapriv->sta_hash_lock), &irqL); -@@ -6382,7 +7843,7 @@ static int rtw_add_sta(struct net_device +@@ -6382,7 +7843,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) { int flags = param->u.add_sta.flags; @@ -124802,11 +124316,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psta->aid = param->u.add_sta.aid;//aid=1~2007 -@@ -6430,75 +7891,149 @@ static int rtw_add_sta(struct net_device - - } - --static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) +@@ -6423,82 +7884,156 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param) + } + else + { +- ret = -ENOMEM; +- } ++ ret = -ENOMEM; ++ } ++ ++ return ret; ++ ++} ++ +static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) +{ + _irqL irqL; @@ -124859,11 +124381,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + //ret = -1; + } + -+ -+ return ret; -+ -+} -+ + + return ret; + + } + +-static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) +static int rtw_ioctl_get_sta_data(struct net_device *dev, struct ieee_param *param, int len) { - _irqL irqL; @@ -124917,7 +124440,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - pstapriv->sta_dz_bitmap &=~BIT(psta->aid); - pstapriv->tim_bitmap &=~BIT(psta->aid); --#endif +#if 0 + struct { + u16 aid; @@ -124934,7 +124456,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + u64 tx_bytes; + u64 tx_drops; + } get_sta; -+#endif + #endif + psta_data->aid = (u16)psta->aid; + psta_data->capability = psta->capability; + psta_data->flags = psta->flags; @@ -124995,7 +124517,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) -@@ -6509,7 +8044,7 @@ static int rtw_get_sta_wpaie(struct net_ +@@ -6509,7 +8044,7 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct sta_priv *pstapriv = &padapter->stapriv; @@ -125004,7 +124526,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != _TRUE) { -@@ -6542,7 +8077,7 @@ static int rtw_get_sta_wpaie(struct net_ +@@ -6542,7 +8077,7 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param) else { //ret = -1; @@ -125013,7 +124535,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } else -@@ -6564,7 +8099,7 @@ static int rtw_set_wps_beacon(struct net +@@ -6564,7 +8099,7 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); int ie_len; @@ -125022,7 +124544,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) return -EINVAL; -@@ -6583,7 +8118,7 @@ static int rtw_set_wps_beacon(struct net +@@ -6583,7 +8118,7 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param, pmlmepriv->wps_beacon_ie = rtw_malloc(ie_len); pmlmepriv->wps_beacon_ie_len = ie_len; if ( pmlmepriv->wps_beacon_ie == NULL) { @@ -125031,7 +124553,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -6607,7 +8142,7 @@ static int rtw_set_wps_probe_resp(struct +@@ -6607,7 +8142,7 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); int ie_len; @@ -125040,7 +124562,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) return -EINVAL; -@@ -6626,7 +8161,7 @@ static int rtw_set_wps_probe_resp(struct +@@ -6626,7 +8161,7 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par pmlmepriv->wps_probe_resp_ie = rtw_malloc(ie_len); pmlmepriv->wps_probe_resp_ie_len = ie_len; if ( pmlmepriv->wps_probe_resp_ie == NULL) { @@ -125049,7 +124571,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } _rtw_memcpy(pmlmepriv->wps_probe_resp_ie, param->u.bcn_ie.buf, ie_len); -@@ -6637,38 +8172,6 @@ static int rtw_set_wps_probe_resp(struct +@@ -6637,38 +8172,6 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par } @@ -125088,7 +124610,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *param, int len) { int ret=0; -@@ -6676,7 +8179,7 @@ static int rtw_set_wps_assoc_resp(struct +@@ -6676,7 +8179,7 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); int ie_len; @@ -125097,7 +124619,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE) return -EINVAL; -@@ -6695,7 +8198,7 @@ static int rtw_set_wps_assoc_resp(struct +@@ -6695,7 +8198,7 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len); pmlmepriv->wps_assoc_resp_ie_len = ie_len; if ( pmlmepriv->wps_assoc_resp_ie == NULL) { @@ -125106,7 +124628,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EINVAL; } -@@ -6707,13 +8210,125 @@ static int rtw_set_wps_assoc_resp(struct +@@ -6707,13 +8210,125 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par } @@ -125233,7 +124755,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /* * this function is expect to call in master mode, which allows no power saving -@@ -6746,7 +8361,7 @@ static int rtw_hostapd_ioctl(struct net_ +@@ -6746,7 +8361,7 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p) goto out; } @@ -125242,7 +124764,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release switch (param->cmd) { -@@ -6809,9 +8424,33 @@ static int rtw_hostapd_ioctl(struct net_ +@@ -6809,9 +8424,33 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p) ret = rtw_set_hidden_ssid(dev, param, p->length); break; @@ -125277,7 +124799,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = -EOPNOTSUPP; break; -@@ -6850,7 +8489,8 @@ static int rtw_wx_set_priv(struct net_de +@@ -6850,7 +8489,8 @@ static int rtw_wx_set_priv(struct net_device *dev, struct iw_point *dwrq = (struct iw_point*)awrq; //RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_notice_, ("+rtw_wx_set_priv\n")); @@ -125287,7 +124809,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release len = dwrq->length; if (!(ext = rtw_vmalloc(len))) return -ENOMEM; -@@ -6952,16 +8592,7 @@ static int rtw_wx_set_priv(struct net_de +@@ -6952,16 +8592,7 @@ static int rtw_wx_set_priv(struct net_device *dev, break; case ANDROID_WIFI_CMD_LINKSPEED : { @@ -125305,7 +124827,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf(ext, "LINKSPEED %d", mbps); } break; -@@ -6970,15 +8601,13 @@ static int rtw_wx_set_priv(struct net_de +@@ -6970,15 +8601,13 @@ static int rtw_wx_set_priv(struct net_device *dev, break; case ANDROID_WIFI_CMD_SCAN_ACTIVE : { @@ -125323,7 +124845,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf(ext, "OK"); } break; -@@ -6986,33 +8615,11 @@ static int rtw_wx_set_priv(struct net_de +@@ -6986,33 +8615,11 @@ static int rtw_wx_set_priv(struct net_device *dev, case ANDROID_WIFI_CMD_COUNTRY : { char country_code[10]; @@ -125359,7 +124881,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release default : #ifdef CONFIG_DEBUG_RTW_WX_SET_PRIV DBG_871X("%s: %s unknowned req=%s\n", __FUNCTION__, -@@ -7069,7 +8676,7 @@ static int rtw_mp_efuse_get(struct net_d +@@ -7069,7 +8676,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, return -EFAULT; pch = extra; @@ -125368,7 +124890,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release i=0; //mac 16 "00e04c871200" rmap,00,2 -@@ -7082,38 +8689,38 @@ static int rtw_mp_efuse_get(struct net_d +@@ -7082,38 +8689,38 @@ static int rtw_mp_efuse_get(struct net_device *dev, if ( strcmp(tmp[0],"realmap") == 0 ) { @@ -125417,7 +124939,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wrqu->length = strlen(extra); return 0; -@@ -7123,39 +8730,39 @@ static int rtw_mp_efuse_get(struct net_d +@@ -7123,39 +8730,39 @@ static int rtw_mp_efuse_get(struct net_device *dev, // rmap addr cnts addr = simple_strtoul(tmp[1], &ptmp, 16); @@ -125465,7 +124987,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7165,24 +8772,24 @@ static int rtw_mp_efuse_get(struct net_d +@@ -7165,24 +8772,24 @@ static int rtw_mp_efuse_get(struct net_device *dev, if (rtw_efuse_access(padapter, _FALSE, addr, mapLen, rawdata) == _FAIL) { @@ -125495,7 +125017,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf(extra, "%s\t", extra); } } -@@ -7201,21 +8808,21 @@ static int rtw_mp_efuse_get(struct net_d +@@ -7201,21 +8808,21 @@ static int rtw_mp_efuse_get(struct net_device *dev, #endif EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (PVOID)&max_available_size, _FALSE); if ((addr + mapLen) > max_available_size) { @@ -125522,7 +125044,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf(extra,"%s ",extra); } wrqu->length = strlen(extra); -@@ -7232,21 +8839,21 @@ static int rtw_mp_efuse_get(struct net_d +@@ -7232,21 +8839,21 @@ static int rtw_mp_efuse_get(struct net_device *dev, cnts = 4; EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (PVOID)&max_available_size, _FALSE); if ((addr + mapLen) > max_available_size) { @@ -125549,7 +125071,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf(extra,"%s ",extra); } wrqu->length = strlen(extra); -@@ -7271,7 +8878,7 @@ static int rtw_mp_efuse_get(struct net_d +@@ -7271,7 +8878,7 @@ static int rtw_mp_efuse_get(struct net_device *dev, static int rtw_mp_efuse_set(struct net_device *dev, struct iw_request_info *info, @@ -125558,7 +125080,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { struct iw_point *wrqu = (struct iw_point *)wdata; PADAPTER padapter = rtw_netdev_priv(dev); -@@ -7286,7 +8893,7 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7286,7 +8893,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, u32 cnts = 0; pch = extra; @@ -125567,7 +125089,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release i=0; while ( (token = strsep (&pch,",") )!=NULL ) -@@ -7304,13 +8911,13 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7304,13 +8911,13 @@ static int rtw_mp_efuse_set(struct net_device *dev, addr = simple_strtoul( tmp[1], &ptmp, 16 ); addr = addr & 0xFF; @@ -125584,7 +125106,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( jj = 0, kk = 0; jj < cnts; jj++, kk += 2 ) { -@@ -7320,14 +8927,14 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7320,14 +8927,14 @@ static int rtw_mp_efuse_set(struct net_device *dev, EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (PVOID)&max_available_size, _FALSE); if ((addr + cnts) > max_available_size) { @@ -125602,7 +125124,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7336,13 +8943,13 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7336,13 +8943,13 @@ static int rtw_mp_efuse_set(struct net_device *dev, if ( ! strlen( tmp[2] )/2 > 1 ) return -EFAULT; addr = simple_strtoul( tmp[1], &ptmp, 16 ); addr = addr & 0xFF; @@ -125619,7 +125141,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( jj = 0, kk = 0; jj < cnts; jj++, kk += 2 ) { -@@ -7350,10 +8957,10 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7350,10 +8957,10 @@ static int rtw_mp_efuse_set(struct net_device *dev, } if ( rtw_efuse_access( padapter, _TRUE, addr, cnts, setrawdata ) == _FAIL ){ @@ -125632,7 +125154,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7369,11 +8976,11 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7369,11 +8976,11 @@ static int rtw_mp_efuse_set(struct net_device *dev, cnts = strlen( tmp[1] )/2; if ( cnts == 0) return -EFAULT; if ( cnts > 6 ){ @@ -125646,7 +125168,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( jj = 0, kk = 0; jj < cnts; jj++, kk += 2 ) { -@@ -7383,14 +8990,14 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7383,14 +8990,14 @@ static int rtw_mp_efuse_set(struct net_device *dev, EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (PVOID)&max_available_size, _FALSE); if ((addr + cnts) > max_available_size) { @@ -125664,7 +125186,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7406,7 +9013,7 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7406,7 +9013,7 @@ static int rtw_mp_efuse_set(struct net_device *dev, cnts=strlen( tmp[1] )/2; if ( cnts == 0) return -EFAULT; @@ -125673,7 +125195,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( jj = 0, kk = 0; jj < cnts; jj++, kk += 2 ) { -@@ -7416,20 +9023,20 @@ static int rtw_mp_efuse_set(struct net_d +@@ -7416,20 +9023,20 @@ static int rtw_mp_efuse_set(struct net_device *dev, EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (PVOID)&max_available_size, _FALSE); if ((addr + cnts) > max_available_size) { @@ -125698,7 +125220,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7534,12 +9141,15 @@ static int rtw_mp_read_reg(struct net_de +@@ -7534,12 +9141,15 @@ static int rtw_mp_read_reg(struct net_device *dev, u32 ret, i=0, j=0, strtout=0; PADAPTER padapter = rtw_netdev_priv(dev); @@ -125715,7 +125237,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pch = input; pnext = strpbrk(pch, " ,.-"); if (pnext == NULL) return -EINVAL; -@@ -7559,7 +9169,7 @@ static int rtw_mp_read_reg(struct net_de +@@ -7559,7 +9169,7 @@ static int rtw_mp_read_reg(struct net_device *dev, // 1 byte // *(u8*)data = rtw_read8(padapter, addr); sprintf(extra, "%d\n", rtw_read8(padapter, addr)); @@ -125724,7 +125246,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case 'w': // 2 bytes -@@ -7578,7 +9188,7 @@ static int rtw_mp_read_reg(struct net_de +@@ -7578,7 +9188,7 @@ static int rtw_mp_read_reg(struct net_device *dev, j++; } pch = tmp; @@ -125733,7 +125255,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release while( *pch != '\0' ) { -@@ -7594,7 +9204,7 @@ static int rtw_mp_read_reg(struct net_de +@@ -7594,7 +9204,7 @@ static int rtw_mp_read_reg(struct net_device *dev, } pch = pnext; } @@ -125742,7 +125264,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case 'd': // 4 bytes -@@ -7612,7 +9222,7 @@ static int rtw_mp_read_reg(struct net_de +@@ -7612,7 +9222,7 @@ static int rtw_mp_read_reg(struct net_device *dev, j++; } pch = tmp; @@ -125751,7 +125273,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release while( *pch != '\0' ) { -@@ -7628,7 +9238,7 @@ static int rtw_mp_read_reg(struct net_de +@@ -7628,7 +9238,7 @@ static int rtw_mp_read_reg(struct net_device *dev, } pch = pnext; } @@ -125760,7 +125282,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; default: -@@ -7666,9 +9276,12 @@ static int rtw_mp_read_reg(struct net_de +@@ -7666,9 +9276,12 @@ static int rtw_mp_read_reg(struct net_device *dev, if (path >= MAX_RF_PATH_NUMS) return -EINVAL; if (addr > 0xFF) return -EINVAL; if (data > 0xFFFFF) return -EINVAL; @@ -125773,7 +125295,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7697,12 +9310,14 @@ static int rtw_mp_read_rf(struct net_dev +@@ -7697,12 +9310,14 @@ static int rtw_mp_read_rf(struct net_device *dev, if (copy_from_user(input, wrqu->pointer, wrqu->length)) return -EFAULT; @@ -125789,7 +125311,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //*data = read_rfreg(padapter, path, addr); sprintf(data, "%08x", read_rfreg(padapter, path, addr)); //add read data format blank -@@ -7717,7 +9332,7 @@ static int rtw_mp_read_rf(struct net_dev +@@ -7717,7 +9332,7 @@ static int rtw_mp_read_rf(struct net_device *dev, j++; } pch = tmp; @@ -125798,7 +125320,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release while( *pch != '\0' ) { -@@ -7733,7 +9348,7 @@ static int rtw_mp_read_rf(struct net_dev +@@ -7733,7 +9348,7 @@ static int rtw_mp_read_rf(struct net_device *dev, } pch = pnext; } @@ -125807,7 +125329,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7794,7 +9409,7 @@ static int rtw_mp_rate(struct net_device +@@ -7794,7 +9409,7 @@ static int rtw_mp_rate(struct net_device *dev, else rate =(rate-0x80+MPT_RATE_MCS0); @@ -125816,7 +125338,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (rate >= MPT_RATE_LAST ) return -EINVAL; -@@ -7819,7 +9434,7 @@ static int rtw_mp_channel(struct net_dev +@@ -7819,7 +9434,7 @@ static int rtw_mp_channel(struct net_device *dev, return -EFAULT; channel = rtw_atoi(input); @@ -125825,7 +125347,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf( extra, "Change channel %d to channel %d", padapter->mppriv.channel , channel ); padapter->mppriv.channel = channel; -@@ -7839,14 +9454,14 @@ static int rtw_mp_bandwidth(struct net_d +@@ -7839,14 +9454,14 @@ static int rtw_mp_bandwidth(struct net_device *dev, //if (copy_from_user(buffer, (void*)wrqu->data.pointer, wrqu->data.length)) // return -EFAULT; @@ -125842,7 +125364,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->mppriv.bandwidth = (u8)bandwidth; padapter->mppriv.preamble = sg; -@@ -7869,7 +9484,7 @@ static int rtw_mp_txpower(struct net_dev +@@ -7869,7 +9484,7 @@ static int rtw_mp_txpower(struct net_device *dev, return -EFAULT; sscanf(input,"patha=%d,pathb=%d",&idx_a,&idx_b); @@ -125851,7 +125373,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf( extra, "Set power level path_A:%d path_B:%d", idx_a , idx_b ); padapter->mppriv.txpoweridx = (u8)idx_a; -@@ -7893,7 +9508,7 @@ static int rtw_mp_ant_tx(struct net_devi +@@ -7893,7 +9508,7 @@ static int rtw_mp_ant_tx(struct net_device *dev, if (copy_from_user(input, wrqu->pointer, wrqu->length)) return -EFAULT; @@ -125860,7 +125382,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf( extra, "switch Tx antenna to %s", input ); -@@ -7910,9 +9525,9 @@ static int rtw_mp_ant_tx(struct net_devi +@@ -7910,9 +9525,9 @@ static int rtw_mp_ant_tx(struct net_device *dev, } } //antenna |= BIT(extra[i]-'a'); @@ -125872,7 +125394,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release Hal_SetAntenna(padapter); -@@ -7931,8 +9546,11 @@ static int rtw_mp_ant_rx(struct net_devi +@@ -7931,8 +9546,11 @@ static int rtw_mp_ant_rx(struct net_device *dev, if (copy_from_user(input, wrqu->pointer, wrqu->length)) return -EFAULT; @@ -125886,7 +125408,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for (i=0; i < strlen(input); i++) { switch( input[i] ) -@@ -7946,11 +9564,11 @@ static int rtw_mp_ant_rx(struct net_devi +@@ -7946,11 +9564,11 @@ static int rtw_mp_ant_rx(struct net_device *dev, } } @@ -125901,7 +125423,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -7973,7 +9591,7 @@ static int rtw_mp_ctx(struct net_device +@@ -7973,7 +9591,7 @@ static int rtw_mp_ctx(struct net_device *dev, if (copy_from_user(extra, wrqu->pointer, wrqu->length)) return -EFAULT; @@ -125910,7 +125432,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release countPkTx = strncmp(extra, "count=", 5); // strncmp TRUE is 0 cotuTx = strncmp(extra, "background", 20); -@@ -7984,9 +9602,9 @@ static int rtw_mp_ctx(struct net_device +@@ -7984,9 +9602,9 @@ static int rtw_mp_ctx(struct net_device *dev, stop = strncmp(extra, "stop", 5); sscanf(extra, "count=%d,pkt", &count); @@ -125922,7 +125444,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (stop == 0) { bStartTest = 0; // To set Stop pmp_priv->tx.stop = 1; -@@ -7995,7 +9613,7 @@ static int rtw_mp_ctx(struct net_device +@@ -7995,7 +9613,7 @@ static int rtw_mp_ctx(struct net_device *dev, bStartTest = 1; if (pmp_priv->mode != MP_ON) { if (pmp_priv->tx.stop != 1) { @@ -125931,7 +125453,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EFAULT; } } -@@ -8016,7 +9634,7 @@ static int rtw_mp_ctx(struct net_device +@@ -8016,7 +9634,7 @@ static int rtw_mp_ctx(struct net_device *dev, { case MP_PACKET_TX: @@ -125940,7 +125462,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (bStartTest == 0) { pmp_priv->tx.stop = 1; -@@ -8026,7 +9644,7 @@ static int rtw_mp_ctx(struct net_device +@@ -8026,7 +9644,7 @@ static int rtw_mp_ctx(struct net_device *dev, else if (pmp_priv->tx.stop == 1) { sprintf( extra, "Start continuous DA=ffffffffffff len=1500 count=%u,\n",count); @@ -125949,7 +125471,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pmp_priv->tx.stop = 0; pmp_priv->tx.count = count; pmp_priv->tx.payload = 2; -@@ -8036,50 +9654,51 @@ static int rtw_mp_ctx(struct net_device +@@ -8036,50 +9654,51 @@ static int rtw_mp_ctx(struct net_device *dev, SetPacketTx(padapter); } else { @@ -126013,7 +125535,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sprintf( extra, "Error! Continuous-Tx is not on-going."); return -EFAULT; } -@@ -8088,7 +9707,7 @@ static int rtw_mp_ctx(struct net_device +@@ -8088,7 +9707,7 @@ static int rtw_mp_ctx(struct net_device *dev, struct mp_priv *pmp_priv = &padapter->mppriv; if (pmp_priv->tx.stop == 0) { pmp_priv->tx.stop = 1; @@ -126022,7 +125544,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_msleep_os(5); } pmp_priv->tx.stop = 0; -@@ -8113,7 +9732,7 @@ static int rtw_mp_arx(struct net_device +@@ -8113,7 +9732,7 @@ static int rtw_mp_arx(struct net_device *dev, if (copy_from_user(input, wrqu->pointer, wrqu->length)) return -EFAULT; @@ -126031,7 +125553,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release bStartRx = (strncmp(input, "start", 5)==0)?1:0; // strncmp TRUE is 0 bStopRx = (strncmp(input, "stop", 5)==0)?1:0; // strncmp TRUE is 0 -@@ -8166,23 +9785,33 @@ static int rtw_mp_pwrtrk(struct net_devi +@@ -8166,23 +9785,33 @@ static int rtw_mp_pwrtrk(struct net_device *dev, u32 thermal; s32 ret; PADAPTER padapter = rtw_netdev_priv(dev); @@ -126070,7 +125592,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -8192,13 +9821,15 @@ static int rtw_mp_psd(struct net_device +@@ -8192,13 +9821,15 @@ static int rtw_mp_psd(struct net_device *dev, struct iw_point *wrqu, char *extra) { PADAPTER padapter = rtw_netdev_priv(dev); @@ -126089,7 +125611,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return 0; } -@@ -8206,7 +9837,7 @@ static int rtw_mp_thermal(struct net_dev +@@ -8206,7 +9837,7 @@ static int rtw_mp_thermal(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrqu, char *extra) { @@ -126098,7 +125620,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u16 bwrite=1; #ifdef CONFIG_RTL8192C u16 addr=0x78; -@@ -8221,7 +9852,7 @@ static int rtw_mp_thermal(struct net_dev +@@ -8221,7 +9852,7 @@ static int rtw_mp_thermal(struct net_device *dev, if (copy_from_user(extra, wrqu->pointer, wrqu->length)) return -EFAULT; @@ -126107,7 +125629,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release bwrite = strncmp(extra, "write", 6); // strncmp TRUE is 0 -@@ -8229,16 +9860,16 @@ static int rtw_mp_thermal(struct net_dev +@@ -8229,16 +9860,16 @@ static int rtw_mp_thermal(struct net_device *dev, if( bwrite == 0 ) { @@ -126127,7 +125649,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return -EFAULT; } else -@@ -8248,7 +9879,7 @@ static int rtw_mp_thermal(struct net_dev +@@ -8248,7 +9879,7 @@ static int rtw_mp_thermal(struct net_device *dev, } else { @@ -126136,7 +125658,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } wrqu->length = strlen(extra); -@@ -8291,24 +9922,24 @@ static int rtw_mp_dump(struct net_device +@@ -8291,24 +9922,24 @@ static int rtw_mp_dump(struct net_device *dev, if ( strncmp(extra, "all", 4)==0 ) { @@ -126170,7 +125692,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(( RF_1T2R == rf_type ) ||( RF_1T1R ==rf_type )) path_nums = 1; else -@@ -8323,10 +9954,10 @@ static int rtw_mp_dump(struct net_device +@@ -8323,10 +9954,10 @@ static int rtw_mp_dump(struct net_device *dev, #endif { //value = PHY_QueryRFReg(padapter, (RF90_RADIO_PATH_E)path,i, bMaskDWord); @@ -126185,7 +125707,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } } } -@@ -8345,7 +9976,7 @@ static int rtw_mp_phypara(struct net_dev +@@ -8345,7 +9976,7 @@ static int rtw_mp_phypara(struct net_device *dev, if (copy_from_user(input, wrqu->pointer, wrqu->length)) return -EFAULT; @@ -126194,7 +125716,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release sscanf(input, "xcap=%d", &valxcap); -@@ -8407,31 +10038,27 @@ static int rtw_mp_set(struct net_device +@@ -8407,31 +10038,27 @@ static int rtw_mp_set(struct net_device *dev, break; case MP_START: @@ -126231,7 +125753,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_mp_efuse_set (dev,info,wdata,extra); break; -@@ -8450,7 +10077,7 @@ static int rtw_mp_get(struct net_device +@@ -8450,7 +10077,7 @@ static int rtw_mp_get(struct net_device *dev, u32 subcmd = wrqu->flags; PADAPTER padapter = rtw_netdev_priv(dev); @@ -126240,7 +125762,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (padapter == NULL) { -@@ -8465,86 +10092,212 @@ static int rtw_mp_get(struct net_device +@@ -8465,86 +10092,212 @@ static int rtw_mp_get(struct net_device *dev, switch(subcmd) { case MP_PHYPARA: @@ -126366,8 +125888,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + else + { + padapter->wdinfo.wfd_tdls_enable = 1; -+ } -+ + } + +-return 0; +#endif //CONFIG_WFD +#endif //CONFIG_TDLS + @@ -126394,9 +125917,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + else + { + padapter->wdinfo.wfd_tdls_weaksec = 1; - } -- --return 0; ++ } +#endif + + return ret; @@ -126475,7 +125996,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_tdls_setup(struct net_device *dev, struct iw_request_info *info, -@@ -8558,20 +10311,40 @@ static int rtw_tdls_setup(struct net_dev +@@ -8558,20 +10311,40 @@ static int rtw_tdls_setup(struct net_device *dev, _adapter *padapter = (_adapter *)rtw_netdev_priv(dev); u8 mac_addr[ETH_ALEN]; @@ -126520,7 +126041,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_tdls_teardown(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) -@@ -8585,12 +10358,12 @@ static int rtw_tdls_teardown(struct net_ +@@ -8585,12 +10358,12 @@ static int rtw_tdls_teardown(struct net_device *dev, struct sta_info *ptdls_sta = NULL; u8 mac_addr[ETH_ALEN]; @@ -126535,7 +126056,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ptdls_sta = rtw_get_stainfo( &(padapter->stapriv), mac_addr); if(ptdls_sta != NULL) -@@ -8599,12 +10372,11 @@ static int rtw_tdls_teardown(struct net_ +@@ -8599,12 +10372,11 @@ static int rtw_tdls_teardown(struct net_device *dev, issue_tdls_teardown(padapter, mac_addr); } @@ -126549,7 +126070,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_tdls_discovery(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) -@@ -8617,11 +10389,11 @@ static int rtw_tdls_discovery(struct net +@@ -8617,11 +10389,11 @@ static int rtw_tdls_discovery(struct net_device *dev, struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -126563,7 +126084,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -8639,7 +10411,7 @@ static int rtw_tdls_ch_switch(struct net +@@ -8639,7 +10411,7 @@ static int rtw_tdls_ch_switch(struct net_device *dev, u8 i, j, mac_addr[ETH_ALEN]; struct sta_info *ptdls_sta = NULL; @@ -126572,7 +126093,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){ mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1)); -@@ -8648,15 +10420,14 @@ static int rtw_tdls_ch_switch(struct net +@@ -8648,15 +10420,14 @@ static int rtw_tdls_ch_switch(struct net_device *dev, ptdls_sta = rtw_get_stainfo(&padapter->stapriv, mac_addr); if( ptdls_sta == NULL ) return ret; @@ -126591,7 +126112,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_tdls_pson(struct net_device *dev, struct iw_request_info *info, -@@ -8672,7 +10443,7 @@ static int rtw_tdls_pson(struct net_devi +@@ -8672,7 +10443,7 @@ static int rtw_tdls_pson(struct net_device *dev, u8 i, j, mac_addr[ETH_ALEN]; struct sta_info *ptdls_sta = NULL; @@ -126600,7 +126121,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){ mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1)); -@@ -8682,9 +10453,9 @@ static int rtw_tdls_pson(struct net_devi +@@ -8682,9 +10453,9 @@ static int rtw_tdls_pson(struct net_device *dev, issue_nulldata_to_TDLS_peer_STA(padapter, ptdls_sta, 1); @@ -126612,7 +126133,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static int rtw_tdls_psoff(struct net_device *dev, -@@ -8701,7 +10472,7 @@ static int rtw_tdls_psoff(struct net_dev +@@ -8701,7 +10472,7 @@ static int rtw_tdls_psoff(struct net_device *dev, u8 i, j, mac_addr[ETH_ALEN]; struct sta_info *ptdls_sta = NULL; @@ -126621,7 +126142,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){ mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1)); -@@ -8711,9 +10482,185 @@ static int rtw_tdls_psoff(struct net_dev +@@ -8711,11 +10482,187 @@ static int rtw_tdls_psoff(struct net_device *dev, issue_nulldata_to_TDLS_peer_STA(padapter, ptdls_sta, 0); @@ -126708,10 +126229,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif //CONFIG_WFD +#endif //CONFIG_TDLS -+ -+ return ret; -+} -+ + + return ret; + } + +static int rtw_tdls_getport(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) @@ -126802,13 +126323,15 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + +#endif //CONFIG_WFD +#endif //CONFIG_TDLS - - return ret; ++ ++ return ret; + - } - ++} ++ static int rtw_tdls_ch_switch_off(struct net_device *dev, -@@ -8728,7 +10675,7 @@ static int rtw_tdls_ch_switch_off(struct + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +@@ -8728,7 +10675,7 @@ static int rtw_tdls_ch_switch_off(struct net_device *dev, u8 i, j, mac_addr[ETH_ALEN]; struct sta_info *ptdls_sta = NULL; @@ -126817,7 +126340,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){ mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1)); -@@ -8741,11 +10688,11 @@ static int rtw_tdls_ch_switch_off(struct +@@ -8741,11 +10688,11 @@ static int rtw_tdls_ch_switch_off(struct net_device *dev, if((ptdls_sta->tdls_sta_state & TDLS_AT_OFF_CH_STATE) && (ptdls_sta->tdls_sta_state & TDLS_PEER_AT_OFF_STATE)){ pmlmeinfo->tdls_candidate_ch= pmlmeext->cur_channel; issue_tdls_ch_switch_req(padapter, mac_addr); @@ -126831,7 +126354,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; } -@@ -8757,8 +10704,34 @@ static int rtw_tdls(struct net_device *d +@@ -8757,8 +10704,34 @@ static int rtw_tdls(struct net_device *dev, int ret = 0; #ifdef CONFIG_TDLS @@ -126867,7 +126390,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ( _rtw_memcmp( extra, "setup=", 6 ) ) { -@@ -8795,89 +10768,56 @@ static int rtw_tdls(struct net_device *d +@@ -8795,89 +10768,56 @@ static int rtw_tdls(struct net_device *dev, wrqu->data.length -= 6; rtw_tdls_psoff( dev, info, wrqu, &extra[6] ); } @@ -126969,20 +126492,20 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + if ( _rtw_memcmp( wrqu->data.pointer, "ip", 2 ) ) + { + rtw_tdls_getip( dev, info, wrqu, extra ); -+ } + } +- else { +- return -EFAULT; + if ( _rtw_memcmp( wrqu->data.pointer, "port", 4 ) ) + { + rtw_tdls_getport( dev, info, wrqu, extra ); } -- else { -- return -EFAULT; +- return 0; + + //WFDTDLS, for sigma test + if ( _rtw_memcmp( wrqu->data.pointer, "dis", 3 ) ) + { + rtw_tdls_dis_result( dev, info, wrqu, extra ); - } -- return 0; ++ } + if ( _rtw_memcmp( wrqu->data.pointer, "status", 6 ) ) + { + rtw_wfd_tdls_status( dev, info, wrqu, extra ); @@ -126994,7 +126517,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static int rtw_pm_set(struct net_device *dev, -@@ -8885,27 +10825,32 @@ static int rtw_pm_set(struct net_device +@@ -8885,27 +10825,32 @@ static int rtw_pm_set(struct net_device *dev, union iwreq_data *wrqu, char *extra) { int ret = 0; @@ -127035,7 +126558,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { int ret = 0; struct oid_par_priv oid_par; -@@ -8946,7 +10891,7 @@ static int rtw_wowlan_ctrl(struct net_de +@@ -8946,7 +10891,7 @@ static int rtw_wowlan_ctrl(struct net_device *dev, DBG_871X("+rtw_wowlan_ctrl: Device didn't support the remote wakeup!!\n"); goto _rtw_wowlan_ctrl_exit_free; } @@ -127366,7 +126889,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + rtw_free_xmitframe(pxmitpriv, pframe); + rtw_free_xmitbuf(pxmitpriv, pxmitbuf); +} -+ + +extern u32 get_txfifo_hwaddr(struct xmit_frame *pxmitframe); + +thread_return lbk_thread(thread_context context) @@ -127563,7 +127086,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + printk("%s: no memory!\n", __func__); + return -ENOMEM; + } - ++ + if (copy_from_user(pbuf, wrqu->data.pointer, len)) { + rtw_mfree(pbuf, len); + printk("%s: copy from user fail!\n", __func__); @@ -127657,7 +127180,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #include int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -@@ -8981,6 +11531,11 @@ int rtw_ioctl(struct net_device *dev, st +@@ -8981,6 +11531,11 @@ int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) case RTL_IOCTL_HOSTAPD: ret = rtw_hostapd_ioctl(dev, &wrq->u.data); break; @@ -127678,7 +127201,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_wx_get_rts, /* SIOCGIWRTS */ rtw_wx_set_frag, /* SIOCSIWFRAG */ rtw_wx_get_frag, /* SIOCGIWFRAG */ -@@ -9060,44 +11615,45 @@ static const struct iw_priv_args rtw_pri +@@ -9060,44 +11615,45 @@ static const struct iw_priv_args rtw_private_args[] = { SIOCIWFIRSTPRIV + 0x00, IW_PRIV_TYPE_CHAR | 1024, 0 , ""}, //set { SIOCIWFIRSTPRIV + 0x01, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK , ""},//get /* --- sub-ioctls definitions --- */ @@ -127744,7 +127267,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { SIOCIWFIRSTPRIV + 0x02, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK , "test"},//set -@@ -9110,23 +11666,23 @@ static iw_handler rtw_private_handler[] +@@ -9110,23 +11666,23 @@ static iw_handler rtw_private_handler[] = rtw_mp_get, }; @@ -127772,7 +127295,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }, { SIOCIWFIRSTPRIV + 0x4, -@@ -9172,40 +11728,57 @@ static const struct iw_priv_args rtw_pri +@@ -9172,40 +11728,57 @@ static const struct iw_priv_args rtw_private_args[] = { SIOCIWFIRSTPRIV + 0xD, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | IFNAMSIZ, "rfr" }, @@ -127841,7 +127364,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; static iw_handler rtw_private_handler[] = -@@ -9234,18 +11807,20 @@ static iw_handler rtw_private_handler[] +@@ -9234,18 +11807,20 @@ static iw_handler rtw_private_handler[] = rtw_wx_write_rf, //0x0C rtw_wx_read_rf, //0x0D @@ -127867,7 +127390,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_pm_set, //0x16 rtw_wx_priv_null, //0x17 -@@ -9254,7 +11829,12 @@ static iw_handler rtw_private_handler[] +@@ -9254,7 +11829,12 @@ static iw_handler rtw_private_handler[] = rtw_mp_efuse_set, //0x1A rtw_mp_efuse_get, //0x1B @@ -127881,7 +127404,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; #endif // #if defined(CONFIG_MP_INCLUDED) && defined(CONFIG_MP_IWPRIV_SUPPORT) -@@ -9273,7 +11853,7 @@ static struct iw_statistics *rtw_get_wir +@@ -9273,7 +11853,7 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev) piwstats->qual.qual = 0; piwstats->qual.level = 0; piwstats->qual.noise = 0; @@ -127890,7 +127413,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else{ #ifdef CONFIG_SIGNAL_DISPLAY_DBM -@@ -9284,7 +11864,7 @@ static struct iw_statistics *rtw_get_wir +@@ -9284,7 +11864,7 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev) tmp_qual = padapter->recvpriv.signal_qual; tmp_noise =padapter->recvpriv.noise; @@ -127899,7 +127422,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release piwstats->qual.level = tmp_level; piwstats->qual.qual = tmp_qual; -@@ -9310,16 +11890,20 @@ static struct iw_statistics *rtw_get_wir +@@ -9310,16 +11890,20 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev) } #endif @@ -127920,9 +127443,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release }; +#endif +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/mlme_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/mlme_linux.c +index 0175ea2..6fc9f03 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/mlme_linux.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/mlme_linux.c -@@ -135,7 +135,6 @@ extern void rtw_indicate_wx_disassoc_eve +@@ -135,7 +135,6 @@ extern void rtw_indicate_wx_disassoc_event(_adapter *padapter); void rtw_os_indicate_connect(_adapter *adapter) { @@ -127946,7 +127471,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif _func_exit_; -@@ -173,7 +171,12 @@ void rtw_reset_securitypriv( _adapter *a +@@ -173,7 +171,12 @@ void rtw_reset_securitypriv( _adapter *adapter ) u8 backupPMKIDIndex = 0; u8 backupTKIPCountermeasure = 0x00; u32 backupTKIPcountermeasure_time = 0; @@ -127960,7 +127485,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(adapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)//802.1x { // Added by Albert 2009/02/18 -@@ -187,8 +190,11 @@ void rtw_reset_securitypriv( _adapter *a +@@ -187,8 +190,11 @@ void rtw_reset_securitypriv( _adapter *adapter ) _rtw_memcpy( &backupPMKIDList[ 0 ], &adapter->securitypriv.PMKIDList[ 0 ], sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE ); backupPMKIDIndex = adapter->securitypriv.PMKIDIndex; backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure; @@ -127974,7 +127499,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _rtw_memset((unsigned char *)&adapter->securitypriv, 0, sizeof (struct security_priv)); //_init_timer(&(adapter->securitypriv.tkip_timer),adapter->pnetdev, rtw_use_tkipkey_handler, adapter); -@@ -197,7 +203,7 @@ void rtw_reset_securitypriv( _adapter *a +@@ -197,7 +203,7 @@ void rtw_reset_securitypriv( _adapter *adapter ) _rtw_memcpy( &adapter->securitypriv.PMKIDList[ 0 ], &backupPMKIDList[ 0 ], sizeof( RT_PMKID_LIST ) * NUM_PMKID_CACHE ); adapter->securitypriv.PMKIDIndex = backupPMKIDIndex; adapter->securitypriv.btkip_countermeasure = backupTKIPCountermeasure; @@ -127983,7 +127508,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release adapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; adapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; -@@ -218,9 +224,10 @@ void rtw_reset_securitypriv( _adapter *a +@@ -218,9 +224,10 @@ void rtw_reset_securitypriv( _adapter *adapter ) psec_priv->ndisauthtype = Ndis802_11AuthModeOpen; psec_priv->ndisencryptstatus = Ndis802_11WEPDisabled; @@ -127995,7 +127520,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } void rtw_os_indicate_disconnect( _adapter *adapter ) -@@ -229,17 +236,19 @@ void rtw_os_indicate_disconnect( _adapte +@@ -229,17 +236,19 @@ void rtw_os_indicate_disconnect( _adapter *adapter ) _func_enter_; @@ -128017,7 +127542,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; -@@ -313,186 +322,20 @@ void _addba_timer_hdl(void *FunctionCont +@@ -313,185 +322,19 @@ void _addba_timer_hdl(void *FunctionContext) addba_timer_hdl(psta); } @@ -128088,9 +127613,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -} - -void _off_ch_timer_hdl(void *FunctionContext) -+#ifdef CONFIG_IEEE80211W -+void _sa_query_timer_hdl (void *FunctionContext) - { +-{ - struct sta_info *ptdls_sta = (struct sta_info *)FunctionContext; - rtw_tdls_cmd(ptdls_sta->padapter, ptdls_sta->hwaddr, TDLS_P_BASE_CH ); - } @@ -128102,7 +127625,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -} - -void _tdls_handshake_timer_hdl(void *FunctionContext) --{ ++#ifdef CONFIG_IEEE80211W ++void _sa_query_timer_hdl (void *FunctionContext) + { - struct sta_info *ptdls_sta = (struct sta_info *)FunctionContext; - - if(ptdls_sta != NULL) @@ -128196,22 +127721,21 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - ptdls_sta->timer_flag = 0; - _exit_critical_bh(&ptdlsinfo->hdl_lock, &irqL); -} - -+ _init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl, psta); - } +- +-} -void init_tdls_alive_timer(_adapter *padapter, struct sta_info *psta) -{ - psta->padapter=padapter; - _init_timer(&psta->alive_timer1, padapter->pnetdev, _tdls_alive_timer_phase1_hdl, psta); - _init_timer(&psta->alive_timer2, padapter->pnetdev, _tdls_alive_timer_phase2_hdl, psta); --} ++ _init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl, psta); + } -#endif //CONFIG_TDLS -- + /* void _reauth_timer_hdl(void *FunctionContext) - { -@@ -513,6 +356,9 @@ void init_mlme_ext_timer(_adapter *padap +@@ -513,6 +356,9 @@ void init_mlme_ext_timer(_adapter *padapter) _init_timer(&pmlmeext->survey_timer, padapter->pnetdev, _survey_timer_hdl, padapter); _init_timer(&pmlmeext->link_timer, padapter->pnetdev, _link_timer_hdl, padapter); @@ -128221,7 +127745,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //_init_timer(&pmlmeext->ADDBA_timer, padapter->pnetdev, _addba_timer_hdl, padapter); //_init_timer(&pmlmeext->reauth_timer, padapter->pnetdev, _reauth_timer_hdl, padapter); -@@ -579,24 +425,24 @@ static int mgnt_xmit_entry(struct sk_buf +@@ -579,24 +425,24 @@ static int mgnt_xmit_entry(struct sk_buff *skb, struct net_device *pnetdev) struct hostapd_priv *phostapdpriv = rtw_netdev_priv(pnetdev); _adapter *padapter = (_adapter *)phostapdpriv->padapter; @@ -128252,7 +127776,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release netif_carrier_on(pnetdev); -@@ -609,14 +455,14 @@ static int mgnt_netdev_close(struct net_ +@@ -609,14 +455,14 @@ static int mgnt_netdev_close(struct net_device *pnetdev) { struct hostapd_priv *phostapdpriv = rtw_netdev_priv(pnetdev); @@ -128270,7 +127794,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //rtw_write16(phostapdpriv->padapter, 0x0116, 0x3f3f); -@@ -658,7 +504,7 @@ int hostapd_mode_init(_adapter *padapter +@@ -658,7 +504,7 @@ int hostapd_mode_init(_adapter *padapter) #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29)) @@ -128279,7 +127803,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pnetdev->netdev_ops = &rtl871x_mgnt_netdev_ops; -@@ -690,7 +536,7 @@ int hostapd_mode_init(_adapter *padapter +@@ -690,7 +536,7 @@ int hostapd_mode_init(_adapter *padapter) if(dev_alloc_name(pnetdev,"mgnt.wlan%d") < 0) { @@ -128288,7 +127812,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -713,7 +559,7 @@ int hostapd_mode_init(_adapter *padapter +@@ -713,7 +559,7 @@ int hostapd_mode_init(_adapter *padapter) /* Tell the network stack we exist */ if (register_netdev(pnetdev) != 0) { @@ -128297,6 +127821,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pnetdev) { +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c +index b88a5eb..82dee6d 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c @@ -1,7 +1,7 @@ @@ -128336,7 +127862,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int rtw_wireless_mode = WIRELESS_11BG_24N; int rtw_vrtl_carrier_sense = AUTO_VCS; int rtw_vcs_type = RTS_CTS;//* -@@ -74,18 +70,18 @@ int rtw_preamble = PREAMBLE_LONG;//long, +@@ -74,18 +70,18 @@ int rtw_preamble = PREAMBLE_LONG;//long, short, auto int rtw_scan_mode = 1;//active, passive int rtw_adhoc_tx_pwr = 1; int rtw_soft_ap = 0; @@ -128387,7 +127913,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int rtw_ampdu_enable = 1;//for enable tx_ampdu int rtw_rx_stbc = 1;// 0: disable, bit(0):enable 2.4g, bit(1):enable 5g, default is set to enable 2.4GHZ for IOT issue with bufflao's AP at 5GHZ int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto -@@ -123,7 +119,7 @@ int rtw_ampdu_amsdu = 0;// 0: disabled, +@@ -123,7 +119,7 @@ int rtw_ampdu_amsdu = 0;// 0: disabled, 1:enabled, 2:auto int rtw_lowrate_two_xmit = 1;//Use 2 path Tx to transmit MCS0~7 and legacy mode @@ -128479,7 +128005,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_FILE_FWIMG char *rtw_fw_file_path= ""; module_param(rtw_fw_file_path, charp, 0644); -@@ -243,7 +252,18 @@ MODULE_PARM_DESC(rtw_fw_file_path, "The +@@ -243,7 +252,18 @@ MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image"); module_param(rtw_mc2u_disable, int, 0644); #endif // CONFIG_TX_MCAST2UNI @@ -128524,7 +128050,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(rtw_proc == NULL) { -@@ -283,6 +294,18 @@ void rtw_proc_init_one(struct net_device +@@ -283,6 +294,18 @@ void rtw_proc_init_one(struct net_device *dev) { _rtw_memcpy(rtw_proc_name, RTL8192D_PROC_NAME, sizeof(RTL8192D_PROC_NAME)); } @@ -128543,7 +128069,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) rtw_proc=create_proc_entry(rtw_proc_name, S_IFDIR, proc_net); -@@ -290,23 +313,40 @@ void rtw_proc_init_one(struct net_device +@@ -290,23 +313,40 @@ void rtw_proc_init_one(struct net_device *dev) rtw_proc=create_proc_entry(rtw_proc_name, S_IFDIR, init_net.proc_net); #endif if (rtw_proc == NULL) { @@ -128590,7 +128116,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_proc); dir_dev = padapter->dir_dev; -@@ -320,12 +360,12 @@ void rtw_proc_init_one(struct net_device +@@ -320,12 +360,12 @@ void rtw_proc_init_one(struct net_device *dev) remove_proc_entry(rtw_proc_name, proc_net); #else remove_proc_entry(rtw_proc_name, init_net.proc_net); @@ -128605,7 +128131,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return; } } -@@ -337,147 +377,283 @@ void rtw_proc_init_one(struct net_device +@@ -337,147 +377,283 @@ void rtw_proc_init_one(struct net_device *dev) rtw_proc_cnt++; entry = create_proc_read_entry("write_reg", S_IFREG | S_IRUGO, @@ -128926,7 +128452,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release dir_dev = padapter->dir_dev; padapter->dir_dev = NULL; -@@ -491,29 +667,64 @@ void rtw_proc_remove_one(struct net_devi +@@ -491,29 +667,64 @@ void rtw_proc_remove_one(struct net_device *dev) remove_proc_entry("mlmext_state", dir_dev); remove_proc_entry("qos_option", dir_dev); remove_proc_entry("ht_option", dir_dev); @@ -128997,7 +128523,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } else { -@@ -526,22 +737,26 @@ void rtw_proc_remove_one(struct net_devi +@@ -526,22 +737,26 @@ void rtw_proc_remove_one(struct net_device *dev) { if(rtw_proc){ remove_proc_entry("ver_info", rtw_proc); @@ -129154,7 +128680,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //addr->sa_data[4], addr->sa_data[5]); _rtw_memcpy(padapter->eeprompriv.mac_addr, addr->sa_data, ETH_ALEN); //_rtw_memcpy(pnetdev->dev_addr, addr->sa_data, ETH_ALEN); -@@ -673,20 +901,103 @@ static struct net_device_stats *rtw_net_ +@@ -673,20 +901,103 @@ static struct net_device_stats *rtw_net_get_stats(struct net_device *pnetdev) struct recv_priv *precvpriv = &(padapter->recvpriv); padapter->stats.tx_packets = pxmitpriv->tx_pkts;//pxmitpriv->tx_pkts++; @@ -129261,7 +128787,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release .ndo_set_mac_address = rtw_net_set_mac_address, .ndo_get_stats = rtw_net_get_stats, .ndo_do_ioctl = rtw_ioctl, -@@ -715,24 +1026,24 @@ int rtw_init_netdev_name(struct net_devi +@@ -715,24 +1026,24 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname) TargetNetdev = dev_get_by_name(devnet, "wlan0"); #endif if(TargetNetdev) { @@ -129291,7 +128817,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(dev_alloc_name(pnetdev, ifname) < 0) { -@@ -740,41 +1051,41 @@ int rtw_init_netdev_name(struct net_devi +@@ -740,41 +1051,41 @@ int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname) } netif_carrier_off(pnetdev); @@ -129343,7 +128869,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pnetdev->hard_start_xmit = rtw_xmit_entry; pnetdev->set_mac_address = rtw_net_set_mac_address; pnetdev->get_stats = rtw_net_get_stats; -@@ -784,11 +1095,12 @@ struct net_device *rtw_init_netdev(_adap +@@ -784,11 +1095,12 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter) #ifdef CONFIG_TCP_CSUM_OFFLOAD_TX pnetdev->features |= NETIF_F_IP_CSUM; @@ -129358,7 +128884,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef WIRELESS_SPY //priv->wireless_data.spy_data = &priv->spy_data; -@@ -797,36 +1109,72 @@ struct net_device *rtw_init_netdev(_adap +@@ -797,36 +1109,72 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter) //step 2. loadparam(padapter, pnetdev); @@ -129443,7 +128969,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif return _status; -@@ -835,13 +1183,13 @@ u32 rtw_start_drv_threads(_adapter *pada +@@ -835,13 +1183,13 @@ u32 rtw_start_drv_threads(_adapter *padapter) void rtw_stop_drv_threads (_adapter *padapter) { @@ -129463,7 +128989,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #ifdef CONFIG_EVENT_THREAD_MODE -@@ -853,12 +1201,12 @@ void rtw_stop_drv_threads (_adapter *pad +@@ -853,12 +1201,12 @@ void rtw_stop_drv_threads (_adapter *padapter) #ifdef CONFIG_XMIT_THREAD_MODE // Below is to termindate tx_thread... @@ -129479,7 +129005,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Below is to termindate rx_thread... _rtw_up_sema(&padapter->recvpriv.recv_sema); _rtw_down_sema(&padapter->recvpriv.terminate_recvthread_sema); -@@ -868,12 +1216,12 @@ void rtw_stop_drv_threads (_adapter *pad +@@ -868,12 +1216,12 @@ void rtw_stop_drv_threads (_adapter *padapter) } @@ -129493,7 +129019,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct mlme_priv *pmlmepriv= &padapter->mlmepriv; struct security_priv *psecuritypriv = &padapter->securitypriv; -@@ -883,30 +1231,30 @@ u8 rtw_init_default_value(_adapter *pada +@@ -883,30 +1231,30 @@ u8 rtw_init_default_value(_adapter *padapter) pxmitpriv->vcs_type = pregistrypriv->vcs_type; //pxmitpriv->rts_thresh = pregistrypriv->rts_thresh; pxmitpriv->frag_len = pregistrypriv->frag_thresh; @@ -129532,7 +129058,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open; //open system psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_; -@@ -917,44 +1265,77 @@ u8 rtw_init_default_value(_adapter *pada +@@ -917,44 +1265,77 @@ u8 rtw_init_default_value(_adapter *padapter) psecuritypriv->ndisauthtype = Ndis802_11AuthModeOpen; psecuritypriv->ndisencryptstatus = Ndis802_11WEPDisabled; @@ -129557,19 +129083,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->bWritePortCancel = _FALSE; padapter->bRxRSSIDisplay = 0; - +- return ret; + padapter->bForceWriteInitGain = 1; + padapter->bNotifyChannelChange = 0; +#ifdef CONFIG_P2P + padapter->bShowGetP2PState = 1; +#endif - return ret; - } - --u8 rtw_reset_drv_sw(_adapter *padapter) ++ return ret; ++} ++ +struct dvobj_priv *devobj_init(void) - { -- u8 ret8=_SUCCESS; -- struct mlme_priv *pmlmepriv= &padapter->mlmepriv; ++{ + struct dvobj_priv *pdvobj = NULL; + + if ((pdvobj = (struct dvobj_priv*)rtw_zmalloc(sizeof(*pdvobj))) == NULL) @@ -129583,8 +129107,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + pdvobj->processing_dev_remove = _FALSE; + + return pdvobj; -+} -+ + } + +void devobj_deinit(struct dvobj_priv *pdvobj) +{ + if(!pdvobj) @@ -129598,10 +129122,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + rtw_mfree((u8*)pdvobj, sizeof(*pdvobj)); +} + -+u8 rtw_reset_drv_sw(_adapter *padapter) -+{ + u8 rtw_reset_drv_sw(_adapter *padapter) + { +- u8 ret8=_SUCCESS; + u8 ret8=_SUCCESS; -+ struct mlme_priv *pmlmepriv= &padapter->mlmepriv; + struct mlme_priv *pmlmepriv= &padapter->mlmepriv; struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv; //hal_priv @@ -129775,7 +129300,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } void rtw_cancel_all_timer(_adapter *padapter) -@@ -1115,13 +1512,13 @@ void rtw_cancel_all_timer(_adapter *pada +@@ -1115,13 +1512,13 @@ void rtw_cancel_all_timer(_adapter *padapter) //RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel tkip_timer! \n")); _cancel_timer_ex(&padapter->mlmepriv.scan_to_timer); @@ -129792,7 +129317,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel DeInitSwLeds! \n")); _cancel_timer_ex(&padapter->pwrctrlpriv.pwr_state_check_timer); -@@ -1134,6 +1531,7 @@ void rtw_cancel_all_timer(_adapter *pada +@@ -1134,6 +1531,7 @@ void rtw_cancel_all_timer(_adapter *padapter) #ifdef CONFIG_SET_SCAN_DENY_TIMER _cancel_timer_ex(&padapter->mlmepriv.set_scan_deny_timer); @@ -129800,7 +129325,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_os_intfs_c_,_drv_info_,("rtw_cancel_all_timer:cancel set_scan_deny_timer! \n")); #endif -@@ -1142,15 +1540,16 @@ void rtw_cancel_all_timer(_adapter *pada +@@ -1142,15 +1540,16 @@ void rtw_cancel_all_timer(_adapter *padapter) #endif // cancel dm timer @@ -129883,7 +129408,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_os_intfs_c_,_drv_info_,("<==rtw_free_drv_sw\n")); -@@ -1211,267 +1617,1028 @@ u8 rtw_free_drv_sw(_adapter *padapter) +@@ -1211,265 +1617,1026 @@ u8 rtw_free_drv_sw(_adapter *padapter) if(padapter->rereg_nd_name_priv.old_pnetdev) { free_netdev(padapter->rereg_nd_name_priv.old_pnetdev); padapter->rereg_nd_name_priv.old_pnetdev = NULL; @@ -130025,7 +129550,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - netif_wake_queue(pnetdev); - -#ifdef CONFIG_BR_EXT -- ++ rtw_netif_wake_queue(pnetdev); + -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)) - rcu_read_lock(); -#endif // (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35)) @@ -130053,8 +129579,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - br_netdev = dev_get_by_name(devnet, CONFIG_BR_EXT_BRNAME); -#endif // (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) -+ rtw_netif_wake_queue(pnetdev); - +- - if (br_netdev) { - memcpy(padapter->br_mac, br_netdev->dev_addr, ETH_ALEN); - dev_put(br_netdev); @@ -130281,8 +129806,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif //CONFIG_IOCTL_CFG80211 - //s5. -- if(padapter->bSurpriseRemoved == _FALSE) -- { + //set interface_type/chip_type/HardwareType + padapter->interface_type = primary_padapter->interface_type; + padapter->chip_type = primary_padapter->chip_type; @@ -131095,12 +130618,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + + //s5. -+ if(padapter->bSurpriseRemoved == _FALSE) -+ { + if(padapter->bSurpriseRemoved == _FALSE) + { rtw_hal_deinit(padapter); - } - -@@ -1481,7 +2648,7 @@ int pm_netdev_open(struct net_device *pn +@@ -1481,7 +2648,7 @@ int pm_netdev_open(struct net_device *pnetdev,u8 bnormal) { int status; if(bnormal) @@ -131109,7 +130630,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef CONFIG_IPS else status = (_SUCCESS == ips_netdrv_open((_adapter *)rtw_netdev_priv(pnetdev)))?(0):(-1); -@@ -1489,16 +2656,16 @@ int pm_netdev_open(struct net_device *pn +@@ -1489,16 +2656,16 @@ int pm_netdev_open(struct net_device *pnetdev,u8 bnormal) return status; } @@ -131129,7 +130650,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(padapter->pwrctrlpriv.rf_pwrstate == rf_off) padapter->pwrctrlpriv.ps_flag = _TRUE; } -@@ -1506,7 +2673,7 @@ static int netdev_close(struct net_devic +@@ -1506,7 +2673,7 @@ static int netdev_close(struct net_device *pnetdev) /* if(!padapter->hw_init_completed) { @@ -131138,7 +130659,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->bDriverStopped = _TRUE; -@@ -1514,22 +2681,22 @@ static int netdev_close(struct net_devic +@@ -1514,22 +2681,22 @@ static int netdev_close(struct net_device *pnetdev) } else*/ if(padapter->pwrctrlpriv.rf_pwrstate == rf_on){ @@ -131171,7 +130692,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_free_assoc_resources(padapter, 1); //s2-4. rtw_free_network_queue(padapter,_TRUE); -@@ -1539,7 +2706,7 @@ static int netdev_close(struct net_devic +@@ -1539,7 +2706,7 @@ static int netdev_close(struct net_device *pnetdev) } #ifdef CONFIG_BR_EXT @@ -131180,7 +130701,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { //void nat25_db_cleanup(_adapter *priv); nat25_db_cleanup(padapter); -@@ -1547,22 +2714,36 @@ static int netdev_close(struct net_devic +@@ -1547,22 +2714,36 @@ static int netdev_close(struct net_device *pnetdev) #endif // CONFIG_BR_EXT #ifdef CONFIG_P2P @@ -131227,6 +130748,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + free_netdev(ndev); } +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_intf.c +index 0848297..5bf576f 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_intf.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_intf.c @@ -1,7 +1,7 @@ @@ -131247,7 +130770,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #include #ifndef CONFIG_PCI_HCI -@@ -79,23 +79,21 @@ struct pci_device_id rtw_pci_id_tbl[] = +@@ -79,23 +79,21 @@ struct pci_device_id rtw_pci_id_tbl[] = { {}, }; @@ -131276,7 +130799,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release .rtw_pci_drv.suspend = NULL, .rtw_pci_drv.resume = NULL, #endif -@@ -114,7 +112,7 @@ static u16 pcibridge_vendors[PCI_BRIDGE_ +@@ -114,7 +112,7 @@ static u16 pcibridge_vendors[PCI_BRIDGE_VENDOR_MAX] = { static u8 rtw_pci_platform_switch_device_pci_aspm(_adapter *padapter, u8 value) { @@ -131285,7 +130808,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 bresult = _SUCCESS; int error; -@@ -125,18 +123,18 @@ static u8 rtw_pci_platform_switch_device +@@ -125,18 +123,18 @@ static u8 rtw_pci_platform_switch_device_pci_aspm(_adapter *padapter, u8 value) if(error != 0) { bresult = _FALSE; @@ -131309,7 +130832,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 buffer, bresult = _SUCCESS; int error; -@@ -150,18 +148,18 @@ static u8 rtw_pci_switch_clk_req(_adapte +@@ -150,18 +148,18 @@ static u8 rtw_pci_switch_clk_req(_adapter *padapter, u8 value) if(error != 0) { bresult = _FALSE; @@ -131331,7 +130854,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pci_priv *pcipriv = &(pdvobjpriv->pcipriv); u32 pcicfg_addrport = 0; -@@ -170,8 +168,8 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -170,8 +168,8 @@ void rtw_pci_disable_aspm(_adapter *padapter) u16 pcibridge_linkctrlreg, aspmlevel = 0; // When there exists anyone's busnum, devnum, and funcnum that are set to 0xff, @@ -131342,7 +130865,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ((pcipriv->busnumber == 0xff && pcipriv->devnumber == 0xff && pcipriv->funcnumber == 0xff) -@@ -179,12 +177,12 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -179,12 +177,12 @@ void rtw_pci_disable_aspm(_adapter *padapter) && pcipriv->pcibridge_devnum == 0xff && pcipriv->pcibridge_funcnum == 0xff)) { @@ -131357,7 +130880,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } if (pwrpriv->reg_rfps_level & RT_RF_OFF_LEVL_CLK_REQ) { -@@ -224,7 +222,7 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -224,7 +222,7 @@ void rtw_pci_disable_aspm(_adapter *padapter) } else { @@ -131366,7 +130889,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pcicfg_addrport = (pcipriv->pcibridge_busnum << 16) | (pcipriv->pcibridge_devnum << 11) | (pcipriv->pcibridge_funcnum << 8) | (1 << 31); -@@ -236,9 +234,9 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -236,9 +234,9 @@ void rtw_pci_disable_aspm(_adapter *padapter) // now grab data port with device|vendor 4 byte dword NdisRawWritePortUchar(PCI_CONF_DATA, pcibridge_linkctrlreg); @@ -131379,7 +130902,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release (pcipriv->pcibridge_pciehdr_offset+0x10), pcibridge_linkctrlreg); rtw_udelay_os(50); -@@ -246,13 +244,13 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -246,13 +244,13 @@ void rtw_pci_disable_aspm(_adapter *padapter) } //[ASPM] @@ -131395,7 +130918,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pci_priv *pcipriv = &(pdvobjpriv->pcipriv); u16 aspmlevel = 0; -@@ -262,8 +260,8 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -262,8 +260,8 @@ void rtw_pci_enable_aspm(_adapter *padapter) u8 u_device_aspmsetting = 0; // When there exists anyone's busnum, devnum, and funcnum that are set to 0xff, @@ -131406,7 +130929,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if ((pcipriv->busnumber == 0xff && pcipriv->devnumber == 0xff -@@ -272,12 +270,12 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -272,12 +270,12 @@ void rtw_pci_enable_aspm(_adapter *padapter) && pcipriv->pcibridge_devnum == 0xff && pcipriv->pcibridge_funcnum == 0xff)) { @@ -131422,7 +130945,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release | (pcipriv->pcibridge_devnum << 11) | (pcipriv->pcibridge_funcnum << 8) | (1 << 31); num4bytes = (pcipriv->pcibridge_pciehdr_offset + 0x10) / 4; -@@ -293,11 +291,11 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -293,11 +291,11 @@ void rtw_pci_enable_aspm(_adapter *padapter) NdisRawWritePortUchar(PCI_CONF_DATA, u_pcibridge_aspmsetting); @@ -131439,7 +130962,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u_pcibridge_aspmsetting); rtw_udelay_os(50); -@@ -318,14 +316,14 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -318,14 +316,14 @@ void rtw_pci_enable_aspm(_adapter *padapter) } // @@ -131456,7 +130979,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct pci_priv *pcipriv = &(pdvobjpriv->pcipriv); struct rt_pci_capabilities_header capability_hdr; u8 capability_offset, num4bytes; -@@ -335,7 +333,7 @@ rtw_get_link_control_field(_adapter *pad +@@ -335,7 +333,7 @@ rtw_get_link_control_field(_adapter *padapter, u8 busnum, u8 devnum, //If busnum, devnum, funcnum are set to 0xff. if (busnum == 0xff && devnum == 0xff && funcnum == 0xff) { @@ -131465,7 +130988,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _FALSE; } -@@ -351,15 +349,15 @@ rtw_get_link_control_field(_adapter *pad +@@ -351,15 +349,15 @@ rtw_get_link_control_field(_adapter *padapter, u8 busnum, u8 devnum, // now grab data port with device|vendor 4 byte dword NdisRawReadPortUchar(PCI_CONF_DATA, &capability_offset); @@ -131484,7 +131007,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // next capability and continue looping. //4 get capability_hdr -@@ -397,16 +395,16 @@ rtw_get_link_control_field(_adapter *pad +@@ -397,16 +395,16 @@ rtw_get_link_control_field(_adapter *padapter, u8 busnum, u8 devnum, } else { @@ -131558,7 +131081,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return _FALSE; } -@@ -588,7 +586,7 @@ rtw_get_pci_brideg_info(_adapter *padapt +@@ -588,7 +586,7 @@ rtw_get_pci_brideg_info(_adapter *padapter, NdisRawWritePortUlong(PCI_CONF_ADDRESS, pcicfg_addrport + (3 << 2)); NdisRawReadPortUlong(PCI_CONF_DATA, &headertype); headertype = ((headertype >> 16) & 0x0080) >> 7; // address 0x0e[7]. @@ -131567,7 +131090,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release b_singlefunc = _TRUE; } else -@@ -636,7 +634,7 @@ rtw_get_pci_brideg_info(_adapter *padapt +@@ -636,7 +634,7 @@ rtw_get_pci_brideg_info(_adapter *padapter, *vendorid = venId; *deviceid = devId; @@ -131576,7 +131099,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release venId, devId, busnum_idx, devicenum_idx, functionnum_idx); return _TRUE; -@@ -645,18 +643,18 @@ rtw_get_pci_brideg_info(_adapter *padapt +@@ -645,18 +643,18 @@ rtw_get_pci_brideg_info(_adapter *padapter, } } @@ -131598,7 +131121,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct pci_priv *pcipriv = &(pdvobjpriv->pcipriv); u8 pcibridge_busnum = 0xff; u8 pcibridge_devnum = 0xff; -@@ -679,11 +677,11 @@ static void rtw_find_bridge_info(_adapte +@@ -679,11 +677,11 @@ static void rtw_find_bridge_info(_adapter *padapter) for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { if (pcibridge_vendorid == pcibridge_vendors[tmp]) { pcipriv->pcibridge_vendor = tmp; @@ -131612,7 +131135,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Update corresponding PCI bus info. pcipriv->pcibridge_busnum = pcibridge_busnum; -@@ -726,7 +724,7 @@ rtw_get_amd_l1_patch(_adapter *padapter, +@@ -726,7 +724,7 @@ rtw_get_amd_l1_patch(_adapter *padapter, u8 busnum, u8 devnum, /*Disable RTL8192SE ASPM & Disable Pci Bridge ASPM*/ void rtw_pci_disable_aspm(_adapter *padapter) { @@ -131621,7 +131144,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct pci_dev *pdev = pdvobjpriv->ppcidev; struct pci_dev *bridge_pdev = pdev->bus->self; -@@ -762,7 +760,7 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -762,7 +760,7 @@ void rtw_pci_disable_aspm(_adapter *padapter) } { @@ -131630,7 +131153,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 tmp_u1b; pci_read_config_byte(pdev, 0x80, &tmp_u1b); } -@@ -779,14 +777,14 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -779,14 +777,14 @@ void rtw_pci_disable_aspm(_adapter *padapter) } else { @@ -131649,7 +131172,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release (pcipriv->pcibridge_pciehdr_offset+0x10), pcibridge_linkctrlreg); rtw_udelay_os(50); -@@ -794,18 +792,18 @@ void rtw_pci_disable_aspm(_adapter *pada +@@ -794,18 +792,18 @@ void rtw_pci_disable_aspm(_adapter *padapter) } @@ -131672,7 +131195,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 u_pcibridge_aspmsetting = 0; u8 u_device_aspmsetting = 0; u32 u_device_aspmsupportsetting = 0; -@@ -816,11 +814,11 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -816,11 +814,11 @@ void rtw_pci_enable_aspm(_adapter *padapter) return; //When there exists anyone's BusNum, DevNum, and FuncNum that are set to 0xff, @@ -131686,7 +131209,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return; } -@@ -834,19 +832,19 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -834,19 +832,19 @@ void rtw_pci_enable_aspm(_adapter *padapter) //NdisRawWritePortUlong((ULONG_PTR)PCI_CONF_ADDRESS , PciCfgAddrPort+(Num4Bytes << 2)); //NdisRawReadPortUlong((ULONG_PTR)PCI_CONF_DATA,&uDeviceASPMSupportSetting); pci_read_config_dword(bridge_pdev, (pcipriv->pcibridge_pciehdr_offset+0x0C), &u_device_aspmsupportsetting); @@ -131709,7 +131232,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return; } } -@@ -854,7 +852,7 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -854,7 +852,7 @@ void rtw_pci_enable_aspm(_adapter *padapter) { if((u_device_aspmsupportsetting & BIT(10)) != BIT(10)) { @@ -131718,7 +131241,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return; } -@@ -862,12 +860,12 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -862,12 +860,12 @@ void rtw_pci_enable_aspm(_adapter *padapter) } else { @@ -131733,7 +131256,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //PciCfgAddrPort = (pcipriv->pcibridge_busnum << 16)|(pcipriv->pcibridge_devnum<< 11) |(pcipriv->pcibridge_funcnum << 8)|(1 << 31); //Num4Bytes = (pcipriv->pcibridge_pciehdr_offset+0x10)/4; // set up address port at 0xCF8 offset field= 0 (dev|vend) -@@ -884,14 +882,14 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -884,14 +882,14 @@ void rtw_pci_enable_aspm(_adapter *padapter) //NdisRawWritePortUchar(PCI_CONF_DATA, u_pcibridge_aspmsetting); pci_write_config_byte(bridge_pdev, (pcipriv->pcibridge_pciehdr_offset+0x10), u_pcibridge_aspmsetting); @@ -131752,7 +131275,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release aspmlevel |= pdvobjpriv->const_devicepci_aspm_setting; u_device_aspmsetting = pcipriv->linkctrl_reg; u_device_aspmsetting |= aspmlevel; // device 43 -@@ -906,10 +904,9 @@ void rtw_pci_enable_aspm(_adapter *padap +@@ -906,10 +904,9 @@ void rtw_pci_enable_aspm(_adapter *padapter) rtw_udelay_os(50); } @@ -131765,7 +131288,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct pci_dev *bridge_pdev = pdev->bus->self; u8 status = _FALSE; u8 offset_e0; -@@ -934,15 +931,14 @@ static u8 rtw_pci_get_amd_l1_patch(_adap +@@ -934,15 +931,14 @@ static u8 rtw_pci_get_amd_l1_patch(_adapter *padapter) return status; } @@ -131786,7 +131309,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /*Read Link Control Register*/ pci_read_config_byte(bridge_pdev, capabilityoffset + PCI_EXP_LNKCTL, &linkctrl_reg); -@@ -950,10 +946,10 @@ static void rtw_pci_get_linkcontrol_fiel +@@ -950,10 +946,10 @@ static void rtw_pci_get_linkcontrol_field(_adapter *padapter) } #endif @@ -131800,7 +131323,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release u8 tmp; int pos; u8 linkctrl_reg; -@@ -963,7 +959,7 @@ static void rtw_pci_parse_configuration( +@@ -963,7 +959,7 @@ static void rtw_pci_parse_configuration(struct pci_dev *pdev, _adapter *padapter pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &linkctrl_reg); pcipriv->linkctrl_reg = linkctrl_reg; @@ -131809,7 +131332,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pci_read_config_byte(pdev, 0x98, &tmp); tmp |= BIT(4); -@@ -978,7 +974,7 @@ static void rtw_pci_parse_configuration( +@@ -978,7 +974,7 @@ static void rtw_pci_parse_configuration(struct pci_dev *pdev, _adapter *padapter // static void rtw_pci_update_default_setting(_adapter *padapter) { @@ -131818,7 +131341,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct pci_priv *pcipriv = &(pdvobjpriv->pcipriv); struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; -@@ -986,8 +982,8 @@ static void rtw_pci_update_default_setti +@@ -986,8 +982,8 @@ static void rtw_pci_update_default_setting(_adapter *padapter) pwrpriv->reg_rfps_level = 0; pwrpriv->b_support_aspm = 0; @@ -131829,7 +131352,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release // Update PCI ASPM setting pwrpriv->const_amdpci_aspm = pdvobjpriv->const_amdpci_aspm; -@@ -1056,7 +1052,7 @@ static void rtw_pci_update_default_setti +@@ -1056,7 +1052,7 @@ static void rtw_pci_update_default_setting(_adapter *padapter) pwrpriv->b_support_aspm = b_support_aspm; /*if(pAdapter->MgntInfo.CustomerID == RT_CID_TOSHIBA && @@ -131838,7 +131361,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release !pcipriv->amd_l1_patch) b_support_backdoor = _FALSE;*/ -@@ -1065,7 +1061,7 @@ static void rtw_pci_update_default_setti +@@ -1065,7 +1061,7 @@ static void rtw_pci_update_default_setting(_adapter *padapter) break; case 2: // Set by Chipset. @@ -131847,16 +131370,16 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (pcipriv->pcibridge_vendor == PCI_BRIDGE_VENDOR_INTEL) { u8 b_support_aspm = _TRUE; pwrpriv->b_support_aspm = b_support_aspm; -@@ -1098,32 +1094,119 @@ static void rtw_pci_initialize_adapter_c +@@ -1098,32 +1094,119 @@ static void rtw_pci_initialize_adapter_common(_adapter *padapter) static irqreturn_t rtw_pci_interrupt(int irq, void *priv, struct pt_regs *regs) { - _adapter *padapter = (_adapter *)priv; - struct dvobj_priv *pdvobjpriv = &padapter->dvobjpriv; -- + struct dvobj_priv *dvobj = (struct dvobj_priv *)priv; + _adapter *adapter = dvobj->if1; +- - if (pdvobjpriv->irq_enabled == 0) { + if (dvobj->irq_enabled == 0) { return IRQ_HANDLED; @@ -132110,7 +131633,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release venderid = pdev->vendor; -@@ -1261,13 +1367,13 @@ static void decide_chip_type_by_pci_devi +@@ -1261,13 +1367,13 @@ static void decide_chip_type_by_pci_device_id(_adapter *padapter, struct pci_dev // @@ -132126,7 +131649,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->HardwareType=HARDWARE_TYPE_RTL8185; } else if (deviceid == HAL_HW_PCI_8190_DEVICE_ID || -@@ -1275,7 +1381,7 @@ static void decide_chip_type_by_pci_devi +@@ -1275,7 +1381,7 @@ static void decide_chip_type_by_pci_device_id(_adapter *padapter, struct pci_dev deviceid == HAL_HW_PCI_0046_DEVICE_ID || deviceid == HAL_HW_PCI_DLINK_DEVICE_ID) { @@ -132135,7 +131658,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->HardwareType = HARDWARE_TYPE_RTL8190P; } else if (deviceid == HAL_HW_PCI_8192_DEVICE_ID || -@@ -1292,19 +1398,19 @@ static void decide_chip_type_by_pci_devi +@@ -1292,19 +1398,19 @@ static void decide_chip_type_by_pci_device_id(_adapter *padapter, struct pci_dev // Added for 92DE. We deferentiate it from SVID,SDID. if( pdev->subsystem_vendor == 0x10EC && pdev->subsystem_device == 0xE020){ padapter->HardwareType = HARDWARE_TYPE_RTL8192DE; @@ -132159,7 +131682,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release padapter->HardwareType = HARDWARE_TYPE_RTL8192SE; break; } -@@ -1312,25 +1418,25 @@ static void decide_chip_type_by_pci_devi +@@ -1312,25 +1418,25 @@ static void decide_chip_type_by_pci_device_id(_adapter *padapter, struct pci_dev } else if(deviceid==HAL_HW_PCI_8723E_DEVICE_ID ) {//RTL8723E may have the same device ID with RTL8192CET @@ -132191,7 +131714,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //padapter->HardwareType = HAL_DEFAULT_HARDWARE_TYPE; } -@@ -1355,13 +1461,16 @@ static void pci_intf_start(_adapter *pad +@@ -1355,13 +1461,16 @@ static void pci_intf_start(_adapter *padapter) { RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+pci_intf_start\n")); @@ -132211,7 +131734,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void pci_intf_stop(_adapter *padapter) -@@ -1373,13 +1482,27 @@ static void pci_intf_stop(_adapter *pada +@@ -1373,13 +1482,27 @@ static void pci_intf_stop(_adapter *padapter) if(padapter->bSurpriseRemoved == _FALSE) { //device still exists, so driver can do i/o operation @@ -132241,7 +131764,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-pci_intf_stop\n")); -@@ -1395,25 +1518,13 @@ static void rtw_dev_unload(_adapter *pad +@@ -1395,25 +1518,13 @@ static void rtw_dev_unload(_adapter *padapter) if(padapter->bup == _TRUE) { @@ -132272,7 +131795,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //s3. if(padapter->intf_stop) -@@ -1428,7 +1539,7 @@ static void rtw_dev_unload(_adapter *pad +@@ -1428,7 +1539,7 @@ static void rtw_dev_unload(_adapter *padapter) //s5. if(padapter->bSurpriseRemoved == _FALSE) { @@ -132281,7 +131804,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_hal_deinit(padapter); padapter->bSurpriseRemoved = _TRUE; -@@ -1442,7 +1553,7 @@ static void rtw_dev_unload(_adapter *pad +@@ -1442,7 +1553,7 @@ static void rtw_dev_unload(_adapter *padapter) RT_TRACE(_module_hci_intfs_c_,_drv_err_,("r871x_dev_unload():padapter->bup == _FALSE\n" )); } @@ -132290,7 +131813,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-rtw_dev_unload\n")); -@@ -1475,7 +1586,7 @@ static void disable_ht_for_spec_devid(co +@@ -1475,7 +1586,7 @@ static void disable_ht_for_spec_devid(const struct pci_device_id *pdid) #ifdef CONFIG_PM static int rtw_suspend(struct pci_dev *pdev, pm_message_t state) @@ -132299,7 +131822,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_enter_; -@@ -1489,270 +1600,291 @@ static int rtw_resume(struct pci_dev *pd +@@ -1489,270 +1600,291 @@ static int rtw_resume(struct pci_dev *pdev) _func_exit_; @@ -132360,21 +131883,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - bdma64 = _TRUE; - } else -+ padapter->bDriverStopped=_TRUE; -+ -+ dvobj->padapters[dvobj->iface_nums++] = padapter; -+ padapter->iface_id = IFACE_ID0; -+ -+#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT) -+ //set adapter_type/iface type for primary padapter -+ padapter->isprimary = _TRUE; -+ padapter->adapter_type = PRIMARY_ADAPTER; -+ #ifndef CONFIG_HWPORT_SWAP -+ padapter->iface_type = IFACE_PORT0; -+ #else -+ padapter->iface_type = IFACE_PORT1; -+ #endif - #endif +-#endif - { - if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) { - if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) { @@ -132385,11 +131894,24 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - } - } -- ++ padapter->bDriverStopped=_TRUE; + - pci_set_master(pdev); -- ++ dvobj->padapters[dvobj->iface_nums++] = padapter; ++ padapter->iface_id = IFACE_ID0; + - //step 0. - disable_ht_for_spec_devid(pdid); ++#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT) ++ //set adapter_type/iface type for primary padapter ++ padapter->isprimary = _TRUE; ++ padapter->adapter_type = PRIMARY_ADAPTER; ++ #ifndef CONFIG_HWPORT_SWAP ++ padapter->iface_type = IFACE_PORT0; ++ #else ++ padapter->iface_type = IFACE_PORT1; ++ #endif ++#endif + //step 1-1., decide the chip_type via vid/pid + padapter->interface_type = RTW_PCIE; @@ -132455,10 +131977,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pci_write_config_byte(pdev, 0x04, 0x06); - pci_write_config_byte(pdev, 0x04, 0x07); - - +- - //set interface_type to usb - padapter->interface_type = RTW_PCIE; -- + - //step 1-1., decide the chip_type via vid/pid - decide_chip_type_by_pci_device_id(padapter, pdev); - @@ -132582,6 +132104,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - if (register_netdev(pnetdev) != 0) { - RT_TRACE(_module_hci_intfs_c_,_drv_err_,("register_netdev() failed\n")); - goto error; +- } + DBG_871X("bDriverStopped:%d, bSurpriseRemoved:%d, bup:%d, hw_init_completed:%d\n" + ,padapter->bDriverStopped + ,padapter->bSurpriseRemoved @@ -132617,7 +132140,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + else if (padapter) + rtw_vmfree((u8*)padapter, sizeof(*padapter)); + padapter = NULL; - } ++ } +exit: + return padapter; +} @@ -132700,43 +132223,43 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + //step 0. + disable_ht_for_spec_devid(did); - -- if (pdvobjpriv->irq_alloc) { -- free_irq(pdev->irq, padapter); -- pdvobjpriv->irq_alloc = 0; ++ + /* Initialize dvobj_priv */ + if ((dvobj = pci_dvobj_init(pdev)) == NULL) { + RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("initialize device object priv Failed!\n")); + goto exit; - } ++ } -- if (pdvobjpriv->pci_mem_start != 0) { -- pci_iounmap(pdev, (void *)pdvobjpriv->pci_mem_start); +- if (pdvobjpriv->irq_alloc) { +- free_irq(pdev->irq, padapter); +- pdvobjpriv->irq_alloc = 0; + /* Initialize if1 */ + if ((if1 = rtw_pci_if1_init(dvobj, pdev, did)) == NULL) { + DBG_871X("rtw_pci_if1_init Failed!\n"); + goto free_dvobj; } -- pci_dvobj_deinit(padapter); +- if (pdvobjpriv->pci_mem_start != 0) { +- pci_iounmap(pdev, (void *)pdvobjpriv->pci_mem_start); + /* Initialize if2 */ +#ifdef CONFIG_CONCURRENT_MODE + if((if2 = rtw_drv_if2_init(if1, pci_set_intf_ops)) == NULL) { + goto free_if1; -+ } + } +#endif -- if (pnetdev) -- { -- //unregister_netdev(pnetdev); -- rtw_free_netdev(pnetdev); +- pci_dvobj_deinit(padapter); +#ifdef CONFIG_GLOBAL_UI_PID + if (ui_pid[1]!=0) { + DBG_871X("ui_pid[1]:%d\n",ui_pid[1]); + rtw_signal_process(ui_pid[1], SIGUSR2); + } +#endif -+ + +- if (pnetdev) +- { +- //unregister_netdev(pnetdev); +- rtw_free_netdev(pnetdev); + //dev_alloc_name && register_netdev + if((status = rtw_drv_register_netdev(if1)) != _SUCCESS) { + goto free_if1; @@ -132754,21 +132277,21 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + DBG_871X("wlan link up\n"); + rtd2885_wlan_netlink_sendMsg("linkup", "8712"); +#endif - -- DBG_8192C("-871x_pci - drv_init, fail!\n"); ++ +#ifdef RTK_DMP_PLATFORM + rtw_proc_init_one(if1->pnetdev); +#endif -+ -+ + +- DBG_8192C("-871x_pci - drv_init, fail!\n"); + +- return err; + /* alloc irq */ + if (pci_alloc_irq(dvobj) != _SUCCESS) + goto free_if2; + + RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-871x_drv - drv_init, success!\n")); + //DBG_871X("-871x_drv - drv_init, success!\n"); - -- return err; ++ + status = _SUCCESS; + +free_if2: @@ -132812,12 +132335,12 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } - DBG_8192C("+rtw_dev_remove\n"); -- ++ rtw_unregister_netdevs(pdvobjpriv); + -#if defined(CONFIG_HAS_EARLYSUSPEND ) || defined(CONFIG_ANDROID_POWER) - rtw_unregister_early_suspend(&padapter->pwrctrlpriv); -#endif -+ rtw_unregister_netdevs(pdvobjpriv); - +- - LeaveAllPowerSaveMode(padapter); - -#ifdef RTK_DMP_PLATFORM @@ -132960,6 +132483,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_ops_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_ops_linux.c +new file mode 100644 +index 0000000..7d671df --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/pci_ops_linux.c @@ -0,0 +1,24 @@ @@ -132987,6 +132513,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + + + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/recv_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/recv_linux.c +index 4a76c3f..9c92019 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/recv_linux.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/recv_linux.c @@ -1,7 +1,7 @@ @@ -133007,7 +132535,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int res=_SUCCESS; return res; -@@ -43,7 +43,7 @@ int rtw_os_recv_resource_init(struct rec +@@ -43,7 +43,7 @@ int rtw_os_recv_resource_init(struct recv_priv *precvpriv, _adapter *padapter) //alloc os related resource in union recv_frame int rtw_os_recv_resource_alloc(_adapter *padapter, union recv_frame *precvframe) @@ -133016,7 +132544,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int res=_SUCCESS; precvframe->u.hdr.pkt_newalloc = precvframe->u.hdr.pkt = NULL; -@@ -64,8 +64,8 @@ int rtw_os_recvbuf_resource_alloc(_adapt +@@ -64,8 +64,8 @@ int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf) { int res=_SUCCESS; @@ -133027,7 +132555,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct usb_device *pusbd = pdvobjpriv->pusbdev; precvbuf->irp_pending = _FALSE; -@@ -85,9 +85,9 @@ int rtw_os_recvbuf_resource_alloc(_adapt +@@ -85,9 +85,9 @@ int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf) precvbuf->transfer_len = 0; precvbuf->len = 0; @@ -133039,7 +132567,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release precvbuf->pbuf = precvbuf->pallocated_buf; if(precvbuf->pallocated_buf == NULL) return _FAIL; -@@ -95,18 +95,7 @@ int rtw_os_recvbuf_resource_alloc(_adapt +@@ -95,18 +95,7 @@ int rtw_os_recvbuf_resource_alloc(_adapter *padapter, struct recv_buf *precvbuf) #endif //CONFIG_USB_HCI @@ -133058,7 +132586,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } //free os related resource in struct recv_buf -@@ -118,7 +107,7 @@ int rtw_os_recvbuf_resource_free(_adapte +@@ -118,7 +107,7 @@ int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf) #ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX @@ -133067,7 +132595,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct usb_device *pusbd = pdvobjpriv->pusbdev; rtw_usb_buffer_free(pusbd, (size_t)precvbuf->alloc_sz, precvbuf->pallocated_buf, precvbuf->dma_transfer_addr); -@@ -132,13 +121,13 @@ int rtw_os_recvbuf_resource_free(_adapte +@@ -132,13 +121,13 @@ int rtw_os_recvbuf_resource_free(_adapter *padapter, struct recv_buf *precvbuf) //usb_kill_urb(precvbuf->purb); usb_free_urb(precvbuf->purb); } @@ -133084,7 +132612,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return ret; -@@ -151,10 +140,10 @@ void rtw_handle_tkip_mic_err(_adapter *p +@@ -151,10 +140,10 @@ void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup) #endif union iwreq_data wrqu; struct iw_michaelmicfailure ev; @@ -133098,7 +132626,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if( psecuritypriv->last_mic_err_time == 0 ) { psecuritypriv->last_mic_err_time = rtw_get_current_time(); -@@ -192,11 +181,11 @@ void rtw_handle_tkip_mic_err(_adapter *p +@@ -192,11 +181,11 @@ void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup) _rtw_memset( &ev, 0x00, sizeof( ev ) ); if ( bgroup ) { @@ -133112,7 +132640,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } ev.src_addr.sa_family = ARPHRD_ETHER; -@@ -210,47 +199,47 @@ void rtw_handle_tkip_mic_err(_adapter *p +@@ -210,47 +199,47 @@ void rtw_handle_tkip_mic_err(_adapter *padapter,u8 bgroup) void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame) { @@ -133177,7 +132705,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct recv_priv *precvpriv; _queue *pfree_recv_queue; _pkt *skb; -@@ -265,20 +254,20 @@ int rtw_recv_indicatepkt(_adapter *padap +@@ -265,20 +254,20 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame) _func_enter_; @@ -133322,7 +132850,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct recv_priv *precvpriv = &padapter->recvpriv; #ifdef CONFIG_USB_HCI -@@ -428,7 +414,7 @@ void rtw_os_read_port(_adapter *padapter +@@ -428,7 +414,7 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf) precvbuf->ref_cnt--; //free skb in recv_buf @@ -133331,7 +132859,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release precvbuf->pskb = NULL; precvbuf->reuse = _FALSE; -@@ -436,8 +422,8 @@ void rtw_os_read_port(_adapter *padapter +@@ -436,8 +422,8 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf) if(precvbuf->irp_pending == _FALSE) { rtw_read_port(padapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); @@ -133342,7 +132870,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #endif #ifdef CONFIG_SDIO_HCI -@@ -457,6 +443,6 @@ void rtw_init_recv_timer(struct recv_reo +@@ -457,6 +443,6 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl) _adapter *padapter = preorder_ctrl->padapter; _init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl); @@ -133350,6 +132878,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/rtw_android.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/rtw_android.c +index aceaaa7..a4bb073 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/rtw_android.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/rtw_android.c @@ -27,15 +27,14 @@ @@ -133370,7 +132900,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = { "START", -@@ -71,7 +70,11 @@ const char *android_wifi_cmd_str[ANDROID +@@ -71,7 +70,11 @@ const char *android_wifi_cmd_str[ANDROID_WIFI_CMD_MAX] = { "MACADDR", "BLOCK", @@ -133402,7 +132932,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release /** * Local (static) functions and variables */ -@@ -147,7 +155,7 @@ static int wl_android_set_pno_setup(stru +@@ -147,7 +155,7 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t DHD_INFO(("%s: command=%s, len=%d\n", __FUNCTION__, command, total_len)); if (total_len < (strlen(CMD_PNOSETUP_SET) + sizeof(cmd_tlv_t))) { @@ -133411,7 +132941,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit_proc; } -@@ -174,12 +182,12 @@ static int wl_android_set_pno_setup(stru +@@ -174,12 +182,12 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t if ((nssid = wl_iw_parse_ssid_list_tlv(&str_ptr, ssids_local, MAX_PFN_LIST_COUNT, &tlv_size_left)) <= 0) { @@ -133427,7 +132957,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit_proc; } str_ptr++; -@@ -188,16 +196,16 @@ static int wl_android_set_pno_setup(stru +@@ -188,16 +196,16 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t if (str_ptr[0] != 0) { if ((str_ptr[0] != PNO_TLV_FREQ_REPEAT)) { @@ -133448,7 +132978,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit_proc; } str_ptr++; -@@ -207,7 +215,7 @@ static int wl_android_set_pno_setup(stru +@@ -207,7 +215,7 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t } } } else { @@ -133457,7 +132987,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release goto exit_proc; } -@@ -251,7 +259,7 @@ int rtw_android_get_link_speed(struct ne +@@ -251,7 +259,7 @@ int rtw_android_get_link_speed(struct net_device *net, char *command, int total_ int bytes_written = 0; u16 link_speed = 0; @@ -133466,7 +132996,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release bytes_written = snprintf(command, total_len, "LinkSpeed %d", link_speed); return bytes_written; -@@ -270,7 +278,7 @@ int rtw_android_set_country(struct net_d +@@ -270,7 +278,7 @@ int rtw_android_set_country(struct net_device *net, char *command, int total_len { _adapter *adapter = (_adapter *)rtw_netdev_priv(net); char *country_code = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_COUNTRY]) + 1; @@ -133475,7 +133005,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = rtw_set_country(adapter, country_code); -@@ -279,7 +287,6 @@ int rtw_android_set_country(struct net_d +@@ -279,7 +287,6 @@ int rtw_android_set_country(struct net_device *net, char *command, int total_len int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int total_len) { @@ -133483,7 +133013,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int bytes_written = 0; //We use the same address as our HW MAC address -@@ -291,7 +298,6 @@ int rtw_android_get_p2p_dev_addr(struct +@@ -291,7 +298,6 @@ int rtw_android_get_p2p_dev_addr(struct net_device *net, char *command, int tota int rtw_android_set_block(struct net_device *net, char *command, int total_len) { @@ -133491,7 +133021,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _adapter *adapter = (_adapter *)rtw_netdev_priv(net); char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK]) + 1; -@@ -302,6 +308,45 @@ int rtw_android_set_block(struct net_dev +@@ -302,6 +308,45 @@ int rtw_android_set_block(struct net_device *net, char *command, int total_len) return 0; } @@ -133537,7 +133067,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) { int ret = 0; -@@ -320,14 +365,21 @@ int rtw_android_priv_cmd(struct net_devi +@@ -320,14 +365,21 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) ret = -EFAULT; goto exit; } @@ -133561,7 +133091,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release ret = -EFAULT; goto exit; } -@@ -359,10 +411,15 @@ int rtw_android_priv_cmd(struct net_devi +@@ -359,10 +411,15 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) break; case ANDROID_WIFI_CMD_SCAN_ACTIVE: @@ -133579,7 +133109,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case ANDROID_WIFI_CMD_RSSI: -@@ -419,11 +476,11 @@ int rtw_android_priv_cmd(struct net_devi +@@ -419,11 +476,11 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) break; case ANDROID_WIFI_CMD_SETBAND: @@ -133594,7 +133124,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release break; case ANDROID_WIFI_CMD_COUNTRY: -@@ -467,6 +524,74 @@ int rtw_android_priv_cmd(struct net_devi +@@ -467,6 +524,74 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd) } #endif //CONFIG_IOCTL_CFG80211 @@ -133696,7 +133226,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int g_wifidev_registered = 0; static struct semaphore wifi_control_sem; -@@ -516,14 +641,14 @@ static struct resource *wifi_irqres = NU +@@ -516,14 +641,14 @@ static struct resource *wifi_irqres = NULL; static int wifi_add_dev(void); static void wifi_del_dev(void); @@ -133729,7 +133259,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { if (g_wifidev_registered) { -@@ -552,14 +677,14 @@ void *wl_android_prealloc(int section, u +@@ -552,14 +677,14 @@ void *wl_android_prealloc(int section, unsigned long size) if (wifi_control_data && wifi_control_data->mem_prealloc) { alloc_ptr = wifi_control_data->mem_prealloc(section, size); if (alloc_ptr) { @@ -133747,7 +133277,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release return NULL; } -@@ -578,7 +703,7 @@ int wifi_get_irq_number(unsigned long *i +@@ -578,7 +703,7 @@ int wifi_get_irq_number(unsigned long *irq_flags_ptr) int wifi_set_power(int on, unsigned long msec) { @@ -133756,7 +133286,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (wifi_control_data && wifi_control_data->set_power) { wifi_control_data->set_power(on); } -@@ -590,7 +715,7 @@ int wifi_set_power(int on, unsigned long +@@ -590,7 +715,7 @@ int wifi_set_power(int on, unsigned long msec) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) int wifi_get_mac_addr(unsigned char *buf) { @@ -133765,7 +133295,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (!buf) return -EINVAL; if (wifi_control_data && wifi_control_data->get_mac_addr) { -@@ -600,10 +725,10 @@ int wifi_get_mac_addr(unsigned char *buf +@@ -600,10 +725,10 @@ int wifi_get_mac_addr(unsigned char *buf) } #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)) */ @@ -133787,7 +133317,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if (wifi_control_data && wifi_control_data->set_carddetect) { wifi_control_data->set_carddetect(on); } -@@ -627,7 +752,7 @@ static int wifi_probe(struct platform_de +@@ -627,7 +752,7 @@ static int wifi_probe(struct platform_device *pdev) struct wifi_platform_data *wifi_ctrl = (struct wifi_platform_data *)(pdev->dev.platform_data); @@ -133796,7 +133326,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wifi_irqres = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "bcmdhd_wlan_irq"); if (wifi_irqres == NULL) wifi_irqres = platform_get_resource_byname(pdev, -@@ -646,7 +771,7 @@ static int wifi_remove(struct platform_d +@@ -646,7 +771,7 @@ static int wifi_remove(struct platform_device *pdev) struct wifi_platform_data *wifi_ctrl = (struct wifi_platform_data *)(pdev->dev.platform_data); @@ -133805,7 +133335,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release wifi_control_data = wifi_ctrl; wifi_set_power(0, 0); /* Power Off */ -@@ -658,7 +783,7 @@ static int wifi_remove(struct platform_d +@@ -658,7 +783,7 @@ static int wifi_remove(struct platform_device *pdev) static int wifi_suspend(struct platform_device *pdev, pm_message_t state) { @@ -133814,7 +133344,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY) bcmsdh_oob_intr_set(0); #endif -@@ -667,7 +792,7 @@ static int wifi_suspend(struct platform_ +@@ -667,7 +792,7 @@ static int wifi_suspend(struct platform_device *pdev, pm_message_t state) static int wifi_resume(struct platform_device *pdev) { @@ -133823,7 +133353,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY) if (dhd_os_check_if_up(bcmsdh_get_drvdata())) bcmsdh_oob_intr_set(1); -@@ -675,6 +800,7 @@ static int wifi_resume(struct platform_d +@@ -675,6 +800,7 @@ static int wifi_resume(struct platform_device *pdev) return 0; } @@ -133831,7 +133361,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static struct platform_driver wifi_device = { .probe = wifi_probe, .remove = wifi_remove, -@@ -697,7 +823,7 @@ static struct platform_driver wifi_devic +@@ -697,7 +823,7 @@ static struct platform_driver wifi_device_legacy = { static int wifi_add_dev(void) { @@ -133852,6 +133382,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release -#endif /* defined(CONFIG_WIFI_CONTROL_FUNC) */ +#endif /* defined(RTW_ENABLE_WIFI_CONTROL_FUNC) */ +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/sdio_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/sdio_intf.c +deleted file mode 100644 +index 52faefc..0000000 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/sdio_intf.c +++ /dev/null @@ -1,922 +0,0 @@ @@ -134777,6 +134310,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - -module_init(r8712s_drv_entry); -module_exit(r8712s_drv_halt); +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +index 2e54e74..4c1089a 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c @@ -1,7 +1,7 @@ @@ -134816,7 +134351,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static int rtw_drv_init(struct usb_interface *pusb_intf,const struct usb_device_id *pdid); -@@ -70,117 +69,142 @@ static void rtw_dev_remove(struct usb_in +@@ -70,117 +69,142 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf); #define USB_VENDER_ID_REALTEK 0x0BDA @@ -135029,10 +134564,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#ifndef CONFIG_RTL8192C + #undef RTL8192C_USB_IDS + #define RTL8192C_USB_IDS -+#endif -+#ifndef CONFIG_RTL8192D -+ #undef RTL8192D_USB_IDS -+ #define RTL8192D_USB_IDS #endif -#ifdef CONFIG_RTL8192D - /*=== Realtek demoboard ===*/ @@ -135052,10 +134583,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - - /****** 8192DU-VS ********/ - {USB_DEVICE(0x20F4, 0x664B)},//TRENDnet - +- - /****** 8192DU-WiFi Display Dongle ********/ - {USB_DEVICE(0x2019, 0xAB2D)},//Planex - Abocom ,5G dongle for WiFi Display --#endif ++#ifndef CONFIG_RTL8192D ++ #undef RTL8192D_USB_IDS ++ #define RTL8192D_USB_IDS + #endif ++ + +static struct usb_device_id rtw_usb_id_tbl[] ={ + RTL8192C_USB_IDS @@ -135066,7 +134601,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release int const rtw_usb_id_len = sizeof(rtw_usb_id_tbl) / sizeof(struct usb_device_id); -@@ -189,7 +213,7 @@ static struct specific_device_id specifi +@@ -189,7 +213,7 @@ static struct specific_device_id specific_device_id_tbl[] = { {.idVendor=USB_VENDER_ID_REALTEK, .idProduct=0x817E, .flags=SPEC_DEV_ID_DISABLE_HT},//8188CE-VAU USB minCard (b/g mode only) {.idVendor=0x0b05, .idProduct=0x1791, .flags=SPEC_DEV_ID_DISABLE_HT}, {.idVendor=0x13D3, .idProduct=0x3311, .flags=SPEC_DEV_ID_DISABLE_HT}, @@ -135075,7 +134610,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef RTK_DMP_PLATFORM {.idVendor=USB_VENDER_ID_REALTEK, .idProduct=0x8111, .flags=SPEC_DEV_ID_ASSIGN_IFNAME}, // Realtek 5G dongle for WiFi Display {.idVendor=0x2019, .idProduct=0xAB2D, .flags=SPEC_DEV_ID_ASSIGN_IFNAME}, // PCI-Abocom 5G dongle for WiFi Display -@@ -197,31 +221,86 @@ static struct specific_device_id specifi +@@ -197,31 +221,86 @@ static struct specific_device_id specific_device_id_tbl[] = { {} }; @@ -135138,14 +134673,14 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + #ifdef CONFIG_AUTOSUSPEND + .usbdrv.supports_autosuspend = 1, + #endif -+ + + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) + .usbdrv.drvwrap.driver.shutdown = rtw_dev_shutdown, + #else + .usbdrv.driver.shutdown = rtw_dev_shutdown, + #endif +}; - ++ +static struct rtw_usb_drv *usb_drv = &rtl8192c_usb_drv; +#endif /* CONFIG_RTL8192C */ + @@ -135180,7 +134715,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release static inline int RT_usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) { -@@ -263,58 +342,54 @@ static inline int RT_usb_endpoint_num(co +@@ -263,58 +342,54 @@ static inline int RT_usb_endpoint_num(const struct usb_endpoint_descriptor *epd) return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; } @@ -135262,7 +134797,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct usb_device_descriptor *pdev_desc; struct usb_host_config *phost_conf; struct usb_config_descriptor *pconf_desc; -@@ -322,78 +397,78 @@ static u32 usb_dvobj_init(_adapter *pada +@@ -322,78 +397,78 @@ static u32 usb_dvobj_init(_adapter *padapter) struct usb_interface_descriptor *piface_desc; struct usb_host_endpoint *phost_endp; struct usb_endpoint_descriptor *pendp_desc; @@ -135469,22 +135004,22 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //.3 misc - _rtw_init_sema(&(padapter->dvobjpriv.usb_suspend_sema), 0); + _rtw_init_sema(&(pdvobjpriv->usb_suspend_sema), 0); ++ ++ rtw_reset_continual_urb_error(pdvobjpriv); - intf_read_chip_version(padapter); -+ rtw_reset_continual_urb_error(pdvobjpriv); ++ usb_get_dev(pusbd); - //.4 usb endpoint mapping - intf_chip_configure(padapter); -+ usb_get_dev(pusbd); ++ //DBG_871X("%s %d\n", __func__, ATOMIC_READ(&usb_intf->dev.kobj.kref.refcount)); - rtw_reset_continual_urb_error(pdvobjpriv); - -_func_exit_; -+ //DBG_871X("%s %d\n", __func__, ATOMIC_READ(&usb_intf->dev.kobj.kref.refcount)); ++ status = _SUCCESS; - return status; -+ status = _SUCCESS; -+ +free_dvobj: + if (status != _SUCCESS && pdvobjpriv) { + usb_set_intfdata(usb_intf, NULL); @@ -135576,7 +135111,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } static void usb_intf_stop(_adapter *padapter) -@@ -541,10 +609,7 @@ static void usb_intf_stop(_adapter *pada +@@ -541,10 +609,7 @@ static void usb_intf_stop(_adapter *padapter) } //cancel in irp @@ -135588,7 +135123,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //cancel out irp rtw_write_port_cancel(padapter); -@@ -563,9 +628,13 @@ static void rtw_dev_unload(_adapter *pad +@@ -563,9 +628,13 @@ static void rtw_dev_unload(_adapter *padapter) if(padapter->bup == _TRUE) { @@ -135603,7 +135138,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release //s3. if(padapter->intf_stop) -@@ -574,20 +643,20 @@ static void rtw_dev_unload(_adapter *pad +@@ -574,20 +643,20 @@ static void rtw_dev_unload(_adapter *padapter) } //s4. @@ -135630,7 +135165,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { rtw_hal_deinit(padapter); } -@@ -595,14 +664,16 @@ static void rtw_dev_unload(_adapter *pad +@@ -595,14 +664,16 @@ static void rtw_dev_unload(_adapter *padapter) } padapter->bup = _FALSE; @@ -135649,7 +135184,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-rtw_dev_unload\n")); -@@ -636,8 +707,8 @@ static void process_spec_devid(const str +@@ -636,8 +707,8 @@ static void process_spec_devid(const struct usb_device_id *pdid) if((pdid->idVendor==vid) && (pdid->idProduct==pid) && (flags&SPEC_DEV_ID_ASSIGN_IFNAME)) { extern char* ifname; @@ -135660,7 +135195,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif /* RTK_DMP_PLATFORM */ -@@ -645,29 +716,26 @@ static void process_spec_devid(const str +@@ -645,29 +716,26 @@ static void process_spec_devid(const struct usb_device_id *pdid) } #ifdef SUPPORT_HW_RFOFF_DETECTED @@ -135853,13 +135388,23 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - padapter->bup, padapter->bDriverStopped,padapter->bSurpriseRemoved); - return 0; - } -- ++ DBG_871X("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n", ++ padapter->bup, padapter->bDriverStopped,padapter->bSurpriseRemoved); ++ goto exit; ++ } + - DBG_8192C("########### rtw_suspend #################\n"); - - if(padapter)//system suspend - { - if(pwrpriv->bInternalAutoSuspend ) -- { ++ if(pwrpriv->bInternalAutoSuspend ) ++ { ++ #ifdef CONFIG_AUTOSUSPEND ++ #ifdef SUPPORT_HW_RFOFF_DETECTED ++ // The FW command register update must after MAC and FW init ready. ++ if((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable )) + { - #ifdef CONFIG_AUTOSUSPEND - #ifdef SUPPORT_HW_RFOFF_DETECTED - // The FW command register update must after MAC and FW init ready. @@ -135871,39 +135416,28 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - } - #endif - #endif -- } ++ u8 bOpen = _TRUE; ++ rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen); ++ //rtl8192c_set_FwSelectSuspend_cmd(padapter,_TRUE ,500);//note fw to support hw power down ping detect + } - pwrpriv->bInSuspend = _TRUE; - rtw_cancel_all_timer(padapter); - LeaveAllPowerSaveMode(padapter); -+ DBG_871X("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n", -+ padapter->bup, padapter->bDriverStopped,padapter->bSurpriseRemoved); -+ goto exit; ++ #endif ++ #endif + } ++ pwrpriv->bInSuspend = _TRUE; ++ rtw_cancel_all_timer(padapter); ++ LeaveAllPowerSaveMode(padapter); - _enter_pwrlock(&pwrpriv->lock); - //padapter->net_closed = _TRUE; - //s1. - if(pnetdev) -+ if(pwrpriv->bInternalAutoSuspend ) -+ { -+ #ifdef CONFIG_AUTOSUSPEND -+ #ifdef SUPPORT_HW_RFOFF_DETECTED -+ // The FW command register update must after MAC and FW init ready. -+ if((padapter->bFWReady) && ( padapter->pwrctrlpriv.bHWPwrPindetect ) && (padapter->registrypriv.usbss_enable )) - { +- { - netif_carrier_off(pnetdev); - netif_stop_queue(pnetdev); -+ u8 bOpen = _TRUE; -+ rtw_interface_ps_func(padapter,HAL_USB_SELECT_SUSPEND,&bOpen); -+ //rtl8192c_set_FwSelectSuspend_cmd(padapter,_TRUE ,500);//note fw to support hw power down ping detect - } -+ #endif -+ #endif -+ } -+ pwrpriv->bInSuspend = _TRUE; -+ rtw_cancel_all_timer(padapter); -+ LeaveAllPowerSaveMode(padapter); -+ +- } + rtw_stop_cmd_thread(padapter); + + _enter_pwrlock(&pwrpriv->lock); @@ -136369,7 +135903,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _adapter *padapter = NULL; - struct dvobj_priv *pdvobjpriv; - struct net_device *pnetdev; -- ++ struct net_device *pnetdev = NULL; ++ int status = _FAIL; + - RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_drv_init\n")); - //DBG_8192C("+rtw_drv_init\n"); - @@ -136377,9 +135913,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - // In this probe function, O.S. will provide the usb interface pointer to driver. - // We have to increase the reference count of the usb device structure by using the usb_get_dev function. - usb_get_dev(interface_to_usbdev(pusb_intf)); -+ struct net_device *pnetdev = NULL; -+ int status = _FAIL; - +- - //step 0. - process_spec_devid(pdid); - @@ -136402,17 +135936,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - pdvobjpriv->padapter = padapter; - pdvobjpriv->pusbintf = pusb_intf ; - pdvobjpriv->pusbdev = interface_to_usbdev(pusb_intf); - +- -#ifdef CONFIG_IOCTL_CFG80211 - rtw_wdev_alloc(padapter, &pusb_intf->dev); -#endif //CONFIG_IOCTL_CFG80211 - -+ dvobj->padapters[dvobj->iface_nums++] = padapter; -+ padapter->iface_id = IFACE_ID0; - // set data - usb_set_intfdata(pusb_intf, pnetdev); -- ++ dvobj->padapters[dvobj->iface_nums++] = padapter; ++ padapter->iface_id = IFACE_ID0; + - //set interface_type to usb - padapter->interface_type = RTW_USB; +#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT) @@ -136534,7 +136068,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } #endif #endif -@@ -1232,101 +1262,204 @@ static int rtw_drv_init(struct usb_inter +@@ -1232,101 +1262,204 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device { if(padapter->registrypriv.usbss_enable ){ /* autosuspend (2s delay) */ #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,38)) @@ -136599,7 +136133,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + rtw_wdev_unregister(padapter->rtw_wdev); + rtw_wdev_free(padapter->rtw_wdev); + #endif - } ++ } +handle_dualmac: + if (status != _SUCCESS) + rtw_handle_dualmac(padapter, 0); @@ -136613,7 +136147,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + else if (padapter) + rtw_vmfree((u8*)padapter, sizeof(*padapter)); + padapter = NULL; -+ } + } +exit: + return padapter; +} @@ -136669,8 +136203,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtd2885_wlan_netlink_sendMsg("linkup", "8712"); + DBG_871X("wlan link down\n"); + rtd2885_wlan_netlink_sendMsg("linkdown", "8712"); -+#endif -+ + #endif + +} + +/* @@ -136723,8 +136257,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } + } +#endif //CONFIG_MULTI_VIR_IFACES - #endif - ++#endif ++ +#ifdef CONFIG_INTEL_PROXIM + rtw_sw_export=if1; +#endif @@ -136810,13 +136344,10 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _func_exit_; - usb_set_intfdata(pusb_intf, NULL); -+ DBG_871X("+rtw_dev_remove\n"); -+ RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+dev_remove()\n")); - +- - if(padapter) - { -+ dvobj->processing_dev_remove = _TRUE; - +- -#ifdef CONFIG_IOCTL_CFG80211 - struct wireless_dev *wdev = padapter->rtw_wdev; -#endif //CONFIG_IOCTL_CFG80211 @@ -136827,11 +136358,13 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - rtw_unregister_early_suspend(&padapter->pwrctrlpriv); -#endif - LeaveAllPowerSaveMode(padapter); -+ rtw_unregister_netdevs(dvobj); ++ DBG_871X("+rtw_dev_remove\n"); ++ RT_TRACE(_module_hci_intfs_c_,_drv_err_,("+dev_remove()\n")); - if(check_fwstate(pmlmepriv, _FW_LINKED)) - disconnect_hdl(padapter, NULL); -- ++ dvobj->processing_dev_remove = _TRUE; + - if(drvpriv.drv_registered == _TRUE) - { - //DBG_8192C("r871xu_dev_remove():padapter->bSurpriseRemoved == _TRUE\n"); @@ -136842,7 +136375,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - //DBG_8192C("r871xu_dev_remove():module removed\n"); - padapter->hw_init_completed = _FALSE; - }*/ -- ++ rtw_unregister_netdevs(dvobj); + -#ifdef CONFIG_AP_MODE - free_mlme_ap_info(padapter); -#ifdef CONFIG_HOSTAPD_MLME @@ -136965,7 +136499,6 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release tmp |= 0x55; writel(tmp,(volatile unsigned int*)0xb801a608);//write dummy register for 1055 #endif -- +#ifdef CONFIG_PLATFORM_ARM_SUNxI +#ifndef CONFIG_RTL8723A + int ret = 0; @@ -136989,7 +136522,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + printk("ERR: script_get_item wifi_usbc_id failed\n"); + return -ENOMEM; + } -+ + + printk("sw_usb_enable_hcd: usbc_num = %d\n", item.val); + wifi_pm_power(1); + mdelay(10); @@ -137096,6 +136629,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release _adapter *rtw_usb_get_sw_pointer(void) { return rtw_sw_export; +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_ops_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_ops_linux.c +new file mode 100644 +index 0000000..f54cfb4 --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_ops_linux.c @@ -0,0 +1,649 @@ @@ -137748,6 +137284,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + } +} + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/xmit_linux.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/xmit_linux.c +index 02eec93..9105e29 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/xmit_linux.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/xmit_linux.c @@ -16,7 +16,7 @@ @@ -137759,7 +137297,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #define _XMIT_OSDEP_C_ #include -@@ -98,11 +98,11 @@ void rtw_set_tx_chksum_offload(_pkt *pkt +@@ -98,11 +98,11 @@ void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib) const struct iphdr *ip = ip_hdr(skb); if (ip->protocol == IPPROTO_TCP) { // TCP checksum offload by HW @@ -137773,7 +137311,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #if 1 skb_checksum_help(skb); #else -@@ -111,12 +111,12 @@ void rtw_set_tx_chksum_offload(_pkt *pkt +@@ -111,12 +111,12 @@ void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib) udp->check = 0; #endif } else { @@ -137788,7 +137326,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release skb_checksum_help(skb); } } -@@ -128,11 +128,11 @@ int rtw_os_xmit_resource_alloc(_adapter +@@ -128,11 +128,11 @@ int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 { #ifdef CONFIG_USB_HCI int i; @@ -137802,7 +137340,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pxmitbuf->pbuf = pxmitbuf->pallocated_buf; if(pxmitbuf->pallocated_buf == NULL) return _FAIL; -@@ -154,13 +154,13 @@ int rtw_os_xmit_resource_alloc(_adapter +@@ -154,13 +154,13 @@ int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL); if(pxmitbuf->pxmit_urb[i] == NULL) { @@ -137818,7 +137356,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz); if (pxmitbuf->pallocated_buf == NULL) { -@@ -177,7 +177,7 @@ void rtw_os_xmit_resource_free(_adapter +@@ -177,7 +177,7 @@ void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 { #ifdef CONFIG_USB_HCI int i; @@ -137827,7 +137365,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release struct usb_device *pusbd = pdvobjpriv->pusbdev; -@@ -193,14 +193,14 @@ void rtw_os_xmit_resource_free(_adapter +@@ -193,14 +193,14 @@ void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 #ifdef CONFIG_USE_USB_BUFFER_ALLOC_TX rtw_usb_buffer_free(pusbd, (size_t)free_sz, pxmitbuf->pallocated_buf, pxmitbuf->dma_transfer_addr); pxmitbuf->pallocated_buf = NULL; @@ -137844,7 +137382,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release if(pxmitbuf->pallocated_buf) rtw_mfree(pxmitbuf->pallocated_buf, free_sz); #endif -@@ -208,39 +208,58 @@ void rtw_os_xmit_resource_free(_adapter +@@ -208,39 +208,58 @@ void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt) { @@ -137912,7 +137450,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -@@ -254,6 +273,12 @@ int rtw_mlcst2unicst(_adapter *padapter, +@@ -254,6 +273,12 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) _list *phead, *plist; struct sk_buff *newskb; struct sta_info *psta = NULL; @@ -137925,7 +137463,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release s32 res; _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL); -@@ -261,45 +286,54 @@ int rtw_mlcst2unicst(_adapter *padapter, +@@ -261,45 +286,54 @@ int rtw_mlcst2unicst(_adapter *padapter, struct sk_buff *skb) plist = get_next(phead); //free sta asoc_queue @@ -137997,7 +137535,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release { _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -@@ -308,7 +342,9 @@ int rtw_xmit_entry(_pkt *pkt, _nic_hdl p +@@ -308,7 +342,9 @@ int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev) extern int rtw_mc2u_disable; #endif // CONFIG_TX_MCAST2UNI s32 res = 0; @@ -138059,6 +137597,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return _rtw_xmit_entry(pkt, pnetdev); +} + +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c b/drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c +index 343cd82..e73a068 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/osdep_service.c @@ -25,8 +25,13 @@ @@ -138076,7 +137616,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef RTK_DMP_PLATFORM #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)) #include -@@ -66,6 +71,27 @@ inline int RTW_STATUS_CODE(int error_cod +@@ -66,6 +71,27 @@ inline int RTW_STATUS_CODE(int error_code){ } #endif @@ -138125,7 +137665,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release #ifdef PLATFORM_WINDOWS NdisAllocateMemoryWithTag(&pbuf,sz, RT_TAG); if (pbuf != NULL) -@@ -113,7 +144,9 @@ inline void _rtw_vmfree(u8 *pbuf, u32 sz +@@ -113,7 +144,9 @@ inline void _rtw_vmfree(u8 *pbuf, u32 sz) #ifdef PLATFORM_LINUX vfree(pbuf); #endif @@ -138208,7 +137748,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + skb->end = (unsigned char*)data + size; + skb->len = 0; + //printf("%s()-%d: skb=%p, skb->head = %p\n", __FUNCTION__, __LINE__, skb, skb->head); -+ + +-#ifdef DBG_MEM_ALLOC +out: + return skb; +nodata: @@ -138271,7 +137812,11 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return skb_clone(skb); +#endif /* PLATFORM_FREEBSD */ +} -+ + +-struct rtw_dbg_mem_stat { +- ATOMIC_T vir_alloc; // the memory bytes we allocate now +- ATOMIC_T vir_peak; // the peak memory bytes we allocate +- ATOMIC_T vir_alloc_err; // the error times we fail to allocate memory +inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb) +{ +#ifdef PLATFORM_LINUX @@ -138302,7 +137847,19 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + return usb_buffer_alloc(dev, size, (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL), dma); +#endif +#endif /* PLATFORM_LINUX */ -+ + +- ATOMIC_T phy_alloc; +- ATOMIC_T phy_peak; +- ATOMIC_T phy_alloc_err; +-} rtw_dbg_mem_stat; +- +-enum { +- MEM_STAT_VIR_ALLOC_SUCCESS, +- MEM_STAT_VIR_ALLOC_FAIL, +- MEM_STAT_VIR_FREE, +- MEM_STAT_PHY_ALLOC_SUCCESS, +- MEM_STAT_PHY_ALLOC_FAIL, +- MEM_STAT_PHY_FREE +#ifdef PLATFORM_FREEBSD + return (malloc(size, M_USBDEV, M_NOWAIT | M_ZERO)); +#endif /* PLATFORM_FREEBSD */ @@ -138322,33 +137879,17 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +#endif /* PLATFORM_FREEBSD */ +} +#endif /* CONFIG_USB_HCI */ - - #ifdef DBG_MEM_ALLOC - --struct rtw_dbg_mem_stat { -- ATOMIC_T vir_alloc; // the memory bytes we allocate now -- ATOMIC_T vir_peak; // the peak memory bytes we allocate -- ATOMIC_T vir_alloc_err; // the error times we fail to allocate memory -- -- ATOMIC_T phy_alloc; -- ATOMIC_T phy_peak; -- ATOMIC_T phy_alloc_err; --} rtw_dbg_mem_stat; -- --enum { -- MEM_STAT_VIR_ALLOC_SUCCESS, -- MEM_STAT_VIR_ALLOC_FAIL, -- MEM_STAT_VIR_FREE, -- MEM_STAT_PHY_ALLOC_SUCCESS, -- MEM_STAT_PHY_ALLOC_FAIL, -- MEM_STAT_PHY_FREE ++ ++#ifdef DBG_MEM_ALLOC ++ +struct rtw_mem_stat { + ATOMIC_T alloc; // the memory bytes we allocate currently + ATOMIC_T peak; // the peak memory bytes we allocate + ATOMIC_T alloc_cnt; // the alloc count for alloc currently + ATOMIC_T alloc_err_cnt; // the error times we fail to allocate memory -+}; -+ + }; + +-void rtw_dump_mem_stat (void) +struct rtw_mem_stat rtw_mem_type_stat[mstat_tf_idx(MSTAT_TYPE_MAX)]; +struct rtw_mem_stat rtw_mem_func_stat[mstat_ff_idx(MSTAT_FUNC_MAX)]; + @@ -138357,9 +137898,8 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release + "PHY", + "SKB", + "USB", - }; - --void rtw_dump_mem_stat (void) ++}; ++ +char *MSTAT_FUNC_str[] = { + "UNSP", + "IO", @@ -138380,25 +137920,23 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release - vir_alloc=ATOMIC_READ(&rtw_dbg_mem_stat.vir_alloc); - vir_peak=ATOMIC_READ(&rtw_dbg_mem_stat.vir_peak); - vir_alloc_err=ATOMIC_READ(&rtw_dbg_mem_stat.vir_alloc_err); -- ++ int vir_alloc, vir_peak, vir_alloc_err, phy_alloc, phy_peak, phy_alloc_err; ++ int tx_alloc, tx_peak, tx_alloc_err, rx_alloc, rx_peak, rx_alloc_err; + - phy_alloc=ATOMIC_READ(&rtw_dbg_mem_stat.phy_alloc); - phy_peak=ATOMIC_READ(&rtw_dbg_mem_stat.phy_peak); - phy_alloc_err=ATOMIC_READ(&rtw_dbg_mem_stat.phy_alloc_err); -- -- DBG_871X("vir_alloc:%d, vir_peak:%d,vir_alloc_err:%d, phy_alloc:%d, phy_peak:%d, phy_alloc_err:%d\n" -- , vir_alloc, vir_peak, vir_alloc_err -- , phy_alloc, phy_peak, phy_alloc_err -- ); -+ int vir_alloc, vir_peak, vir_alloc_err, phy_alloc, phy_peak, phy_alloc_err; -+ int tx_alloc, tx_peak, tx_alloc_err, rx_alloc, rx_peak, rx_alloc_err; -+ + for(i=0;iold_pnetdev=cur_pnetdev; -@@ -1488,21 +2032,7 @@ int rtw_change_ifname(_adapter *padapter +@@ -1488,21 +2032,7 @@ int rtw_change_ifname(_adapter *padapter, const char *ifname) goto error; } @@ -139541,7 +139079,7 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release rtw_init_netdev_name(pnetdev, ifname); -@@ -1520,9 +2050,7 @@ int rtw_change_ifname(_adapter *padapter +@@ -1520,9 +2050,7 @@ int rtw_change_ifname(_adapter *padapter, const char *ifname) goto error; } @@ -139801,6 +139339,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release } -#endif +diff --git a/drivers/net/wireless/rtl8192cu/runwpa b/drivers/net/wireless/rtl8192cu/runwpa +new file mode 100755 +index 0000000..f825e8b --- /dev/null +++ b/drivers/net/wireless/rtl8192cu/runwpa @@ -0,0 +1,20 @@ @@ -139824,3 +139365,9 @@ Subject: [PATCH 097/174] wifi: Update to newer rtl8192cu driver release +fi + + +diff --git a/drivers/net/wireless/rtl8192cu/wlan0dhcp b/drivers/net/wireless/rtl8192cu/wlan0dhcp +old mode 100644 +new mode 100755 +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0098-wifi-add-patches-from-3.6.y-tree-to-make-rtl8192cu-w.patch b/target/linux/brcm2708/patches-3.10/0098-wifi-add-patches-from-3.6.y-tree-to-make-rtl8192cu-w.patch index 4f1f5d9429d..e2faf2087b0 100644 --- a/target/linux/brcm2708/patches-3.10/0098-wifi-add-patches-from-3.6.y-tree-to-make-rtl8192cu-w.patch +++ b/target/linux/brcm2708/patches-3.10/0098-wifi-add-patches-from-3.6.y-tree-to-make-rtl8192cu-w.patch @@ -1,7 +1,7 @@ -From 1c4544175663c38eb22b9095ce75c31f2d6c6e18 Mon Sep 17 00:00:00 2001 +From 0682247a80d24b2613d4a89b396371ac7fcf3214 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 9 Nov 2013 13:32:03 +0000 -Subject: [PATCH 098/174] wifi: add patches from 3.6.y tree to make rtl8192cu +Subject: [PATCH 098/196] wifi: add patches from 3.6.y tree to make rtl8192cu work wifi: add missing patch from 3.6.y tree to disable debug @@ -13,6 +13,8 @@ wifi: add missing patch from 3.6.y tree to disable debug drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c | 1 + 5 files changed, 23 insertions(+), 3 deletions(-) +diff --git a/drivers/net/wireless/rtl8192cu/Kconfig b/drivers/net/wireless/rtl8192cu/Kconfig +index bee5ed6..ef46361 100644 --- a/drivers/net/wireless/rtl8192cu/Kconfig +++ b/drivers/net/wireless/rtl8192cu/Kconfig @@ -1,6 +1,8 @@ @@ -25,6 +27,8 @@ wifi: add missing patch from 3.6.y tree to disable debug - Help message of RTL8192CU + Enable wireless network adapters based on Realtek RTL8192C chipset family, such as EDUP nano series +diff --git a/drivers/net/wireless/rtl8192cu/Makefile b/drivers/net/wireless/rtl8192cu/Makefile +index c399011..f85c59f 100644 --- a/drivers/net/wireless/rtl8192cu/Makefile +++ b/drivers/net/wireless/rtl8192cu/Makefile @@ -38,7 +38,7 @@ CONFIG_RTL8192CU_REDEFINE_1X1 = n @@ -47,6 +51,8 @@ wifi: add missing patch from 3.6.y tree to disable debug ifneq ($(USER_MODULE_NAME),) MODULE_NAME := $(USER_MODULE_NAME) endif +diff --git a/drivers/net/wireless/rtl8192cu/include/autoconf.h b/drivers/net/wireless/rtl8192cu/include/autoconf.h +index 12294df..1341ff0 100644 --- a/drivers/net/wireless/rtl8192cu/include/autoconf.h +++ b/drivers/net/wireless/rtl8192cu/include/autoconf.h @@ -296,7 +296,7 @@ @@ -58,6 +64,8 @@ wifi: add missing patch from 3.6.y tree to disable debug #define CONFIG_PROC_DEBUG 1 +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c +index 82dee6d..b0bf0e9 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c @@ -277,6 +277,18 @@ static int rtw_proc_cnt = 0; @@ -79,7 +87,7 @@ wifi: add missing patch from 3.6.y tree to disable debug void rtw_proc_init_one(struct net_device *dev) { struct proc_dir_entry *dir_dev = NULL; -@@ -751,6 +763,7 @@ void rtw_proc_remove_one(struct net_devi +@@ -751,6 +763,7 @@ void rtw_proc_remove_one(struct net_device *dev) } } } @@ -87,9 +95,11 @@ wifi: add missing patch from 3.6.y tree to disable debug #endif uint loadparam( _adapter *padapter, _nic_hdl pnetdev); +diff --git a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +index 4c1089a..baccb59 100644 --- a/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c +++ b/drivers/net/wireless/rtl8192cu/os_dep/linux/usb_intf.c -@@ -138,6 +138,7 @@ static void rtw_dev_remove(struct usb_in +@@ -138,6 +138,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf); {USB_DEVICE(0x2001, 0x3307)},/* D-Link - Cameo */ \ {USB_DEVICE(0x2001, 0x330A)},/* D-Link - Alpha */ \ {USB_DEVICE(0x2001, 0x3309)},/* D-Link - Alpha */ \ @@ -97,3 +107,6 @@ wifi: add missing patch from 3.6.y tree to disable debug {USB_DEVICE(0x0586, 0x341F)},/* Zyxel - Abocom */ \ {USB_DEVICE(0x7392, 0x7822)},/* Edimax - Edimax */ \ {USB_DEVICE(0x2019, 0xAB2B)},/* Planex - Abocom */ \ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0099-mmc-Report-3.3V-support-in-caps.patch b/target/linux/brcm2708/patches-3.10/0099-mmc-Report-3.3V-support-in-caps.patch index f88e3d2e9cc..50113ae0dd7 100644 --- a/target/linux/brcm2708/patches-3.10/0099-mmc-Report-3.3V-support-in-caps.patch +++ b/target/linux/brcm2708/patches-3.10/0099-mmc-Report-3.3V-support-in-caps.patch @@ -1,7 +1,7 @@ -From c24b41600f008f5662a467de17644d26a0c269fd Mon Sep 17 00:00:00 2001 +From f88d56e9c6976ebd217993062e0e53d65877685b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 9 Nov 2013 17:42:58 +0000 -Subject: [PATCH 099/174] mmc: Report 3.3V support in caps +Subject: [PATCH 099/196] mmc: Report 3.3V support in caps sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstream code --- @@ -9,9 +9,11 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre drivers/mmc/host/sdhci.c | 82 ++++++++++++++++++++++------------------ 2 files changed, 47 insertions(+), 37 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 4770680..7fdd815 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1282,6 +1282,8 @@ static int sdhci_bcm2708_probe(struct pl +@@ -1282,6 +1282,8 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev) host_priv->dma_chan, host_priv->dma_chan_base, host_priv->dma_irq); @@ -20,9 +22,11 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre if (allow_highspeed) host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED; +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c +index 470860b..13e4e11 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -210,6 +210,14 @@ static void sdhci_spin_disable_schedule( +@@ -210,6 +210,14 @@ static void sdhci_spin_disable_schedule(struct sdhci_host *host) #endif } @@ -37,7 +41,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre static void sdhci_clear_set_irqs(struct sdhci_host *host, u32 clear, u32 set) { u32 ier; -@@ -374,7 +382,7 @@ static void sdhci_led_control(struct led +@@ -374,7 +382,7 @@ static void sdhci_led_control(struct led_classdev *led, struct sdhci_host *host = container_of(led, struct sdhci_host, led); unsigned long flags; @@ -46,7 +50,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre if (host->runtime_suspended) goto out; -@@ -384,7 +392,7 @@ static void sdhci_led_control(struct led +@@ -384,7 +392,7 @@ static void sdhci_led_control(struct led_classdev *led, else sdhci_activate_led(host); out: @@ -55,7 +59,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } #endif -@@ -1419,7 +1427,7 @@ static void sdhci_request(struct mmc_hos +@@ -1419,7 +1427,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) sdhci_runtime_pm_get(host); @@ -64,7 +68,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre WARN_ON(host->mrq != NULL); -@@ -1477,9 +1485,9 @@ static void sdhci_request(struct mmc_hos +@@ -1477,9 +1485,9 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) mmc->card->type == MMC_TYPE_MMC ? MMC_SEND_TUNING_BLOCK_HS200 : MMC_SEND_TUNING_BLOCK; @@ -76,7 +80,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre /* Restore original mmc_request structure */ host->mrq = mrq; -@@ -1493,7 +1501,7 @@ static void sdhci_request(struct mmc_hos +@@ -1493,7 +1501,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) } mmiowb(); @@ -85,7 +89,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) -@@ -1502,10 +1510,10 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1502,10 +1510,10 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) int vdd_bit = -1; u8 ctrl; @@ -98,7 +102,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre if (host->vmmc && ios->power_mode == MMC_POWER_OFF) mmc_regulator_set_ocr(host->mmc, host->vmmc, 0); return; -@@ -1532,9 +1540,9 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1532,9 +1540,9 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) vdd_bit = sdhci_set_power(host, ios->vdd); if (host->vmmc && vdd_bit != -1) { @@ -110,7 +114,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } if (host->ops->platform_send_init_74_clocks) -@@ -1672,7 +1680,7 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1672,7 +1680,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); mmiowb(); @@ -119,7 +123,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) -@@ -1720,7 +1728,7 @@ static int sdhci_check_ro(struct sdhci_h +@@ -1720,7 +1728,7 @@ static int sdhci_check_ro(struct sdhci_host *host) unsigned long flags; int is_readonly; @@ -128,7 +132,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre if (host->flags & SDHCI_DEVICE_DEAD) is_readonly = 0; -@@ -1730,7 +1738,7 @@ static int sdhci_check_ro(struct sdhci_h +@@ -1730,7 +1738,7 @@ static int sdhci_check_ro(struct sdhci_host *host) is_readonly = !(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_WRITE_PROTECT); @@ -137,7 +141,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre /* This quirk needs to be replaced by a callback-function later */ return host->quirks & SDHCI_QUIRK_INVERTED_WRITE_PROTECT ? -@@ -1803,9 +1811,9 @@ static void sdhci_enable_sdio_irq(struct +@@ -1803,9 +1811,9 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; @@ -149,7 +153,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, -@@ -2149,7 +2157,7 @@ static void sdhci_card_event(struct mmc_ +@@ -2149,7 +2157,7 @@ static void sdhci_card_event(struct mmc_host *mmc) struct sdhci_host *host = mmc_priv(mmc); unsigned long flags; @@ -158,7 +162,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre /* Check host->mrq first in case we are runtime suspended */ if (host->mrq && -@@ -2166,7 +2174,7 @@ static void sdhci_card_event(struct mmc_ +@@ -2166,7 +2174,7 @@ static void sdhci_card_event(struct mmc_host *mmc) tasklet_schedule(&host->finish_tasklet); } @@ -167,7 +171,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } static const struct mmc_host_ops sdhci_ops = { -@@ -2205,14 +2213,14 @@ static void sdhci_tasklet_finish(unsigne +@@ -2205,14 +2213,14 @@ static void sdhci_tasklet_finish(unsigned long param) host = (struct sdhci_host*)param; @@ -184,7 +188,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre return; } -@@ -2250,7 +2258,7 @@ static void sdhci_tasklet_finish(unsigne +@@ -2250,7 +2258,7 @@ static void sdhci_tasklet_finish(unsigned long param) #endif mmiowb(); @@ -193,7 +197,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre mmc_request_done(host->mmc, mrq); sdhci_runtime_pm_put(host); -@@ -2263,7 +2271,7 @@ static void sdhci_timeout_timer(unsigned +@@ -2263,7 +2271,7 @@ static void sdhci_timeout_timer(unsigned long data) host = (struct sdhci_host*)data; @@ -202,7 +206,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre if (host->mrq) { pr_err("%s: Timeout waiting for hardware " -@@ -2284,7 +2292,7 @@ static void sdhci_timeout_timer(unsigned +@@ -2284,7 +2292,7 @@ static void sdhci_timeout_timer(unsigned long data) } mmiowb(); @@ -211,7 +215,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } static void sdhci_tuning_timer(unsigned long data) -@@ -2294,11 +2302,11 @@ static void sdhci_tuning_timer(unsigned +@@ -2294,11 +2302,11 @@ static void sdhci_tuning_timer(unsigned long data) host = (struct sdhci_host *)data; @@ -225,7 +229,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } /*****************************************************************************\ -@@ -2522,10 +2530,10 @@ static irqreturn_t sdhci_irq(int irq, vo +@@ -2522,10 +2530,10 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) u32 intmask, unexpected = 0; int cardint = 0, max_loops = 16; @@ -247,7 +251,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre if (unexpected) { pr_err("%s: Unexpected interrupt 0x%08x.\n", -@@ -2791,15 +2799,15 @@ int sdhci_runtime_suspend_host(struct sd +@@ -2791,15 +2799,15 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host) host->flags &= ~SDHCI_NEEDS_RETUNING; } @@ -267,7 +271,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre return ret; } -@@ -2825,16 +2833,16 @@ int sdhci_runtime_resume_host(struct sdh +@@ -2825,16 +2833,16 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) sdhci_do_start_signal_voltage_switch(host, &host->mmc->ios); if ((host_flags & SDHCI_PV_ENABLED) && !(host->quirks2 & SDHCI_QUIRK2_PRESET_VALUE_BROKEN)) { @@ -287,7 +291,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre host->runtime_suspended = false; -@@ -2845,7 +2853,7 @@ int sdhci_runtime_resume_host(struct sdh +@@ -2845,7 +2853,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) /* Enable Card Detection */ sdhci_enable_card_detection(host); @@ -296,7 +300,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre return ret; } -@@ -3401,7 +3409,7 @@ void sdhci_remove_host(struct sdhci_host +@@ -3401,7 +3409,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) unsigned long flags; if (dead) { @@ -305,7 +309,7 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre host->flags |= SDHCI_DEVICE_DEAD; -@@ -3413,7 +3421,7 @@ void sdhci_remove_host(struct sdhci_host +@@ -3413,7 +3421,7 @@ void sdhci_remove_host(struct sdhci_host *host, int dead) tasklet_schedule(&host->finish_tasklet); } @@ -314,3 +318,6 @@ sdhci: Use macros for out spin lock/unlock functions to reduce diffs with upstre } sdhci_disable_card_detection(host); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0100-sdhci-sdhci_bcm2708_quirk_voltage_broken-appears-to-.patch b/target/linux/brcm2708/patches-3.10/0100-sdhci-sdhci_bcm2708_quirk_voltage_broken-appears-to-.patch index 770dd4d21fc..5056472c368 100644 --- a/target/linux/brcm2708/patches-3.10/0100-sdhci-sdhci_bcm2708_quirk_voltage_broken-appears-to-.patch +++ b/target/linux/brcm2708/patches-3.10/0100-sdhci-sdhci_bcm2708_quirk_voltage_broken-appears-to-.patch @@ -1,7 +1,7 @@ -From 45f717497730b7e98f3bd934ba09757748d8418d Mon Sep 17 00:00:00 2001 +From 2b7ffec03e2dda5b3f78a354668e9bf1945f5805 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 12 Nov 2013 23:01:30 +0000 -Subject: [PATCH 100/174] sdhci: sdhci_bcm2708_quirk_voltage_broken appears to +Subject: [PATCH 100/196] sdhci: sdhci_bcm2708_quirk_voltage_broken appears to be a no-op --- @@ -10,9 +10,11 @@ Subject: [PATCH 100/174] sdhci: sdhci_bcm2708_quirk_voltage_broken appears to drivers/mmc/host/sdhci.h | 1 - 3 files changed, 13 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 7fdd815..c775666 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1114,11 +1114,6 @@ static unsigned int sdhci_bcm2708_quirk_ +@@ -1114,11 +1114,6 @@ static unsigned int sdhci_bcm2708_quirk_spurious_crc_acmd51(struct sdhci_host *h return 1; } @@ -24,7 +26,7 @@ Subject: [PATCH 100/174] sdhci: sdhci_bcm2708_quirk_voltage_broken appears to static unsigned int sdhci_bcm2708_uhs_broken(struct sdhci_host *host) { return 1; -@@ -1155,7 +1150,6 @@ static struct sdhci_ops sdhci_bcm2708_op +@@ -1155,7 +1150,6 @@ static struct sdhci_ops sdhci_bcm2708_ops = { .pdma_reset = sdhci_bcm2708_platdma_reset, #endif .extra_ints = sdhci_bcm2708_quirk_extra_ints, @@ -32,9 +34,11 @@ Subject: [PATCH 100/174] sdhci: sdhci_bcm2708_quirk_voltage_broken appears to .uhs_broken = sdhci_bcm2708_uhs_broken, }; +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c +index 13e4e11..237158c 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -3245,12 +3245,6 @@ int sdhci_add_host(struct sdhci_host *ho +@@ -3245,12 +3245,6 @@ int sdhci_add_host(struct sdhci_host *host) SDHCI_MAX_CURRENT_MULTIPLIER; } @@ -47,6 +51,8 @@ Subject: [PATCH 100/174] sdhci: sdhci_bcm2708_quirk_voltage_broken appears to mmc->ocr_avail = ocr_avail; mmc->ocr_avail_sdio = ocr_avail; if (host->ocr_avail_sdio) +diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h +index cc393af..fc6fcf3 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -299,7 +299,6 @@ struct sdhci_ops { @@ -57,3 +63,6 @@ Subject: [PATCH 100/174] sdhci: sdhci_bcm2708_quirk_voltage_broken appears to unsigned int (*uhs_broken)(struct sdhci_host *host); unsigned int (*missing_status)(struct sdhci_host *host); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0101-sdhci-sdhci_bcm2708_uhs_broken-should-be-handled-thr.patch b/target/linux/brcm2708/patches-3.10/0101-sdhci-sdhci_bcm2708_uhs_broken-should-be-handled-thr.patch index 09e15fbce10..2c727f013b9 100644 --- a/target/linux/brcm2708/patches-3.10/0101-sdhci-sdhci_bcm2708_uhs_broken-should-be-handled-thr.patch +++ b/target/linux/brcm2708/patches-3.10/0101-sdhci-sdhci_bcm2708_uhs_broken-should-be-handled-thr.patch @@ -1,7 +1,7 @@ -From 68f187f8fa966229b9820edec5dda455bdff52ea Mon Sep 17 00:00:00 2001 +From 84a69f4eea629347522bcb4e7fe6a04ed687686e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 13 Nov 2013 11:40:56 +0000 -Subject: [PATCH 101/174] sdhci: sdhci_bcm2708_uhs_broken should be handled +Subject: [PATCH 101/196] sdhci: sdhci_bcm2708_uhs_broken should be handled through caps reported --- @@ -10,9 +10,11 @@ Subject: [PATCH 101/174] sdhci: sdhci_bcm2708_uhs_broken should be handled drivers/mmc/host/sdhci.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index c775666..2797ae6 100644 --- a/drivers/mmc/host/sdhci-bcm2708.c +++ b/drivers/mmc/host/sdhci-bcm2708.c -@@ -1114,11 +1114,6 @@ static unsigned int sdhci_bcm2708_quirk_ +@@ -1114,11 +1114,6 @@ static unsigned int sdhci_bcm2708_quirk_spurious_crc_acmd51(struct sdhci_host *h return 1; } @@ -24,7 +26,7 @@ Subject: [PATCH 101/174] sdhci: sdhci_bcm2708_uhs_broken should be handled static unsigned int sdhci_bcm2708_missing_status(struct sdhci_host *host) { return 1; -@@ -1150,7 +1145,6 @@ static struct sdhci_ops sdhci_bcm2708_op +@@ -1150,7 +1145,6 @@ static struct sdhci_ops sdhci_bcm2708_ops = { .pdma_reset = sdhci_bcm2708_platdma_reset, #endif .extra_ints = sdhci_bcm2708_quirk_extra_ints, @@ -32,9 +34,11 @@ Subject: [PATCH 101/174] sdhci: sdhci_bcm2708_uhs_broken should be handled }; /*****************************************************************************\ +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c +index 237158c..9c93e00 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -1581,7 +1581,7 @@ static void sdhci_do_set_ios(struct sdhc +@@ -1581,7 +1581,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios) else ctrl &= ~SDHCI_CTRL_HISPD; @@ -43,6 +47,8 @@ Subject: [PATCH 101/174] sdhci: sdhci_bcm2708_uhs_broken should be handled u16 clk, ctrl_2; /* In case of UHS-I modes, set High Speed Enable */ +diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h +index fc6fcf3..9c3970b 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -299,7 +299,6 @@ struct sdhci_ops { @@ -53,3 +59,6 @@ Subject: [PATCH 101/174] sdhci: sdhci_bcm2708_uhs_broken should be handled unsigned int (*missing_status)(struct sdhci_host *host); void (*hw_reset)(struct sdhci_host *host); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0102-lirc_rpi-Fix-return-from-incompatible-pointer-type-w.patch b/target/linux/brcm2708/patches-3.10/0102-lirc_rpi-Fix-return-from-incompatible-pointer-type-w.patch index 1e7b178a283..d1ff6e3ea8e 100644 --- a/target/linux/brcm2708/patches-3.10/0102-lirc_rpi-Fix-return-from-incompatible-pointer-type-w.patch +++ b/target/linux/brcm2708/patches-3.10/0102-lirc_rpi-Fix-return-from-incompatible-pointer-type-w.patch @@ -1,13 +1,15 @@ -From 1007843b7b431973897f0059c7025355fa3ff75d Mon Sep 17 00:00:00 2001 +From b80da4978ba9731cabeb3ab81fb15feca71a657d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Dragi=C4=87?= Date: Wed, 25 Sep 2013 18:20:09 +0200 -Subject: [PATCH 102/174] lirc_rpi: Fix return from incompatible pointer type +Subject: [PATCH 102/196] lirc_rpi: Fix return from incompatible pointer type warnings --- drivers/staging/media/lirc/lirc_rpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) +diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c +index 5bb0dfe..cb32042 100644 --- a/drivers/staging/media/lirc/lirc_rpi.c +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -63,13 +63,13 @@ static int gpio_in_pin = 18; @@ -27,7 +29,7 @@ Subject: [PATCH 102/174] lirc_rpi: Fix return from incompatible pointer type struct gpio_chip *gpiochip; struct irq_chip *irqchip; -@@ -678,7 +678,7 @@ MODULE_PARM_DESC(gpio_in_pin, "GPIO inpu +@@ -678,7 +678,7 @@ MODULE_PARM_DESC(gpio_in_pin, "GPIO input pin number of the BCM processor." " Valid pin numbers are: 0, 1, 4, 8, 7, 9, 10, 11, 14, 15," " 17, 18, 21, 22, 23, 24, 25, default 18"); @@ -36,3 +38,6 @@ Subject: [PATCH 102/174] lirc_rpi: Fix return from incompatible pointer type MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit" " (0 = active high, 1 = active low )"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0103-lirc_rpi-Don-t-register-with-lirc_dev-if-we-can-t-cl.patch b/target/linux/brcm2708/patches-3.10/0103-lirc_rpi-Don-t-register-with-lirc_dev-if-we-can-t-cl.patch index 9e026df20ba..e6f93b671a8 100644 --- a/target/linux/brcm2708/patches-3.10/0103-lirc_rpi-Don-t-register-with-lirc_dev-if-we-can-t-cl.patch +++ b/target/linux/brcm2708/patches-3.10/0103-lirc_rpi-Don-t-register-with-lirc_dev-if-we-can-t-cl.patch @@ -1,7 +1,7 @@ -From 72ce4c24efeac1b3260b3b10ec7cbc2701dcef5a Mon Sep 17 00:00:00 2001 +From a4a78ef42a4720e11e6489dc44936153e601d89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Dragi=C4=87?= Date: Wed, 25 Sep 2013 18:44:05 +0200 -Subject: [PATCH 103/174] lirc_rpi: Don't register with lirc_dev if we can't +Subject: [PATCH 103/196] lirc_rpi: Don't register with lirc_dev if we can't claim gpio pins Currently the lirc_rpi module always registers a new lirc device. @@ -13,6 +13,8 @@ Also, don't free gpio pins that we haven't claimed. drivers/staging/media/lirc/lirc_rpi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) +diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c +index cb32042..c76f696 100644 --- a/drivers/staging/media/lirc/lirc_rpi.c +++ b/drivers/staging/media/lirc/lirc_rpi.c @@ -590,8 +590,6 @@ static int __init lirc_rpi_init(void) @@ -24,7 +26,7 @@ Also, don't free gpio pins that we haven't claimed. platform_device_unregister(lirc_rpi_dev); platform_driver_unregister(&lirc_rpi_driver); lirc_buffer_free(&rbuf); -@@ -623,6 +621,10 @@ static int __init lirc_rpi_init_module(v +@@ -623,6 +621,10 @@ static int __init lirc_rpi_init_module(void) goto exit_rpi; } @@ -35,7 +37,7 @@ Also, don't free gpio pins that we haven't claimed. driver.features = LIRC_CAN_SET_SEND_DUTY_CYCLE | LIRC_CAN_SET_SEND_CARRIER | LIRC_CAN_SEND_PULSE | -@@ -640,10 +642,6 @@ static int __init lirc_rpi_init_module(v +@@ -640,10 +642,6 @@ static int __init lirc_rpi_init_module(void) printk(KERN_INFO LIRC_DRIVER_NAME ": driver registered!\n"); @@ -46,7 +48,7 @@ Also, don't free gpio pins that we haven't claimed. return 0; exit_rpi: -@@ -654,6 +652,9 @@ static int __init lirc_rpi_init_module(v +@@ -654,6 +652,9 @@ static int __init lirc_rpi_init_module(void) static void __exit lirc_rpi_exit_module(void) { @@ -56,3 +58,6 @@ Also, don't free gpio pins that we haven't claimed. lirc_rpi_exit(); lirc_unregister_driver(driver.minor); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0104-config-Add-CONFIG_MD_LINEAR.patch b/target/linux/brcm2708/patches-3.10/0104-config-Add-CONFIG_MD_LINEAR.patch index bb9f23d000d..b0bd7d5f378 100644 --- a/target/linux/brcm2708/patches-3.10/0104-config-Add-CONFIG_MD_LINEAR.patch +++ b/target/linux/brcm2708/patches-3.10/0104-config-Add-CONFIG_MD_LINEAR.patch @@ -1,12 +1,14 @@ -From 7d37ad9d31bf6188677dacbb69705bbca4c4db34 Mon Sep 17 00:00:00 2001 +From 6c529b1cd2e0be886a65f39f5206079058b58979 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 16 Nov 2013 18:38:33 +0000 -Subject: [PATCH 104/174] config: Add CONFIG_MD_LINEAR +Subject: [PATCH 104/196] config: Add CONFIG_MD_LINEAR --- arch/arm/configs/bcmrpi_defconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 20c1c4f..905cd2e 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -395,6 +395,7 @@ CONFIG_SCSI_ISCSI_ATTRS=y @@ -17,3 +19,6 @@ Subject: [PATCH 104/174] config: Add CONFIG_MD_LINEAR CONFIG_MD_RAID0=m CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0105-config-Add-CONFIG_IFB.patch b/target/linux/brcm2708/patches-3.10/0105-config-Add-CONFIG_IFB.patch index c393ac6e005..7f06c839c5d 100644 --- a/target/linux/brcm2708/patches-3.10/0105-config-Add-CONFIG_IFB.patch +++ b/target/linux/brcm2708/patches-3.10/0105-config-Add-CONFIG_IFB.patch @@ -1,12 +1,14 @@ -From bc4acbad80239f770ca05312d94e15285ede65f7 Mon Sep 17 00:00:00 2001 +From a19726c5fa90ffcb9e8f5e5d67ad73fd8d215d24 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Sat, 23 Nov 2013 11:47:00 +0000 -Subject: [PATCH 105/174] config: Add CONFIG_IFB +Subject: [PATCH 105/196] config: Add CONFIG_IFB --- arch/arm/configs/bcmrpi_defconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 905cd2e..2532583 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -408,6 +408,7 @@ CONFIG_DM_DELAY=m @@ -17,3 +19,6 @@ Subject: [PATCH 105/174] config: Add CONFIG_IFB CONFIG_MACVLAN=m CONFIG_NETCONSOLE=m CONFIG_TUN=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0106-dvb-Add-support-for-CableStar-Device.patch b/target/linux/brcm2708/patches-3.10/0106-dvb-Add-support-for-CableStar-Device.patch index a986002289f..58d4ace2341 100644 --- a/target/linux/brcm2708/patches-3.10/0106-dvb-Add-support-for-CableStar-Device.patch +++ b/target/linux/brcm2708/patches-3.10/0106-dvb-Add-support-for-CableStar-Device.patch @@ -1,13 +1,15 @@ -From 3afa67312a9675ac945cffd9499341a19d55c94d Mon Sep 17 00:00:00 2001 +From 2a8704be59bf6566d55cdc7e2b905173e7a6b71c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 27 Nov 2013 22:52:53 +0000 -Subject: [PATCH 106/174] dvb: Add support for CableStar Device +Subject: [PATCH 106/196] dvb: Add support for CableStar Device --- drivers/media/dvb-core/dvb-usb-ids.h | 1 + drivers/media/usb/dvb-usb-v2/az6007.c | 59 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) +diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h +index 335a8f4..110c197 100644 --- a/drivers/media/dvb-core/dvb-usb-ids.h +++ b/drivers/media/dvb-core/dvb-usb-ids.h @@ -365,6 +365,7 @@ @@ -18,9 +20,11 @@ Subject: [PATCH 106/174] dvb: Add support for CableStar Device #define USB_PID_TECHNISAT_AIRSTAR_TELESTICK_2 0x0004 #define USB_PID_TECHNISAT_USB2_DVB_S2 0x0500 #endif +diff --git a/drivers/media/usb/dvb-usb-v2/az6007.c b/drivers/media/usb/dvb-usb-v2/az6007.c +index 44c64ef3..c1051c3 100644 --- a/drivers/media/usb/dvb-usb-v2/az6007.c +++ b/drivers/media/usb/dvb-usb-v2/az6007.c -@@ -68,6 +68,19 @@ static struct drxk_config terratec_h7_dr +@@ -68,6 +68,19 @@ static struct drxk_config terratec_h7_drxk = { .microcode_name = "dvb-usb-terratec-h7-drxk.fw", }; @@ -40,7 +44,7 @@ Subject: [PATCH 106/174] dvb: Add support for CableStar Device static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable) { struct az6007_device_state *st = fe_to_priv(fe); -@@ -630,6 +643,27 @@ static int az6007_frontend_attach(struct +@@ -630,6 +643,27 @@ static int az6007_frontend_attach(struct dvb_usb_adapter *adap) return 0; } @@ -68,7 +72,7 @@ Subject: [PATCH 106/174] dvb: Add support for CableStar Device static int az6007_tuner_attach(struct dvb_usb_adapter *adap) { struct dvb_usb_device *d = adap_to_d(adap); -@@ -868,6 +902,29 @@ static struct dvb_usb_device_properties +@@ -868,6 +902,29 @@ static struct dvb_usb_device_properties az6007_props = { } }; @@ -98,7 +102,7 @@ Subject: [PATCH 106/174] dvb: Add support for CableStar Device static struct usb_device_id az6007_usb_table[] = { {DVB_USB_DEVICE(USB_VID_AZUREWAVE, USB_PID_AZUREWAVE_6007, &az6007_props, "Azurewave 6007", RC_MAP_EMPTY)}, -@@ -875,6 +932,8 @@ static struct usb_device_id az6007_usb_t +@@ -875,6 +932,8 @@ static struct usb_device_id az6007_usb_table[] = { &az6007_props, "Terratec H7", RC_MAP_NEC_TERRATEC_CINERGY_XS)}, {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7_2, &az6007_props, "Terratec H7", RC_MAP_NEC_TERRATEC_CINERGY_XS)}, @@ -107,3 +111,6 @@ Subject: [PATCH 106/174] dvb: Add support for CableStar Device {0}, }; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0107-sdhci-Only-do-one-iteration-of-PIO-reading-loop.patch b/target/linux/brcm2708/patches-3.10/0107-sdhci-Only-do-one-iteration-of-PIO-reading-loop.patch index a1c5067282e..8e3dfb9fa70 100644 --- a/target/linux/brcm2708/patches-3.10/0107-sdhci-Only-do-one-iteration-of-PIO-reading-loop.patch +++ b/target/linux/brcm2708/patches-3.10/0107-sdhci-Only-do-one-iteration-of-PIO-reading-loop.patch @@ -1,15 +1,17 @@ -From e397b0cf1aee50664b423f716d6843b2a2010093 Mon Sep 17 00:00:00 2001 +From cb78955cb0bedd81351bbe017dd5642f1358148d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 20 Nov 2013 11:22:05 +0000 -Subject: [PATCH 107/174] sdhci: Only do one iteration of PIO reading loop +Subject: [PATCH 107/196] sdhci: Only do one iteration of PIO reading loop --- drivers/mmc/host/sdhci.c | 1 + 1 file changed, 1 insertion(+) +diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c +index 9c93e00..b4faaff 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c -@@ -539,6 +539,7 @@ static void sdhci_transfer_pio(struct sd +@@ -539,6 +539,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host, u32 intstate) break; state = sdhci_readl(host, SDHCI_PRESENT_STATE); available = state & mask; @@ -17,3 +19,6 @@ Subject: [PATCH 107/174] sdhci: Only do one iteration of PIO reading loop } DBG("PIO transfer complete - %d blocks left.\n", host->blocks); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0108-vchiq-create_pagelist-copes-with-vmalloc-memory.patch b/target/linux/brcm2708/patches-3.10/0108-vchiq-create_pagelist-copes-with-vmalloc-memory.patch index c2e25e1fdd2..befcaa1a821 100644 --- a/target/linux/brcm2708/patches-3.10/0108-vchiq-create_pagelist-copes-with-vmalloc-memory.patch +++ b/target/linux/brcm2708/patches-3.10/0108-vchiq-create_pagelist-copes-with-vmalloc-memory.patch @@ -1,16 +1,18 @@ -From 974102eef65cd2576157b089db47386c5b29dee6 Mon Sep 17 00:00:00 2001 +From f3978e548747dfe988016ef7c99fe50975da90df Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 2 Sep 2013 16:44:57 +0100 -Subject: [PATCH 108/174] vchiq: create_pagelist copes with vmalloc memory +Subject: [PATCH 108/196] vchiq: create_pagelist copes with vmalloc memory Signed-off-by: Daniel Stone --- .../interface/vchiq_arm/vchiq_2835_arm.c | 83 ++++++++++++++-------- 1 file changed, 53 insertions(+), 30 deletions(-) +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +index 2b5fa56..b3bdaa2 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c -@@ -374,6 +374,7 @@ create_pagelist(char __user *buf, size_t +@@ -374,6 +374,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, unsigned int num_pages, offset, i; char *addr, *base_addr, *next_addr; int run, addridx, actual_pages; @@ -18,7 +20,7 @@ Signed-off-by: Daniel Stone offset = (unsigned int)buf & (PAGE_SIZE - 1); num_pages = (count + offset + PAGE_SIZE - 1) / PAGE_SIZE; -@@ -384,9 +385,10 @@ create_pagelist(char __user *buf, size_t +@@ -384,9 +385,10 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, ** list */ pagelist = kmalloc(sizeof(PAGELIST_T) + @@ -32,7 +34,7 @@ Signed-off-by: Daniel Stone vchiq_log_trace(vchiq_arm_log_level, "create_pagelist - %x", (unsigned int)pagelist); -@@ -394,28 +396,44 @@ create_pagelist(char __user *buf, size_t +@@ -394,28 +396,44 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, return -ENOMEM; addrs = pagelist->addrs; @@ -98,7 +100,7 @@ Signed-off-by: Daniel Stone pagelist->length = count; pagelist->type = type; -@@ -482,6 +500,7 @@ create_pagelist(char __user *buf, size_t +@@ -482,6 +500,7 @@ create_pagelist(char __user *buf, size_t count, unsigned short type, static void free_pagelist(PAGELIST_T *pagelist, int actual) { @@ -106,7 +108,7 @@ Signed-off-by: Daniel Stone struct page **pages; unsigned int num_pages, i; -@@ -492,7 +511,8 @@ free_pagelist(PAGELIST_T *pagelist, int +@@ -492,7 +511,8 @@ free_pagelist(PAGELIST_T *pagelist, int actual) (pagelist->length + pagelist->offset + PAGE_SIZE - 1) / PAGE_SIZE; @@ -116,7 +118,7 @@ Signed-off-by: Daniel Stone /* Deal with any partial cache lines (fragments) */ if (pagelist->type >= PAGELIST_READ_WITH_FRAGMENTS) { -@@ -528,11 +548,14 @@ free_pagelist(PAGELIST_T *pagelist, int +@@ -528,11 +548,14 @@ free_pagelist(PAGELIST_T *pagelist, int actual) up(&g_free_fragments_sema); } @@ -136,3 +138,6 @@ Signed-off-by: Daniel Stone kfree(pagelist); } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch b/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch index fa8e79ccb87..0442280e42b 100644 --- a/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch +++ b/target/linux/brcm2708/patches-3.10/0109-vchiq-fix-the-shim-message-release.patch @@ -1,16 +1,18 @@ -From 6d8dc87966b488c93a365657588690137de13ed1 Mon Sep 17 00:00:00 2001 +From 4791194922d8ab361136d462a23e897b459d1a2a Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 30 Sep 2013 17:04:55 +0100 -Subject: [PATCH 109/174] vchiq: fix the shim message release +Subject: [PATCH 109/196] vchiq: fix the shim message release Signed-off-by: Daniel Stone --- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 47 +++++++++++++--------- 1 file changed, 29 insertions(+), 18 deletions(-) +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c +index f752f8d..fe9bd80 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c -@@ -545,47 +545,58 @@ static VCHIQ_STATUS_T shim_callback(VCHI +@@ -545,47 +545,58 @@ static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason, SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)VCHIQ_GET_SERVICE_USERDATA(handle); @@ -87,3 +89,6 @@ Signed-off-by: Daniel Stone return VCHIQ_SUCCESS; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0110-vchiq-export-additional-symbols.patch b/target/linux/brcm2708/patches-3.10/0110-vchiq-export-additional-symbols.patch index d92b9e82f7e..41fcca5ed85 100644 --- a/target/linux/brcm2708/patches-3.10/0110-vchiq-export-additional-symbols.patch +++ b/target/linux/brcm2708/patches-3.10/0110-vchiq-export-additional-symbols.patch @@ -1,16 +1,18 @@ -From f5a30bc0daed31795078a29b13f85c48613ccd65 Mon Sep 17 00:00:00 2001 +From c213b1ef30855c2a795bd622b9ae1cee38ba0958 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 9 Nov 2013 22:37:21 +0000 -Subject: [PATCH 110/174] vchiq: export additional symbols +Subject: [PATCH 110/196] vchiq: export additional symbols Signed-off-by: Daniel Stone --- drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c +index fe9bd80..a0b069d 100644 --- a/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c -@@ -405,6 +405,7 @@ int32_t vchi_held_msg_release(VCHI_HELD_ +@@ -405,6 +405,7 @@ int32_t vchi_held_msg_release(VCHI_HELD_MSG_T *message) return 0; } @@ -18,7 +20,7 @@ Signed-off-by: Daniel Stone /*********************************************************** * Name: vchi_msg_hold -@@ -450,6 +451,7 @@ int32_t vchi_msg_hold(VCHI_SERVICE_HANDL +@@ -450,6 +451,7 @@ int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, return 0; } @@ -26,3 +28,6 @@ Signed-off-by: Daniel Stone /*********************************************************** * Name: vchi_initialise +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch b/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch index 8f731afe879..5f954567a90 100644 --- a/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch +++ b/target/linux/brcm2708/patches-3.10/0111-bcm2835-add-v4l2-camera-device.patch @@ -1,7 +1,7 @@ -From 2ba75a0486033660ce65c2dd2406d619fe73a20b Mon Sep 17 00:00:00 2001 +From 8a7d7b13afa19d8a7140df042cf3045c37d0ce28 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 30 Jan 2013 12:45:18 +0000 -Subject: [PATCH 111/174] bcm2835: add v4l2 camera device +Subject: [PATCH 111/196] bcm2835: add v4l2 camera device - Supports raw YUV capture, preview, JPEG and H264. - Uses videobuf2 for data transfer, using dma_buf. @@ -46,6 +46,9 @@ Signed-off-by: Luke Diamand create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.c create mode 100644 drivers/media/platform/bcm2835/mmal-vchiq.h +diff --git a/Documentation/video4linux/bcm2835-v4l2.txt b/Documentation/video4linux/bcm2835-v4l2.txt +new file mode 100644 +index 0000000..c585a8f --- /dev/null +++ b/Documentation/video4linux/bcm2835-v4l2.txt @@ -0,0 +1,60 @@ @@ -109,6 +112,8 @@ Signed-off-by: Luke Diamand +List of available formats: + +$ v4l2-ctl --list-formats +diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig +index 0494d27..8e6d48b 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -124,6 +124,7 @@ config VIDEO_S3C_CAMIF @@ -119,6 +124,8 @@ Signed-off-by: Luke Diamand endif # V4L_PLATFORM_DRIVERS +diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile +index eee28dd..29be30c 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -50,4 +50,6 @@ obj-y += davinci/ @@ -128,6 +135,9 @@ Signed-off-by: Luke Diamand +obj-$(CONFIG_VIDEO_BCM2835) += bcm2835/ + ccflags-y += -I$(srctree)/drivers/media/i2c +diff --git a/drivers/media/platform/bcm2835/Kconfig b/drivers/media/platform/bcm2835/Kconfig +new file mode 100644 +index 0000000..a8fd172 --- /dev/null +++ b/drivers/media/platform/bcm2835/Kconfig @@ -0,0 +1,25 @@ @@ -156,6 +166,9 @@ Signed-off-by: Luke Diamand + + +endif # VIDEO_BM2835 +diff --git a/drivers/media/platform/bcm2835/Makefile b/drivers/media/platform/bcm2835/Makefile +new file mode 100644 +index 0000000..f17c79c --- /dev/null +++ b/drivers/media/platform/bcm2835/Makefile @@ -0,0 +1,5 @@ @@ -164,6 +177,9 @@ Signed-off-by: Luke Diamand +obj-$(CONFIG_VIDEO_BCM2835_MMAL) += bcm2835-v4l2.o + +ccflags-$(CONFIG_VIDEO_BCM2835) += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +new file mode 100644 +index 0000000..47fe45d --- /dev/null +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -0,0 +1,1478 @@ @@ -1645,6 +1661,9 @@ Signed-off-by: Luke Diamand + +module_init(bm2835_mmal_init); +module_exit(bm2835_mmal_exit); +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +new file mode 100644 +index 0000000..883eab7 --- /dev/null +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -0,0 +1,113 @@ @@ -1761,6 +1780,9 @@ Signed-off-by: Luke Diamand + (pix_fmt)->pixelformat, (pix_fmt)->bytesperline, \ + (pix_fmt)->sizeimage, (pix_fmt)->colorspace, (pix_fmt)->priv); \ +} +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +new file mode 100644 +index 0000000..d1408e5 --- /dev/null +++ b/drivers/media/platform/bcm2835/controls.c @@ -0,0 +1,725 @@ @@ -2489,6 +2511,9 @@ Signed-off-by: Luke Diamand + + return 0; +} +diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h +new file mode 100644 +index 0000000..602b4a7 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-common.h @@ -0,0 +1,52 @@ @@ -2544,6 +2569,9 @@ Signed-off-by: Luke Diamand + u32 v; +}; + +diff --git a/drivers/media/platform/bcm2835/mmal-encodings.h b/drivers/media/platform/bcm2835/mmal-encodings.h +new file mode 100644 +index 0000000..856e80e --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-encodings.h @@ -0,0 +1,93 @@ @@ -2640,6 +2668,9 @@ Signed-off-by: Luke Diamand +#define MMAL_ENCODING_VARIANT_H264_AVC1 MMAL_FOURCC('A', 'V', 'C', '1') +/** Implicitly delineated NAL units without emulation prevention */ +#define MMAL_ENCODING_VARIANT_H264_RAW MMAL_FOURCC('R', 'A', 'W', ' ') +diff --git a/drivers/media/platform/bcm2835/mmal-msg-common.h b/drivers/media/platform/bcm2835/mmal-msg-common.h +new file mode 100644 +index 0000000..66e8a6e --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-common.h @@ -0,0 +1,50 @@ @@ -2693,6 +2724,9 @@ Signed-off-by: Luke Diamand +}; + +#endif /* MMAL_MSG_COMMON_H */ +diff --git a/drivers/media/platform/bcm2835/mmal-msg-format.h b/drivers/media/platform/bcm2835/mmal-msg-format.h +new file mode 100644 +index 0000000..123d86e --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-format.h @@ -0,0 +1,81 @@ @@ -2777,6 +2811,9 @@ Signed-off-by: Luke Diamand +}; + +#endif /* MMAL_MSG_FORMAT_H */ +diff --git a/drivers/media/platform/bcm2835/mmal-msg-port.h b/drivers/media/platform/bcm2835/mmal-msg-port.h +new file mode 100644 +index 0000000..a55c1ea --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg-port.h @@ -0,0 +1,107 @@ @@ -2887,6 +2924,9 @@ Signed-off-by: Luke Diamand + */ + +}; +diff --git a/drivers/media/platform/bcm2835/mmal-msg.h b/drivers/media/platform/bcm2835/mmal-msg.h +new file mode 100644 +index 0000000..67b1076 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-msg.h @@ -0,0 +1,404 @@ @@ -3294,6 +3334,9 @@ Signed-off-by: Luke Diamand + u8 payload[MMAL_MSG_MAX_PAYLOAD]; + } u; +}; +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +new file mode 100644 +index 0000000..c611b58 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -0,0 +1,539 @@ @@ -3836,6 +3879,9 @@ Signed-off-by: Luke Diamand + u32 num_effect_params; + u32 effect_parameter[MMAL_MAX_IMAGEFX_PARAMETERS]; +}; +diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c +new file mode 100644 +index 0000000..a06fb44 --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-vchiq.c @@ -0,0 +1,1916 @@ @@ -5755,6 +5801,9 @@ Signed-off-by: Luke Diamand + kfree(instance); + return -ENODEV; +} +diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.h b/drivers/media/platform/bcm2835/mmal-vchiq.h +new file mode 100644 +index 0000000..9d1d11e --- /dev/null +++ b/drivers/media/platform/bcm2835/mmal-vchiq.h @@ -0,0 +1,178 @@ @@ -5936,3 +5985,6 @@ Signed-off-by: Luke Diamand + struct mmal_buffer *buf); + +#endif /* MMAL_VCHIQ_H */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0112-config-Enable-V4L-MMAL-driver.patch b/target/linux/brcm2708/patches-3.10/0112-config-Enable-V4L-MMAL-driver.patch index 8384b1c6b18..0a14f7d9f7e 100644 --- a/target/linux/brcm2708/patches-3.10/0112-config-Enable-V4L-MMAL-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0112-config-Enable-V4L-MMAL-driver.patch @@ -1,12 +1,14 @@ -From de21dc3310c018b1d90a51b7eaf89329f2a1d5c9 Mon Sep 17 00:00:00 2001 +From 23658a07c8ae6a98513a97bb961ce3715b8fbb5a Mon Sep 17 00:00:00 2001 From: popcornmix Date: Mon, 2 Dec 2013 16:57:44 +0000 -Subject: [PATCH 112/174] config: Enable V4L / MMAL driver +Subject: [PATCH 112/196] config: Enable V4L / MMAL driver --- arch/arm/configs/bcmrpi_defconfig | 3 +++ 1 file changed, 3 insertions(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 2532583..76f3ad7 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -687,6 +687,9 @@ CONFIG_DVB_B2C2_FLEXCOP_USB=m @@ -19,3 +21,6 @@ Subject: [PATCH 112/174] config: Enable V4L / MMAL driver CONFIG_RADIO_SI470X=y CONFIG_USB_SI470X=m CONFIG_I2C_SI470X=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0113-config-Add-BCACHE.patch b/target/linux/brcm2708/patches-3.10/0113-config-Add-BCACHE.patch index 34d2c837798..b71088d2274 100644 --- a/target/linux/brcm2708/patches-3.10/0113-config-Add-BCACHE.patch +++ b/target/linux/brcm2708/patches-3.10/0113-config-Add-BCACHE.patch @@ -1,12 +1,14 @@ -From 7720663aca3ed9b1ecb3a9db8f463b285ed42ba8 Mon Sep 17 00:00:00 2001 +From f91920fb2180c878ddcf5168addefecbfb29a7cd Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 5 Dec 2013 16:42:37 +0000 -Subject: [PATCH 113/174] config: Add BCACHE +Subject: [PATCH 113/196] config: Add BCACHE --- arch/arm/configs/bcmrpi_defconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 76f3ad7..1a0b8d9 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -397,6 +397,7 @@ CONFIG_ISCSI_BOOT_SYSFS=m @@ -17,3 +19,6 @@ Subject: [PATCH 113/174] config: Add BCACHE CONFIG_BLK_DEV_DM=m CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0114-dmaengine-Add-support-for-BCM2708.patch b/target/linux/brcm2708/patches-3.10/0114-dmaengine-Add-support-for-BCM2708.patch index e1829208aae..9a21509f205 100644 --- a/target/linux/brcm2708/patches-3.10/0114-dmaengine-Add-support-for-BCM2708.patch +++ b/target/linux/brcm2708/patches-3.10/0114-dmaengine-Add-support-for-BCM2708.patch @@ -1,7 +1,7 @@ -From 5fa4eb7d17acff35c1ea9a7def5dec5802566565 Mon Sep 17 00:00:00 2001 +From f7a2665c5c7690e769a6010a88e2aca3477e5b1f Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:22:53 +0100 -Subject: [PATCH 114/174] dmaengine: Add support for BCM2708 +Subject: [PATCH 114/196] dmaengine: Add support for BCM2708 Add support for DMA controller of BCM2708 as used in the Raspberry Pi. Currently it only supports cyclic DMA. @@ -14,6 +14,8 @@ Signed-off-by: Florian Meier 3 files changed, 595 insertions(+) create mode 100644 drivers/dma/bcm2708-dmaengine.c +diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig +index 0ba5a95..9a99add 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -305,6 +305,12 @@ config DMA_OMAP @@ -29,6 +31,8 @@ Signed-off-by: Florian Meier config MMP_PDMA bool "MMP PDMA support" depends on (ARCH_MMP || ARCH_PXA) +diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile +index a2b0df5..d0f5b32 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -37,4 +37,5 @@ obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o @@ -37,6 +41,9 @@ Signed-off-by: Florian Meier obj-$(CONFIG_DMA_OMAP) += omap-dma.o +obj-$(CONFIG_DMA_BCM2708) += bcm2708-dmaengine.o obj-$(CONFIG_MMP_PDMA) += mmp_pdma.o +diff --git a/drivers/dma/bcm2708-dmaengine.c b/drivers/dma/bcm2708-dmaengine.c +new file mode 100644 +index 0000000..3ba3cec --- /dev/null +++ b/drivers/dma/bcm2708-dmaengine.c @@ -0,0 +1,588 @@ @@ -628,3 +635,6 @@ Signed-off-by: Florian Meier +MODULE_DESCRIPTION("BCM2708 DMA engine driver"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0115-ASoC-core-Add-API-for-configuration-of-DAI-BCLK-rati.patch b/target/linux/brcm2708/patches-3.10/0115-ASoC-core-Add-API-for-configuration-of-DAI-BCLK-rati.patch index 3a3f7916c86..763bd541d16 100644 --- a/target/linux/brcm2708/patches-3.10/0115-ASoC-core-Add-API-for-configuration-of-DAI-BCLK-rati.patch +++ b/target/linux/brcm2708/patches-3.10/0115-ASoC-core-Add-API-for-configuration-of-DAI-BCLK-rati.patch @@ -1,7 +1,7 @@ -From 5c080b18934d9dcea2bf902c09d640daf6fe49d4 Mon Sep 17 00:00:00 2001 +From 573a4bcbf022cae315a2b40ddd7b96c29d22971a Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 16 Sep 2013 13:01:46 +0100 -Subject: [PATCH 115/174] ASoC: core: Add API for configuration of DAI BCLK +Subject: [PATCH 115/196] ASoC: core: Add API for configuration of DAI BCLK ratio Some codec drivers when running in slave mode require that BCLK to sample rate ratio @@ -18,9 +18,11 @@ Signed-off-by: Mark Brown sound/soc/soc-core.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) +diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h +index ae9a227..d8acf0c 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h -@@ -105,6 +105,8 @@ int snd_soc_dai_set_clkdiv(struct snd_so +@@ -105,6 +105,8 @@ int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, int snd_soc_dai_set_pll(struct snd_soc_dai *dai, int pll_id, int source, unsigned int freq_in, unsigned int freq_out); @@ -37,9 +39,11 @@ Signed-off-by: Mark Brown /* * DAI format configuration +diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c +index d56bbea..d18272c 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c -@@ -3463,6 +3463,22 @@ int snd_soc_codec_set_pll(struct snd_soc +@@ -3463,6 +3463,22 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, EXPORT_SYMBOL_GPL(snd_soc_codec_set_pll); /** @@ -62,3 +66,6 @@ Signed-off-by: Mark Brown * snd_soc_dai_set_fmt - configure DAI hardware audio format. * @dai: DAI * @fmt: SND_SOC_DAIFMT_ format value. +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0116-ASoC-Add-support-for-BCM2708.patch b/target/linux/brcm2708/patches-3.10/0116-ASoC-Add-support-for-BCM2708.patch index 28a801aa92a..0a26124b176 100644 --- a/target/linux/brcm2708/patches-3.10/0116-ASoC-Add-support-for-BCM2708.patch +++ b/target/linux/brcm2708/patches-3.10/0116-ASoC-Add-support-for-BCM2708.patch @@ -1,7 +1,7 @@ -From f3c21ba6458e497638d4a006645f055b63288168 Mon Sep 17 00:00:00 2001 +From a4d16d8d405371163b4dd7d7fc8d8e23569e1d63 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:33:38 +0100 -Subject: [PATCH 116/174] ASoC: Add support for BCM2708 +Subject: [PATCH 116/196] ASoC: Add support for BCM2708 This driver adds support for digital audio (I2S) for the BCM2708 SoC that is used by the @@ -22,6 +22,8 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/bcm/Makefile create mode 100644 sound/soc/bcm/bcm2708-i2s.c +diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig +index 9e675c7..0e63522 100644 --- a/sound/soc/Kconfig +++ b/sound/soc/Kconfig @@ -36,6 +36,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM @@ -32,6 +34,8 @@ Signed-off-by: Florian Meier source "sound/soc/blackfin/Kconfig" source "sound/soc/cirrus/Kconfig" source "sound/soc/davinci/Kconfig" +diff --git a/sound/soc/Makefile b/sound/soc/Makefile +index 197b6ae..e61febc 100644 --- a/sound/soc/Makefile +++ b/sound/soc/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_SND_SOC) += codecs/ @@ -42,6 +46,9 @@ Signed-off-by: Florian Meier obj-$(CONFIG_SND_SOC) += blackfin/ obj-$(CONFIG_SND_SOC) += cirrus/ obj-$(CONFIG_SND_SOC) += davinci/ +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +new file mode 100644 +index 0000000..37c8f8c --- /dev/null +++ b/sound/soc/bcm/Kconfig @@ -0,0 +1,10 @@ @@ -55,6 +62,9 @@ Signed-off-by: Florian Meier + Say Y or M if you want to add support for codecs attached to + the BCM2708 I2S interface. You will also need + to select the audio interfaces to support below. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +new file mode 100644 +index 0000000..486ea09 --- /dev/null +++ b/sound/soc/bcm/Makefile @@ -0,0 +1,4 @@ @@ -62,6 +72,9 @@ Signed-off-by: Florian Meier +snd-soc-bcm2708-i2s-objs := bcm2708-i2s.o + +obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd-soc-bcm2708-i2s.o +diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c +new file mode 100644 +index 0000000..ebaf3d6 --- /dev/null +++ b/sound/soc/bcm/bcm2708-i2s.c @@ -0,0 +1,940 @@ @@ -1005,3 +1018,6 @@ Signed-off-by: Florian Meier +MODULE_DESCRIPTION("BCM2708 I2S interface"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0117-BCM2708-Extend-mach-header.patch b/target/linux/brcm2708/patches-3.10/0117-BCM2708-Extend-mach-header.patch index 6cfc17d3f76..73226b4b7b7 100644 --- a/target/linux/brcm2708/patches-3.10/0117-BCM2708-Extend-mach-header.patch +++ b/target/linux/brcm2708/patches-3.10/0117-BCM2708-Extend-mach-header.patch @@ -1,7 +1,7 @@ -From a35663826cfd0dea9a44d7b7a506ce9db9c703e3 Mon Sep 17 00:00:00 2001 +From 4b91c17e8ac97e4326df2068a56a3ead2b920e93 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:37:51 +0100 -Subject: [PATCH 117/174] BCM2708: Extend mach header +Subject: [PATCH 117/196] BCM2708: Extend mach header Extend the headers of the mach-bcm2708 in order to support I2S and DMA engine. @@ -12,6 +12,8 @@ Signed-off-by: Florian Meier arch/arm/mach-bcm2708/include/mach/platform.h | 2 ++ 2 files changed, 4 insertions(+) +diff --git a/arch/arm/mach-bcm2708/include/mach/dma.h b/arch/arm/mach-bcm2708/include/mach/dma.h +index ac7a4a0..f2568d4 100644 --- a/arch/arm/mach-bcm2708/include/mach/dma.h +++ b/arch/arm/mach-bcm2708/include/mach/dma.h @@ -45,6 +45,8 @@ @@ -23,6 +25,8 @@ Signed-off-by: Florian Meier #define BCM2708_DMA_NEXTCB 0x1C #define BCM2708_DMA_DEBUG 0x20 +diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h +index 992a630..2e7e1bb 100644 --- a/arch/arm/mach-bcm2708/include/mach/platform.h +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -62,10 +62,12 @@ @@ -38,3 +42,6 @@ Signed-off-by: Florian Meier #define SPI0_BASE (BCM2708_PERI_BASE + 0x204000) /* SPI0 */ #define BSC0_BASE (BCM2708_PERI_BASE + 0x205000) /* BSC0 I2C/TWI */ #define UART1_BASE (BCM2708_PERI_BASE + 0x215000) /* Uart 1 */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0118-ASoC-Add-support-for-PCM5102A-codec.patch b/target/linux/brcm2708/patches-3.10/0118-ASoC-Add-support-for-PCM5102A-codec.patch index 811dfa02972..587135d0da3 100644 --- a/target/linux/brcm2708/patches-3.10/0118-ASoC-Add-support-for-PCM5102A-codec.patch +++ b/target/linux/brcm2708/patches-3.10/0118-ASoC-Add-support-for-PCM5102A-codec.patch @@ -1,7 +1,7 @@ -From bce5adc2ee7a7332909ccdc6bc6f8bda17d85bbf Mon Sep 17 00:00:00 2001 +From 8f5751798e712bae5a2ff370368745a3464b2027 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 14:59:51 +0100 -Subject: [PATCH 118/174] ASoC: Add support for PCM5102A codec +Subject: [PATCH 118/196] ASoC: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. @@ -14,6 +14,8 @@ Signed-off-by: Florian Meier 3 files changed, 69 insertions(+) create mode 100644 sound/soc/codecs/pcm5102a.c +diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig +index 2f45f00..7c43413 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -55,6 +55,7 @@ config SND_SOC_ALL_CODECS @@ -34,6 +36,8 @@ Signed-off-by: Florian Meier config SND_SOC_RT5631 tristate +diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile +index b9e41c9..0677eb5 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -43,6 +43,7 @@ snd-soc-mc13783-objs := mc13783.o @@ -44,7 +48,7 @@ Signed-off-by: Florian Meier snd-soc-rt5631-objs := rt5631.o snd-soc-sgtl5000-objs := sgtl5000.o snd-soc-alc5623-objs := alc5623.o -@@ -170,6 +171,7 @@ obj-$(CONFIG_SND_SOC_MC13783) += snd-soc +@@ -170,6 +171,7 @@ obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o obj-$(CONFIG_SND_SOC_ML26124) += snd-soc-ml26124.o obj-$(CONFIG_SND_SOC_OMAP_HDMI_CODEC) += snd-soc-omap-hdmi-codec.o obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o @@ -52,6 +56,9 @@ Signed-off-by: Florian Meier obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o +diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c +new file mode 100644 +index 0000000..126f1e9 --- /dev/null +++ b/sound/soc/codecs/pcm5102a.c @@ -0,0 +1,63 @@ @@ -118,3 +125,6 @@ Signed-off-by: Florian Meier +MODULE_DESCRIPTION("ASoC PCM5102A codec driver"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0119-BCM2708-Add-I2S-support-to-board-file.patch b/target/linux/brcm2708/patches-3.10/0119-BCM2708-Add-I2S-support-to-board-file.patch index 47eb6dd1f91..5b9f2c1470e 100644 --- a/target/linux/brcm2708/patches-3.10/0119-BCM2708-Add-I2S-support-to-board-file.patch +++ b/target/linux/brcm2708/patches-3.10/0119-BCM2708-Add-I2S-support-to-board-file.patch @@ -1,7 +1,7 @@ -From d873c79a7f4c512b41644d3f140d17e662ffde5e Mon Sep 17 00:00:00 2001 +From 2c64d1db0de9c5fecc7a7ca44a1a8b0d85eddfbe Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:04:54 +0100 -Subject: [PATCH 119/174] BCM2708: Add I2S support to board file +Subject: [PATCH 119/196] BCM2708: Add I2S support to board file Adds the required initializations for I2S to the board file of mach-bcm2708. @@ -11,9 +11,11 @@ Signed-off-by: Florian Meier arch/arm/mach-bcm2708/bcm2708.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 13b91de..42d613f 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -617,6 +617,28 @@ static struct platform_device bcm2835_th +@@ -617,6 +617,28 @@ static struct platform_device bcm2835_thermal_device = { .name = "bcm2835_thermal", }; @@ -53,3 +55,6 @@ Signed-off-by: Florian Meier for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0120-ASoC-Add-support-for-HifiBerry-DAC.patch b/target/linux/brcm2708/patches-3.10/0120-ASoC-Add-support-for-HifiBerry-DAC.patch index ee7c54b11b0..7e41d38df80 100644 --- a/target/linux/brcm2708/patches-3.10/0120-ASoC-Add-support-for-HifiBerry-DAC.patch +++ b/target/linux/brcm2708/patches-3.10/0120-ASoC-Add-support-for-HifiBerry-DAC.patch @@ -1,7 +1,7 @@ -From 584dfa04559ef74d7e862fd7319221f82efc1db0 Mon Sep 17 00:00:00 2001 +From ba93efdc28c5e66d5d01a1cd35c458aa1074d7d5 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:19:08 +0100 -Subject: [PATCH 120/174] ASoC: Add support for HifiBerry DAC +Subject: [PATCH 120/196] ASoC: Add support for HifiBerry DAC This adds a machine driver for the HifiBerry DAC. It is a sound card that can @@ -15,6 +15,8 @@ Signed-off-by: Florian Meier 3 files changed, 112 insertions(+) create mode 100644 sound/soc/bcm/hifiberry_dac.c +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 37c8f8c..8b14e37 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -8,3 +8,10 @@ config SND_BCM2708_SOC_I2S @@ -28,6 +30,8 @@ Signed-off-by: Florian Meier + select SND_SOC_PCM5102A + help + Say Y or M if you want to add support for HifiBerry DAC. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 486ea09..6834b4d 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile @@ -2,3 +2,8 @@ @@ -39,6 +43,9 @@ Signed-off-by: Florian Meier +snd-soc-hifiberry-dac-objs := hifiberry_dac.o + +obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o +diff --git a/sound/soc/bcm/hifiberry_dac.c b/sound/soc/bcm/hifiberry_dac.c +new file mode 100644 +index 0000000..4b70b45 --- /dev/null +++ b/sound/soc/bcm/hifiberry_dac.c @@ -0,0 +1,100 @@ @@ -142,3 +149,6 @@ Signed-off-by: Florian Meier +MODULE_AUTHOR("Florian Meier "); +MODULE_DESCRIPTION("ASoC Driver for HifiBerry DAC"); +MODULE_LICENSE("GPL v2"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0121-BCM2708-Add-HifiBerry-DAC-to-board-file.patch b/target/linux/brcm2708/patches-3.10/0121-BCM2708-Add-HifiBerry-DAC-to-board-file.patch index 980afaa421e..0854105fab2 100644 --- a/target/linux/brcm2708/patches-3.10/0121-BCM2708-Add-HifiBerry-DAC-to-board-file.patch +++ b/target/linux/brcm2708/patches-3.10/0121-BCM2708-Add-HifiBerry-DAC-to-board-file.patch @@ -1,7 +1,7 @@ -From f73a2a0e2756e2959e4e6ae487ce1e1bdd5441f0 Mon Sep 17 00:00:00 2001 +From bf6804bf90bb62f70942a5a97dfaf3245c9e2dad Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 22 Nov 2013 19:21:34 +0100 -Subject: [PATCH 121/174] BCM2708: Add HifiBerry DAC to board file +Subject: [PATCH 121/196] BCM2708: Add HifiBerry DAC to board file This adds the initalization of the HifiBerry DAC to the mach-bcm2708 board file. @@ -11,9 +11,11 @@ Signed-off-by: Florian Meier arch/arm/mach-bcm2708/bcm2708.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 42d613f..155a50c 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -639,6 +639,20 @@ static struct platform_device bcm2708_i2 +@@ -639,6 +639,20 @@ static struct platform_device bcm2708_i2s_device = { }; #endif @@ -46,3 +48,6 @@ Signed-off-by: Florian Meier for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0122-ASoC-BCM2708-Add-24-bit-support.patch b/target/linux/brcm2708/patches-3.10/0122-ASoC-BCM2708-Add-24-bit-support.patch index d80fa34c062..358cba82961 100644 --- a/target/linux/brcm2708/patches-3.10/0122-ASoC-BCM2708-Add-24-bit-support.patch +++ b/target/linux/brcm2708/patches-3.10/0122-ASoC-BCM2708-Add-24-bit-support.patch @@ -1,7 +1,7 @@ -From d44c918e6f017acb488bf41c4ab91159ac423084 Mon Sep 17 00:00:00 2001 +From 0d1bc8d7dd1f6abce818484285872975865217f4 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 18:55:53 +0100 -Subject: [PATCH 122/174] ASoC: BCM2708: Add 24 bit support +Subject: [PATCH 122/196] ASoC: BCM2708: Add 24 bit support This adds 24 bit support to the I2S driver of the BCM2708. Besides enabling the 24 bit flags, it includes two bug fixes: @@ -18,9 +18,11 @@ Signed-off-by: Florian Meier sound/soc/bcm/bcm2708-i2s.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) +diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c +index ebaf3d6..a179216 100644 --- a/sound/soc/bcm/bcm2708-i2s.c +++ b/sound/soc/bcm/bcm2708-i2s.c -@@ -346,6 +346,10 @@ static int bcm2708_i2s_hw_params(struct +@@ -346,6 +346,10 @@ static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream, data_length = 16; bclk_ratio = 40; break; @@ -31,7 +33,7 @@ Signed-off-by: Florian Meier case SNDRV_PCM_FORMAT_S32_LE: data_length = 32; bclk_ratio = 80; -@@ -424,7 +428,7 @@ static int bcm2708_i2s_hw_params(struct +@@ -424,7 +428,7 @@ static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream, /* Setup the frame format */ format = BCM2708_I2S_CHEN; @@ -40,7 +42,7 @@ Signed-off-by: Florian Meier format |= BCM2708_I2S_CHWEX; format |= BCM2708_I2S_CHWID((data_length-8)&0xf); -@@ -714,6 +718,7 @@ static struct snd_soc_dai_driver bcm2708 +@@ -714,6 +718,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE @@ -48,7 +50,7 @@ Signed-off-by: Florian Meier | SNDRV_PCM_FMTBIT_S32_LE }, .capture = { -@@ -721,6 +726,7 @@ static struct snd_soc_dai_driver bcm2708 +@@ -721,6 +726,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE @@ -70,3 +72,6 @@ Signed-off-by: Florian Meier SNDRV_PCM_FMTBIT_S32_LE, .period_bytes_min = 32, .period_bytes_max = 64 * PAGE_SIZE, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0123-BCM2708-Add-I2S-and-DMA-support-to-default-config.patch b/target/linux/brcm2708/patches-3.10/0123-BCM2708-Add-I2S-and-DMA-support-to-default-config.patch index 752d16cabee..dfc20b409d9 100644 --- a/target/linux/brcm2708/patches-3.10/0123-BCM2708-Add-I2S-and-DMA-support-to-default-config.patch +++ b/target/linux/brcm2708/patches-3.10/0123-BCM2708-Add-I2S-and-DMA-support-to-default-config.patch @@ -1,7 +1,7 @@ -From 77d44ee6fab1ed0775634e85a950fdfa6a00c74f Mon Sep 17 00:00:00 2001 +From d4147755dd7adb7270ca1d84d3695c75d5c8ad00 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Mon, 2 Dec 2013 20:28:22 +0100 -Subject: [PATCH 123/174] BCM2708: Add I2S and DMA support to default config +Subject: [PATCH 123/196] BCM2708: Add I2S and DMA support to default config This commit adds several modules that are needed for I2S support for the Raspberry Pi to the defconfig. @@ -11,6 +11,8 @@ Signed-off-by: Florian Meier arch/arm/configs/bcmrpi_defconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 1a0b8d9..c3c4e1a 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -733,6 +733,13 @@ CONFIG_SND_USB_UA101=m @@ -38,3 +40,6 @@ Signed-off-by: Florian Meier CONFIG_UIO=m CONFIG_UIO_PDRV=m CONFIG_UIO_PDRV_GENIRQ=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0124-ASoC-BCM2708-Add-support-for-RPi-DAC.patch b/target/linux/brcm2708/patches-3.10/0124-ASoC-BCM2708-Add-support-for-RPi-DAC.patch index e1fc7a5a598..4e97a829d3e 100644 --- a/target/linux/brcm2708/patches-3.10/0124-ASoC-BCM2708-Add-support-for-RPi-DAC.patch +++ b/target/linux/brcm2708/patches-3.10/0124-ASoC-BCM2708-Add-support-for-RPi-DAC.patch @@ -1,7 +1,7 @@ -From f83ff3e87f95ca90af499af93233fa2732e4dbbb Mon Sep 17 00:00:00 2001 +From 50720aa9a0e4af2d8c6dbf9305d45e0a91929951 Mon Sep 17 00:00:00 2001 From: Florian Meier Date: Fri, 6 Dec 2013 20:50:28 +0100 -Subject: [PATCH 124/174] ASoC: BCM2708: Add support for RPi-DAC +Subject: [PATCH 124/196] ASoC: BCM2708: Add support for RPi-DAC This adds a machine driver for the RPi-DAC. @@ -19,6 +19,8 @@ Signed-off-by: Florian Meier create mode 100644 sound/soc/bcm/rpi-dac.c create mode 100644 sound/soc/codecs/pcm1794a.c +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index c3c4e1a..d0328d8 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -738,8 +738,10 @@ CONFIG_SND_SOC_DMAENGINE_PCM=y @@ -32,9 +34,11 @@ Signed-off-by: Florian Meier CONFIG_SOUND_PRIME=m CONFIG_HIDRAW=y CONFIG_HID_A4TECH=m +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 155a50c..90debb4 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -653,6 +653,20 @@ static struct platform_device snd_pcm510 +@@ -653,6 +653,20 @@ static struct platform_device snd_pcm5102a_codec_device = { }; #endif @@ -67,6 +71,8 @@ Signed-off-by: Florian Meier for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { struct amba_device *d = amba_devs[i]; amba_device_register(d, &iomem_resource); +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 8b14e37..1c1f5cf 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -15,3 +15,10 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -81,9 +87,11 @@ Signed-off-by: Florian Meier + help + Say Y or M if you want to add support for RPi-DAC. \ No newline at end of file +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 6834b4d..95a9d44 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -5,5 +5,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd +@@ -5,5 +5,7 @@ obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd-soc-bcm2708-i2s.o # BCM2708 Machine Support snd-soc-hifiberry-dac-objs := hifiberry_dac.o @@ -91,6 +99,9 @@ Signed-off-by: Florian Meier obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o +obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o +diff --git a/sound/soc/bcm/rpi-dac.c b/sound/soc/bcm/rpi-dac.c +new file mode 100644 +index 0000000..ef3cd93 --- /dev/null +++ b/sound/soc/bcm/rpi-dac.c @@ -0,0 +1,97 @@ @@ -191,6 +202,8 @@ Signed-off-by: Florian Meier +MODULE_AUTHOR("Florian Meier "); +MODULE_DESCRIPTION("ASoC Driver for RPi-DAC"); +MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig +index 7c43413..ef9ac1e 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -55,6 +55,7 @@ config SND_SOC_ALL_CODECS @@ -211,6 +224,8 @@ Signed-off-by: Florian Meier config SND_SOC_PCM5102A tristate +diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile +index 0677eb5..e98b865 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -43,6 +43,7 @@ snd-soc-mc13783-objs := mc13783.o @@ -221,7 +236,7 @@ Signed-off-by: Florian Meier snd-soc-pcm5102a-objs := pcm5102a.o snd-soc-rt5631-objs := rt5631.o snd-soc-sgtl5000-objs := sgtl5000.o -@@ -171,6 +172,7 @@ obj-$(CONFIG_SND_SOC_MC13783) += snd-soc +@@ -171,6 +172,7 @@ obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o obj-$(CONFIG_SND_SOC_ML26124) += snd-soc-ml26124.o obj-$(CONFIG_SND_SOC_OMAP_HDMI_CODEC) += snd-soc-omap-hdmi-codec.o obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o @@ -229,6 +244,9 @@ Signed-off-by: Florian Meier obj-$(CONFIG_SND_SOC_PCM5102A) += snd-soc-pcm5102a.o obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o +diff --git a/sound/soc/codecs/pcm1794a.c b/sound/soc/codecs/pcm1794a.c +new file mode 100644 +index 0000000..b4eaa44 --- /dev/null +++ b/sound/soc/codecs/pcm1794a.c @@ -0,0 +1,62 @@ @@ -294,3 +312,6 @@ Signed-off-by: Florian Meier +MODULE_DESCRIPTION("ASoC PCM1794A codec driver"); +MODULE_AUTHOR("Florian Meier "); +MODULE_LICENSE("GPL v2"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0125-clockevents-Add-module-refcount.patch b/target/linux/brcm2708/patches-3.10/0125-clockevents-Add-module-refcount.patch index 75f1c49ba34..3c85e62aa82 100644 --- a/target/linux/brcm2708/patches-3.10/0125-clockevents-Add-module-refcount.patch +++ b/target/linux/brcm2708/patches-3.10/0125-clockevents-Add-module-refcount.patch @@ -1,7 +1,7 @@ -From 38ca21f81217c14749f190f44709d4f5606ff798 Mon Sep 17 00:00:00 2001 +From a32b173c1e9039d2ce45a1bb8267bfdd33204461 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 25 Apr 2013 20:31:49 +0000 -Subject: [PATCH 125/174] clockevents: Add module refcount +Subject: [PATCH 125/196] clockevents: Add module refcount commit ccf33d6880f39a35158fff66db13000ae4943fac upstream. @@ -21,9 +21,11 @@ Signed-off-by: Greg Kroah-Hartman kernel/time/tick-common.c | 3 +++ 2 files changed, 5 insertions(+) +diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c +index 19ee339..b219c9f 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c -@@ -92,6 +92,8 @@ void tick_install_broadcast_device(struc +@@ -92,6 +92,8 @@ void tick_install_broadcast_device(struct clock_event_device *dev) if (!try_module_get(dev->owner)) return; @@ -32,9 +34,11 @@ Signed-off-by: Greg Kroah-Hartman clockevents_exchange_device(cur, dev); if (cur) +diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c +index 086216c..2dcea16 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c -@@ -273,6 +273,9 @@ void tick_check_new_device(struct clock_ +@@ -273,6 +273,9 @@ void tick_check_new_device(struct clock_event_device *newdev) if (!try_module_get(newdev->owner)) return; @@ -44,3 +48,6 @@ Signed-off-by: Greg Kroah-Hartman /* * Replace the eventually existing device by the new * device. If the current device is the broadcast device, do +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0126-config-recreate-with-savedefconfig.patch b/target/linux/brcm2708/patches-3.10/0126-config-recreate-with-savedefconfig.patch index e173b8c215e..b4429748fdf 100644 --- a/target/linux/brcm2708/patches-3.10/0126-config-recreate-with-savedefconfig.patch +++ b/target/linux/brcm2708/patches-3.10/0126-config-recreate-with-savedefconfig.patch @@ -1,12 +1,14 @@ -From b9054daf1190829201f0f8c099a699ac8cbe09ed Mon Sep 17 00:00:00 2001 +From d373452a8e28350103ada064054898c3b5445d06 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 12 Dec 2013 11:11:03 +0000 -Subject: [PATCH 126/174] config: recreate with savedefconfig +Subject: [PATCH 126/196] config: recreate with savedefconfig --- arch/arm/configs/bcmrpi_defconfig | 7 ------- 1 file changed, 7 deletions(-) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index d0328d8..75c17bc 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -734,14 +734,9 @@ CONFIG_SND_USB_CAIAQ=m @@ -33,3 +35,6 @@ Subject: [PATCH 126/174] config: recreate with savedefconfig CONFIG_UIO=m CONFIG_UIO_PDRV=m CONFIG_UIO_PDRV_GENIRQ=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0127-config-Make-XPAD-and-USB_NET_AX88179_178A-modules.patch b/target/linux/brcm2708/patches-3.10/0127-config-Make-XPAD-and-USB_NET_AX88179_178A-modules.patch index f22c388a392..aeeec28e51e 100644 --- a/target/linux/brcm2708/patches-3.10/0127-config-Make-XPAD-and-USB_NET_AX88179_178A-modules.patch +++ b/target/linux/brcm2708/patches-3.10/0127-config-Make-XPAD-and-USB_NET_AX88179_178A-modules.patch @@ -1,12 +1,14 @@ -From c37bbdb8a56d4ecac0fe260d0b5b50ae860d1aaf Mon Sep 17 00:00:00 2001 +From 0cf9f079b6fbf0d700239bdf57824e2572fc525b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 12 Dec 2013 11:16:05 +0000 -Subject: [PATCH 127/174] config: Make XPAD and USB_NET_AX88179_178A modules +Subject: [PATCH 127/196] config: Make XPAD and USB_NET_AX88179_178A modules --- arch/arm/configs/bcmrpi_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 75c17bc..31010e4 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -434,6 +434,7 @@ CONFIG_USB_RTL8150=m @@ -34,3 +36,6 @@ Subject: [PATCH 127/174] config: Make XPAD and USB_NET_AX88179_178A modules CONFIG_USB_ANNOUNCE_NEW_DEVICES=y CONFIG_USB_MON=m CONFIG_USB_DWCOTG=y +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0128-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch b/target/linux/brcm2708/patches-3.10/0128-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch index 9c049b46e49..e231f6540f7 100644 --- a/target/linux/brcm2708/patches-3.10/0128-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch +++ b/target/linux/brcm2708/patches-3.10/0128-config-Enable-CONFIG_MEMCG-but-leave-it-disabled-due.patch @@ -1,7 +1,7 @@ -From 7793e8e7ab80fb41381652e46dbfe29dae3d7eea Mon Sep 17 00:00:00 2001 +From 10e9081e9311264f34259527c8d08a8c95beb2da Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:16:19 +0000 -Subject: [PATCH 128/174] config: Enable CONFIG_MEMCG, but leave it disabled +Subject: [PATCH 128/196] config: Enable CONFIG_MEMCG, but leave it disabled (due to memory cost). Enable with cgroup_enable=memory. --- @@ -10,6 +10,8 @@ Subject: [PATCH 128/174] config: Enable CONFIG_MEMCG, but leave it disabled mm/memcontrol.c | 1 + 3 files changed, 33 insertions(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 31010e4..fd3229a 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -18,6 +18,7 @@ CONFIG_CGROUP_FREEZER=y @@ -20,9 +22,11 @@ Subject: [PATCH 128/174] config: Enable CONFIG_MEMCG, but leave it disabled CONFIG_BLK_CGROUP=y CONFIG_NAMESPACES=y CONFIG_SCHED_AUTOGROUP=y +diff --git a/kernel/cgroup.c b/kernel/cgroup.c +index d0def7f..de9d91a 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c -@@ -5127,6 +5127,37 @@ static int __init cgroup_disable(char *s +@@ -5127,6 +5127,37 @@ static int __init cgroup_disable(char *str) } __setup("cgroup_disable=", cgroup_disable); @@ -60,9 +64,11 @@ Subject: [PATCH 128/174] config: Enable CONFIG_MEMCG, but leave it disabled /* * Functons for CSS ID. */ +diff --git a/mm/memcontrol.c b/mm/memcontrol.c +index f45e21a..28a7e40 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -6970,6 +6970,7 @@ struct cgroup_subsys mem_cgroup_subsys = +@@ -6970,6 +6970,7 @@ struct cgroup_subsys mem_cgroup_subsys = { .base_cftypes = mem_cgroup_files, .early_init = 0, .use_id = 1, @@ -70,3 +76,6 @@ Subject: [PATCH 128/174] config: Enable CONFIG_MEMCG, but leave it disabled }; #ifdef CONFIG_MEMCG_SWAP +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0129-config-Add-CONFIG_IPV6_TUNNEL.patch b/target/linux/brcm2708/patches-3.10/0129-config-Add-CONFIG_IPV6_TUNNEL.patch index f7a43b42b9c..77fb121e534 100644 --- a/target/linux/brcm2708/patches-3.10/0129-config-Add-CONFIG_IPV6_TUNNEL.patch +++ b/target/linux/brcm2708/patches-3.10/0129-config-Add-CONFIG_IPV6_TUNNEL.patch @@ -1,13 +1,15 @@ -From 962104e8624908c51af0bdea615a12beb348ba96 Mon Sep 17 00:00:00 2001 +From 1c59b0bba59d5eb80018aad1a5207c9379516e87 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 18 Dec 2013 22:52:07 +0000 -Subject: [PATCH 129/174] config: Add CONFIG_IPV6_TUNNEL See: +Subject: [PATCH 129/196] config: Add CONFIG_IPV6_TUNNEL See: https://github.com/raspberrypi/linux/issues/464 --- arch/arm/configs/bcmrpi_defconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index fd3229a..c9bcc7e 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -95,6 +95,7 @@ CONFIG_IPV6_PRIVACY=y @@ -18,3 +20,6 @@ Subject: [PATCH 129/174] config: Add CONFIG_IPV6_TUNNEL See: CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_MROUTE=y CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0130-1-wire-Add-support-for-configuring-pin-for-w1-gpio-k.patch b/target/linux/brcm2708/patches-3.10/0130-1-wire-Add-support-for-configuring-pin-for-w1-gpio-k.patch index 30c01284755..ba7393d9df4 100644 --- a/target/linux/brcm2708/patches-3.10/0130-1-wire-Add-support-for-configuring-pin-for-w1-gpio-k.patch +++ b/target/linux/brcm2708/patches-3.10/0130-1-wire-Add-support-for-configuring-pin-for-w1-gpio-k.patch @@ -1,13 +1,15 @@ -From 539f6945d211e91b73bd098b11270beb766c8475 Mon Sep 17 00:00:00 2001 +From 9f49a38c6a2e2966982f307fab54c8a27f88d13b Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 19 Dec 2013 18:05:31 +0000 -Subject: [PATCH 130/174] 1-wire: Add support for configuring pin for w1-gpio +Subject: [PATCH 130/196] 1-wire: Add support for configuring pin for w1-gpio kernel module See: https://github.com/raspberrypi/linux/pull/457 --- arch/arm/mach-bcm2708/bcm2708.c | 3 +++ 1 file changed, 3 insertions(+) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 90debb4..46586d8 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -84,6 +84,7 @@ @@ -31,3 +33,6 @@ Subject: [PATCH 130/174] 1-wire: Add support for configuring pin for w1-gpio module_param(uart_clock, uint, 0644); module_param(reboot_part, uint, 0644); +module_param(w1_gpio_pin, uint, 0644); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0131-V4L2-Fix-EV-values.-Add-manual-shutter-speed-control.patch b/target/linux/brcm2708/patches-3.10/0131-V4L2-Fix-EV-values.-Add-manual-shutter-speed-control.patch index 7a5114ccdcf..9983c3de507 100644 --- a/target/linux/brcm2708/patches-3.10/0131-V4L2-Fix-EV-values.-Add-manual-shutter-speed-control.patch +++ b/target/linux/brcm2708/patches-3.10/0131-V4L2-Fix-EV-values.-Add-manual-shutter-speed-control.patch @@ -1,7 +1,7 @@ -From 75f2608b89d80e627d50aca40f2124253a8275b0 Mon Sep 17 00:00:00 2001 +From 6519115a0742befaa2e5864a496398367aab97b0 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 10:58:01 +0000 -Subject: [PATCH 131/174] V4L2: Fix EV values. Add manual shutter speed control +Subject: [PATCH 131/196] V4L2: Fix EV values. Add manual shutter speed control V4L2 EV values should be in units of 1/1000. Corrected. Add support for V4L2_CID_EXPOSURE_ABSOLUTE which should @@ -15,6 +15,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-parameters.h | 1 + 3 files changed, 76 insertions(+), 23 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 883eab7..5640492 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -15,7 +15,7 @@ @@ -35,6 +37,8 @@ Signed-off-by: Dave Stevenson /* allocated mmal instance and components */ struct vchiq_mmal_instance *instance; +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index d1408e5..481d1f6 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c @@ -30,11 +30,23 @@ @@ -64,7 +68,7 @@ Signed-off-by: Dave Stevenson }; /* Supported ISO values -@@ -166,6 +178,22 @@ static int ctrl_set_value(struct bm2835_ +@@ -166,6 +178,22 @@ static int ctrl_set_value(struct bm2835_mmal_dev *dev, &u32_value, sizeof(u32_value)); } @@ -87,7 +91,7 @@ Signed-off-by: Dave Stevenson static int ctrl_set_rotate(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) -@@ -245,34 +273,50 @@ static int ctrl_set_exposure(struct bm28 +@@ -245,34 +273,50 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) { @@ -103,18 +107,6 @@ Signed-off-by: Dave Stevenson - case V4L2_EXPOSURE_AUTO: - u32_value = MMAL_PARAM_EXPOSUREMODE_AUTO; - break; -- -- case V4L2_EXPOSURE_MANUAL: -- u32_value = MMAL_PARAM_EXPOSUREMODE_OFF; -- break; -- -- case V4L2_EXPOSURE_SHUTTER_PRIORITY: -- u32_value = MMAL_PARAM_EXPOSUREMODE_SPORTS; -- break; -- -- case V4L2_EXPOSURE_APERTURE_PRIORITY: -- u32_value = MMAL_PARAM_EXPOSUREMODE_NIGHT; -- break; + if (mmal_ctrl->mmal_id == MMAL_PARAMETER_SHUTTER_SPEED) { + /* V4L2 is in 100usec increments. + * MMAL is 1usec. @@ -125,15 +117,24 @@ Signed-off-by: Dave Stevenson + case V4L2_EXPOSURE_AUTO: + exp_mode = MMAL_PARAM_EXPOSUREMODE_AUTO; + break; -+ + +- case V4L2_EXPOSURE_MANUAL: +- u32_value = MMAL_PARAM_EXPOSUREMODE_OFF; +- break; + case V4L2_EXPOSURE_MANUAL: + exp_mode = MMAL_PARAM_EXPOSUREMODE_OFF; + break; -+ + +- case V4L2_EXPOSURE_SHUTTER_PRIORITY: +- u32_value = MMAL_PARAM_EXPOSUREMODE_SPORTS; +- break; + case V4L2_EXPOSURE_SHUTTER_PRIORITY: + exp_mode = MMAL_PARAM_EXPOSUREMODE_SPORTS; + break; -+ + +- case V4L2_EXPOSURE_APERTURE_PRIORITY: +- u32_value = MMAL_PARAM_EXPOSUREMODE_NIGHT; +- break; + case V4L2_EXPOSURE_APERTURE_PRIORITY: + exp_mode = MMAL_PARAM_EXPOSUREMODE_NIGHT; + break; @@ -159,7 +160,7 @@ Signed-off-by: Dave Stevenson } static int ctrl_set_metering_mode(struct bm2835_mmal_dev *dev, -@@ -578,10 +622,16 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -578,10 +622,16 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { }, */ { @@ -177,6 +178,8 @@ Signed-off-by: Dave Stevenson }, { V4L2_CID_EXPOSURE_METERING, +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +index c611b58..d8aace5 100644 --- a/drivers/media/platform/bcm2835/mmal-parameters.h +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -161,6 +161,7 @@ enum mmal_parameter_camera_type { @@ -187,3 +190,6 @@ Signed-off-by: Dave Stevenson }; enum mmal_parameter_camera_config_timestamp_mode { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0132-V4L2-Correct-JPEG-Q-factor-range.patch b/target/linux/brcm2708/patches-3.10/0132-V4L2-Correct-JPEG-Q-factor-range.patch index 3d656818b45..4bb12093d7f 100644 --- a/target/linux/brcm2708/patches-3.10/0132-V4L2-Correct-JPEG-Q-factor-range.patch +++ b/target/linux/brcm2708/patches-3.10/0132-V4L2-Correct-JPEG-Q-factor-range.patch @@ -1,7 +1,7 @@ -From c76bf0b3b33a00eb7a8bd274a84d3b0cae93a5b9 Mon Sep 17 00:00:00 2001 +From acce3e98b254b042c53a713e1a0ff9332e45cdd4 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:01:53 +0000 -Subject: [PATCH 132/174] V4L2: Correct JPEG Q-factor range +Subject: [PATCH 132/196] V4L2: Correct JPEG Q-factor range Should be 1-100, not 0-100 @@ -10,9 +10,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/controls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index 481d1f6..c2e4c64 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -538,7 +538,7 @@ static int ctrl_set_bitrate_mode(struct +@@ -538,7 +538,7 @@ static int ctrl_set_bitrate_mode(struct bm2835_mmal_dev *dev, return 0; } @@ -21,7 +23,7 @@ Signed-off-by: Dave Stevenson struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) { -@@ -683,9 +683,9 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -683,9 +683,9 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { }, { V4L2_CID_JPEG_COMPRESSION_QUALITY, MMAL_CONTROL_TYPE_STD, @@ -33,3 +35,6 @@ Signed-off-by: Dave Stevenson }, }; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0133-V4L2-Fix-issue-of-driver-jamming-if-STREAMON-failed.patch b/target/linux/brcm2708/patches-3.10/0133-V4L2-Fix-issue-of-driver-jamming-if-STREAMON-failed.patch index 6f2819c61a4..93cab30e0ab 100644 --- a/target/linux/brcm2708/patches-3.10/0133-V4L2-Fix-issue-of-driver-jamming-if-STREAMON-failed.patch +++ b/target/linux/brcm2708/patches-3.10/0133-V4L2-Fix-issue-of-driver-jamming-if-STREAMON-failed.patch @@ -1,7 +1,7 @@ -From a29f4da13057535935fb2b390b01b46b4a4d133b Mon Sep 17 00:00:00 2001 +From 3e5851305b45a4dac66bd49529e511d1334a08fc Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:05:24 +0000 -Subject: [PATCH 133/174] V4L2: Fix issue of driver jamming if STREAMON failed. +Subject: [PATCH 133/196] V4L2: Fix issue of driver jamming if STREAMON failed. Fix issue where the driver was left in a partially enabled state if STREAMON failed, and would then reject many IOCTLs @@ -12,9 +12,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/bcm2835-camera.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 47fe45d..2743074 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -425,7 +425,15 @@ static int start_streaming(struct vb2_qu +@@ -425,7 +425,15 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) vchiq_mmal_port_enable(dev->instance, dev->capture.port, buffer_cb); if (ret) { v4l2_err(&dev->v4l2_dev, @@ -31,3 +33,6 @@ Signed-off-by: Dave Stevenson return -1; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0134-V4L2-Fix-ISO-controls.patch b/target/linux/brcm2708/patches-3.10/0134-V4L2-Fix-ISO-controls.patch index 75883df91f7..3f6c91c362a 100644 --- a/target/linux/brcm2708/patches-3.10/0134-V4L2-Fix-ISO-controls.patch +++ b/target/linux/brcm2708/patches-3.10/0134-V4L2-Fix-ISO-controls.patch @@ -1,7 +1,7 @@ -From d9dc4b7760b20885d5bd1d17fd6dce818f1141e0 Mon Sep 17 00:00:00 2001 +From e4dc7a4bf88ca8e70f604b5d26335911073e5238 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 15:30:48 +0000 -Subject: [PATCH 134/174] V4L2: Fix ISO controls. +Subject: [PATCH 134/196] V4L2: Fix ISO controls. Driver was passing the index to the GPU, and not the desired ISO value. @@ -11,9 +11,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/controls.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index c2e4c64..92863f7 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -178,6 +178,25 @@ static int ctrl_set_value(struct bm2835_ +@@ -178,6 +178,25 @@ static int ctrl_set_value(struct bm2835_mmal_dev *dev, &u32_value, sizeof(u32_value)); } @@ -39,7 +41,7 @@ Signed-off-by: Dave Stevenson static int ctrl_set_value_ev(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) -@@ -601,7 +620,7 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -601,7 +620,7 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { { V4L2_CID_ISO_SENSITIVITY, MMAL_CONTROL_TYPE_INT_MENU, 0, ARRAY_SIZE(iso_qmenu) - 1, 0, 1, iso_qmenu, @@ -48,3 +50,6 @@ Signed-off-by: Dave Stevenson }, { V4L2_CID_IMAGE_STABILIZATION, MMAL_CONTROL_TYPE_STD, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0135-V4L2-Add-flicker-avoidance-controls.patch b/target/linux/brcm2708/patches-3.10/0135-V4L2-Add-flicker-avoidance-controls.patch index b67a8bafc76..fcbe95f6153 100644 --- a/target/linux/brcm2708/patches-3.10/0135-V4L2-Add-flicker-avoidance-controls.patch +++ b/target/linux/brcm2708/patches-3.10/0135-V4L2-Add-flicker-avoidance-controls.patch @@ -1,7 +1,7 @@ -From 9d80a4ce15c265530d8372a3577748123e365ee3 Mon Sep 17 00:00:00 2001 +From 7158cb41bff61dc6e3aee5b243ba0d6fbafe35bc Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 16:40:24 +0000 -Subject: [PATCH 135/174] V4L2: Add flicker avoidance controls +Subject: [PATCH 135/196] V4L2: Add flicker avoidance controls Add support for V4L2_CID_POWER_LINE_FREQUENCY to set flicker avoidance frequencies. @@ -13,6 +13,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-parameters.h | 8 +++++ 3 files changed, 51 insertions(+), 1 deletion(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 5640492..a53c3bd 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -15,7 +15,7 @@ @@ -24,6 +26,8 @@ Signed-off-by: Dave Stevenson enum { MMAL_COMPONENT_CAMERA = 0, +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index 92863f7..7cc97c8 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c @@ -56,6 +56,13 @@ static const s64 iso_qmenu[] = { @@ -40,7 +44,7 @@ Signed-off-by: Dave Stevenson /* Supported video encode modes */ static const s64 bitrate_mode_qmenu[] = { (s64)V4L2_MPEG_VIDEO_BITRATE_MODE_VBR, -@@ -373,6 +380,35 @@ static int ctrl_set_metering_mode(struct +@@ -373,6 +380,35 @@ static int ctrl_set_metering_mode(struct bm2835_mmal_dev *dev, &u32_value, sizeof(u32_value)); } @@ -76,7 +80,7 @@ Signed-off-by: Dave Stevenson static int ctrl_set_awb_mode(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) -@@ -706,6 +742,12 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -706,6 +742,12 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { 30, 1, NULL, MMAL_PARAMETER_JPEG_Q_FACTOR, &ctrl_set_image_encode_output }, @@ -89,6 +93,8 @@ Signed-off-by: Dave Stevenson }; int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev) +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +index d8aace5..b3d2c39 100644 --- a/drivers/media/platform/bcm2835/mmal-parameters.h +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -271,6 +271,14 @@ enum mmal_parameter_imagefx { @@ -106,3 +112,6 @@ Signed-off-by: Dave Stevenson /** Manner of video rate control */ enum mmal_parameter_rate_control_mode { MMAL_VIDEO_RATECONTROL_DEFAULT, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0136-V4L2-Add-support-for-frame-rate-control.patch b/target/linux/brcm2708/patches-3.10/0136-V4L2-Add-support-for-frame-rate-control.patch index 36897db1c0c..3c971dec66d 100644 --- a/target/linux/brcm2708/patches-3.10/0136-V4L2-Add-support-for-frame-rate-control.patch +++ b/target/linux/brcm2708/patches-3.10/0136-V4L2-Add-support-for-frame-rate-control.patch @@ -1,7 +1,7 @@ -From 980348ac7301c266ddbed9256ad9835cbda6e719 Mon Sep 17 00:00:00 2001 +From 4991eec9f8b1cd048c8df5fcb8da8f5046ed444f Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 13 Dec 2013 15:54:13 +0000 -Subject: [PATCH 136/174] V4L2: Add support for frame rate control. +Subject: [PATCH 136/196] V4L2: Add support for frame rate control. Add support for frame rate (or time per frame as V4L2 inverts it) control via s_parm. @@ -14,9 +14,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-parameters.h | 5 + 4 files changed, 116 insertions(+), 13 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 2743074..8c38d03 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -55,6 +55,15 @@ MODULE_PARM_DESC(bcm2835_v4l2_debug, "De +@@ -55,6 +55,15 @@ MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2"); static struct bm2835_mmal_dev *gdev; /* global device data */ @@ -32,7 +34,7 @@ Signed-off-by: Dave Stevenson /* video formats */ static struct mmal_fmt formats[] = { { -@@ -869,8 +878,10 @@ static int mmal_setup_components(struct +@@ -869,8 +878,10 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, camera_port->es.video.crop.y = 0; camera_port->es.video.crop.width = f->fmt.pix.width; camera_port->es.video.crop.height = f->fmt.pix.height; @@ -45,7 +47,7 @@ Signed-off-by: Dave Stevenson ret = vchiq_mmal_port_set_format(dev->instance, camera_port); -@@ -1064,6 +1075,90 @@ static int vidioc_s_fmt_vid_cap(struct f +@@ -1064,6 +1075,90 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, return ret; } @@ -136,7 +138,7 @@ Signed-off-by: Dave Stevenson static const struct v4l2_ioctl_ops camera0_ioctl_ops = { /* overlay */ .vidioc_enum_fmt_vid_overlay = vidioc_enum_fmt_vid_overlay, -@@ -1092,6 +1187,9 @@ static const struct v4l2_ioctl_ops camer +@@ -1092,6 +1187,9 @@ static const struct v4l2_ioctl_ops camera0_ioctl_ops = { .vidioc_querybuf = vb2_ioctl_querybuf, .vidioc_qbuf = vb2_ioctl_qbuf, .vidioc_dqbuf = vb2_ioctl_dqbuf, @@ -146,7 +148,7 @@ Signed-off-by: Dave Stevenson .vidioc_streamon = vb2_ioctl_streamon, .vidioc_streamoff = vb2_ioctl_streamoff, -@@ -1184,8 +1282,10 @@ static int __init mmal_init(struct bm283 +@@ -1184,8 +1282,10 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) format->es->video.crop.y = 0; format->es->video.crop.width = 1024; format->es->video.crop.height = 768; @@ -159,7 +161,7 @@ Signed-off-by: Dave Stevenson format = &dev->component[MMAL_COMPONENT_CAMERA]-> -@@ -1200,8 +1300,10 @@ static int __init mmal_init(struct bm283 +@@ -1200,8 +1300,10 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) format->es->video.crop.y = 0; format->es->video.crop.width = 1024; format->es->video.crop.height = 768; @@ -172,7 +174,7 @@ Signed-off-by: Dave Stevenson format = &dev->component[MMAL_COMPONENT_CAMERA]-> -@@ -1222,6 +1324,7 @@ static int __init mmal_init(struct bm283 +@@ -1222,6 +1324,7 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) dev->capture.height = format->es->video.height; dev->capture.fmt = &formats[0]; dev->capture.encode_component = NULL; @@ -180,6 +182,8 @@ Signed-off-by: Dave Stevenson /* get the preview component ready */ ret = vchiq_mmal_component_init( +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index a53c3bd..0f29b1a 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -32,9 +32,6 @@ enum { @@ -200,9 +204,11 @@ Signed-off-by: Dave Stevenson /* H264 encode bitrate */ int encode_bitrate; +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index 7cc97c8..e965ca3 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -152,10 +152,7 @@ static int ctrl_set_rational(struct bm28 +@@ -152,10 +152,7 @@ static int ctrl_set_rational(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) { @@ -214,6 +220,8 @@ Signed-off-by: Dave Stevenson struct vchiq_mmal_port *control; control = &dev->component[MMAL_COMPONENT_CAMERA]->control; +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +index b3d2c39..0f2bd50 100644 --- a/drivers/media/platform/bcm2835/mmal-parameters.h +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -164,6 +164,11 @@ enum mmal_parameter_camera_type { @@ -228,3 +236,6 @@ Signed-off-by: Dave Stevenson enum mmal_parameter_camera_config_timestamp_mode { MMAL_PARAM_TIMESTAMP_MODE_ZERO = 0, /* Always timestamp frames as 0 */ MMAL_PARAM_TIMESTAMP_MODE_RAW_STC, /* Use the raw STC value +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0137-V4L2-Improve-G_FBUF-handling-so-we-pass-conformance.patch b/target/linux/brcm2708/patches-3.10/0137-V4L2-Improve-G_FBUF-handling-so-we-pass-conformance.patch index 5e4ea73c240..67ca15dc14a 100644 --- a/target/linux/brcm2708/patches-3.10/0137-V4L2-Improve-G_FBUF-handling-so-we-pass-conformance.patch +++ b/target/linux/brcm2708/patches-3.10/0137-V4L2-Improve-G_FBUF-handling-so-we-pass-conformance.patch @@ -1,7 +1,7 @@ -From 6f5cc6eb60f7db36b94b9c960b5330464b4e729f Mon Sep 17 00:00:00 2001 +From cd3d0404cf78e7ae0d4f3320c9d900ad88dbd5ed Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:30:09 +0000 -Subject: [PATCH 137/174] V4L2: Improve G_FBUF handling so we pass conformance +Subject: [PATCH 137/196] V4L2: Improve G_FBUF handling so we pass conformance Return some sane numbers for get framebuffer so that we pass conformance. @@ -11,9 +11,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/bcm2835-camera.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 8c38d03..c8d8742 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -664,10 +664,18 @@ static int vidioc_g_fbuf(struct file *fi +@@ -664,10 +664,18 @@ static int vidioc_g_fbuf(struct file *file, void *fh, { /* The video overlay must stay within the framebuffer and can't be positioned independently. */ @@ -35,3 +37,6 @@ Signed-off-by: Dave Stevenson return 0; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0138-V4L2-Fix-information-advertised-through-g_vidfmt.patch b/target/linux/brcm2708/patches-3.10/0138-V4L2-Fix-information-advertised-through-g_vidfmt.patch index 984bfa3c7b0..ec936665cd2 100644 --- a/target/linux/brcm2708/patches-3.10/0138-V4L2-Fix-information-advertised-through-g_vidfmt.patch +++ b/target/linux/brcm2708/patches-3.10/0138-V4L2-Fix-information-advertised-through-g_vidfmt.patch @@ -1,7 +1,7 @@ -From afd8800a96b940049ac37fb90cc24deeeea5c57e Mon Sep 17 00:00:00 2001 +From e583299dcd36a6e23a8479d8597a85b6c9e6cbbb Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 17:29:39 +0000 -Subject: [PATCH 138/174] V4L2: Fix information advertised through g_vidfmt +Subject: [PATCH 138/196] V4L2: Fix information advertised through g_vidfmt Width and height were being stored based on incorrect values. @@ -11,9 +11,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/bcm2835-camera.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index c8d8742..4766a9c 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -1028,13 +1028,19 @@ static int mmal_setup_components(struct +@@ -1028,13 +1028,19 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, if (!ret) { dev->capture.fmt = mfmt; dev->capture.stride = f->fmt.pix.bytesperline; @@ -35,3 +37,6 @@ Signed-off-by: Dave Stevenson } } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0139-V4L2-Add-support-for-inline-H264-headers.patch b/target/linux/brcm2708/patches-3.10/0139-V4L2-Add-support-for-inline-H264-headers.patch index 858316633ee..299ed0b3dd9 100644 --- a/target/linux/brcm2708/patches-3.10/0139-V4L2-Add-support-for-inline-H264-headers.patch +++ b/target/linux/brcm2708/patches-3.10/0139-V4L2-Add-support-for-inline-H264-headers.patch @@ -1,7 +1,7 @@ -From aceebc39876d7cec8f2b4289a09ddeb94a5697d9 Mon Sep 17 00:00:00 2001 +From f4206d9063a2b73cf7ca7aa497c1f7e3def1859b Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:03:54 +0000 -Subject: [PATCH 139/174] V4L2: Add support for inline H264 headers +Subject: [PATCH 139/196] V4L2: Add support for inline H264 headers Add support for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER to control H264 inline headers. @@ -15,6 +15,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-parameters.h | 11 ++- 3 files changed, 103 insertions(+), 25 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 0f29b1a..25aa91f 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -15,7 +15,7 @@ @@ -26,6 +28,8 @@ Signed-off-by: Dave Stevenson enum { MMAL_COMPONENT_CAMERA = 0, +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index e965ca3..cb062a9 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c @@ -96,6 +96,7 @@ struct bm2835_mmal_v4l2_ctrl { @@ -36,7 +40,7 @@ Signed-off-by: Dave Stevenson }; struct v4l2_to_mmal_effects_setting { -@@ -606,12 +607,29 @@ static int ctrl_set_image_encode_output( +@@ -606,12 +607,29 @@ static int ctrl_set_image_encode_output(struct bm2835_mmal_dev *dev, &u32_value, sizeof(u32_value)); } @@ -66,7 +70,7 @@ Signed-off-by: Dave Stevenson if ((mmal_ctrl == NULL) || (mmal_ctrl->id != ctrl->id) || -@@ -620,7 +638,10 @@ static int bm2835_mmal_s_ctrl(struct v4l +@@ -620,7 +638,10 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) return -EINVAL; } @@ -78,7 +82,7 @@ Signed-off-by: Dave Stevenson } static const struct v4l2_ctrl_ops bm2835_mmal_ctrl_ops = { -@@ -633,32 +654,44 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -633,32 +654,44 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { { V4L2_CID_SATURATION, MMAL_CONTROL_TYPE_STD, -100, 100, 0, 1, NULL, @@ -129,7 +133,7 @@ Signed-off-by: Dave Stevenson }, /* { 0, MMAL_CONTROL_TYPE_CLUSTER, 3, 1, 0, NULL, 0, NULL -@@ -666,7 +699,9 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -666,7 +699,9 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { */ { V4L2_CID_EXPOSURE_AUTO, MMAL_CONTROL_TYPE_STD_MENU, ~0x03, 3, V4L2_EXPOSURE_AUTO, 0, NULL, @@ -140,7 +144,7 @@ Signed-off-by: Dave Stevenson }, /* todo this needs mixing in with set exposure { -@@ -677,86 +712,120 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -677,86 +712,120 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { V4L2_CID_EXPOSURE_ABSOLUTE, MMAL_CONTROL_TYPE_STD, /* Units of 100usecs */ 1, 1*1000*10, 100*10, 1, NULL, @@ -276,6 +280,8 @@ Signed-off-by: Dave Stevenson break; } } +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +index 0f2bd50..b08a4b0 100644 --- a/drivers/media/platform/bcm2835/mmal-parameters.h +++ b/drivers/media/platform/bcm2835/mmal-parameters.h @@ -421,7 +421,16 @@ enum mmal_parameter_video_type { @@ -296,3 +302,6 @@ Signed-off-by: Dave Stevenson }; /** Valid mirror modes */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0140-V4L2-Fix-JPEG-timestamp-issue.patch b/target/linux/brcm2708/patches-3.10/0140-V4L2-Fix-JPEG-timestamp-issue.patch index 1c9277f8ebb..3efa7660bf5 100644 --- a/target/linux/brcm2708/patches-3.10/0140-V4L2-Fix-JPEG-timestamp-issue.patch +++ b/target/linux/brcm2708/patches-3.10/0140-V4L2-Fix-JPEG-timestamp-issue.patch @@ -1,7 +1,7 @@ -From 126bd13f65c8e88fd4eb037433ab39f7faf803ca Mon Sep 17 00:00:00 2001 +From a1eed4a5fcd05d266f68dd30fa17ba045a2a322e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 19 Dec 2013 17:33:02 +0000 -Subject: [PATCH 140/174] V4L2: Fix JPEG timestamp issue +Subject: [PATCH 140/196] V4L2: Fix JPEG timestamp issue JPEG images were coming through from the GPU with timestamp of 0. Detect this and give current system time instead @@ -12,9 +12,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/bcm2835-camera.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 4766a9c..9fc90a2 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -238,7 +238,8 @@ static void buffer_cb(struct vchiq_mmal_ +@@ -238,7 +238,8 @@ static void buffer_cb(struct vchiq_mmal_instance *instance, } } else { if (dev->capture.frame_count) { @@ -24,7 +26,7 @@ Signed-off-by: Dave Stevenson s64 runtime_us = pts - dev->capture.vc_start_timestamp; u32 div = 0; -@@ -259,7 +260,7 @@ static void buffer_cb(struct vchiq_mmal_ +@@ -259,7 +260,7 @@ static void buffer_cb(struct vchiq_mmal_instance *instance, USEC_PER_SEC; } v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, @@ -33,3 +35,6 @@ Signed-off-by: Dave Stevenson "with offset %llu to %d.%06d\n", (int)dev->capture.kernel_start_ts. tv_sec, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0141-V4L2-Fix-issue-when-switching-down-JPEG-resolution.patch b/target/linux/brcm2708/patches-3.10/0141-V4L2-Fix-issue-when-switching-down-JPEG-resolution.patch index ee16189e776..2d7069cc731 100644 --- a/target/linux/brcm2708/patches-3.10/0141-V4L2-Fix-issue-when-switching-down-JPEG-resolution.patch +++ b/target/linux/brcm2708/patches-3.10/0141-V4L2-Fix-issue-when-switching-down-JPEG-resolution.patch @@ -1,7 +1,7 @@ -From 50a40e8c2a9014c62943b034edefa035c0647519 Mon Sep 17 00:00:00 2001 +From 8a529de86bee2dd7e76fc77d0364ace6df3da685 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 9 Dec 2013 11:24:55 +0000 -Subject: [PATCH 141/174] V4L2: Fix issue when switching down JPEG resolution. +Subject: [PATCH 141/196] V4L2: Fix issue when switching down JPEG resolution. JPEG buffer size calculation is based on input resolution. Input resolution was being configured after output port @@ -13,9 +13,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/bcm2835-camera.c | 126 ++++++++++++++---------- 1 file changed, 72 insertions(+), 54 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 9fc90a2..4780107 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c -@@ -955,69 +955,87 @@ static int mmal_setup_components(struct +@@ -955,69 +955,87 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, camera_port->current_buffer.num = camera_port->recommended_buffer.num; @@ -157,3 +159,6 @@ Signed-off-by: Dave Stevenson } } else { /* configure buffering */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0142-V4L2-Enable-MJPEG-encoding.patch b/target/linux/brcm2708/patches-3.10/0142-V4L2-Enable-MJPEG-encoding.patch index 556919ced66..a5321f6c7d5 100644 --- a/target/linux/brcm2708/patches-3.10/0142-V4L2-Enable-MJPEG-encoding.patch +++ b/target/linux/brcm2708/patches-3.10/0142-V4L2-Enable-MJPEG-encoding.patch @@ -1,7 +1,7 @@ -From 9878725ea0cedbc79d962e0ac041acdc1135d79c Mon Sep 17 00:00:00 2001 +From 640a6391ca5a617196bb250d3378f775fe16b9f8 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Mon, 23 Dec 2013 15:42:21 +0000 -Subject: [PATCH 142/174] V4L2: Enable MJPEG encoding +Subject: [PATCH 142/196] V4L2: Enable MJPEG encoding Requires GPU firmware update to support MJPEG encoder. @@ -11,6 +11,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-encodings.h | 1 + 2 files changed, 8 insertions(+) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 4780107..166039e 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -100,6 +100,13 @@ static struct mmal_fmt formats[] = { @@ -27,6 +29,8 @@ Signed-off-by: Dave Stevenson } }; +diff --git a/drivers/media/platform/bcm2835/mmal-encodings.h b/drivers/media/platform/bcm2835/mmal-encodings.h +index 856e80e..764bb12 100644 --- a/drivers/media/platform/bcm2835/mmal-encodings.h +++ b/drivers/media/platform/bcm2835/mmal-encodings.h @@ -27,6 +27,7 @@ @@ -37,3 +41,6 @@ Signed-off-by: Dave Stevenson #define MMAL_ENCODING_JPEG MMAL_FOURCC('J', 'P', 'E', 'G') #define MMAL_ENCODING_GIF MMAL_FOURCC('G', 'I', 'F', ' ') +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch b/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch index f805a898cc7..69559075e1e 100644 --- a/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch +++ b/target/linux/brcm2708/patches-3.10/0143-i2c-bcm2708-fixed-baudrate.patch @@ -1,7 +1,7 @@ -From fdd5f63fca69c692eaaac24b3a3d23e2cdf2fb4d Mon Sep 17 00:00:00 2001 +From bfece5de53315bba13fd253745d12d63a8803b11 Mon Sep 17 00:00:00 2001 From: brabl2 Date: Sat, 21 Dec 2013 21:25:36 +0100 -Subject: [PATCH 143/174] i2c-bcm2708: fixed baudrate +Subject: [PATCH 143/196] i2c-bcm2708: fixed baudrate Fixed issue where the wrong CDIV value was set for baudrates below 3815 Hz (for 250MHz bus clock). In that case the computed CDIV value was more than 0xffff. However the CDIV register width is only 16 bits. This resulted in incorrect setting of CDIV and higher baudrate than intended. Example: 3500Hz -> CDIV=0x11704 -> CDIV(16bit)=0x1704 -> 42430Hz @@ -11,9 +11,11 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction. drivers/i2c/busses/i2c-bcm2708.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) +diff --git a/drivers/i2c/busses/i2c-bcm2708.c b/drivers/i2c/busses/i2c-bcm2708.c +index 33f4e7d..dd7a5c8 100644 --- a/drivers/i2c/busses/i2c-bcm2708.c +++ b/drivers/i2c/busses/i2c-bcm2708.c -@@ -155,6 +155,8 @@ static inline void bcm2708_bsc_setup(str +@@ -155,6 +155,8 @@ static inline void bcm2708_bsc_setup(struct bcm2708_i2c *bi) bus_hz = clk_get_rate(bi->clk); cdiv = bus_hz / baudrate; @@ -22,7 +24,7 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction. if (bi->msg->flags & I2C_M_RD) c |= BSC_C_INTR | BSC_C_READ; -@@ -268,6 +270,8 @@ static int bcm2708_i2c_probe(struct plat +@@ -268,6 +270,8 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) struct clk *clk; struct bcm2708_i2c *bi; struct i2c_adapter *adap; @@ -31,7 +33,7 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction. regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!regs) { -@@ -343,8 +347,15 @@ static int bcm2708_i2c_probe(struct plat +@@ -343,8 +347,15 @@ static int bcm2708_i2c_probe(struct platform_device *pdev) goto out_free_irq; } @@ -49,3 +51,6 @@ The correct baudrate is shown in the log after the cdiv > 0xffff correction. return 0; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0144-vc_mem-tidy-up-debug-procfs-code.patch b/target/linux/brcm2708/patches-3.10/0144-vc_mem-tidy-up-debug-procfs-code.patch index 06c10295a40..1abdaeb3273 100644 --- a/target/linux/brcm2708/patches-3.10/0144-vc_mem-tidy-up-debug-procfs-code.patch +++ b/target/linux/brcm2708/patches-3.10/0144-vc_mem-tidy-up-debug-procfs-code.patch @@ -1,7 +1,7 @@ -From e9db9a1035224a30ebb6be44e760e57518d19533 Mon Sep 17 00:00:00 2001 +From 1533d883e78022ef323358cadf73d8cf059fe1fa Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Sat, 28 Dec 2013 07:39:51 +0000 -Subject: [PATCH 144/174] vc_mem: tidy up debug procfs code +Subject: [PATCH 144/196] vc_mem: tidy up debug procfs code Remove commented-out procfs code, which was generating a warning and no longer worked. Replace this with @@ -12,6 +12,8 @@ Signed-off-by: Luke Diamand arch/arm/mach-bcm2708/vc_mem.c | 119 +++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 70 deletions(-) +diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c +index aeae4d5..007754d 100644 --- a/arch/arm/mach-bcm2708/vc_mem.c +++ b/arch/arm/mach-bcm2708/vc_mem.c @@ -19,7 +19,7 @@ @@ -23,7 +25,7 @@ Signed-off-by: Luke Diamand #include #include -@@ -51,8 +51,9 @@ static struct class *vc_mem_class = NULL +@@ -51,8 +51,9 @@ static struct class *vc_mem_class = NULL; static struct cdev vc_mem_cdev; static int vc_mem_inited = 0; @@ -35,7 +37,7 @@ Signed-off-by: Luke Diamand /* * Videocore memory addresses and size -@@ -280,75 +281,60 @@ static const struct file_operations vc_m +@@ -280,75 +281,60 @@ static const struct file_operations vc_mem_fops = { .mmap = vc_mem_mmap, }; @@ -94,21 +96,15 @@ Signed-off-by: Luke Diamand - char input_str[10]; - - memset(input_str, 0, sizeof (input_str)); -- -- if (count > sizeof (input_str)) { -- LOG_ERR("%s: input string length too long", __func__); -- goto out; -- } -- -- if (copy_from_user(input_str, buffer, count - 1)) { -- LOG_ERR("%s: failed to get input string", __func__); -- goto out; + vc_mem_debugfs_entry = debugfs_create_dir(DRIVER_NAME, NULL); + if (!vc_mem_debugfs_entry) { + dev_warn(dev, "could not create debugfs entry\n"); + return -EFAULT; + } -+ + +- if (count > sizeof (input_str)) { +- LOG_ERR("%s: input string length too long", __func__); +- goto out; + if (!debugfs_create_x32("vc_mem_phys_addr", + 0444, + vc_mem_debugfs_entry, @@ -116,8 +112,11 @@ Signed-off-by: Luke Diamand + dev_warn(dev, "%s:could not create vc_mem_phys entry\n", + __func__); + goto fail; -+ } -+ + } + +- if (copy_from_user(input_str, buffer, count - 1)) { +- LOG_ERR("%s: failed to get input string", __func__); +- goto out; + if (!debugfs_create_x32("vc_mem_size", + 0444, + vc_mem_debugfs_entry, @@ -125,8 +124,11 @@ Signed-off-by: Luke Diamand + dev_warn(dev, "%s:could not create vc_mem_size entry\n", + __func__); + goto fail; -+ } -+ + } + +- if (strncmp(input_str, "connect", strlen("connect")) == 0) { +- // Get the videocore memory size from the videocore +- vc_mem_get_size(); + if (!debugfs_create_x32("vc_mem_base", + 0444, + vc_mem_debugfs_entry, @@ -136,14 +138,10 @@ Signed-off-by: Luke Diamand + goto fail; } -- if (strncmp(input_str, "connect", strlen("connect")) == 0) { -- // Get the videocore memory size from the videocore -- vc_mem_get_size(); -- } -+ return 0; - - out: - return rc; ++ return 0; ++ +fail: + vc_mem_debugfs_deinit(); + return -EFAULT; @@ -191,3 +189,6 @@ Signed-off-by: Luke Diamand #endif device_destroy(vc_mem_class, vc_mem_devnum); class_destroy(vc_mem_class); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0145-vc_mem-tidy-up-debug-printing.patch b/target/linux/brcm2708/patches-3.10/0145-vc_mem-tidy-up-debug-printing.patch index 7ba6433b340..02667690fe6 100644 --- a/target/linux/brcm2708/patches-3.10/0145-vc_mem-tidy-up-debug-printing.patch +++ b/target/linux/brcm2708/patches-3.10/0145-vc_mem-tidy-up-debug-printing.patch @@ -1,7 +1,7 @@ -From 3d55e3e65ac2277c2b9a1803c39847fc6b9a0a5d Mon Sep 17 00:00:00 2001 +From 9c4e06f1061c7b8c0fe5a83937275d4fd54d4853 Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Sat, 28 Dec 2013 07:39:51 +0000 -Subject: [PATCH 145/174] vc_mem: tidy up debug printing +Subject: [PATCH 145/196] vc_mem: tidy up debug printing Replace explicit use of printk() with pr_XXX() calls to better conform to kernel coding style. @@ -11,6 +11,8 @@ Signed-off-by: Luke Diamand arch/arm/mach-bcm2708/vc_mem.c | 47 +++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) +diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c +index 007754d..2adac12 100644 --- a/arch/arm/mach-bcm2708/vc_mem.c +++ b/arch/arm/mach-bcm2708/vc_mem.c @@ -35,16 +35,6 @@ @@ -30,7 +32,7 @@ Signed-off-by: Luke Diamand // Device (/dev) related variables static dev_t vc_mem_devnum = 0; static struct class *vc_mem_class = NULL; -@@ -95,7 +85,7 @@ vc_mem_open(struct inode *inode, struct +@@ -95,7 +85,7 @@ vc_mem_open(struct inode *inode, struct file *file) (void) inode; (void) file; @@ -39,7 +41,7 @@ Signed-off-by: Luke Diamand return 0; } -@@ -112,7 +102,7 @@ vc_mem_release(struct inode *inode, stru +@@ -112,7 +102,7 @@ vc_mem_release(struct inode *inode, struct file *file) (void) inode; (void) file; @@ -48,7 +50,7 @@ Signed-off-by: Luke Diamand return 0; } -@@ -167,12 +157,12 @@ vc_mem_ioctl(struct file *file, unsigned +@@ -167,12 +157,12 @@ vc_mem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) (void) cmd; (void) arg; @@ -63,7 +65,7 @@ Signed-off-by: Luke Diamand __func__, (void *) mm_vc_mem_phys_addr); if (copy_to_user((void *) arg, &mm_vc_mem_phys_addr, -@@ -186,7 +176,7 @@ vc_mem_ioctl(struct file *file, unsigned +@@ -186,7 +176,7 @@ vc_mem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) // Get the videocore memory size first vc_mem_get_size(); @@ -72,7 +74,7 @@ Signed-off-by: Luke Diamand mm_vc_mem_size); if (copy_to_user((void *) arg, &mm_vc_mem_size, -@@ -200,7 +190,7 @@ vc_mem_ioctl(struct file *file, unsigned +@@ -200,7 +190,7 @@ vc_mem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) // Get the videocore memory base vc_mem_get_base(); @@ -81,7 +83,7 @@ Signed-off-by: Luke Diamand mm_vc_mem_base); if (copy_to_user((void *) arg, &mm_vc_mem_base, -@@ -214,7 +204,7 @@ vc_mem_ioctl(struct file *file, unsigned +@@ -214,7 +204,7 @@ vc_mem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) // Get the videocore memory base vc_mem_get_base(); @@ -90,7 +92,7 @@ Signed-off-by: Luke Diamand mm_vc_mem_base); if (copy_to_user((void *) arg, &mm_vc_mem_base, -@@ -228,7 +218,7 @@ vc_mem_ioctl(struct file *file, unsigned +@@ -228,7 +218,7 @@ vc_mem_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return -ENOTTY; } } @@ -99,7 +101,7 @@ Signed-off-by: Luke Diamand return rc; } -@@ -246,12 +236,12 @@ vc_mem_mmap(struct file *filp, struct vm +@@ -246,12 +236,12 @@ vc_mem_mmap(struct file *filp, struct vm_area_struct *vma) unsigned long length = vma->vm_end - vma->vm_start; unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; @@ -114,7 +116,7 @@ Signed-off-by: Luke Diamand return -EINVAL; } // Do not cache the memory map -@@ -261,7 +251,7 @@ vc_mem_mmap(struct file *filp, struct vm +@@ -261,7 +251,7 @@ vc_mem_mmap(struct file *filp, struct vm_area_struct *vma) (mm_vc_mem_phys_addr >> PAGE_SHIFT) + vma->vm_pgoff, length, vma->vm_page_prot); if (rc != 0) { @@ -180,3 +182,6 @@ Signed-off-by: Luke Diamand if (vc_mem_inited) { #if CONFIG_DEBUG_FS +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0146-fixes-a-bug-in-the-snd-bcm2835-driver.patch b/target/linux/brcm2708/patches-3.10/0146-fixes-a-bug-in-the-snd-bcm2835-driver.patch index 8deafcffaae..16a5a6d1e94 100644 --- a/target/linux/brcm2708/patches-3.10/0146-fixes-a-bug-in-the-snd-bcm2835-driver.patch +++ b/target/linux/brcm2708/patches-3.10/0146-fixes-a-bug-in-the-snd-bcm2835-driver.patch @@ -1,7 +1,7 @@ -From f7af161699cbbca544dd8feab4c05d9bc5ea8807 Mon Sep 17 00:00:00 2001 +From bd15c8ebc85f89b3e3c464a628f70ea4b144377f Mon Sep 17 00:00:00 2001 From: Janis Danisevskis Date: Wed, 1 Jan 2014 18:41:53 +0100 -Subject: [PATCH 146/174] fixes a bug in the snd-bcm2835 driver +Subject: [PATCH 146/196] fixes a bug in the snd-bcm2835 driver The "instance" field of bcm2835_alsa_stream_t may be accessed uninitialized by bcm2835_audio_set_ctls_chan if called during stream creation. This fix @@ -11,9 +11,11 @@ initialized. sound/arm/bcm2835-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index 21e435b..499e225 100755 --- a/sound/arm/bcm2835-pcm.c +++ b/sound/arm/bcm2835-pcm.c -@@ -127,7 +127,6 @@ static int snd_bcm2835_playback_open(str +@@ -127,7 +127,6 @@ static int snd_bcm2835_playback_open(struct snd_pcm_substream *substream) alsa_stream->chip = chip; alsa_stream->substream = substream; alsa_stream->idx = idx; @@ -21,7 +23,7 @@ initialized. sema_init(&alsa_stream->buffers_update_sem, 0); sema_init(&alsa_stream->control_sem, 0); -@@ -149,6 +148,7 @@ static int snd_bcm2835_playback_open(str +@@ -149,6 +148,7 @@ static int snd_bcm2835_playback_open(struct snd_pcm_substream *substream) kfree(alsa_stream); return err; } @@ -29,3 +31,6 @@ initialized. alsa_stream->open = 1; alsa_stream->draining = 1; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0147-V4L2-Correct-flag-settings-for-compressed-formats.patch b/target/linux/brcm2708/patches-3.10/0147-V4L2-Correct-flag-settings-for-compressed-formats.patch index 1cf3977aabb..8dc82bc1488 100644 --- a/target/linux/brcm2708/patches-3.10/0147-V4L2-Correct-flag-settings-for-compressed-formats.patch +++ b/target/linux/brcm2708/patches-3.10/0147-V4L2-Correct-flag-settings-for-compressed-formats.patch @@ -1,7 +1,7 @@ -From dfd619eb2e3415681d726f749984ab5ecf355736 Mon Sep 17 00:00:00 2001 +From 3481fef0091c023c634ecf747b3dea455b24b32c Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 2 Jan 2014 15:57:06 +0000 -Subject: [PATCH 147/174] V4L2: Correct flag settings for compressed formats +Subject: [PATCH 147/196] V4L2: Correct flag settings for compressed formats Set flags field correctly on enum_fmt_vid_cap for compressed image formats. @@ -12,6 +12,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-common.h | 1 + 2 files changed, 10 insertions(+) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 166039e..7f99a14 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -69,6 +69,7 @@ static struct mmal_fmt formats[] = { @@ -62,7 +64,7 @@ Signed-off-by: Dave Stevenson .mmal = MMAL_ENCODING_MJPEG, .depth = 8, .mmal_component = MMAL_COMPONENT_VIDEO_ENCODE, -@@ -555,6 +561,7 @@ static int vidioc_enum_fmt_vid_overlay(s +@@ -555,6 +561,7 @@ static int vidioc_enum_fmt_vid_overlay(struct file *file, void *priv, strlcpy(f->description, fmt->name, sizeof(f->description)); f->pixelformat = fmt->fourcc; @@ -70,7 +72,7 @@ Signed-off-by: Dave Stevenson return 0; } -@@ -750,6 +757,8 @@ static int vidioc_enum_fmt_vid_cap(struc +@@ -750,6 +757,8 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, strlcpy(f->description, fmt->name, sizeof(f->description)); f->pixelformat = fmt->fourcc; @@ -79,6 +81,8 @@ Signed-off-by: Dave Stevenson return 0; } +diff --git a/drivers/media/platform/bcm2835/mmal-common.h b/drivers/media/platform/bcm2835/mmal-common.h +index 602b4a7..076f9a8 100644 --- a/drivers/media/platform/bcm2835/mmal-common.h +++ b/drivers/media/platform/bcm2835/mmal-common.h @@ -26,6 +26,7 @@ @@ -89,3 +93,6 @@ Signed-off-by: Dave Stevenson u32 mmal; int depth; u32 mmal_component; /* MMAL component index to be used to encode */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0148-bcm2708_fb-report-number-of-dma-copies.patch b/target/linux/brcm2708/patches-3.10/0148-bcm2708_fb-report-number-of-dma-copies.patch index cd09a729b2f..a7817237e7e 100644 --- a/target/linux/brcm2708/patches-3.10/0148-bcm2708_fb-report-number-of-dma-copies.patch +++ b/target/linux/brcm2708/patches-3.10/0148-bcm2708_fb-report-number-of-dma-copies.patch @@ -1,7 +1,7 @@ -From 2807aef659483de0d569b2c01e2b68be046496d3 Mon Sep 17 00:00:00 2001 +From ceb70800efa2f4c92f0c89bf472005decd577d65 Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Tue, 31 Dec 2013 23:07:36 +0000 -Subject: [PATCH 148/174] bcm2708_fb: report number of dma copies +Subject: [PATCH 148/196] bcm2708_fb: report number of dma copies Add a counter (exported via debugfs) reporting the number of dma copies that the framebuffer driver @@ -13,6 +13,8 @@ Signed-off-by: Luke Diamand drivers/video/bcm2708_fb.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) +diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c +index c10c5ee..4d7d963 100644 --- a/drivers/video/bcm2708_fb.c +++ b/drivers/video/bcm2708_fb.c @@ -27,6 +27,7 @@ @@ -88,7 +90,7 @@ Signed-off-by: Luke Diamand static int bcm2708_fb_set_bitfields(struct fb_var_screeninfo *var) { int ret = 0; -@@ -443,8 +491,10 @@ static void bcm2708_fb_copyarea(struct f +@@ -443,8 +491,10 @@ static void bcm2708_fb_copyarea(struct fb_info *info, /* end of dma control blocks chain */ cb->next = 0; @@ -99,7 +101,7 @@ Signed-off-by: Luke Diamand } static void bcm2708_fb_imageblit(struct fb_info *info, -@@ -552,6 +602,9 @@ static int bcm2708_fb_probe(struct platf +@@ -552,6 +602,9 @@ static int bcm2708_fb_probe(struct platform_device *dev) } memset(fb, 0, sizeof(struct bcm2708_fb)); @@ -109,7 +111,7 @@ Signed-off-by: Luke Diamand fb->cb_base = dma_alloc_writecombine(&dev->dev, SZ_64K, &fb->cb_handle, GFP_KERNEL); if (!fb->cb_base) { -@@ -607,6 +660,8 @@ static int bcm2708_fb_remove(struct plat +@@ -607,6 +660,8 @@ static int bcm2708_fb_remove(struct platform_device *dev) dma_free_coherent(NULL, PAGE_ALIGN(sizeof(*fb->info)), (void *)fb->info, fb->dma); @@ -118,3 +120,6 @@ Signed-off-by: Luke Diamand kfree(fb); return 0; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0149-bcm2708_fb-use-IRQ-for-DMA-copies.patch b/target/linux/brcm2708/patches-3.10/0149-bcm2708_fb-use-IRQ-for-DMA-copies.patch index bf915beb80c..90cb5396b7c 100644 --- a/target/linux/brcm2708/patches-3.10/0149-bcm2708_fb-use-IRQ-for-DMA-copies.patch +++ b/target/linux/brcm2708/patches-3.10/0149-bcm2708_fb-use-IRQ-for-DMA-copies.patch @@ -1,7 +1,7 @@ -From ab41011a32fdc35352ee6b308f29b6954056d787 Mon Sep 17 00:00:00 2001 +From 298c1744068079c5174e0c6023a89cb5ad3576c4 Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Wed, 1 Jan 2014 00:45:29 +0000 -Subject: [PATCH 149/174] bcm2708_fb: use IRQ for DMA copies +Subject: [PATCH 149/196] bcm2708_fb: use IRQ for DMA copies The copyarea ioctl() uses DMA to speed things along. This was busy-waiting for completion. This change supports using @@ -15,9 +15,11 @@ Signed-off-by: Luke Diamand drivers/video/bcm2708_fb.c | 64 ++++++++++++++++++++++++++++++-- 3 files changed, 70 insertions(+), 4 deletions(-) +diff --git a/arch/arm/mach-bcm2708/dma.c b/arch/arm/mach-bcm2708/dma.c +index 51d147a..1da2413 100644 --- a/arch/arm/mach-bcm2708/dma.c +++ b/arch/arm/mach-bcm2708/dma.c -@@ -83,6 +83,14 @@ extern void bcm_dma_wait_idle(void __iom +@@ -83,6 +83,14 @@ extern void bcm_dma_wait_idle(void __iomem *dma_chan_base) EXPORT_SYMBOL_GPL(bcm_dma_start); @@ -32,6 +34,8 @@ Signed-off-by: Luke Diamand /* Complete an ongoing DMA (assuming its results are to be ignored) Does nothing if there is no DMA in progress. This routine waits for the current AXI transfer to complete before +diff --git a/arch/arm/mach-bcm2708/include/mach/dma.h b/arch/arm/mach-bcm2708/include/mach/dma.h +index f2568d4..a4aac4c 100644 --- a/arch/arm/mach-bcm2708/include/mach/dma.h +++ b/arch/arm/mach-bcm2708/include/mach/dma.h @@ -64,11 +64,13 @@ struct bcm2708_dma_cb { @@ -48,6 +52,8 @@ Signed-off-by: Luke Diamand extern int /*rc*/ bcm_dma_abort(void __iomem *dma_chan_base); /* When listing features we can ask for when allocating DMA channels give +diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c +index 4d7d963..5758146 100644 --- a/drivers/video/bcm2708_fb.c +++ b/drivers/video/bcm2708_fb.c @@ -21,6 +21,7 @@ @@ -58,7 +64,7 @@ Signed-off-by: Luke Diamand #include #include #include -@@ -48,6 +49,11 @@ static const char *bcm2708_name = "BCM27 +@@ -48,6 +49,11 @@ static const char *bcm2708_name = "BCM2708 FB"; #define DRIVER_NAME "bcm2708_fb" @@ -78,7 +84,7 @@ Signed-off-by: Luke Diamand struct bcm2708_fb_stats stats; }; -@@ -95,6 +102,10 @@ static int bcm2708_fb_debugfs_init(struc +@@ -95,6 +102,10 @@ static int bcm2708_fb_debugfs_init(struct bcm2708_fb *fb) "dma_copies", offsetof(struct bcm2708_fb_stats, dma_copies) }, @@ -89,7 +95,7 @@ Signed-off-by: Luke Diamand }; fb->debugfs_dir = debugfs_create_dir(DRIVER_NAME, NULL); -@@ -400,6 +411,7 @@ static void bcm2708_fb_copyarea(struct f +@@ -400,6 +411,7 @@ static void bcm2708_fb_copyarea(struct fb_info *info, int bytes_per_pixel = (info->var.bits_per_pixel + 7) >> 3; /* Channel 0 supports larger bursts and is a bit faster */ int burst_size = (fb->dma_chan == 0) ? 8 : 2; @@ -97,7 +103,7 @@ Signed-off-by: Luke Diamand /* Fallback to cfb_copyarea() if we don't like something */ if (bytes_per_pixel > 4 || -@@ -492,8 +504,20 @@ static void bcm2708_fb_copyarea(struct f +@@ -492,8 +504,20 @@ static void bcm2708_fb_copyarea(struct fb_info *info, cb->next = 0; @@ -120,7 +126,7 @@ Signed-off-by: Luke Diamand fb->stats.dma_copies++; } -@@ -504,6 +528,24 @@ static void bcm2708_fb_imageblit(struct +@@ -504,6 +528,24 @@ static void bcm2708_fb_imageblit(struct fb_info *info, cfb_imageblit(info, image); } @@ -145,7 +151,7 @@ Signed-off-by: Luke Diamand static struct fb_ops bcm2708_fb_ops = { .owner = THIS_MODULE, .fb_check_var = bcm2708_fb_check_var, -@@ -568,6 +610,7 @@ static int bcm2708_fb_register(struct bc +@@ -568,6 +610,7 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb) fb->fb.monspecs.dclkmax = 100000000; bcm2708_fb_set_bitfields(&fb->fb.var); @@ -153,7 +159,7 @@ Signed-off-by: Luke Diamand /* * Allocate colourmap. -@@ -593,14 +636,15 @@ static int bcm2708_fb_probe(struct platf +@@ -593,14 +636,15 @@ static int bcm2708_fb_probe(struct platform_device *dev) struct bcm2708_fb *fb; int ret; @@ -171,7 +177,7 @@ Signed-off-by: Luke Diamand bcm2708_fb_debugfs_init(fb); -@@ -624,6 +668,14 @@ static int bcm2708_fb_probe(struct platf +@@ -624,6 +668,14 @@ static int bcm2708_fb_probe(struct platform_device *dev) } fb->dma_chan = ret; @@ -186,7 +192,7 @@ Signed-off-by: Luke Diamand pr_info("BCM2708FB: allocated DMA channel %d @ %p\n", fb->dma_chan, fb->dma_chan_base); -@@ -635,6 +687,8 @@ static int bcm2708_fb_probe(struct platf +@@ -635,6 +687,8 @@ static int bcm2708_fb_probe(struct platform_device *dev) goto out; } @@ -195,7 +201,7 @@ Signed-off-by: Luke Diamand free_cb: dma_free_writecombine(&dev->dev, SZ_64K, fb->cb_base, fb->cb_handle); free_fb: -@@ -662,6 +716,8 @@ static int bcm2708_fb_remove(struct plat +@@ -662,6 +716,8 @@ static int bcm2708_fb_remove(struct platform_device *dev) fb->dma); bcm2708_fb_debugfs_deinit(fb); @@ -204,3 +210,6 @@ Signed-off-by: Luke Diamand kfree(fb); return 0; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0150-Cleanup-include-for-files-under-include-linux.patch b/target/linux/brcm2708/patches-3.10/0150-Cleanup-include-for-files-under-include-linux.patch index 499634af483..53c4a231094 100644 --- a/target/linux/brcm2708/patches-3.10/0150-Cleanup-include-for-files-under-include-linux.patch +++ b/target/linux/brcm2708/patches-3.10/0150-Cleanup-include-for-files-under-include-linux.patch @@ -1,7 +1,7 @@ -From d8088f3740de018fd6ae975f290db057194fe243 Mon Sep 17 00:00:00 2001 +From 6815e4637c297d0932c622084006b662401ba09b Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Fri, 3 Jan 2014 17:24:46 -0600 -Subject: [PATCH 150/174] Cleanup include for files under include/linux +Subject: [PATCH 150/196] Cleanup include for files under include/linux Adding include/linux/anything is bad form. This fixes this prior to other changes that touches this Makefile. @@ -10,6 +10,8 @@ other changes that touches this Makefile. drivers/char/broadcom/vc_cma/vc_cma.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) +diff --git a/drivers/char/broadcom/vc_cma/Makefile b/drivers/char/broadcom/vc_cma/Makefile +index ae71918..61682bf 100644 --- a/drivers/char/broadcom/vc_cma/Makefile +++ b/drivers/char/broadcom/vc_cma/Makefile @@ -1,6 +1,5 @@ @@ -19,6 +21,8 @@ other changes that touches this Makefile. EXTRA_CFLAGS += -I"drivers/misc/vc04_services" EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/vchi" EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/vchiq_arm" +diff --git a/drivers/char/broadcom/vc_cma/vc_cma.c b/drivers/char/broadcom/vc_cma/vc_cma.c +index fe80887..13485c1 100644 --- a/drivers/char/broadcom/vc_cma/vc_cma.c +++ b/drivers/char/broadcom/vc_cma/vc_cma.c @@ -46,7 +46,7 @@ @@ -30,3 +34,6 @@ other changes that touches this Makefile. #include "vchiq_util.h" #include "vchiq_connected.h" +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch b/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch index 4b4b5054dab..c572e719fed 100644 --- a/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch +++ b/target/linux/brcm2708/patches-3.10/0151-Makefiles-change-EXTRA_CFLAGS-to-ccflags-y.patch @@ -1,7 +1,7 @@ -From 6544998027a0bb96d3f64ec5429757344c9a729a Mon Sep 17 00:00:00 2001 +From c2ab501c1e79c78de711a3592816a2fa93b2e527 Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Fri, 3 Jan 2014 17:52:19 -0600 -Subject: [PATCH 151/174] Makefiles: change EXTRA_CFLAGS to ccflags-y +Subject: [PATCH 151/196] Makefiles: change EXTRA_CFLAGS to ccflags-y According to section 3.7 of Documentation/kbuild/makefiles.txt, using EXTRA_CFLAGS in Makefiles is "still supported but their usage is @@ -18,6 +18,8 @@ fixes the problem. sound/arm/Makefile | 2 +- 6 files changed, 46 insertions(+), 46 deletions(-) +diff --git a/drivers/char/broadcom/vc_cma/Makefile b/drivers/char/broadcom/vc_cma/Makefile +index 61682bf..2d773f8 100644 --- a/drivers/char/broadcom/vc_cma/Makefile +++ b/drivers/char/broadcom/vc_cma/Makefile @@ -1,12 +1,12 @@ @@ -26,21 +28,24 @@ fixes the problem. -EXTRA_CFLAGS += -I"drivers/misc/vc04_services" -EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/vchi" -EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/vchiq_arm" +- +-EXTRA_CFLAGS += -D__KERNEL__ +-EXTRA_CFLAGS += -D__linux__ +-EXTRA_CFLAGS += -Werror +ccflags-y += -Wall -Wstrict-prototypes -Wno-trigraphs +ccflags-y += -Werror +ccflags-y += -Idrivers/misc/vc04_services +ccflags-y += -Idrivers/misc/vc04_services/interface/vchi +ccflags-y += -Idrivers/misc/vc04_services/interface/vchiq_arm - --EXTRA_CFLAGS += -D__KERNEL__ --EXTRA_CFLAGS += -D__linux__ --EXTRA_CFLAGS += -Werror ++ +ccflags-y += -D__KERNEL__ +ccflags-y += -D__linux__ +ccflags-y += -Werror obj-$(CONFIG_BCM_VC_CMA) += vc-cma.o +diff --git a/drivers/misc/vc04_services/Makefile b/drivers/misc/vc04_services/Makefile +index 1aeb20a..92e7525 100644 --- a/drivers/misc/vc04_services/Makefile +++ b/drivers/misc/vc04_services/Makefile @@ -12,7 +12,7 @@ vchiq-objs := \ @@ -52,6 +57,8 @@ fixes the problem. endif +diff --git a/drivers/usb/host/dwc_common_port/Makefile b/drivers/usb/host/dwc_common_port/Makefile +index 63e3485..ec890b5 100644 --- a/drivers/usb/host/dwc_common_port/Makefile +++ b/drivers/usb/host/dwc_common_port/Makefile @@ -4,16 +4,16 @@ @@ -62,17 +69,16 @@ fixes the problem. -#EXTRA_CFLAGS += -DDEBUG -#EXTRA_CFLAGS += -DDWC_DEBUG_REGS -#EXTRA_CFLAGS += -DDWC_DEBUG_MEMORY -- ++ccflags-y += -DDWC_LINUX ++#ccflags-y += -DDEBUG ++#ccflags-y += -DDWC_DEBUG_REGS ++#ccflags-y += -DDWC_DEBUG_MEMORY + -EXTRA_CFLAGS += -DDWC_LIBMODULE -EXTRA_CFLAGS += -DDWC_CCLIB -#EXTRA_CFLAGS += -DDWC_CRYPTOLIB -EXTRA_CFLAGS += -DDWC_NOTIFYLIB -EXTRA_CFLAGS += -DDWC_UTFLIB -+ccflags-y += -DDWC_LINUX -+#ccflags-y += -DDEBUG -+#ccflags-y += -DDWC_DEBUG_REGS -+#ccflags-y += -DDWC_DEBUG_MEMORY -+ +ccflags-y += -DDWC_LIBMODULE +ccflags-y += -DDWC_CCLIB +#ccflags-y += -DDWC_CRYPTOLIB @@ -81,7 +87,7 @@ fixes the problem. obj-$(CONFIG_USB_DWCOTG) += dwc_common_port_lib.o dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \ -@@ -24,8 +24,8 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE +@@ -24,8 +24,8 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE)) kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd)) ifneq ($(kernrel3),2.6.20) @@ -92,6 +98,8 @@ fixes the problem. endif else +diff --git a/drivers/usb/host/dwc_common_port/Makefile.linux b/drivers/usb/host/dwc_common_port/Makefile.linux +index 961df3f..0cef7b4 100644 --- a/drivers/usb/host/dwc_common_port/Makefile.linux +++ b/drivers/usb/host/dwc_common_port/Makefile.linux @@ -3,16 +3,16 @@ @@ -102,16 +110,17 @@ fixes the problem. -#EXTRA_CFLAGS += -DDEBUG -#EXTRA_CFLAGS += -DDWC_DEBUG_REGS -#EXTRA_CFLAGS += -DDWC_DEBUG_MEMORY -+ccflags-y += -DDWC_LINUX -+#ccflags-y += -DDEBUG -+#ccflags-y += -DDWC_DEBUG_REGS -+#ccflags-y += -DDWC_DEBUG_MEMORY - +- -EXTRA_CFLAGS += -DDWC_LIBMODULE -EXTRA_CFLAGS += -DDWC_CCLIB -EXTRA_CFLAGS += -DDWC_CRYPTOLIB -EXTRA_CFLAGS += -DDWC_NOTIFYLIB -EXTRA_CFLAGS += -DDWC_UTFLIB ++ccflags-y += -DDWC_LINUX ++#ccflags-y += -DDEBUG ++#ccflags-y += -DDWC_DEBUG_REGS ++#ccflags-y += -DDWC_DEBUG_MEMORY ++ +ccflags-y += -DDWC_LIBMODULE +ccflags-y += -DDWC_CCLIB +ccflags-y += -DDWC_CRYPTOLIB @@ -120,6 +129,8 @@ fixes the problem. obj-m := dwc_common_port_lib.o dwc_common_port_lib-objs := dwc_cc.o dwc_modpow.o dwc_dh.o \ +diff --git a/drivers/usb/host/dwc_otg/Makefile b/drivers/usb/host/dwc_otg/Makefile +index 6bd6a2e..c11cbc2 100644 --- a/drivers/usb/host/dwc_otg/Makefile +++ b/drivers/usb/host/dwc_otg/Makefile @@ -12,22 +12,22 @@ ifeq ($(BUS_INTERFACE),) @@ -135,9 +146,7 @@ fixes the problem. # device-only mode. -#EXTRA_CFLAGS += -DDWC_HOST_ONLY -#EXTRA_CFLAGS += -DDWC_DEVICE_ONLY -+#ccflags-y += -DDWC_HOST_ONLY -+#ccflags-y += -DDWC_DEVICE_ONLY - +- -EXTRA_CFLAGS += -Dlinux -DDWC_HS_ELECT_TST -#EXTRA_CFLAGS += -DDWC_EN_ISOC -EXTRA_CFLAGS += -I$(obj)/../dwc_common_port @@ -146,6 +155,9 @@ fixes the problem. -EXTRA_CFLAGS += $(CFI) -EXTRA_CFLAGS += $(BUS_INTERFACE) -#EXTRA_CFLAGS += -DDWC_DEV_SRPCAP ++#ccflags-y += -DDWC_HOST_ONLY ++#ccflags-y += -DDWC_DEVICE_ONLY ++ +ccflags-y += -Dlinux -DDWC_HS_ELECT_TST +#ccflags-y += -DDWC_EN_ISOC +ccflags-y += -I$(obj)/../dwc_common_port @@ -157,7 +169,7 @@ fixes the problem. obj-$(CONFIG_USB_DWCOTG) += dwc_otg.o -@@ -45,7 +45,7 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE +@@ -45,7 +45,7 @@ kernrelwd := $(subst ., ,$(KERNELRELEASE)) kernrel3 := $(word 1,$(kernrelwd)).$(word 2,$(kernrelwd)).$(word 3,$(kernrelwd)) ifneq ($(kernrel3),2.6.20) @@ -166,6 +178,8 @@ fixes the problem. endif else +diff --git a/sound/arm/Makefile b/sound/arm/Makefile +index 181cb57..63cdfb7 100644 --- a/sound/arm/Makefile +++ b/sound/arm/Makefile @@ -18,5 +18,5 @@ snd-pxa2xx-ac97-objs := pxa2xx-ac97.o @@ -175,3 +189,6 @@ fixes the problem. -EXTRA_CFLAGS += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 +ccflags-y += -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel -D__VCCOREVER__=0x04000000 +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0152-V4L2-Increase-the-MMAL-timeout-to-3sec.patch b/target/linux/brcm2708/patches-3.10/0152-V4L2-Increase-the-MMAL-timeout-to-3sec.patch index 6588a6a764a..a4a4dec7cde 100644 --- a/target/linux/brcm2708/patches-3.10/0152-V4L2-Increase-the-MMAL-timeout-to-3sec.patch +++ b/target/linux/brcm2708/patches-3.10/0152-V4L2-Increase-the-MMAL-timeout-to-3sec.patch @@ -1,7 +1,7 @@ -From 5ea012c31815b53d6f49ce0679750108657b8a63 Mon Sep 17 00:00:00 2001 +From e2da876177f951c0010181d441fd41536109b71e Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Tue, 7 Jan 2014 12:36:07 +0000 -Subject: [PATCH 152/174] V4L2: Increase the MMAL timeout to 3sec +Subject: [PATCH 152/196] V4L2: Increase the MMAL timeout to 3sec MJPEG codec flush is now taking longer and results in a kernel panic if the driver has stopped waiting for @@ -13,9 +13,11 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c +index a06fb44..67d1ce6 100644 --- a/drivers/media/platform/bcm2835/mmal-vchiq.c +++ b/drivers/media/platform/bcm2835/mmal-vchiq.c -@@ -742,7 +742,7 @@ static int send_synchronous_mmal_msg(str +@@ -742,7 +742,7 @@ static int send_synchronous_mmal_msg(struct vchiq_mmal_instance *instance, return ret; } @@ -24,3 +26,6 @@ Signed-off-by: Dave Stevenson if (ret <= 0) { pr_err("error %d waiting for sync completion\n", ret); if (ret == 0) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0153-bcm2708-fix-gpio_to_irq-name-clash.patch b/target/linux/brcm2708/patches-3.10/0153-bcm2708-fix-gpio_to_irq-name-clash.patch index 1482f1cf9a0..ab7c4f05dbd 100644 --- a/target/linux/brcm2708/patches-3.10/0153-bcm2708-fix-gpio_to_irq-name-clash.patch +++ b/target/linux/brcm2708/patches-3.10/0153-bcm2708-fix-gpio_to_irq-name-clash.patch @@ -1,7 +1,7 @@ -From 5342341058c0706fe56a05ebd473fd38ca8654a9 Mon Sep 17 00:00:00 2001 +From ca0e3a11c5cb7a46a98fbad909250ce81a19f1f8 Mon Sep 17 00:00:00 2001 From: Joerg Faschingbauer Date: Tue, 7 Jan 2014 13:55:15 +0000 -Subject: [PATCH 153/174] bcm2708: fix gpio_to_irq() name clash +Subject: [PATCH 153/196] bcm2708: fix gpio_to_irq() name clash has gpio_to_irq() defined as a macro. the macro is obviously intended as the direct implementation of that @@ -18,9 +18,11 @@ together with their uses. arch/arm/mach-bcm2708/include/mach/gpio.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) +diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c +index d0339eb..96fae74 100644 --- a/arch/arm/mach-bcm2708/bcm2708_gpio.c +++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c -@@ -135,9 +135,9 @@ static void bcm2708_gpio_set(struct gpio +@@ -135,9 +135,9 @@ static void bcm2708_gpio_set(struct gpio_chip *gc, unsigned offset, int value) #if BCM_GPIO_USE_IRQ @@ -32,7 +34,7 @@ together with their uses. } static int bcm2708_gpio_irq_set_type(struct irq_data *d, unsigned type) -@@ -149,15 +149,15 @@ static int bcm2708_gpio_irq_set_type(str +@@ -149,15 +149,15 @@ static int bcm2708_gpio_irq_set_type(struct irq_data *d, unsigned type) return -EINVAL; if (type & IRQ_TYPE_EDGE_RISING) { @@ -52,7 +54,7 @@ together with their uses. } return 0; } -@@ -166,7 +166,7 @@ static void bcm2708_gpio_irq_mask(struct +@@ -166,7 +166,7 @@ static void bcm2708_gpio_irq_mask(struct irq_data *d) { unsigned irq = d->irq; struct bcm2708_gpio *gpio = irq_get_chip_data(irq); @@ -61,7 +63,7 @@ together with their uses. unsigned gb = gn / 32; unsigned long rising = readl(gpio->base + GPIOREN(gb)); unsigned long falling = readl(gpio->base + GPIOFEN(gb)); -@@ -181,7 +181,7 @@ static void bcm2708_gpio_irq_unmask(stru +@@ -181,7 +181,7 @@ static void bcm2708_gpio_irq_unmask(struct irq_data *d) { unsigned irq = d->irq; struct bcm2708_gpio *gpio = irq_get_chip_data(irq); @@ -70,7 +72,7 @@ together with their uses. unsigned gb = gn / 32; unsigned long rising = readl(gpio->base + GPIOREN(gb)); unsigned long falling = readl(gpio->base + GPIOFEN(gb)); -@@ -222,7 +222,7 @@ static irqreturn_t bcm2708_gpio_interrup +@@ -222,7 +222,7 @@ static irqreturn_t bcm2708_gpio_interrupt(int irq, void *dev_id) edsr = readl(__io_address(GPIO_BASE) + GPIOEDS(bank)); for_each_set_bit(i, &edsr, 32) { gpio = i + bank * 32; @@ -79,7 +81,7 @@ together with their uses. } writel(0xffffffff, __io_address(GPIO_BASE) + GPIOEDS(bank)); } -@@ -239,7 +239,7 @@ static void bcm2708_gpio_irq_init(struct +@@ -239,7 +239,7 @@ static void bcm2708_gpio_irq_init(struct bcm2708_gpio *ucb) { unsigned irq; @@ -88,6 +90,8 @@ together with their uses. for (irq = GPIO_IRQ_START; irq < (GPIO_IRQ_START + GPIO_IRQS); irq++) { irq_set_chip_data(irq, ucb); +diff --git a/arch/arm/mach-bcm2708/include/mach/gpio.h b/arch/arm/mach-bcm2708/include/mach/gpio.h +index f600bc7..f09639a 100644 --- a/arch/arm/mach-bcm2708/include/mach/gpio.h +++ b/arch/arm/mach-bcm2708/include/mach/gpio.h @@ -11,8 +11,8 @@ @@ -101,3 +105,6 @@ together with their uses. #endif +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0154-gpio-support-low-and-high-level-interrupts.patch b/target/linux/brcm2708/patches-3.10/0154-gpio-support-low-and-high-level-interrupts.patch index ec9bb761680..bec567779e0 100644 --- a/target/linux/brcm2708/patches-3.10/0154-gpio-support-low-and-high-level-interrupts.patch +++ b/target/linux/brcm2708/patches-3.10/0154-gpio-support-low-and-high-level-interrupts.patch @@ -1,12 +1,14 @@ -From c334aa8da6e17555823ebf05bdb429ff224e99b3 Mon Sep 17 00:00:00 2001 +From 504b5a3a5f492deccf35a3ed5e7b9a48a069ece2 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Thu, 9 Jan 2014 16:05:20 +0000 -Subject: [PATCH 154/174] gpio: support low and high level interrupts +Subject: [PATCH 154/196] gpio: support low and high level interrupts --- arch/arm/mach-bcm2708/bcm2708_gpio.c | 52 +++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 15 deletions(-) +diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c +index 96fae74..1d93ad8 100644 --- a/arch/arm/mach-bcm2708/bcm2708_gpio.c +++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c @@ -58,6 +58,8 @@ struct bcm2708_gpio { @@ -18,7 +20,7 @@ Subject: [PATCH 154/174] gpio: support low and high level interrupts }; static int bcm2708_set_function(struct gpio_chip *gc, unsigned offset, -@@ -145,20 +147,22 @@ static int bcm2708_gpio_irq_set_type(str +@@ -145,20 +147,22 @@ static int bcm2708_gpio_irq_set_type(struct irq_data *d, unsigned type) unsigned irq = d->irq; struct bcm2708_gpio *gpio = irq_get_chip_data(irq); @@ -51,7 +53,7 @@ Subject: [PATCH 154/174] gpio: support low and high level interrupts return 0; } -@@ -168,13 +172,17 @@ static void bcm2708_gpio_irq_mask(struct +@@ -168,13 +172,17 @@ static void bcm2708_gpio_irq_mask(struct irq_data *d) struct bcm2708_gpio *gpio = irq_get_chip_data(irq); unsigned gn = __bcm2708_irq_to_gpio(irq); unsigned gb = gn / 32; @@ -71,7 +73,7 @@ Subject: [PATCH 154/174] gpio: support low and high level interrupts } static void bcm2708_gpio_irq_unmask(struct irq_data *d) -@@ -183,24 +191,38 @@ static void bcm2708_gpio_irq_unmask(stru +@@ -183,24 +191,38 @@ static void bcm2708_gpio_irq_unmask(struct irq_data *d) struct bcm2708_gpio *gpio = irq_get_chip_data(irq); unsigned gn = __bcm2708_irq_to_gpio(irq); unsigned gb = gn / 32; @@ -113,3 +115,6 @@ Subject: [PATCH 154/174] gpio: support low and high level interrupts } static struct irq_chip bcm2708_irqchip = { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0155-config-Remove-CONFIG_RTC_HCTOSYS.patch b/target/linux/brcm2708/patches-3.10/0155-config-Remove-CONFIG_RTC_HCTOSYS.patch index 4fbafca3150..62a067dc99e 100644 --- a/target/linux/brcm2708/patches-3.10/0155-config-Remove-CONFIG_RTC_HCTOSYS.patch +++ b/target/linux/brcm2708/patches-3.10/0155-config-Remove-CONFIG_RTC_HCTOSYS.patch @@ -1,13 +1,15 @@ -From 84b32065ee2dd4e871c1b12ed45171477320a19f Mon Sep 17 00:00:00 2001 +From 2d05b923f1fee3d6e7a2d0d2589325af6d2027eb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 10 Jan 2014 17:04:34 +0000 -Subject: [PATCH 155/174] config: Remove CONFIG_RTC_HCTOSYS See: +Subject: [PATCH 155/196] config: Remove CONFIG_RTC_HCTOSYS See: https://github.com/raspberrypi/linux/issues/163 --- arch/arm/configs/bcmrpi_defconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index c9bcc7e..fb23712 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -902,6 +902,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y @@ -18,3 +20,6 @@ Subject: [PATCH 155/174] config: Remove CONFIG_RTC_HCTOSYS See: CONFIG_RTC_DRV_DS1307=m CONFIG_RTC_DRV_DS1374=m CONFIG_RTC_DRV_DS1672=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0156-ASoC-wm8804-Implement-MCLK-configuration-options-add.patch b/target/linux/brcm2708/patches-3.10/0156-ASoC-wm8804-Implement-MCLK-configuration-options-add.patch index e7f9bef8140..da8a7e21d04 100644 --- a/target/linux/brcm2708/patches-3.10/0156-ASoC-wm8804-Implement-MCLK-configuration-options-add.patch +++ b/target/linux/brcm2708/patches-3.10/0156-ASoC-wm8804-Implement-MCLK-configuration-options-add.patch @@ -1,7 +1,7 @@ -From 01aa1e11984ac4cd798308cd7a40c92fc4be214e Mon Sep 17 00:00:00 2001 +From e793383b503f51589d82b9aaeb678c97e44fef3f Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:41:23 +0100 -Subject: [PATCH 156/174] ASoC: wm8804: Implement MCLK configuration options, +Subject: [PATCH 156/196] ASoC: wm8804: Implement MCLK configuration options, add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs for most sample rates. At 192kHz only 128xfs is supported. The existing driver selects 128xfs automatically for some lower samples rates. By using an @@ -20,6 +20,8 @@ Signed-off-by: Daniel Matuschek sound/soc/codecs/wm8804.h | 4 ++++ 2 files changed, 19 insertions(+), 4 deletions(-) +diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c +index 1704b1e..7ec8381 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -63,6 +63,7 @@ struct wm8804_priv { @@ -30,7 +32,7 @@ Signed-off-by: Daniel Matuschek }; static int txsrc_get(struct snd_kcontrol *kcontrol, -@@ -277,6 +278,7 @@ static int wm8804_hw_params(struct snd_p +@@ -277,6 +278,7 @@ static int wm8804_hw_params(struct snd_pcm_substream *substream, blen = 0x1; break; case SNDRV_PCM_FORMAT_S24_LE: @@ -47,7 +49,7 @@ Signed-off-by: Daniel Matuschek { u64 Kpart; unsigned long int K, Ndiv, Nmod, tmp; -@@ -330,7 +332,8 @@ static int pll_factors(struct pll_div *p +@@ -330,7 +332,8 @@ static int pll_factors(struct pll_div *pll_div, unsigned int target, */ for (i = 0; i < ARRAY_SIZE(post_table); i++) { tmp = target * post_table[i].div; @@ -57,7 +59,7 @@ Signed-off-by: Daniel Matuschek pll_div->freqmode = post_table[i].freqmode; pll_div->mclkdiv = post_table[i].mclkdiv; target *= post_table[i].div; -@@ -387,8 +390,11 @@ static int wm8804_set_pll(struct snd_soc +@@ -387,8 +390,11 @@ static int wm8804_set_pll(struct snd_soc_dai *dai, int pll_id, } else { int ret; struct pll_div pll_div; @@ -70,7 +72,7 @@ Signed-off-by: Daniel Matuschek if (ret) return ret; -@@ -452,6 +458,7 @@ static int wm8804_set_clkdiv(struct snd_ +@@ -452,6 +458,7 @@ static int wm8804_set_clkdiv(struct snd_soc_dai *dai, int div_id, int div) { struct snd_soc_codec *codec; @@ -78,7 +80,7 @@ Signed-off-by: Daniel Matuschek codec = dai->codec; switch (div_id) { -@@ -459,6 +466,10 @@ static int wm8804_set_clkdiv(struct snd_ +@@ -459,6 +466,10 @@ static int wm8804_set_clkdiv(struct snd_soc_dai *dai, snd_soc_update_bits(codec, WM8804_PLL5, 0x30, (div & 0x3) << 4); break; @@ -89,7 +91,7 @@ Signed-off-by: Daniel Matuschek default: dev_err(dai->dev, "Unknown clock divider: %d\n", div_id); return -EINVAL; -@@ -641,7 +652,7 @@ static const struct snd_soc_dai_ops wm88 +@@ -641,7 +652,7 @@ static const struct snd_soc_dai_ops wm8804_dai_ops = { }; #define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ @@ -98,6 +100,8 @@ Signed-off-by: Daniel Matuschek #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ +diff --git a/sound/soc/codecs/wm8804.h b/sound/soc/codecs/wm8804.h +index 8ec14f5..e72d4f4 100644 --- a/sound/soc/codecs/wm8804.h +++ b/sound/soc/codecs/wm8804.h @@ -57,5 +57,9 @@ @@ -110,3 +114,6 @@ Signed-off-by: Daniel Matuschek +#define WM8804_MCLKDIV_128FS 1 #endif /* _WM8804_H */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0157-ASoC-BCM-Add-support-for-HiFiBerry-Digi.patch b/target/linux/brcm2708/patches-3.10/0157-ASoC-BCM-Add-support-for-HiFiBerry-Digi.patch index bd3ab1ba5bc..d64fd4d3127 100644 --- a/target/linux/brcm2708/patches-3.10/0157-ASoC-BCM-Add-support-for-HiFiBerry-Digi.patch +++ b/target/linux/brcm2708/patches-3.10/0157-ASoC-BCM-Add-support-for-HiFiBerry-Digi.patch @@ -1,7 +1,7 @@ -From 32dd343121ac18b02d642046517f0184c0652c57 Mon Sep 17 00:00:00 2001 +From 4800df016d86e646023966b727915a06f9c9ccd9 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Wed, 15 Jan 2014 21:42:08 +0100 -Subject: [PATCH 157/174] ASoC: BCM:Add support for HiFiBerry Digi. Driver is +Subject: [PATCH 157/196] ASoC: BCM:Add support for HiFiBerry Digi. Driver is based on the patched WM8804 driver. Signed-off-by: Daniel Matuschek @@ -12,6 +12,8 @@ Signed-off-by: Daniel Matuschek 3 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 sound/soc/bcm/hifiberry_digi.c +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 1c1f5cf..7e2afc2 100644 --- a/sound/soc/bcm/Kconfig +++ b/sound/soc/bcm/Kconfig @@ -16,9 +16,16 @@ config SND_BCM2708_SOC_HIFIBERRY_DAC @@ -33,9 +35,11 @@ Signed-off-by: Daniel Matuschek - Say Y or M if you want to add support for RPi-DAC. \ No newline at end of file + Say Y or M if you want to add support for RPi-DAC. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 95a9d44..54e37eb 100644 --- a/sound/soc/bcm/Makefile +++ b/sound/soc/bcm/Makefile -@@ -5,7 +5,9 @@ obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd +@@ -5,7 +5,9 @@ obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd-soc-bcm2708-i2s.o # BCM2708 Machine Support snd-soc-hifiberry-dac-objs := hifiberry_dac.o @@ -45,6 +49,9 @@ Signed-off-by: Daniel Matuschek obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o +obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o +diff --git a/sound/soc/bcm/hifiberry_digi.c b/sound/soc/bcm/hifiberry_digi.c +new file mode 100644 +index 0000000..5b37e66 --- /dev/null +++ b/sound/soc/bcm/hifiberry_digi.c @@ -0,0 +1,153 @@ @@ -201,3 +208,6 @@ Signed-off-by: Daniel Matuschek +MODULE_AUTHOR("Daniel Matuschek "); +MODULE_DESCRIPTION("ASoC Driver for HifiBerry Digi"); +MODULE_LICENSE("GPL v2"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0158-BCM2708-Added-support-for-HiFiBerry-Digi-board.patch b/target/linux/brcm2708/patches-3.10/0158-BCM2708-Added-support-for-HiFiBerry-Digi-board.patch index e4882b2cf52..c0a274e3ed7 100644 --- a/target/linux/brcm2708/patches-3.10/0158-BCM2708-Added-support-for-HiFiBerry-Digi-board.patch +++ b/target/linux/brcm2708/patches-3.10/0158-BCM2708-Added-support-for-HiFiBerry-Digi-board.patch @@ -1,7 +1,7 @@ -From cdc5a0a83c2eed46dd646f50f532f7820b18c28d Mon Sep 17 00:00:00 2001 +From d6b3cadd9e3b884a63fe00f78956362c846122e1 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:26:08 +0100 -Subject: [PATCH 158/174] BCM2708: Added support for HiFiBerry Digi board Board +Subject: [PATCH 158/196] BCM2708: Added support for HiFiBerry Digi board Board initalization by I2C Signed-off-by: Daniel Matuschek @@ -9,9 +9,11 @@ Signed-off-by: Daniel Matuschek arch/arm/mach-bcm2708/bcm2708.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 46586d8..993379c 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c -@@ -654,6 +654,21 @@ static struct platform_device snd_pcm510 +@@ -654,6 +654,21 @@ static struct platform_device snd_pcm5102a_codec_device = { }; #endif @@ -45,3 +47,6 @@ Signed-off-by: Daniel Matuschek #if defined(CONFIG_SND_BCM2708_SOC_RPI_DAC) || defined(CONFIG_SND_BCM2708_SOC_RPI_DAC_MODULE) bcm_register_device(&snd_rpi_dac_device); bcm_register_device(&snd_pcm1794a_codec_device); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0159-BCM2708-Added-HiFiBerry-Digi-configuration-option.patch b/target/linux/brcm2708/patches-3.10/0159-BCM2708-Added-HiFiBerry-Digi-configuration-option.patch index cc0213e9c06..ce7ee67759a 100644 --- a/target/linux/brcm2708/patches-3.10/0159-BCM2708-Added-HiFiBerry-Digi-configuration-option.patch +++ b/target/linux/brcm2708/patches-3.10/0159-BCM2708-Added-HiFiBerry-Digi-configuration-option.patch @@ -1,7 +1,7 @@ -From 038fbc00d6468c8087ff67b3946d098dd888a219 Mon Sep 17 00:00:00 2001 +From bd863949a53390a5b95380a68aac3f035635eb47 Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:27:28 +0100 -Subject: [PATCH 159/174] BCM2708: Added HiFiBerry Digi configuration option It +Subject: [PATCH 159/196] BCM2708: Added HiFiBerry Digi configuration option It will be compiled as a module by default. This also includes the WM8804 driver. @@ -10,6 +10,8 @@ Signed-off-by: Daniel Matuschek arch/arm/configs/bcmrpi_defconfig | 2 ++ 1 file changed, 2 insertions(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index fb23712..6f21b7c 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -737,8 +737,10 @@ CONFIG_SND_USB_CAIAQ=m @@ -23,3 +25,6 @@ Signed-off-by: Daniel Matuschek CONFIG_SND_BCM2708_SOC_RPI_DAC=m CONFIG_SOUND_PRIME=m CONFIG_HIDRAW=y +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0160-ASoC-wm8804-Set-idle_bias_off-to-false.patch b/target/linux/brcm2708/patches-3.10/0160-ASoC-wm8804-Set-idle_bias_off-to-false.patch index 7e49adfe245..c9927ab932d 100644 --- a/target/linux/brcm2708/patches-3.10/0160-ASoC-wm8804-Set-idle_bias_off-to-false.patch +++ b/target/linux/brcm2708/patches-3.10/0160-ASoC-wm8804-Set-idle_bias_off-to-false.patch @@ -1,7 +1,7 @@ -From e9bdcaa2b42e66aa2774b5cbdd0238b2f4d9f345 Mon Sep 17 00:00:00 2001 +From 8a9745e5671060860dd795573bff57cbcb33507f Mon Sep 17 00:00:00 2001 From: Daniel Matuschek Date: Thu, 16 Jan 2014 07:36:35 +0100 -Subject: [PATCH 160/174] ASoC: wm8804: Set idle_bias_off to false Idle bias +Subject: [PATCH 160/196] ASoC: wm8804: Set idle_bias_off to false Idle bias has been change to remove warning on driver startup Signed-off-by: Daniel Matuschek @@ -9,9 +9,11 @@ Signed-off-by: Daniel Matuschek sound/soc/codecs/wm8804.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c +index 7ec8381..50d0f0c 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c -@@ -685,7 +685,7 @@ static struct snd_soc_codec_driver soc_c +@@ -685,7 +685,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8804 = { .suspend = wm8804_suspend, .resume = wm8804_resume, .set_bias_level = wm8804_set_bias_level, @@ -20,3 +22,6 @@ Signed-off-by: Daniel Matuschek .controls = wm8804_snd_controls, .num_controls = ARRAY_SIZE(wm8804_snd_controls), +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0161-Revert-bcm2708-fix-gpio_to_irq-name-clash.patch b/target/linux/brcm2708/patches-3.10/0161-Revert-bcm2708-fix-gpio_to_irq-name-clash.patch index 7d1ba93facb..177a3948afd 100644 --- a/target/linux/brcm2708/patches-3.10/0161-Revert-bcm2708-fix-gpio_to_irq-name-clash.patch +++ b/target/linux/brcm2708/patches-3.10/0161-Revert-bcm2708-fix-gpio_to_irq-name-clash.patch @@ -1,7 +1,7 @@ -From b279f5b69e5ce5f25bfc85f0b469aa023e27920a Mon Sep 17 00:00:00 2001 +From ff068b36af8d2ee9634b0b50922656c350211ec5 Mon Sep 17 00:00:00 2001 From: Joerg Faschingbauer Date: Sat, 18 Jan 2014 22:58:00 +0100 -Subject: [PATCH 161/174] Revert "bcm2708: fix gpio_to_irq() name clash" +Subject: [PATCH 161/196] Revert "bcm2708: fix gpio_to_irq() name clash" This reverts commit dee3db1c55e9a1c2efce858f44d9810cc2392b18. @@ -12,9 +12,11 @@ Conflicts: arch/arm/mach-bcm2708/include/mach/gpio.h | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) +diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c +index 1d93ad8..bab8a49 100644 --- a/arch/arm/mach-bcm2708/bcm2708_gpio.c +++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c -@@ -137,9 +137,9 @@ static void bcm2708_gpio_set(struct gpio +@@ -137,9 +137,9 @@ static void bcm2708_gpio_set(struct gpio_chip *gc, unsigned offset, int value) #if BCM_GPIO_USE_IRQ @@ -26,7 +28,7 @@ Conflicts: } static int bcm2708_gpio_irq_set_type(struct irq_data *d, unsigned type) -@@ -147,22 +147,22 @@ static int bcm2708_gpio_irq_set_type(str +@@ -147,22 +147,22 @@ static int bcm2708_gpio_irq_set_type(struct irq_data *d, unsigned type) unsigned irq = d->irq; struct bcm2708_gpio *gpio = irq_get_chip_data(irq); @@ -57,7 +59,7 @@ Conflicts: return 0; } -@@ -170,7 +170,7 @@ static void bcm2708_gpio_irq_mask(struct +@@ -170,7 +170,7 @@ static void bcm2708_gpio_irq_mask(struct irq_data *d) { unsigned irq = d->irq; struct bcm2708_gpio *gpio = irq_get_chip_data(irq); @@ -66,7 +68,7 @@ Conflicts: unsigned gb = gn / 32; unsigned long rising = readl(gpio->base + GPIOREN(gb)); unsigned long falling = readl(gpio->base + GPIOFEN(gb)); -@@ -189,7 +189,7 @@ static void bcm2708_gpio_irq_unmask(stru +@@ -189,7 +189,7 @@ static void bcm2708_gpio_irq_unmask(struct irq_data *d) { unsigned irq = d->irq; struct bcm2708_gpio *gpio = irq_get_chip_data(irq); @@ -75,7 +77,7 @@ Conflicts: unsigned gb = gn / 32; unsigned long rising = readl(gpio->base + GPIOREN(gb)); unsigned long falling = readl(gpio->base + GPIOFEN(gb)); -@@ -244,7 +244,7 @@ static irqreturn_t bcm2708_gpio_interrup +@@ -244,7 +244,7 @@ static irqreturn_t bcm2708_gpio_interrupt(int irq, void *dev_id) edsr = readl(__io_address(GPIO_BASE) + GPIOEDS(bank)); for_each_set_bit(i, &edsr, 32) { gpio = i + bank * 32; @@ -84,7 +86,7 @@ Conflicts: } writel(0xffffffff, __io_address(GPIO_BASE) + GPIOEDS(bank)); } -@@ -261,7 +261,7 @@ static void bcm2708_gpio_irq_init(struct +@@ -261,7 +261,7 @@ static void bcm2708_gpio_irq_init(struct bcm2708_gpio *ucb) { unsigned irq; @@ -93,6 +95,8 @@ Conflicts: for (irq = GPIO_IRQ_START; irq < (GPIO_IRQ_START + GPIO_IRQS); irq++) { irq_set_chip_data(irq, ucb); +diff --git a/arch/arm/mach-bcm2708/include/mach/gpio.h b/arch/arm/mach-bcm2708/include/mach/gpio.h +index f09639a..f600bc7 100644 --- a/arch/arm/mach-bcm2708/include/mach/gpio.h +++ b/arch/arm/mach-bcm2708/include/mach/gpio.h @@ -11,8 +11,8 @@ @@ -106,3 +110,6 @@ Conflicts: #endif +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0162-bcm2708-select-NEED_MACH_GPIO_H.patch b/target/linux/brcm2708/patches-3.10/0162-bcm2708-select-NEED_MACH_GPIO_H.patch index cbc262fa6d1..9f0c7ad3e93 100644 --- a/target/linux/brcm2708/patches-3.10/0162-bcm2708-select-NEED_MACH_GPIO_H.patch +++ b/target/linux/brcm2708/patches-3.10/0162-bcm2708-select-NEED_MACH_GPIO_H.patch @@ -1,7 +1,7 @@ -From d1df97f2d10654ace3d14a77a2de866ce4cd8d4b Mon Sep 17 00:00:00 2001 +From 89fe6af687fcbbae28b05e10debe0de60b6ee5a3 Mon Sep 17 00:00:00 2001 From: Joerg Faschingbauer Date: Sat, 18 Jan 2014 23:15:07 +0100 -Subject: [PATCH 162/174] bcm2708: select NEED_MACH_GPIO_H +Subject: [PATCH 162/196] bcm2708: select NEED_MACH_GPIO_H makers out there use to use gpio_to_irq() in board setup code. it is necessary that gpio_to_irq() be defined as a macro for this to work. @@ -18,6 +18,8 @@ makers (though this clearly is in the way of devicetree). arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 4e36ccd..7707c27 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -367,6 +367,7 @@ config ARCH_BCM2708 @@ -28,3 +30,6 @@ makers (though this clearly is in the way of devicetree). select NEED_MACH_MEMORY_H select CLKDEV_LOOKUP select ARCH_HAS_CPUFREQ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0163-config-CONFIG_RT2800USB_RT55XX-for-more-RaLink-ID.patch b/target/linux/brcm2708/patches-3.10/0163-config-CONFIG_RT2800USB_RT55XX-for-more-RaLink-ID.patch index 1ef29992499..b97d4da2021 100644 --- a/target/linux/brcm2708/patches-3.10/0163-config-CONFIG_RT2800USB_RT55XX-for-more-RaLink-ID.patch +++ b/target/linux/brcm2708/patches-3.10/0163-config-CONFIG_RT2800USB_RT55XX-for-more-RaLink-ID.patch @@ -1,13 +1,15 @@ -From 25d842ed0d8cc82ba025f93744bf06bc25ccf3ce Mon Sep 17 00:00:00 2001 +From de7811e92cafc11532ae449deeb5d50f41ef20ea Mon Sep 17 00:00:00 2001 From: juleq Date: Mon, 27 Jan 2014 21:15:04 +0100 -Subject: [PATCH 163/174] config: CONFIG_RT2800USB_RT55XX for more RaLink ID +Subject: [PATCH 163/196] config: CONFIG_RT2800USB_RT55XX for more RaLink ID I added CONFIG_RT2800USB_RT55XX=y to have my el cheapo dual band wlan adapter (RaLink chip, MediaTek brand, 148f:5572) supported by RT2800. I tested with 3.10.27+ and it works. 5GHz for 5-10 Euro. --- arch/arm/configs/bcmrpi_defconfig | 1 + 1 file changed, 1 insertion(+) +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 6f21b7c..56068e2 100644 --- a/arch/arm/configs/bcmrpi_defconfig +++ b/arch/arm/configs/bcmrpi_defconfig @@ -488,6 +488,7 @@ CONFIG_RT2500USB=m @@ -18,3 +20,6 @@ I added CONFIG_RT2800USB_RT55XX=y to have my el cheapo dual band wlan adapter (R CONFIG_RT2800USB_UNKNOWN=y CONFIG_ZD1211RW=m CONFIG_MWIFIEX=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0164-video-relax-the-dimensions-check-for-rotated-display.patch b/target/linux/brcm2708/patches-3.10/0164-video-relax-the-dimensions-check-for-rotated-display.patch index bb731187be2..d8ac1d93a6b 100644 --- a/target/linux/brcm2708/patches-3.10/0164-video-relax-the-dimensions-check-for-rotated-display.patch +++ b/target/linux/brcm2708/patches-3.10/0164-video-relax-the-dimensions-check-for-rotated-display.patch @@ -1,16 +1,18 @@ -From cadc956e10cf0811927600dfe1f4657d92aad32a Mon Sep 17 00:00:00 2001 +From c53c5708dcae81fbda536e38bbca6fa45886ffa9 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 29 Jan 2014 21:37:00 +0000 -Subject: [PATCH 164/174] video: relax the dimensions check for rotated +Subject: [PATCH 164/196] video: relax the dimensions check for rotated displays --- drivers/video/bcm2708_fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) +diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c +index 5758146..935288d 100644 --- a/drivers/video/bcm2708_fb.c +++ b/drivers/video/bcm2708_fb.c -@@ -255,8 +255,8 @@ static int bcm2708_fb_check_var(struct f +@@ -255,8 +255,8 @@ static int bcm2708_fb_check_var(struct fb_var_screeninfo *var, else if (var->vmode & FB_VMODE_INTERLACED) yres = (yres + 1) / 2; @@ -21,7 +23,7 @@ Subject: [PATCH 164/174] video: relax the dimensions check for rotated "special treatment required! (TODO)\n"); return -EINVAL; } -@@ -415,7 +415,7 @@ static void bcm2708_fb_copyarea(struct f +@@ -415,7 +415,7 @@ static void bcm2708_fb_copyarea(struct fb_info *info, /* Fallback to cfb_copyarea() if we don't like something */ if (bytes_per_pixel > 4 || @@ -30,3 +32,6 @@ Subject: [PATCH 164/174] video: relax the dimensions check for rotated region->width <= 0 || region->width > info->var.xres || region->height <= 0 || region->height > info->var.yres || region->sx < 0 || region->sx >= info->var.xres || +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0165-bcm2708_fb-Remove-unnecessary-second-call-of-bcm2708.patch b/target/linux/brcm2708/patches-3.10/0165-bcm2708_fb-Remove-unnecessary-second-call-of-bcm2708.patch index 32b4cff3ba1..e688fddf391 100644 --- a/target/linux/brcm2708/patches-3.10/0165-bcm2708_fb-Remove-unnecessary-second-call-of-bcm2708.patch +++ b/target/linux/brcm2708/patches-3.10/0165-bcm2708_fb-Remove-unnecessary-second-call-of-bcm2708.patch @@ -1,7 +1,7 @@ -From 543d19bb3d96c1e34a2eedc0d7e2d7f1b14e5f3d Mon Sep 17 00:00:00 2001 +From fc133162fe020547e00f04ce1d74a3bcf19dabdb Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 5 Feb 2014 17:00:22 +0000 -Subject: [PATCH 165/174] bcm2708_fb: Remove unnecessary second call of +Subject: [PATCH 165/196] bcm2708_fb: Remove unnecessary second call of bcm2708_fb_debugfs_init See: https://github.com/raspberrypi/linux/issues/521 @@ -9,9 +9,11 @@ See: https://github.com/raspberrypi/linux/issues/521 drivers/video/bcm2708_fb.c | 3 --- 1 file changed, 3 deletions(-) +diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c +index 935288d..e8bbcc3 100644 --- a/drivers/video/bcm2708_fb.c +++ b/drivers/video/bcm2708_fb.c -@@ -646,9 +646,6 @@ static int bcm2708_fb_probe(struct platf +@@ -646,9 +646,6 @@ static int bcm2708_fb_probe(struct platform_device *dev) bcm2708_fb_debugfs_init(fb); @@ -21,3 +23,6 @@ See: https://github.com/raspberrypi/linux/issues/521 fb->cb_base = dma_alloc_writecombine(&dev->dev, SZ_64K, &fb->cb_handle, GFP_KERNEL); if (!fb->cb_base) { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0166-bcm2708-Allow-disk-activity-led-gpio-to-be-specified.patch b/target/linux/brcm2708/patches-3.10/0166-bcm2708-Allow-disk-activity-led-gpio-to-be-specified.patch index dd96317a5f5..a333f58f279 100644 --- a/target/linux/brcm2708/patches-3.10/0166-bcm2708-Allow-disk-activity-led-gpio-to-be-specified.patch +++ b/target/linux/brcm2708/patches-3.10/0166-bcm2708-Allow-disk-activity-led-gpio-to-be-specified.patch @@ -1,12 +1,14 @@ -From e2fe98dc5d658c504d31a0ad1eb9748a2001ce09 Mon Sep 17 00:00:00 2001 +From 6fa3166b901b1f3a88e52c232c09df48c430303d Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 11 Feb 2014 17:03:51 +0000 -Subject: [PATCH 166/174] bcm2708: Allow disk activity led gpio to be specified +Subject: [PATCH 166/196] bcm2708: Allow disk activity led gpio to be specified --- arch/arm/mach-bcm2708/bcm2708.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index 993379c..caa9f48 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -83,6 +83,8 @@ @@ -18,7 +20,7 @@ Subject: [PATCH 166/174] bcm2708: Allow disk activity led gpio to be specified static unsigned reboot_part = 0; static unsigned w1_gpio_pin = W1_GPIO; -@@ -965,7 +967,9 @@ static struct platform_device bcm2708_le +@@ -965,7 +967,9 @@ static struct platform_device bcm2708_led_device = { static void __init bcm2708_init_led(void) { @@ -37,3 +39,6 @@ Subject: [PATCH 166/174] bcm2708: Allow disk activity led gpio to be specified +module_param(disk_led_active_low, uint, 0644); module_param(reboot_part, uint, 0644); module_param(w1_gpio_pin, uint, 0644); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch b/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch index 5636c44f21b..f260ecbb818 100644 --- a/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch +++ b/target/linux/brcm2708/patches-3.10/0167-bcm2708fb-Allow-swapping-of-red-blue-in-24-32-modes.patch @@ -1,15 +1,17 @@ -From 4e0660161587681630da35f525cacf17bed58795 Mon Sep 17 00:00:00 2001 +From 4072d89852bcc0d69eab31908b0ea7870c6b9e1e Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 12 Feb 2014 12:01:56 +0000 -Subject: [PATCH 167/174] bcm2708fb: Allow swapping of red/blue in 24/32 modes +Subject: [PATCH 167/196] bcm2708fb: Allow swapping of red/blue in 24/32 modes --- drivers/video/bcm2708_fb.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) +diff --git a/drivers/video/bcm2708_fb.c b/drivers/video/bcm2708_fb.c +index e8bbcc3..86f07fd 100644 --- a/drivers/video/bcm2708_fb.c +++ b/drivers/video/bcm2708_fb.c -@@ -53,6 +53,7 @@ static u32 dma_busy_wait_threshold = 1<< +@@ -53,6 +53,7 @@ static u32 dma_busy_wait_threshold = 1<<15; module_param(dma_busy_wait_threshold, int, 0644); MODULE_PARM_DESC(dma_busy_wait_threshold, "Busy-wait for DMA completion below this area"); @@ -17,7 +19,7 @@ Subject: [PATCH 167/174] bcm2708fb: Allow swapping of red/blue in 24/32 modes /* this data structure describes each frame buffer device we find */ -@@ -185,7 +186,12 @@ static int bcm2708_fb_set_bitfields(stru +@@ -185,7 +186,12 @@ static int bcm2708_fb_set_bitfields(struct fb_var_screeninfo *var) * encoded in the pixel data. Calculate their position from * the bitfield length defined above. */ @@ -31,7 +33,7 @@ Subject: [PATCH 167/174] bcm2708fb: Allow swapping of red/blue in 24/32 modes var->red.offset = 0; var->green.offset = var->red.offset + var->red.length; var->blue.offset = var->green.offset + var->green.length; -@@ -618,8 +624,8 @@ static int bcm2708_fb_register(struct bc +@@ -618,8 +624,8 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb) fb_set_var(&fb->fb, &fb->fb.var); @@ -55,3 +57,6 @@ Subject: [PATCH 167/174] bcm2708fb: Allow swapping of red/blue in 24/32 modes MODULE_PARM_DESC(fbheight, "Height of ARM Framebuffer"); MODULE_PARM_DESC(fbdepth, "Bit depth of ARM Framebuffer"); +MODULE_PARM_DESC(fbswap, "Swap order of red and blue in 24 and 32 bit modes"); +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0168-spidev-fix-hang-when-transfer_one_message-fails.patch b/target/linux/brcm2708/patches-3.10/0168-spidev-fix-hang-when-transfer_one_message-fails.patch index 855f1fe30c0..655d322e15e 100644 --- a/target/linux/brcm2708/patches-3.10/0168-spidev-fix-hang-when-transfer_one_message-fails.patch +++ b/target/linux/brcm2708/patches-3.10/0168-spidev-fix-hang-when-transfer_one_message-fails.patch @@ -1,7 +1,7 @@ -From b68b4448dc37e5fd510f1bb9bbd62722ad497f41 Mon Sep 17 00:00:00 2001 +From d02bc1f83cf08d59c159eb2e1263a3b4a2addc90 Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Sun, 5 Jan 2014 17:39:26 -0600 -Subject: [PATCH 168/174] spidev: fix hang when transfer_one_message fails +Subject: [PATCH 168/196] spidev: fix hang when transfer_one_message fails commit e120cc0dcf2880a4c5c0a6cb27b655600a1cfa1d upstream. @@ -25,9 +25,11 @@ Signed-off-by: Greg Kroah-Hartman drivers/spi/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) +diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c +index 32b7bb1..ca99ac9 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -584,7 +584,9 @@ static void spi_pump_messages(struct kth +@@ -584,7 +584,9 @@ static void spi_pump_messages(struct kthread_work *work) ret = master->transfer_one_message(master, master->cur_msg); if (ret) { dev_err(&master->dev, @@ -38,3 +40,6 @@ Signed-off-by: Greg Kroah-Hartman return; } } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0169-V4L2-H264-profile-level-ctrls-FPS-control-and-auto-e.patch b/target/linux/brcm2708/patches-3.10/0169-V4L2-H264-profile-level-ctrls-FPS-control-and-auto-e.patch index 4b8df8f0f50..4a6ba46ae84 100644 --- a/target/linux/brcm2708/patches-3.10/0169-V4L2-H264-profile-level-ctrls-FPS-control-and-auto-e.patch +++ b/target/linux/brcm2708/patches-3.10/0169-V4L2-H264-profile-level-ctrls-FPS-control-and-auto-e.patch @@ -1,7 +1,7 @@ -From 6b3c057ec5705d3c7556d4755103a2650d3aaaf5 Mon Sep 17 00:00:00 2001 +From 94cf90dae250a9dcb3b52b655a94e2106a422698 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 11:18:20 +0000 -Subject: [PATCH 169/174] V4L2: H264 profile & level ctrls, FPS control and +Subject: [PATCH 169/196] V4L2: H264 profile & level ctrls, FPS control and auto exp pri Several control handling updates. @@ -17,6 +17,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/mmal-parameters.h | 87 +++++++++ 4 files changed, 383 insertions(+), 48 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 7f99a14..6d0d77a 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -36,7 +36,8 @@ @@ -29,7 +31,7 @@ Signed-off-by: Dave Stevenson #define MAX_WIDTH 2592 #define MAX_HEIGHT 1944 #define MIN_BUFFER_SIZE (80*1024) -@@ -56,7 +57,7 @@ MODULE_PARM_DESC(bcm2835_v4l2_debug, "De +@@ -56,7 +57,7 @@ MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2"); static struct bm2835_mmal_dev *gdev; /* global device data */ #define FPS_MIN 1 @@ -38,7 +40,7 @@ Signed-off-by: Dave Stevenson /* timeperframe: min/max and default */ static const struct v4l2_fract -@@ -903,10 +904,8 @@ static int mmal_setup_components(struct +@@ -903,10 +904,8 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, camera_port->es.video.crop.y = 0; camera_port->es.video.crop.width = f->fmt.pix.width; camera_port->es.video.crop.height = f->fmt.pix.height; @@ -51,7 +53,7 @@ Signed-off-by: Dave Stevenson ret = vchiq_mmal_port_set_format(dev->instance, camera_port); -@@ -940,8 +939,10 @@ static int mmal_setup_components(struct +@@ -940,8 +939,10 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, preview_port->es.video.crop.y = 0; preview_port->es.video.crop.width = f->fmt.pix.width; preview_port->es.video.crop.height = f->fmt.pix.height; @@ -64,7 +66,7 @@ Signed-off-by: Dave Stevenson ret = vchiq_mmal_port_set_format(dev->instance, preview_port); if (overlay_enabled) { ret = vchiq_mmal_port_connect_tunnel( -@@ -1116,22 +1117,56 @@ static int vidioc_s_fmt_vid_cap(struct f +@@ -1116,22 +1117,56 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, } ret = mmal_setup_components(dev, f); @@ -123,7 +125,7 @@ Signed-off-by: Dave Stevenson fival->type = V4L2_FRMIVAL_TYPE_CONTINUOUS; -@@ -1167,7 +1202,6 @@ static int vidioc_s_parm(struct file *fi +@@ -1167,7 +1202,6 @@ static int vidioc_s_parm(struct file *file, void *priv, struct bm2835_mmal_dev *dev = video_drvdata(file); struct v4l2_fract tpf; struct mmal_parameter_rational fps_param; @@ -131,7 +133,7 @@ Signed-off-by: Dave Stevenson if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; -@@ -1183,27 +1217,11 @@ static int vidioc_s_parm(struct file *fi +@@ -1183,27 +1217,11 @@ static int vidioc_s_parm(struct file *file, void *priv, parm->parm.capture.timeperframe = tpf; parm->parm.capture.readbuffers = 1; @@ -164,7 +166,7 @@ Signed-off-by: Dave Stevenson return 0; } -@@ -1236,6 +1254,7 @@ static const struct v4l2_ioctl_ops camer +@@ -1236,6 +1254,7 @@ static const struct v4l2_ioctl_ops camera0_ioctl_ops = { .vidioc_querybuf = vb2_ioctl_querybuf, .vidioc_qbuf = vb2_ioctl_qbuf, .vidioc_dqbuf = vb2_ioctl_dqbuf, @@ -172,7 +174,7 @@ Signed-off-by: Dave Stevenson .vidioc_enum_frameintervals = vidioc_enum_frameintervals, .vidioc_g_parm = vidioc_g_parm, .vidioc_s_parm = vidioc_s_parm, -@@ -1331,10 +1350,8 @@ static int __init mmal_init(struct bm283 +@@ -1331,10 +1350,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) format->es->video.crop.y = 0; format->es->video.crop.width = 1024; format->es->video.crop.height = 768; @@ -185,7 +187,7 @@ Signed-off-by: Dave Stevenson format = &dev->component[MMAL_COMPONENT_CAMERA]-> -@@ -1349,10 +1366,8 @@ static int __init mmal_init(struct bm283 +@@ -1349,10 +1366,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) format->es->video.crop.y = 0; format->es->video.crop.width = 1024; format->es->video.crop.height = 768; @@ -198,7 +200,7 @@ Signed-off-by: Dave Stevenson format = &dev->component[MMAL_COMPONENT_CAMERA]-> -@@ -1366,7 +1381,7 @@ static int __init mmal_init(struct bm283 +@@ -1366,7 +1381,7 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) format->es->video.crop.y = 0; format->es->video.crop.width = 2592; format->es->video.crop.height = 1944; @@ -207,7 +209,7 @@ Signed-off-by: Dave Stevenson format->es->video.frame_rate.den = 1; dev->capture.width = format->es->video.width; -@@ -1374,6 +1389,8 @@ static int __init mmal_init(struct bm283 +@@ -1374,6 +1389,8 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) dev->capture.fmt = &formats[0]; dev->capture.encode_component = NULL; dev->capture.timeperframe = tpf_default; @@ -216,7 +218,7 @@ Signed-off-by: Dave Stevenson /* get the preview component ready */ ret = vchiq_mmal_component_init( -@@ -1420,6 +1437,14 @@ static int __init mmal_init(struct bm283 +@@ -1420,6 +1437,14 @@ static int __init mmal_init(struct bm2835_mmal_dev *dev) } { @@ -231,6 +233,8 @@ Signed-off-by: Dave Stevenson unsigned int enable = 1; vchiq_mmal_port_parameter_set( dev->instance, +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 25aa91f..8822a1a 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -15,7 +15,7 @@ @@ -279,9 +283,11 @@ Signed-off-by: Dave Stevenson /* Debug helpers */ +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index cb062a9..45cf790 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -69,7 +69,6 @@ static const s64 bitrate_mode_qmenu[] = +@@ -69,7 +69,6 @@ static const s64 bitrate_mode_qmenu[] = { (s64)V4L2_MPEG_VIDEO_BITRATE_MODE_CBR, }; @@ -289,7 +295,7 @@ Signed-off-by: Dave Stevenson enum bm2835_mmal_ctrl_type { MMAL_CONTROL_TYPE_STD, MMAL_CONTROL_TYPE_STD_MENU, -@@ -329,6 +328,9 @@ static int ctrl_set_exposure(struct bm28 +@@ -329,6 +328,9 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, } dev->exposure_mode = exp_mode; @@ -299,7 +305,7 @@ Signed-off-by: Dave Stevenson } if (dev->exposure_mode == MMAL_PARAM_EXPOSUREMODE_OFF) -@@ -340,6 +342,8 @@ static int ctrl_set_exposure(struct bm28 +@@ -340,6 +342,8 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, ret += vchiq_mmal_port_parameter_set(dev->instance, control, MMAL_PARAMETER_EXPOSURE_MODE, &exp_mode, sizeof(u32)); @@ -308,7 +314,7 @@ Signed-off-by: Dave Stevenson return ret; } -@@ -540,8 +544,8 @@ static int ctrl_set_colfx(struct bm2835_ +@@ -540,8 +544,8 @@ static int ctrl_set_colfx(struct bm2835_mmal_dev *dev, &dev->colourfx, sizeof(dev->colourfx)); v4l2_dbg(1, bcm2835_v4l2_debug, &dev->v4l2_dev, @@ -319,7 +325,7 @@ Signed-off-by: Dave Stevenson (ret == 0 ? 0 : -EINVAL)); return (ret == 0 ? 0 : EINVAL); } -@@ -623,6 +627,117 @@ static int ctrl_set_video_encode_param_o +@@ -623,6 +627,117 @@ static int ctrl_set_video_encode_param_output(struct bm2835_mmal_dev *dev, &u32_value, sizeof(u32_value)); } @@ -437,7 +443,7 @@ Signed-off-by: Dave Stevenson static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) { struct bm2835_mmal_dev *dev = -@@ -639,6 +754,9 @@ static int bm2835_mmal_s_ctrl(struct v4l +@@ -639,6 +754,9 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) } ret = mmal_ctrl->setter(dev, ctrl, mmal_ctrl); @@ -447,7 +453,7 @@ Signed-off-by: Dave Stevenson if (mmal_ctrl->ignore_errors) ret = 0; return ret; -@@ -725,6 +843,14 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -725,6 +843,14 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { false }, { @@ -462,7 +468,7 @@ Signed-off-by: Dave Stevenson V4L2_CID_EXPOSURE_METERING, MMAL_CONTROL_TYPE_STD_MENU, ~0x7, 2, V4L2_EXPOSURE_METERING_AVERAGE, 0, NULL, -@@ -814,6 +940,39 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -814,6 +940,39 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { &ctrl_set_video_encode_param_output, true /* Errors ignored as requires latest firmware to work */ }, @@ -502,7 +508,7 @@ Signed-off-by: Dave Stevenson }; int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev) -@@ -825,13 +984,71 @@ int bm2835_mmal_set_all_camera_controls( +@@ -825,13 +984,71 @@ int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev) if ((dev->ctrls[c]) && (v4l2_ctrls[c].setter)) { ret = v4l2_ctrls[c].setter(dev, dev->ctrls[c], &v4l2_ctrls[c]); @@ -575,9 +581,11 @@ Signed-off-by: Dave Stevenson int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl) { +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +index b08a4b0..ae8fef9 100644 --- a/drivers/media/platform/bcm2835/mmal-parameters.h +++ b/drivers/media/platform/bcm2835/mmal-parameters.h -@@ -182,6 +182,14 @@ enum mmal_parameter_camera_config_timest +@@ -182,6 +182,14 @@ enum mmal_parameter_camera_config_timestamp_mode { */ }; @@ -678,3 +686,6 @@ Signed-off-by: Dave Stevenson /* video parameters */ enum mmal_parameter_video_type { +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0170-V4L2-Correct-BGR24-to-RGB24-in-format-table.patch b/target/linux/brcm2708/patches-3.10/0170-V4L2-Correct-BGR24-to-RGB24-in-format-table.patch index 12b57afacd6..01486e2eb50 100644 --- a/target/linux/brcm2708/patches-3.10/0170-V4L2-Correct-BGR24-to-RGB24-in-format-table.patch +++ b/target/linux/brcm2708/patches-3.10/0170-V4L2-Correct-BGR24-to-RGB24-in-format-table.patch @@ -1,13 +1,15 @@ -From c07faead7a537b84fda682c8f62eea977814af31 Mon Sep 17 00:00:00 2001 +From 6388f93fa432c2e6acc04d75b574b61c02d13ece Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 11:39:20 +0000 -Subject: [PATCH 170/174] V4L2: Correct BGR24 to RGB24 in format table +Subject: [PATCH 170/196] V4L2: Correct BGR24 to RGB24 in format table Signed-off-by: Dave Stevenson --- drivers/media/platform/bcm2835/bcm2835-camera.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 6d0d77a..8285e6a 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -84,8 +84,8 @@ static struct mmal_fmt formats[] = { @@ -21,3 +23,6 @@ Signed-off-by: Dave Stevenson .flags = 0, .mmal = MMAL_ENCODING_BGR24, .depth = 24, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0171-V4L2-Add-additional-pixel-formats.-Correct-colourspa.patch b/target/linux/brcm2708/patches-3.10/0171-V4L2-Add-additional-pixel-formats.-Correct-colourspa.patch index 92985ee58b0..3342a2cc9a1 100644 --- a/target/linux/brcm2708/patches-3.10/0171-V4L2-Add-additional-pixel-formats.-Correct-colourspa.patch +++ b/target/linux/brcm2708/patches-3.10/0171-V4L2-Add-additional-pixel-formats.-Correct-colourspa.patch @@ -1,7 +1,7 @@ -From 0be62650adff2cfac1aab39fc72a41b08df59885 Mon Sep 17 00:00:00 2001 +From 1f1d93391b9662de72187a5a709bacf2d25f6e86 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 12 Feb 2014 15:35:41 +0000 -Subject: [PATCH 171/174] V4L2: Add additional pixel formats. Correct +Subject: [PATCH 171/196] V4L2: Add additional pixel formats. Correct colourspace Adds the other flavours of YUYV, and NV12. @@ -12,6 +12,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/bcm2835-camera.c | 36 +++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 8285e6a..3dea993 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/media/platform/bcm2835/bcm2835-camera.c @@ -114,7 +114,39 @@ static struct mmal_fmt formats[] = { @@ -55,7 +57,7 @@ Signed-off-by: Dave Stevenson }; static struct mmal_fmt *get_format(struct v4l2_format *f) -@@ -691,7 +723,7 @@ static int vidioc_g_fbuf(struct file *fi +@@ -691,7 +723,7 @@ static int vidioc_g_fbuf(struct file *file, void *fh, a->fmt.bytesperline = (preview_port->es.video.width * 3)>>1; a->fmt.sizeimage = (preview_port->es.video.width * preview_port->es.video.height * 3)>>1; @@ -64,3 +66,6 @@ Signed-off-by: Dave Stevenson return 0; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0172-V4L2-Drop-logging-msg-from-info-to-debug.patch b/target/linux/brcm2708/patches-3.10/0172-V4L2-Drop-logging-msg-from-info-to-debug.patch index 7252369fae5..b3d1528e750 100644 --- a/target/linux/brcm2708/patches-3.10/0172-V4L2-Drop-logging-msg-from-info-to-debug.patch +++ b/target/linux/brcm2708/patches-3.10/0172-V4L2-Drop-logging-msg-from-info-to-debug.patch @@ -1,16 +1,18 @@ -From 04bb053f81e848f89b510cbd902ed22ce6bf4969 Mon Sep 17 00:00:00 2001 +From 2a1440a912c08b81aa22660d4ce0ba74b6f63116 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 14 Feb 2014 17:08:18 +0000 -Subject: [PATCH 172/174] V4L2: Drop logging msg from info to debug +Subject: [PATCH 172/196] V4L2: Drop logging msg from info to debug Signed-off-by: Dave Stevenson --- drivers/media/platform/bcm2835/mmal-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/drivers/media/platform/bcm2835/mmal-vchiq.c b/drivers/media/platform/bcm2835/mmal-vchiq.c +index 67d1ce6..76f249e 100644 --- a/drivers/media/platform/bcm2835/mmal-vchiq.c +++ b/drivers/media/platform/bcm2835/mmal-vchiq.c -@@ -1326,7 +1326,7 @@ static int port_parameter_get(struct vch +@@ -1326,7 +1326,7 @@ static int port_parameter_get(struct vchiq_mmal_instance *instance, memcpy(value, &rmsg->u.port_parameter_get_reply.value, rmsg->u.port_parameter_get_reply.size); @@ -19,3 +21,6 @@ Signed-off-by: Dave Stevenson ret, port->component->handle, port->handle, parameter_id); release_msg: +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0173-V4L2-Initial-pass-at-scene-modes.patch b/target/linux/brcm2708/patches-3.10/0173-V4L2-Initial-pass-at-scene-modes.patch index c8c8abf0702..3362217bccb 100644 --- a/target/linux/brcm2708/patches-3.10/0173-V4L2-Initial-pass-at-scene-modes.patch +++ b/target/linux/brcm2708/patches-3.10/0173-V4L2-Initial-pass-at-scene-modes.patch @@ -1,7 +1,7 @@ -From ba09044961948d93db7aa166f2829d46e81e875a Mon Sep 17 00:00:00 2001 +From 1073798a92010ecd467fba0cc720752992fd7a2a Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Fri, 14 Feb 2014 17:12:08 +0000 -Subject: [PATCH 173/174] V4L2: Initial pass at scene modes. +Subject: [PATCH 173/196] V4L2: Initial pass at scene modes. Only supports exposure mode and metering modes. @@ -11,6 +11,8 @@ Signed-off-by: Dave Stevenson drivers/media/platform/bcm2835/controls.c | 225 ++++++++++++++++++++---- 2 files changed, 199 insertions(+), 36 deletions(-) +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index 8822a1a..f389bea 100644 --- a/drivers/media/platform/bcm2835/bcm2835-camera.h +++ b/drivers/media/platform/bcm2835/bcm2835-camera.h @@ -15,7 +15,7 @@ @@ -40,9 +42,11 @@ Signed-off-by: Dave Stevenson unsigned int manual_shutter_speed; bool exp_auto_priority; +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index 45cf790..b7a7e88 100644 --- a/drivers/media/platform/bcm2835/controls.c +++ b/drivers/media/platform/bcm2835/controls.c -@@ -145,6 +145,25 @@ static const struct v4l2_to_mmal_effects +@@ -145,6 +145,25 @@ static const struct v4l2_to_mmal_effects_setting 1, 1, 0, 0, 0, {0, 0, 0, 0, 0} } }; @@ -68,7 +72,7 @@ Signed-off-by: Dave Stevenson /* control handlers*/ -@@ -296,7 +315,7 @@ static int ctrl_set_exposure(struct bm28 +@@ -296,7 +315,7 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) { @@ -77,7 +81,7 @@ Signed-off-by: Dave Stevenson u32 shutter_speed = 0; struct vchiq_mmal_port *control; int ret = 0; -@@ -317,31 +336,32 @@ static int ctrl_set_exposure(struct bm28 +@@ -317,31 +336,32 @@ static int ctrl_set_exposure(struct bm2835_mmal_dev *dev, case V4L2_EXPOSURE_MANUAL: exp_mode = MMAL_PARAM_EXPOSUREMODE_OFF; break; @@ -129,7 +133,7 @@ Signed-off-by: Dave Stevenson ret += set_framerate_params(dev); return ret; -@@ -351,35 +371,38 @@ static int ctrl_set_metering_mode(struct +@@ -351,35 +371,38 @@ static int ctrl_set_metering_mode(struct bm2835_mmal_dev *dev, struct v4l2_ctrl *ctrl, const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) { @@ -178,7 +182,7 @@ Signed-off-by: Dave Stevenson } static int ctrl_set_flicker_avoidance(struct bm2835_mmal_dev *dev, -@@ -738,6 +761,113 @@ static int ctrl_set_video_encode_profile +@@ -738,6 +761,113 @@ static int ctrl_set_video_encode_profile_level(struct bm2835_mmal_dev *dev, return ret; } @@ -292,7 +296,7 @@ Signed-off-by: Dave Stevenson static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) { struct bm2835_mmal_dev *dev = -@@ -973,6 +1103,15 @@ static const struct bm2835_mmal_v4l2_ctr +@@ -973,6 +1103,15 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { &ctrl_set_video_encode_profile_level, false }, @@ -308,7 +312,7 @@ Signed-off-by: Dave Stevenson }; int bm2835_mmal_set_all_camera_controls(struct bm2835_mmal_dev *dev) -@@ -1000,8 +1139,7 @@ int set_framerate_params(struct bm2835_m +@@ -1000,8 +1139,7 @@ int set_framerate_params(struct bm2835_mmal_dev *dev) struct mmal_parameter_fps_range fps_range; int ret; @@ -318,7 +322,7 @@ Signed-off-by: Dave Stevenson (dev->exp_auto_priority)) { /* Variable FPS. Define min FPS as 1fps. * Max as max defined FPS. -@@ -1049,6 +1187,7 @@ int set_framerate_params(struct bm2835_m +@@ -1049,6 +1187,7 @@ int set_framerate_params(struct bm2835_mmal_dev *dev) return ret; } @@ -326,7 +330,7 @@ Signed-off-by: Dave Stevenson int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl) { -@@ -1068,10 +1207,30 @@ int bm2835_mmal_init_controls(struct bm2 +@@ -1068,10 +1207,30 @@ int bm2835_mmal_init_controls(struct bm2835_mmal_dev *dev, break; case MMAL_CONTROL_TYPE_STD_MENU: @@ -358,3 +362,6 @@ Signed-off-by: Dave Stevenson case MMAL_CONTROL_TYPE_INT_MENU: dev->ctrls[c] = v4l2_ctrl_new_int_menu(hdl, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0174-alsa-Make-alsa-work-queue-high-priority.-Fixes-under.patch b/target/linux/brcm2708/patches-3.10/0174-alsa-Make-alsa-work-queue-high-priority.-Fixes-under.patch index e490b6d04ed..5f7fc072b30 100644 --- a/target/linux/brcm2708/patches-3.10/0174-alsa-Make-alsa-work-queue-high-priority.-Fixes-under.patch +++ b/target/linux/brcm2708/patches-3.10/0174-alsa-Make-alsa-work-queue-high-priority.-Fixes-under.patch @@ -1,16 +1,18 @@ -From b4ac9f9ce1c102b2550608161f466b06af1ebf00 Mon Sep 17 00:00:00 2001 +From 7283e37aaa873478ecc56b3eb602249e9be6ab84 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Fri, 21 Feb 2014 17:15:59 +0000 -Subject: [PATCH 174/174] alsa: Make alsa work queue high priority. Fixes +Subject: [PATCH 174/196] alsa: Make alsa work queue high priority. Fixes underrun issues when using negitive nice priority --- sound/arm/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/sound/arm/bcm2835-vchiq.c b/sound/arm/bcm2835-vchiq.c +index 169d899..eaa23a8 100755 --- a/sound/arm/bcm2835-vchiq.c +++ b/sound/arm/bcm2835-vchiq.c -@@ -178,7 +178,7 @@ int bcm2835_audio_write(bcm2835_alsa_str +@@ -178,7 +178,7 @@ int bcm2835_audio_write(bcm2835_alsa_stream_t *alsa_stream, void my_workqueue_init(bcm2835_alsa_stream_t * alsa_stream) { @@ -19,3 +21,6 @@ Subject: [PATCH 174/174] alsa: Make alsa work queue high priority. Fixes return; } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0175-ASoc-Don-t-report-S24_LE-support-it-produces-white-n.patch b/target/linux/brcm2708/patches-3.10/0175-ASoc-Don-t-report-S24_LE-support-it-produces-white-n.patch new file mode 100644 index 00000000000..530c0023106 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0175-ASoc-Don-t-report-S24_LE-support-it-produces-white-n.patch @@ -0,0 +1,26 @@ +From d9bf66aadd1f0238d2f055a9204e892f3b8d9366 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Fri, 28 Feb 2014 15:26:33 +0000 +Subject: [PATCH 175/196] ASoc: Don't report S24_LE support, it produces white + noise with xbmc + +--- + sound/soc/codecs/pcm5102a.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sound/soc/codecs/pcm5102a.c b/sound/soc/codecs/pcm5102a.c +index 126f1e9..7812d34 100644 +--- a/sound/soc/codecs/pcm5102a.c ++++ b/sound/soc/codecs/pcm5102a.c +@@ -28,7 +28,7 @@ static struct snd_soc_dai_driver pcm5102a_dai = { + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_192000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | +- SNDRV_PCM_FMTBIT_S24_LE | ++ // SNDRV_PCM_FMTBIT_S24_LE | : disable for now, it causes white noise with xbmc + SNDRV_PCM_FMTBIT_S32_LE + }, + }; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0176-config-Enable-CONFIG_CHR_DEV_SG-for-SCSI-generic-dev.patch b/target/linux/brcm2708/patches-3.10/0176-config-Enable-CONFIG_CHR_DEV_SG-for-SCSI-generic-dev.patch new file mode 100644 index 00000000000..18668594894 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0176-config-Enable-CONFIG_CHR_DEV_SG-for-SCSI-generic-dev.patch @@ -0,0 +1,33 @@ +From 3f886d852f31d4980226bc83346a88f3dfa159a0 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 5 Mar 2014 23:24:00 +0000 +Subject: [PATCH 176/196] config: Enable CONFIG_CHR_DEV_SG for SCSI generic + devices See: https://github.com/raspberrypi/linux/issues/540 + +--- + arch/arm/configs/bcmrpi_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 56068e2..fe1cff3 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -392,6 +392,7 @@ CONFIG_BLK_DEV_SD=y + CONFIG_CHR_DEV_ST=m + CONFIG_CHR_DEV_OSST=m + CONFIG_BLK_DEV_SR=m ++CONFIG_CHR_DEV_SG=m + CONFIG_SCSI_MULTI_LUN=y + CONFIG_SCSI_ISCSI_ATTRS=y + CONFIG_ISCSI_TCP=m +@@ -738,7 +739,6 @@ CONFIG_SND_USB_CAIAQ=m + CONFIG_SND_USB_CAIAQ_INPUT=y + CONFIG_SND_USB_6FIRE=m + CONFIG_SND_SOC=m +-CONFIG_SND_SOC_WM8804=m + CONFIG_SND_BCM2708_SOC_I2S=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0177-Added-PCB-rev2-GPIO-pins.patch b/target/linux/brcm2708/patches-3.10/0177-Added-PCB-rev2-GPIO-pins.patch new file mode 100644 index 00000000000..d6e11a9c408 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0177-Added-PCB-rev2-GPIO-pins.patch @@ -0,0 +1,27 @@ +From 4382cc0c5600466360032562dcdac17c7c6e6aa7 Mon Sep 17 00:00:00 2001 +From: eduvik +Date: Fri, 14 Mar 2014 11:31:09 +1100 +Subject: [PATCH 177/196] Added PCB rev2 GPIO pins + +--- + drivers/staging/media/lirc/lirc_rpi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c +index c76f696..8aee83f 100644 +--- a/drivers/staging/media/lirc/lirc_rpi.c ++++ b/drivers/staging/media/lirc/lirc_rpi.c +@@ -80,8 +80,8 @@ static long send_pulse(unsigned long length); + static void send_space(long length); + static void lirc_rpi_exit(void); + +-int valid_gpio_pins[] = { 0, 1, 4, 8, 7, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, +- 24, 25 }; ++int valid_gpio_pins[] = { 0, 1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, ++ 22, 23, 24, 25 ,27, 28, 29, 30, 31 }; + + static struct platform_device *lirc_rpi_dev; + static struct timeval lasttv = { 0, 0 }; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0178-V4L2-Increase-the-number-of-image-buffers-for-high-f.patch b/target/linux/brcm2708/patches-3.10/0178-V4L2-Increase-the-number-of-image-buffers-for-high-f.patch new file mode 100644 index 00000000000..11978b10105 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0178-V4L2-Increase-the-number-of-image-buffers-for-high-f.patch @@ -0,0 +1,30 @@ +From 4f4423e1198b3b76c2dfa2820c2ccb3345df4105 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 14 Mar 2014 17:02:45 +0000 +Subject: [PATCH 178/196] V4L2: Increase the number of image buffers for high + fps + +Increase the number of image buffers available to improve +performance at high framerates. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index 3dea993..b6880cc 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -1330,7 +1330,7 @@ static int set_camera_parameters(struct vchiq_mmal_instance *instance, + .one_shot_stills = 1, + .max_preview_video_w = 1920, + .max_preview_video_h = 1088, +- .num_preview_video_frames = 3, ++ .num_preview_video_frames = 6, + .stills_capture_circular_buffer_height = 0, + .fast_preview_resume = 0, + .use_stc_timestamp = MMAL_PARAM_TIMESTAMP_MODE_RAW_STC +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0179-V4L2-Increase-threshold-for-switching-between-video-.patch b/target/linux/brcm2708/patches-3.10/0179-V4L2-Increase-threshold-for-switching-between-video-.patch new file mode 100644 index 00000000000..a48473085e2 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0179-V4L2-Increase-threshold-for-switching-between-video-.patch @@ -0,0 +1,44 @@ +From 94172081d9bc1f358d799fcef2b6f07615bcca60 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 14 Mar 2014 17:03:45 +0000 +Subject: [PATCH 179/196] V4L2: Increase threshold for switching between video + & stills + +The threshold used to be hard and fast at 1280x720 and failed if +either width or height exceeded those limits. Now it limits it at +a pixel count of 1280*720 (ie 921600), so 1024x768 is now considered +a video mode. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index b6880cc..b1eac21 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -42,6 +42,9 @@ + #define MAX_HEIGHT 1944 + #define MIN_BUFFER_SIZE (80*1024) + ++/* Max number of pixels supported whilst still being considered ++ * a video mode by the GPU. ++ */ + #define MAX_VIDEO_MODE_WIDTH 1280 + #define MAX_VIDEO_MODE_HEIGHT 720 + +@@ -893,8 +896,8 @@ static int mmal_setup_components(struct bm2835_mmal_dev *dev, + switch (mfmt->mmal_component) { + case MMAL_COMPONENT_CAMERA: + /* Make a further decision on port based on resolution */ +- if (f->fmt.pix.width <= MAX_VIDEO_MODE_WIDTH +- && f->fmt.pix.height <= MAX_VIDEO_MODE_HEIGHT) ++ if ((f->fmt.pix.width*f->fmt.pix.height) <= ++ (MAX_VIDEO_MODE_WIDTH * MAX_VIDEO_MODE_HEIGHT)) + camera_port = port = + &dev->component[MMAL_COMPONENT_CAMERA]-> + output[MMAL_CAMERA_PORT_VIDEO]; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0180-config-Remove-emergency-kernel-config.patch b/target/linux/brcm2708/patches-3.10/0180-config-Remove-emergency-kernel-config.patch new file mode 100644 index 00000000000..690d4295cc7 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0180-config-Remove-emergency-kernel-config.patch @@ -0,0 +1,551 @@ +From 11202747dbd75ef8e502186b8634a4501d96047d Mon Sep 17 00:00:00 2001 +From: Dom Cobley +Date: Tue, 18 Mar 2014 18:07:01 +0000 +Subject: [PATCH 180/196] config: Remove emergency kernel config + +--- + arch/arm/configs/bcmrpi_emergency_defconfig | 532 ---------------------------- + 1 file changed, 532 deletions(-) + delete mode 100644 arch/arm/configs/bcmrpi_emergency_defconfig + +diff --git a/arch/arm/configs/bcmrpi_emergency_defconfig b/arch/arm/configs/bcmrpi_emergency_defconfig +deleted file mode 100644 +index 3b40c49..0000000 +--- a/arch/arm/configs/bcmrpi_emergency_defconfig ++++ /dev/null +@@ -1,532 +0,0 @@ +-CONFIG_EXPERIMENTAL=y +-# CONFIG_LOCALVERSION_AUTO is not set +-CONFIG_SYSVIPC=y +-CONFIG_POSIX_MQUEUE=y +-CONFIG_BSD_PROCESS_ACCT=y +-CONFIG_BSD_PROCESS_ACCT_V3=y +-CONFIG_FHANDLE=y +-CONFIG_AUDIT=y +-CONFIG_IKCONFIG=y +-CONFIG_IKCONFIG_PROC=y +-CONFIG_BLK_DEV_INITRD=y +-CONFIG_INITRAMFS_SOURCE="../target_fs" +-CONFIG_CGROUP_FREEZER=y +-CONFIG_CGROUP_DEVICE=y +-CONFIG_CGROUP_CPUACCT=y +-CONFIG_RESOURCE_COUNTERS=y +-CONFIG_BLK_CGROUP=y +-CONFIG_NAMESPACES=y +-CONFIG_SCHED_AUTOGROUP=y +-CONFIG_EMBEDDED=y +-# CONFIG_COMPAT_BRK is not set +-CONFIG_SLAB=y +-CONFIG_PROFILING=y +-CONFIG_OPROFILE=m +-CONFIG_KPROBES=y +-CONFIG_MODULES=y +-CONFIG_MODULE_UNLOAD=y +-CONFIG_MODVERSIONS=y +-CONFIG_MODULE_SRCVERSION_ALL=y +-# CONFIG_BLK_DEV_BSG is not set +-CONFIG_BLK_DEV_THROTTLING=y +-CONFIG_CFQ_GROUP_IOSCHED=y +-CONFIG_ARCH_BCM2708=y +-CONFIG_NO_HZ=y +-CONFIG_HIGH_RES_TIMERS=y +-CONFIG_AEABI=y +-CONFIG_SECCOMP=y +-CONFIG_CC_STACKPROTECTOR=y +-CONFIG_ZBOOT_ROM_TEXT=0x0 +-CONFIG_ZBOOT_ROM_BSS=0x0 +-CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait" +-CONFIG_KEXEC=y +-CONFIG_CPU_IDLE=y +-CONFIG_VFP=y +-CONFIG_BINFMT_MISC=m +-CONFIG_NET=y +-CONFIG_PACKET=y +-CONFIG_UNIX=y +-CONFIG_XFRM_USER=y +-CONFIG_NET_KEY=m +-CONFIG_INET=y +-CONFIG_IP_MULTICAST=y +-CONFIG_IP_PNP=y +-CONFIG_IP_PNP_DHCP=y +-CONFIG_IP_PNP_RARP=y +-CONFIG_SYN_COOKIES=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_NET_PKTGEN=m +-CONFIG_IRDA=m +-CONFIG_IRLAN=m +-CONFIG_IRCOMM=m +-CONFIG_IRDA_ULTRA=y +-CONFIG_IRDA_CACHE_LAST_LSAP=y +-CONFIG_IRDA_FAST_RR=y +-CONFIG_IRTTY_SIR=m +-CONFIG_KINGSUN_DONGLE=m +-CONFIG_KSDAZZLE_DONGLE=m +-CONFIG_KS959_DONGLE=m +-CONFIG_USB_IRDA=m +-CONFIG_SIGMATEL_FIR=m +-CONFIG_MCS_FIR=m +-CONFIG_BT=m +-CONFIG_BT_L2CAP=y +-CONFIG_BT_SCO=y +-CONFIG_BT_RFCOMM=m +-CONFIG_BT_RFCOMM_TTY=y +-CONFIG_BT_BNEP=m +-CONFIG_BT_BNEP_MC_FILTER=y +-CONFIG_BT_BNEP_PROTO_FILTER=y +-CONFIG_BT_HIDP=m +-CONFIG_BT_HCIBTUSB=m +-CONFIG_BT_HCIBCM203X=m +-CONFIG_BT_HCIBPA10X=m +-CONFIG_BT_HCIBFUSB=m +-CONFIG_BT_HCIVHCI=m +-CONFIG_BT_MRVL=m +-CONFIG_BT_MRVL_SDIO=m +-CONFIG_BT_ATH3K=m +-CONFIG_CFG80211=m +-CONFIG_MAC80211=m +-CONFIG_MAC80211_RC_PID=y +-CONFIG_MAC80211_MESH=y +-CONFIG_WIMAX=m +-CONFIG_NET_9P=m +-CONFIG_NFC=m +-CONFIG_NFC_PN533=m +-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +-CONFIG_BLK_DEV_LOOP=y +-CONFIG_BLK_DEV_CRYPTOLOOP=m +-CONFIG_BLK_DEV_NBD=m +-CONFIG_BLK_DEV_RAM=y +-CONFIG_CDROM_PKTCDVD=m +-CONFIG_MISC_DEVICES=y +-CONFIG_SCSI=y +-# CONFIG_SCSI_PROC_FS is not set +-CONFIG_BLK_DEV_SD=y +-CONFIG_BLK_DEV_SR=m +-CONFIG_SCSI_MULTI_LUN=y +-# CONFIG_SCSI_LOWLEVEL is not set +-CONFIG_MD=y +-CONFIG_NETDEVICES=y +-CONFIG_TUN=m +-CONFIG_PHYLIB=m +-CONFIG_MDIO_BITBANG=m +-CONFIG_NET_ETHERNET=y +-# CONFIG_NETDEV_1000 is not set +-# CONFIG_NETDEV_10000 is not set +-CONFIG_LIBERTAS_THINFIRM=m +-CONFIG_LIBERTAS_THINFIRM_USB=m +-CONFIG_AT76C50X_USB=m +-CONFIG_USB_ZD1201=m +-CONFIG_USB_NET_RNDIS_WLAN=m +-CONFIG_RTL8187=m +-CONFIG_MAC80211_HWSIM=m +-CONFIG_ATH_COMMON=m +-CONFIG_ATH9K=m +-CONFIG_ATH9K_HTC=m +-CONFIG_CARL9170=m +-CONFIG_B43=m +-CONFIG_B43LEGACY=m +-CONFIG_HOSTAP=m +-CONFIG_IWM=m +-CONFIG_LIBERTAS=m +-CONFIG_LIBERTAS_USB=m +-CONFIG_LIBERTAS_SDIO=m +-CONFIG_P54_COMMON=m +-CONFIG_P54_USB=m +-CONFIG_RT2X00=m +-CONFIG_RT2500USB=m +-CONFIG_RT73USB=m +-CONFIG_RT2800USB=m +-CONFIG_RT2800USB_RT53XX=y +-CONFIG_RTL8192CU=m +-CONFIG_WL1251=m +-CONFIG_WL12XX_MENU=m +-CONFIG_ZD1211RW=m +-CONFIG_MWIFIEX=m +-CONFIG_MWIFIEX_SDIO=m +-CONFIG_WIMAX_I2400M_USB=m +-CONFIG_USB_CATC=m +-CONFIG_USB_KAWETH=m +-CONFIG_USB_PEGASUS=m +-CONFIG_USB_RTL8150=m +-CONFIG_USB_USBNET=y +-CONFIG_USB_NET_AX8817X=m +-CONFIG_USB_NET_CDCETHER=m +-CONFIG_USB_NET_CDC_EEM=m +-CONFIG_USB_NET_DM9601=m +-CONFIG_USB_NET_SMSC75XX=m +-CONFIG_USB_NET_SMSC95XX=y +-CONFIG_USB_NET_GL620A=m +-CONFIG_USB_NET_NET1080=m +-CONFIG_USB_NET_PLUSB=m +-CONFIG_USB_NET_MCS7830=m +-CONFIG_USB_NET_CDC_SUBSET=m +-CONFIG_USB_ALI_M5632=y +-CONFIG_USB_AN2720=y +-CONFIG_USB_KC2190=y +-# CONFIG_USB_NET_ZAURUS is not set +-CONFIG_USB_NET_CX82310_ETH=m +-CONFIG_USB_NET_KALMIA=m +-CONFIG_USB_NET_INT51X1=m +-CONFIG_USB_IPHETH=m +-CONFIG_USB_SIERRA_NET=m +-CONFIG_USB_VL600=m +-CONFIG_PPP=m +-CONFIG_PPP_ASYNC=m +-CONFIG_PPP_SYNC_TTY=m +-CONFIG_PPP_DEFLATE=m +-CONFIG_PPP_BSDCOMP=m +-CONFIG_SLIP=m +-CONFIG_SLIP_COMPRESSED=y +-CONFIG_NETCONSOLE=m +-CONFIG_INPUT_POLLDEV=m +-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +-CONFIG_INPUT_JOYDEV=m +-CONFIG_INPUT_EVDEV=m +-# CONFIG_INPUT_KEYBOARD is not set +-# CONFIG_INPUT_MOUSE is not set +-CONFIG_INPUT_MISC=y +-CONFIG_INPUT_AD714X=m +-CONFIG_INPUT_ATI_REMOTE=m +-CONFIG_INPUT_ATI_REMOTE2=m +-CONFIG_INPUT_KEYSPAN_REMOTE=m +-CONFIG_INPUT_POWERMATE=m +-CONFIG_INPUT_YEALINK=m +-CONFIG_INPUT_CM109=m +-CONFIG_INPUT_UINPUT=m +-CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +-CONFIG_INPUT_ADXL34X=m +-CONFIG_INPUT_CMA3000=m +-CONFIG_SERIO=m +-CONFIG_SERIO_RAW=m +-CONFIG_GAMEPORT=m +-CONFIG_GAMEPORT_NS558=m +-CONFIG_GAMEPORT_L4=m +-CONFIG_VT_HW_CONSOLE_BINDING=y +-# CONFIG_LEGACY_PTYS is not set +-# CONFIG_DEVKMEM is not set +-CONFIG_SERIAL_AMBA_PL011=y +-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +-# CONFIG_HW_RANDOM is not set +-CONFIG_RAW_DRIVER=y +-CONFIG_GPIO_SYSFS=y +-# CONFIG_HWMON is not set +-CONFIG_WATCHDOG=y +-CONFIG_BCM2708_WDT=m +-# CONFIG_MFD_SUPPORT is not set +-CONFIG_FB=y +-CONFIG_FB_BCM2708=y +-CONFIG_FRAMEBUFFER_CONSOLE=y +-CONFIG_LOGO=y +-# CONFIG_LOGO_LINUX_MONO is not set +-# CONFIG_LOGO_LINUX_VGA16 is not set +-CONFIG_SOUND=y +-CONFIG_SND=m +-CONFIG_SND_SEQUENCER=m +-CONFIG_SND_SEQ_DUMMY=m +-CONFIG_SND_MIXER_OSS=m +-CONFIG_SND_PCM_OSS=m +-CONFIG_SND_SEQUENCER_OSS=y +-CONFIG_SND_HRTIMER=m +-CONFIG_SND_DUMMY=m +-CONFIG_SND_ALOOP=m +-CONFIG_SND_VIRMIDI=m +-CONFIG_SND_MTPAV=m +-CONFIG_SND_SERIAL_U16550=m +-CONFIG_SND_MPU401=m +-CONFIG_SND_BCM2835=m +-CONFIG_SND_USB_AUDIO=m +-CONFIG_SND_USB_UA101=m +-CONFIG_SND_USB_CAIAQ=m +-CONFIG_SND_USB_6FIRE=m +-CONFIG_SOUND_PRIME=m +-CONFIG_HID_PID=y +-CONFIG_USB_HIDDEV=y +-CONFIG_HID_A4TECH=m +-CONFIG_HID_ACRUX=m +-CONFIG_HID_APPLE=m +-CONFIG_HID_BELKIN=m +-CONFIG_HID_CHERRY=m +-CONFIG_HID_CHICONY=m +-CONFIG_HID_CYPRESS=m +-CONFIG_HID_DRAGONRISE=m +-CONFIG_HID_EMS_FF=m +-CONFIG_HID_ELECOM=m +-CONFIG_HID_EZKEY=m +-CONFIG_HID_HOLTEK=m +-CONFIG_HID_KEYTOUCH=m +-CONFIG_HID_KYE=m +-CONFIG_HID_UCLOGIC=m +-CONFIG_HID_WALTOP=m +-CONFIG_HID_GYRATION=m +-CONFIG_HID_TWINHAN=m +-CONFIG_HID_KENSINGTON=m +-CONFIG_HID_LCPOWER=m +-CONFIG_HID_LOGITECH=m +-CONFIG_HID_MAGICMOUSE=m +-CONFIG_HID_MICROSOFT=m +-CONFIG_HID_MONTEREY=m +-CONFIG_HID_MULTITOUCH=m +-CONFIG_HID_NTRIG=m +-CONFIG_HID_ORTEK=m +-CONFIG_HID_PANTHERLORD=m +-CONFIG_HID_PETALYNX=m +-CONFIG_HID_PICOLCD=m +-CONFIG_HID_QUANTA=m +-CONFIG_HID_ROCCAT=m +-CONFIG_HID_SAMSUNG=m +-CONFIG_HID_SONY=m +-CONFIG_HID_SPEEDLINK=m +-CONFIG_HID_SUNPLUS=m +-CONFIG_HID_GREENASIA=m +-CONFIG_HID_SMARTJOYPLUS=m +-CONFIG_HID_TOPSEED=m +-CONFIG_HID_THRUSTMASTER=m +-CONFIG_HID_WACOM=m +-CONFIG_HID_WIIMOTE=m +-CONFIG_HID_ZEROPLUS=m +-CONFIG_HID_ZYDACRON=m +-CONFIG_USB=y +-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +-CONFIG_USB_MON=m +-CONFIG_USB_DWCOTG=y +-CONFIG_USB_STORAGE=y +-CONFIG_USB_STORAGE_REALTEK=m +-CONFIG_USB_STORAGE_DATAFAB=m +-CONFIG_USB_STORAGE_FREECOM=m +-CONFIG_USB_STORAGE_ISD200=m +-CONFIG_USB_STORAGE_USBAT=m +-CONFIG_USB_STORAGE_SDDR09=m +-CONFIG_USB_STORAGE_SDDR55=m +-CONFIG_USB_STORAGE_JUMPSHOT=m +-CONFIG_USB_STORAGE_ALAUDA=m +-CONFIG_USB_STORAGE_ONETOUCH=m +-CONFIG_USB_STORAGE_KARMA=m +-CONFIG_USB_STORAGE_CYPRESS_ATACB=m +-CONFIG_USB_STORAGE_ENE_UB6250=m +-CONFIG_USB_UAS=y +-CONFIG_USB_LIBUSUAL=y +-CONFIG_USB_MDC800=m +-CONFIG_USB_MICROTEK=m +-CONFIG_USB_SERIAL=m +-CONFIG_USB_SERIAL_GENERIC=y +-CONFIG_USB_SERIAL_AIRCABLE=m +-CONFIG_USB_SERIAL_ARK3116=m +-CONFIG_USB_SERIAL_BELKIN=m +-CONFIG_USB_SERIAL_CH341=m +-CONFIG_USB_SERIAL_WHITEHEAT=m +-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +-CONFIG_USB_SERIAL_CP210X=m +-CONFIG_USB_SERIAL_CYPRESS_M8=m +-CONFIG_USB_SERIAL_EMPEG=m +-CONFIG_USB_SERIAL_FTDI_SIO=m +-CONFIG_USB_SERIAL_FUNSOFT=m +-CONFIG_USB_SERIAL_VISOR=m +-CONFIG_USB_SERIAL_IPAQ=m +-CONFIG_USB_SERIAL_IR=m +-CONFIG_USB_SERIAL_EDGEPORT=m +-CONFIG_USB_SERIAL_EDGEPORT_TI=m +-CONFIG_USB_SERIAL_GARMIN=m +-CONFIG_USB_SERIAL_IPW=m +-CONFIG_USB_SERIAL_IUU=m +-CONFIG_USB_SERIAL_KEYSPAN_PDA=m +-CONFIG_USB_SERIAL_KEYSPAN=m +-CONFIG_USB_SERIAL_KLSI=m +-CONFIG_USB_SERIAL_KOBIL_SCT=m +-CONFIG_USB_SERIAL_MCT_U232=m +-CONFIG_USB_SERIAL_MOS7720=m +-CONFIG_USB_SERIAL_MOS7840=m +-CONFIG_USB_SERIAL_MOTOROLA=m +-CONFIG_USB_SERIAL_NAVMAN=m +-CONFIG_USB_SERIAL_PL2303=m +-CONFIG_USB_SERIAL_OTI6858=m +-CONFIG_USB_SERIAL_QCAUX=m +-CONFIG_USB_SERIAL_QUALCOMM=m +-CONFIG_USB_SERIAL_SPCP8X5=m +-CONFIG_USB_SERIAL_HP4X=m +-CONFIG_USB_SERIAL_SAFE=m +-CONFIG_USB_SERIAL_SIEMENS_MPI=m +-CONFIG_USB_SERIAL_SIERRAWIRELESS=m +-CONFIG_USB_SERIAL_SYMBOL=m +-CONFIG_USB_SERIAL_TI=m +-CONFIG_USB_SERIAL_CYBERJACK=m +-CONFIG_USB_SERIAL_XIRCOM=m +-CONFIG_USB_SERIAL_OPTION=m +-CONFIG_USB_SERIAL_OMNINET=m +-CONFIG_USB_SERIAL_OPTICON=m +-CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m +-CONFIG_USB_SERIAL_ZIO=m +-CONFIG_USB_SERIAL_SSU100=m +-CONFIG_USB_SERIAL_DEBUG=m +-CONFIG_USB_EMI62=m +-CONFIG_USB_EMI26=m +-CONFIG_USB_ADUTUX=m +-CONFIG_USB_SEVSEG=m +-CONFIG_USB_RIO500=m +-CONFIG_USB_LEGOTOWER=m +-CONFIG_USB_LCD=m +-CONFIG_USB_LED=m +-CONFIG_USB_CYPRESS_CY7C63=m +-CONFIG_USB_CYTHERM=m +-CONFIG_USB_IDMOUSE=m +-CONFIG_USB_FTDI_ELAN=m +-CONFIG_USB_APPLEDISPLAY=m +-CONFIG_USB_LD=m +-CONFIG_USB_TRANCEVIBRATOR=m +-CONFIG_USB_IOWARRIOR=m +-CONFIG_USB_TEST=m +-CONFIG_USB_ISIGHTFW=m +-CONFIG_USB_YUREX=m +-CONFIG_MMC=y +-CONFIG_MMC_SDHCI=y +-CONFIG_MMC_SDHCI_PLTFM=y +-CONFIG_MMC_SDHCI_BCM2708=y +-CONFIG_MMC_SDHCI_BCM2708_DMA=y +-CONFIG_LEDS_GPIO=y +-CONFIG_LEDS_TRIGGER_TIMER=m +-CONFIG_LEDS_TRIGGER_HEARTBEAT=m +-CONFIG_LEDS_TRIGGER_DEFAULT_ON=m +-CONFIG_UIO=m +-CONFIG_UIO_PDRV=m +-CONFIG_UIO_PDRV_GENIRQ=m +-# CONFIG_IOMMU_SUPPORT is not set +-CONFIG_EXT4_FS=y +-CONFIG_EXT4_FS_POSIX_ACL=y +-CONFIG_EXT4_FS_SECURITY=y +-CONFIG_REISERFS_FS=m +-CONFIG_REISERFS_FS_XATTR=y +-CONFIG_REISERFS_FS_POSIX_ACL=y +-CONFIG_REISERFS_FS_SECURITY=y +-CONFIG_JFS_FS=m +-CONFIG_JFS_POSIX_ACL=y +-CONFIG_JFS_SECURITY=y +-CONFIG_JFS_STATISTICS=y +-CONFIG_XFS_FS=m +-CONFIG_XFS_QUOTA=y +-CONFIG_XFS_POSIX_ACL=y +-CONFIG_XFS_RT=y +-CONFIG_GFS2_FS=m +-CONFIG_OCFS2_FS=m +-CONFIG_BTRFS_FS=m +-CONFIG_BTRFS_FS_POSIX_ACL=y +-CONFIG_NILFS2_FS=m +-CONFIG_FANOTIFY=y +-CONFIG_AUTOFS4_FS=y +-CONFIG_FUSE_FS=m +-CONFIG_CUSE=m +-CONFIG_FSCACHE=y +-CONFIG_FSCACHE_STATS=y +-CONFIG_FSCACHE_HISTOGRAM=y +-CONFIG_CACHEFILES=y +-CONFIG_ISO9660_FS=m +-CONFIG_JOLIET=y +-CONFIG_ZISOFS=y +-CONFIG_UDF_FS=m +-CONFIG_MSDOS_FS=y +-CONFIG_VFAT_FS=y +-CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +-CONFIG_NTFS_FS=m +-CONFIG_TMPFS=y +-CONFIG_TMPFS_POSIX_ACL=y +-CONFIG_CONFIGFS_FS=y +-CONFIG_SQUASHFS=m +-CONFIG_SQUASHFS_XATTR=y +-CONFIG_SQUASHFS_LZO=y +-CONFIG_SQUASHFS_XZ=y +-CONFIG_NFS_FS=y +-CONFIG_NFS_V3=y +-CONFIG_NFS_V3_ACL=y +-CONFIG_NFS_V4=y +-CONFIG_ROOT_NFS=y +-CONFIG_NFS_FSCACHE=y +-CONFIG_CIFS=m +-CONFIG_CIFS_WEAK_PW_HASH=y +-CONFIG_CIFS_XATTR=y +-CONFIG_CIFS_POSIX=y +-CONFIG_9P_FS=m +-CONFIG_9P_FS_POSIX_ACL=y +-CONFIG_PARTITION_ADVANCED=y +-CONFIG_MAC_PARTITION=y +-CONFIG_EFI_PARTITION=y +-CONFIG_NLS_DEFAULT="utf8" +-CONFIG_NLS_CODEPAGE_437=y +-CONFIG_NLS_CODEPAGE_737=m +-CONFIG_NLS_CODEPAGE_775=m +-CONFIG_NLS_CODEPAGE_850=m +-CONFIG_NLS_CODEPAGE_852=m +-CONFIG_NLS_CODEPAGE_855=m +-CONFIG_NLS_CODEPAGE_857=m +-CONFIG_NLS_CODEPAGE_860=m +-CONFIG_NLS_CODEPAGE_861=m +-CONFIG_NLS_CODEPAGE_862=m +-CONFIG_NLS_CODEPAGE_863=m +-CONFIG_NLS_CODEPAGE_864=m +-CONFIG_NLS_CODEPAGE_865=m +-CONFIG_NLS_CODEPAGE_866=m +-CONFIG_NLS_CODEPAGE_869=m +-CONFIG_NLS_CODEPAGE_936=m +-CONFIG_NLS_CODEPAGE_950=m +-CONFIG_NLS_CODEPAGE_932=m +-CONFIG_NLS_CODEPAGE_949=m +-CONFIG_NLS_CODEPAGE_874=m +-CONFIG_NLS_ISO8859_8=m +-CONFIG_NLS_CODEPAGE_1250=m +-CONFIG_NLS_CODEPAGE_1251=m +-CONFIG_NLS_ASCII=y +-CONFIG_NLS_ISO8859_1=m +-CONFIG_NLS_ISO8859_2=m +-CONFIG_NLS_ISO8859_3=m +-CONFIG_NLS_ISO8859_4=m +-CONFIG_NLS_ISO8859_5=m +-CONFIG_NLS_ISO8859_6=m +-CONFIG_NLS_ISO8859_7=m +-CONFIG_NLS_ISO8859_9=m +-CONFIG_NLS_ISO8859_13=m +-CONFIG_NLS_ISO8859_14=m +-CONFIG_NLS_ISO8859_15=m +-CONFIG_NLS_KOI8_R=m +-CONFIG_NLS_KOI8_U=m +-CONFIG_NLS_UTF8=m +-CONFIG_PRINTK_TIME=y +-CONFIG_DETECT_HUNG_TASK=y +-CONFIG_TIMER_STATS=y +-CONFIG_DEBUG_STACK_USAGE=y +-CONFIG_DEBUG_INFO=y +-CONFIG_DEBUG_MEMORY_INIT=y +-CONFIG_BOOT_PRINTK_DELAY=y +-CONFIG_LATENCYTOP=y +-CONFIG_SYSCTL_SYSCALL_CHECK=y +-CONFIG_IRQSOFF_TRACER=y +-CONFIG_SCHED_TRACER=y +-CONFIG_STACK_TRACER=y +-CONFIG_BLK_DEV_IO_TRACE=y +-CONFIG_FUNCTION_PROFILER=y +-CONFIG_KGDB=y +-CONFIG_KGDB_KDB=y +-CONFIG_KDB_KEYBOARD=y +-CONFIG_STRICT_DEVMEM=y +-CONFIG_CRYPTO_AUTHENC=m +-CONFIG_CRYPTO_SEQIV=m +-CONFIG_CRYPTO_CBC=y +-CONFIG_CRYPTO_HMAC=y +-CONFIG_CRYPTO_XCBC=m +-CONFIG_CRYPTO_MD5=y +-CONFIG_CRYPTO_SHA1=y +-CONFIG_CRYPTO_SHA256=m +-CONFIG_CRYPTO_SHA512=m +-CONFIG_CRYPTO_TGR192=m +-CONFIG_CRYPTO_WP512=m +-CONFIG_CRYPTO_CAST5=m +-CONFIG_CRYPTO_DES=y +-CONFIG_CRYPTO_DEFLATE=m +-# CONFIG_CRYPTO_ANSI_CPRNG is not set +-# CONFIG_CRYPTO_HW is not set +-CONFIG_CRC_ITU_T=y +-CONFIG_LIBCRC32C=y +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0181-Support-eMMC-5.1-cards.patch b/target/linux/brcm2708/patches-3.10/0181-Support-eMMC-5.1-cards.patch new file mode 100644 index 00000000000..734681d16e6 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0181-Support-eMMC-5.1-cards.patch @@ -0,0 +1,26 @@ +From ec3df4f13db58d75bff0c5cce42d4c7c65f074c8 Mon Sep 17 00:00:00 2001 +From: ghollingworth +Date: Fri, 21 Mar 2014 12:14:41 +0000 +Subject: [PATCH 181/196] Support eMMC 5.1 cards + +Already upstream and in 3.13 +--- + drivers/mmc/core/mmc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c +index 0cbd1ef..73f58e0 100644 +--- a/drivers/mmc/core/mmc.c ++++ b/drivers/mmc/core/mmc.c +@@ -293,7 +293,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) + } + + card->ext_csd.rev = ext_csd[EXT_CSD_REV]; +- if (card->ext_csd.rev > 6) { ++ if (card->ext_csd.rev > 7) { + pr_err("%s: unrecognised EXT_CSD revision %d\n", + mmc_hostname(card->host), card->ext_csd.rev); + err = -EINVAL; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0182-fix-sign-in-sdhci_bcm2708_raw_writel-wait-calculatio.patch b/target/linux/brcm2708/patches-3.10/0182-fix-sign-in-sdhci_bcm2708_raw_writel-wait-calculatio.patch new file mode 100644 index 00000000000..ac46325d6b1 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0182-fix-sign-in-sdhci_bcm2708_raw_writel-wait-calculatio.patch @@ -0,0 +1,28 @@ +From c62717f4dbf933743d3bcde958062d790587ecef Mon Sep 17 00:00:00 2001 +From: Matt Whitlock +Date: Tue, 25 Mar 2014 03:45:21 -0400 +Subject: [PATCH 182/196] fix sign in sdhci_bcm2708_raw_writel wait calculation + +The ns_wait variable is intended to hold a lower bound on the number of nanoseconds that have elapsed since the last sdhci register write. However, the actual calculation of it was incorrect, as the subtraction was inverted. This commit fixes the calculation. + +Note that this correction has no bearing when running with the default cycle_delay of 2 and the default clock rate of 50 MHz, under which conditions ns_2clk is 40 nanoseconds and ns_wait, regardless of whether the subtraction is done correctly or incorrectly, cannot possibly be less than 40 except for during the one-microsecond period just before the tick counter wraps around to meet last_write_hpt (i.e., approximately 4295 seconds after the preceding sdhci register write). The correction in this commit only comes into play if ns_2clk > 1000, which requires a cycle_delay of 51 or greater when using the default clock rate. Under those conditions, sdhci_bcm2708_raw_writel will not wait for the full cycle_delay count if at least 1000 nanoseconds have elapsed since the last register write. +--- + drivers/mmc/host/sdhci-bcm2708.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c +index 2797ae6..9beab6a 100644 +--- a/drivers/mmc/host/sdhci-bcm2708.c ++++ b/drivers/mmc/host/sdhci-bcm2708.c +@@ -263,7 +263,7 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) + { + /* we must have waited at least this many ns: */ + unsigned int ns_wait = HPTIME_CLK_NS * +- (last_write_hpt - now - 1); ++ (now - last_write_hpt - 1); + if (ns_wait < ns_2clk) + ndelay(ns_2clk - ns_wait); + } +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0183-V4L2-Add-manual-white-balance-control.patch b/target/linux/brcm2708/patches-3.10/0183-V4L2-Add-manual-white-balance-control.patch new file mode 100644 index 00000000000..ada84c8828c --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0183-V4L2-Add-manual-white-balance-control.patch @@ -0,0 +1,130 @@ +From 9f0bd5e194e2aca372c7dd4b0911fabf5b9ae80c Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Tue, 25 Mar 2014 11:48:01 +0000 +Subject: [PATCH 183/196] V4L2: Add manual white balance control. + +Adds support for V4L2_CID_RED_BALANCE and +V4L2_CID_BLUE_BALANCE. Only has an effect if +V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE has +V4L2_WHITE_BALANCE_MANUAL selected. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.h | 4 ++- + drivers/media/platform/bcm2835/controls.c | 39 +++++++++++++++++++++++- + drivers/media/platform/bcm2835/mmal-parameters.h | 8 ++++- + 3 files changed, 48 insertions(+), 3 deletions(-) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.h b/drivers/media/platform/bcm2835/bcm2835-camera.h +index f389bea..4ddd687 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.h ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.h +@@ -15,7 +15,7 @@ + * core driver device + */ + +-#define V4L2_CTRL_COUNT 25 /* number of v4l controls */ ++#define V4L2_CTRL_COUNT 27 /* number of v4l controls */ + + enum { + MMAL_COMPONENT_CAMERA = 0, +@@ -49,6 +49,8 @@ struct bm2835_mmal_dev { + struct mmal_colourfx colourfx; + int hflip; + int vflip; ++ int red_gain; ++ int blue_gain; + enum mmal_parameter_exposuremode exposure_mode_user; + enum v4l2_exposure_auto_type exposure_mode_v4l2_user; + /* active exposure mode may differ if selected via a scene mode */ +diff --git a/drivers/media/platform/bcm2835/controls.c b/drivers/media/platform/bcm2835/controls.c +index b7a7e88..9a40bd0 100644 +--- a/drivers/media/platform/bcm2835/controls.c ++++ b/drivers/media/platform/bcm2835/controls.c +@@ -491,6 +491,29 @@ static int ctrl_set_awb_mode(struct bm2835_mmal_dev *dev, + &u32_value, sizeof(u32_value)); + } + ++static int ctrl_set_awb_gains(struct bm2835_mmal_dev *dev, ++ struct v4l2_ctrl *ctrl, ++ const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) ++{ ++ struct vchiq_mmal_port *control; ++ struct mmal_parameter_awbgains gains; ++ ++ control = &dev->component[MMAL_COMPONENT_CAMERA]->control; ++ ++ if (ctrl->id == V4L2_CID_RED_BALANCE) ++ dev->red_gain = ctrl->val; ++ else if (ctrl->id == V4L2_CID_BLUE_BALANCE) ++ dev->blue_gain = ctrl->val; ++ ++ gains.r_gain.num = dev->red_gain; ++ gains.b_gain.num = dev->blue_gain; ++ gains.r_gain.den = gains.b_gain.den = 1000; ++ ++ return vchiq_mmal_port_parameter_set(dev->instance, control, ++ mmal_ctrl->mmal_id, ++ &gains, sizeof(gains)); ++} ++ + static int ctrl_set_image_effect(struct bm2835_mmal_dev *dev, + struct v4l2_ctrl *ctrl, + const struct bm2835_mmal_v4l2_ctrl *mmal_ctrl) +@@ -991,12 +1014,26 @@ static const struct bm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { + { + V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE, + MMAL_CONTROL_TYPE_STD_MENU, +- ~0x3fe, 9, V4L2_WHITE_BALANCE_AUTO, 0, NULL, ++ ~0x3ff, 9, V4L2_WHITE_BALANCE_AUTO, 0, NULL, + MMAL_PARAMETER_AWB_MODE, + &ctrl_set_awb_mode, + false + }, + { ++ V4L2_CID_RED_BALANCE, MMAL_CONTROL_TYPE_STD, ++ 1, 7999, 1000, 1, NULL, ++ MMAL_PARAMETER_CUSTOM_AWB_GAINS, ++ &ctrl_set_awb_gains, ++ false ++ }, ++ { ++ V4L2_CID_BLUE_BALANCE, MMAL_CONTROL_TYPE_STD, ++ 1, 7999, 1000, 1, NULL, ++ MMAL_PARAMETER_CUSTOM_AWB_GAINS, ++ &ctrl_set_awb_gains, ++ false ++ }, ++ { + V4L2_CID_COLORFX, MMAL_CONTROL_TYPE_STD_MENU, + 0, 15, V4L2_COLORFX_NONE, 0, NULL, + MMAL_PARAMETER_IMAGE_EFFECT, +diff --git a/drivers/media/platform/bcm2835/mmal-parameters.h b/drivers/media/platform/bcm2835/mmal-parameters.h +index ae8fef9..089f949 100644 +--- a/drivers/media/platform/bcm2835/mmal-parameters.h ++++ b/drivers/media/platform/bcm2835/mmal-parameters.h +@@ -161,7 +161,8 @@ enum mmal_parameter_camera_type { + MMAL_PARAMETER_SW_SHARPEN_DISABLE, /**< @ref MMAL_PARAMETER_BOOLEAN_T */ + MMAL_PARAMETER_FLASH_REQUIRED, /**< @ref MMAL_PARAMETER_BOOLEAN_T */ + MMAL_PARAMETER_SW_SATURATION_DISABLE, /**< @ref MMAL_PARAMETER_BOOLEAN_T */ +- MMAL_PARAMETER_SHUTTER_SPEED /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ ++ MMAL_PARAMETER_SHUTTER_SPEED, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ ++ MMAL_PARAMETER_CUSTOM_AWB_GAINS, /**< Takes a @ref MMAL_PARAMETER_AWB_GAINS_T */ + }; + + struct mmal_parameter_rational { +@@ -292,6 +293,11 @@ enum MMAL_PARAM_FLICKERAVOID_T { + MMAL_PARAM_FLICKERAVOID_MAX = 0x7FFFFFFF + }; + ++struct mmal_parameter_awbgains { ++ struct mmal_parameter_rational r_gain; /**< Red gain */ ++ struct mmal_parameter_rational b_gain; /**< Blue gain */ ++}; ++ + /** Manner of video rate control */ + enum mmal_parameter_rate_control_mode { + MMAL_VIDEO_RATECONTROL_DEFAULT, +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0184-config-Add-CONFIG_VETH-for-virtual-ethernet-devices.patch b/target/linux/brcm2708/patches-3.10/0184-config-Add-CONFIG_VETH-for-virtual-ethernet-devices.patch new file mode 100644 index 00000000000..de964262827 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0184-config-Add-CONFIG_VETH-for-virtual-ethernet-devices.patch @@ -0,0 +1,24 @@ +From bf9e43bf1c4bc6d362395573c777b8a4966f726f Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Thu, 27 Mar 2014 00:31:03 +0000 +Subject: [PATCH 184/196] config: Add CONFIG_VETH for virtual ethernet devices + +--- + arch/arm/configs/bcmrpi_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index fe1cff3..ca40634 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -416,6 +416,7 @@ CONFIG_IFB=m + CONFIG_MACVLAN=m + CONFIG_NETCONSOLE=m + CONFIG_TUN=m ++CONFIG_VETH=m + CONFIG_MDIO_BITBANG=m + CONFIG_PPP=m + CONFIG_PPP_BSDCOMP=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0185-Add-IQaudIO-Sound-Card-support-for-Raspberry-Pi.patch b/target/linux/brcm2708/patches-3.10/0185-Add-IQaudIO-Sound-Card-support-for-Raspberry-Pi.patch new file mode 100644 index 00000000000..f85b580bea0 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0185-Add-IQaudIO-Sound-Card-support-for-Raspberry-Pi.patch @@ -0,0 +1,1095 @@ +From e84e7c3905da79d7fc5f2f60453673a577dddbd3 Mon Sep 17 00:00:00 2001 +From: Gordon Garrity +Date: Sat, 8 Mar 2014 16:56:57 +0000 +Subject: [PATCH 185/196] Add IQaudIO Sound Card support for Raspberry Pi + +--- + arch/arm/configs/bcmrpi_defconfig | 1 + + arch/arm/mach-bcm2708/bcm2708.c | 22 ++ + sound/soc/bcm/Kconfig | 7 + + sound/soc/bcm/Makefile | 3 + + sound/soc/bcm/iqaudio-dac.c | 111 +++++++ + sound/soc/codecs/Kconfig | 4 + + sound/soc/codecs/Makefile | 2 + + sound/soc/codecs/pcm512x.c | 677 ++++++++++++++++++++++++++++++++++++++ + sound/soc/codecs/pcm512x.h | 142 ++++++++ + 9 files changed, 969 insertions(+) + create mode 100644 sound/soc/bcm/iqaudio-dac.c + create mode 100644 sound/soc/codecs/pcm512x.c + create mode 100644 sound/soc/codecs/pcm512x.h + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index ca40634..90fe241 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -744,6 +744,7 @@ CONFIG_SND_BCM2708_SOC_I2S=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m + CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m + CONFIG_SND_BCM2708_SOC_RPI_DAC=m ++CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m + CONFIG_SOUND_PRIME=m + CONFIG_HIDRAW=y + CONFIG_HID_A4TECH=m +diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c +index caa9f48..68d78f1 100644 +--- a/arch/arm/mach-bcm2708/bcm2708.c ++++ b/arch/arm/mach-bcm2708/bcm2708.c +@@ -685,6 +685,22 @@ static struct platform_device snd_pcm1794a_codec_device = { + }; + #endif + ++ ++#if defined(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) || defined(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC_MODULE) ++static struct platform_device snd_rpi_iqaudio_dac_device = { ++ .name = "snd-rpi-iqaudio-dac", ++ .id = 0, ++ .num_resources = 0, ++}; ++ ++// Use the actual device name rather than generic driver name ++static struct i2c_board_info __initdata snd_pcm512x_i2c_devices[] = { ++ { ++ I2C_BOARD_INFO("pcm5122", 0x4c) ++ }, ++}; ++#endif ++ + int __init bcm_register_device(struct platform_device *pdev) + { + int ret; +@@ -831,6 +847,12 @@ void __init bcm2708_init(void) + bcm_register_device(&snd_pcm1794a_codec_device); + #endif + ++#if defined(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) || defined(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC_MODULE) ++ bcm_register_device(&snd_rpi_iqaudio_dac_device); ++ i2c_register_board_info(1, snd_pcm512x_i2c_devices, ARRAY_SIZE(snd_pcm512x_i2c_devices)); ++#endif ++ ++ + for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { + struct amba_device *d = amba_devs[i]; + amba_device_register(d, &iomem_resource); +diff --git a/sound/soc/bcm/Kconfig b/sound/soc/bcm/Kconfig +index 7e2afc2..0fe398f 100644 +--- a/sound/soc/bcm/Kconfig ++++ b/sound/soc/bcm/Kconfig +@@ -29,3 +29,10 @@ config SND_BCM2708_SOC_RPI_DAC + select SND_SOC_PCM1794A + help + Say Y or M if you want to add support for RPi-DAC. ++ ++config SND_BCM2708_SOC_IQAUDIO_DAC ++ tristate "Support for IQaudIO-DAC" ++ depends on SND_BCM2708_SOC_I2S ++ select SND_SOC_PCM512x ++ help ++ Say Y or M if you want to add support for IQaudIO-DAC. +diff --git a/sound/soc/bcm/Makefile b/sound/soc/bcm/Makefile +index 54e37eb..918f460 100644 +--- a/sound/soc/bcm/Makefile ++++ b/sound/soc/bcm/Makefile +@@ -7,7 +7,10 @@ obj-$(CONFIG_SND_BCM2708_SOC_I2S) += snd-soc-bcm2708-i2s.o + snd-soc-hifiberry-dac-objs := hifiberry_dac.o + snd-soc-hifiberry-digi-objs := hifiberry_digi.o + snd-soc-rpi-dac-objs := rpi-dac.o ++snd-soc-iqaudio-dac-objs := iqaudio-dac.o + + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC) += snd-soc-hifiberry-dac.o + obj-$(CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI) += snd-soc-hifiberry-digi.o + obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += snd-soc-rpi-dac.o ++obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o ++ +diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c +new file mode 100644 +index 0000000..6be0c0e +--- /dev/null ++++ b/sound/soc/bcm/iqaudio-dac.c +@@ -0,0 +1,111 @@ ++/* ++ * ASoC Driver for IQaudIO DAC ++ * ++ * Author: Florian Meier ++ * Copyright 2013 ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++static int snd_rpi_iqaudio_dac_init(struct snd_soc_pcm_runtime *rtd) ++{ ++// NOT USED struct snd_soc_codec *codec = rtd->codec; ++ ++ return 0; ++} ++ ++static int snd_rpi_iqaudio_dac_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++// NOT USED struct snd_soc_dai *codec_dai = rtd->codec_dai; ++// NOT USED struct snd_soc_codec *codec = rtd->codec; ++ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; ++ ++ unsigned int sample_bits = ++ snd_pcm_format_physical_width(params_format(params)); ++ ++ return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2); ++} ++ ++/* machine stream operations */ ++static struct snd_soc_ops snd_rpi_iqaudio_dac_ops = { ++ .hw_params = snd_rpi_iqaudio_dac_hw_params, ++}; ++ ++static struct snd_soc_dai_link snd_rpi_iqaudio_dac_dai[] = { ++{ ++ .name = "IQaudIO DAC", ++ .stream_name = "IQaudIO DAC HiFi", ++ .cpu_dai_name = "bcm2708-i2s.0", ++ .codec_dai_name = "pcm512x-hifi", ++ .platform_name = "bcm2708-i2s.0", ++ .codec_name = "pcm512x.1-004c", ++ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | ++ SND_SOC_DAIFMT_CBS_CFS, ++ .ops = &snd_rpi_iqaudio_dac_ops, ++ .init = snd_rpi_iqaudio_dac_init, ++}, ++}; ++ ++/* audio machine driver */ ++static struct snd_soc_card snd_rpi_iqaudio_dac = { ++ .name = "snd_rpi_iqaudio_dac", ++ .dai_link = snd_rpi_iqaudio_dac_dai, ++ .num_links = ARRAY_SIZE(snd_rpi_iqaudio_dac_dai), ++}; ++ ++static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev) ++{ ++ int ret = 0; ++ ++ snd_rpi_iqaudio_dac.dev = &pdev->dev; ++ ret = snd_soc_register_card(&snd_rpi_iqaudio_dac); ++ if (ret) ++ dev_err(&pdev->dev, ++ "snd_soc_register_card() failed: %d\n", ret); ++ ++ return ret; ++} ++ ++static int snd_rpi_iqaudio_dac_remove(struct platform_device *pdev) ++{ ++ return snd_soc_unregister_card(&snd_rpi_iqaudio_dac); ++} ++ ++static const struct of_device_id iqaudio_of_match[] = { ++ { .compatible = "iqaudio,iqaudio-dac", }, ++ {}, ++}; ++ ++static struct platform_driver snd_rpi_iqaudio_dac_driver = { ++ .driver = { ++ .name = "snd-rpi-iqaudio-dac", ++ .owner = THIS_MODULE, ++ .of_match_table = iqaudio_of_match, ++ }, ++ .probe = snd_rpi_iqaudio_dac_probe, ++ .remove = snd_rpi_iqaudio_dac_remove, ++}; ++ ++module_platform_driver(snd_rpi_iqaudio_dac_driver); ++ ++MODULE_AUTHOR("Florian Meier "); ++MODULE_DESCRIPTION("ASoC Driver for IQAudio DAC"); ++MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig +index ef9ac1e..d0e7539 100644 +--- a/sound/soc/codecs/Kconfig ++++ b/sound/soc/codecs/Kconfig +@@ -57,6 +57,7 @@ config SND_SOC_ALL_CODECS + select SND_SOC_PCM3008 + select SND_SOC_PCM1794A + select SND_SOC_PCM5102A ++ select SND_SOC_PCM512x if SND_SOC_I2C_AND_SPI + select SND_SOC_RT5631 if I2C + select SND_SOC_SGTL5000 if I2C + select SND_SOC_SI476X if MFD_SI476X_CORE +@@ -301,6 +302,9 @@ config SND_SOC_PCM1794A + config SND_SOC_PCM5102A + tristate + ++config SND_SOC_PCM512x ++ tristate ++ + config SND_SOC_RT5631 + tristate + +diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile +index e98b865..e630e06 100644 +--- a/sound/soc/codecs/Makefile ++++ b/sound/soc/codecs/Makefile +@@ -45,6 +45,7 @@ snd-soc-omap-hdmi-codec-objs := omap-hdmi.o + snd-soc-pcm3008-objs := pcm3008.o + snd-soc-pcm1794a-objs := pcm1794a.o + snd-soc-pcm5102a-objs := pcm5102a.o ++snd-soc-pcm512x-objs := pcm512x.o + snd-soc-rt5631-objs := rt5631.o + snd-soc-sgtl5000-objs := sgtl5000.o + snd-soc-alc5623-objs := alc5623.o +@@ -174,6 +175,7 @@ obj-$(CONFIG_SND_SOC_OMAP_HDMI_CODEC) += snd-soc-omap-hdmi-codec.o + obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o + obj-$(CONFIG_SND_SOC_PCM1794A) += snd-soc-pcm1794a.o + obj-$(CONFIG_SND_SOC_PCM5102A) += snd-soc-pcm5102a.o ++obj-$(CONFIG_SND_SOC_PCM512x) += snd-soc-pcm512x.o + obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o + obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o + obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o +diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c +new file mode 100644 +index 0000000..ed36a4a +--- /dev/null ++++ b/sound/soc/codecs/pcm512x.c +@@ -0,0 +1,677 @@ ++/* ++ * Driver for the PCM512x CODECs ++ * ++ * Author: Mark Brown ++ * Copyright 2014 Linaro Ltd ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "pcm512x.h" ++ ++#define PCM512x_NUM_SUPPLIES 3 ++static const char *pcm512x_supply_names[PCM512x_NUM_SUPPLIES] = { ++ "AVDD", ++ "DVDD", ++ "CPVDD", ++}; ++ ++struct pcm512x_priv { ++ struct regmap *regmap; ++ struct clk *sclk; ++ struct regulator_bulk_data supplies[PCM512x_NUM_SUPPLIES]; ++ struct notifier_block supply_nb[PCM512x_NUM_SUPPLIES]; ++}; ++ ++/* ++ * We can't use the same notifier block for more than one supply and ++ * there's no way I can see to get from a callback to the caller ++ * except container_of(). ++ */ ++#define PCM512x_REGULATOR_EVENT(n) \ ++static int pcm512x_regulator_event_##n(struct notifier_block *nb, \ ++ unsigned long event, void *data) \ ++{ \ ++ struct pcm512x_priv *pcm512x = container_of(nb, struct pcm512x_priv, \ ++ supply_nb[n]); \ ++ if (event & REGULATOR_EVENT_DISABLE) { \ ++ regcache_mark_dirty(pcm512x->regmap); \ ++ regcache_cache_only(pcm512x->regmap, true); \ ++ } \ ++ return 0; \ ++} ++ ++PCM512x_REGULATOR_EVENT(0) ++PCM512x_REGULATOR_EVENT(1) ++PCM512x_REGULATOR_EVENT(2) ++ ++static const struct reg_default pcm512x_reg_defaults[] = { ++ { PCM512x_RESET, 0x00 }, ++ { PCM512x_POWER, 0x00 }, ++ { PCM512x_MUTE, 0x00 }, ++ { PCM512x_DSP, 0x00 }, ++ { PCM512x_PLL_REF, 0x00 }, ++ { PCM512x_DAC_ROUTING, 0x11 }, ++ { PCM512x_DSP_PROGRAM, 0x01 }, ++ { PCM512x_CLKDET, 0x00 }, ++ { PCM512x_AUTO_MUTE, 0x00 }, ++ { PCM512x_ERROR_DETECT, 0x00 }, ++ { PCM512x_DIGITAL_VOLUME_1, 0x00 }, ++ { PCM512x_DIGITAL_VOLUME_2, 0x30 }, ++ { PCM512x_DIGITAL_VOLUME_3, 0x30 }, ++ { PCM512x_DIGITAL_MUTE_1, 0x22 }, ++ { PCM512x_DIGITAL_MUTE_2, 0x00 }, ++ { PCM512x_DIGITAL_MUTE_3, 0x07 }, ++}; ++ ++static bool pcm512x_readable(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case PCM512x_RESET: ++ case PCM512x_POWER: ++ case PCM512x_MUTE: ++ case PCM512x_PLL_EN: ++ case PCM512x_SPI_MISO_FUNCTION: ++ case PCM512x_DSP: ++ case PCM512x_GPIO_EN: ++ case PCM512x_BCLK_LRCLK_CFG: ++ case PCM512x_DSP_GPIO_INPUT: ++ case PCM512x_MASTER_MODE: ++ case PCM512x_PLL_REF: ++ case PCM512x_PLL_COEFF_0: ++ case PCM512x_PLL_COEFF_1: ++ case PCM512x_PLL_COEFF_2: ++ case PCM512x_PLL_COEFF_3: ++ case PCM512x_PLL_COEFF_4: ++ case PCM512x_DSP_CLKDIV: ++ case PCM512x_DAC_CLKDIV: ++ case PCM512x_NCP_CLKDIV: ++ case PCM512x_OSR_CLKDIV: ++ case PCM512x_MASTER_CLKDIV_1: ++ case PCM512x_MASTER_CLKDIV_2: ++ case PCM512x_FS_SPEED_MODE: ++ case PCM512x_IDAC_1: ++ case PCM512x_IDAC_2: ++ case PCM512x_ERROR_DETECT: ++ case PCM512x_I2S_1: ++ case PCM512x_I2S_2: ++ case PCM512x_DAC_ROUTING: ++ case PCM512x_DSP_PROGRAM: ++ case PCM512x_CLKDET: ++ case PCM512x_AUTO_MUTE: ++ case PCM512x_DIGITAL_VOLUME_1: ++ case PCM512x_DIGITAL_VOLUME_2: ++ case PCM512x_DIGITAL_VOLUME_3: ++ case PCM512x_DIGITAL_MUTE_1: ++ case PCM512x_DIGITAL_MUTE_2: ++ case PCM512x_DIGITAL_MUTE_3: ++ case PCM512x_GPIO_OUTPUT_1: ++ case PCM512x_GPIO_OUTPUT_2: ++ case PCM512x_GPIO_OUTPUT_3: ++ case PCM512x_GPIO_OUTPUT_4: ++ case PCM512x_GPIO_OUTPUT_5: ++ case PCM512x_GPIO_OUTPUT_6: ++ case PCM512x_GPIO_CONTROL_1: ++ case PCM512x_GPIO_CONTROL_2: ++ case PCM512x_OVERFLOW: ++ case PCM512x_RATE_DET_1: ++ case PCM512x_RATE_DET_2: ++ case PCM512x_RATE_DET_3: ++ case PCM512x_RATE_DET_4: ++ case PCM512x_ANALOG_MUTE_DET: ++ case PCM512x_GPIN: ++ case PCM512x_DIGITAL_MUTE_DET: ++ return true; ++ default: ++ return false; ++ } ++} ++ ++static bool pcm512x_volatile(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case PCM512x_PLL_EN: ++ case PCM512x_OVERFLOW: ++ case PCM512x_RATE_DET_1: ++ case PCM512x_RATE_DET_2: ++ case PCM512x_RATE_DET_3: ++ case PCM512x_RATE_DET_4: ++ case PCM512x_ANALOG_MUTE_DET: ++ case PCM512x_GPIN: ++ case PCM512x_DIGITAL_MUTE_DET: ++ return true; ++ default: ++ return false; ++ } ++} ++ ++static const DECLARE_TLV_DB_SCALE(digital_tlv, -10350, 50, 1); ++ ++static const char *pcm512x_dsp_program_texts[] = { ++ "FIR interpolation with de-emphasis", ++ "Low latency IIR with de-emphasis", ++ "High attenuation with de-emphasis", ++ "Ringing-less low latency FIR", ++}; ++ ++static const unsigned int pcm512x_dsp_program_values[] = { ++ 1, ++ 2, ++ 3, ++ 5, ++ 7, ++}; ++ ++static const SOC_VALUE_ENUM_SINGLE_DECL(pcm512x_dsp_program, ++ PCM512x_DSP_PROGRAM, 0, 0x1f, ++ pcm512x_dsp_program_texts, ++ pcm512x_dsp_program_values); ++ ++static const char *pcm512x_clk_missing_text[] = { ++ "1s", "2s", "3s", "4s", "5s", "6s", "7s", "8s" ++}; ++ ++static const struct soc_enum pcm512x_clk_missing = ++ SOC_ENUM_SINGLE(PCM512x_CLKDET, 0, 7, pcm512x_clk_missing_text); ++ ++static const char *pcm512x_autom_text[] = { ++ "21ms", "106ms", "213ms", "533ms", "1.07s", "2.13s", "5.33s", "10.66s" ++}; ++ ++static const struct soc_enum pcm512x_autom_l = ++ SOC_ENUM_SINGLE(PCM512x_AUTO_MUTE, PCM512x_ATML_SHIFT, 7, ++ pcm512x_autom_text); ++ ++static const struct soc_enum pcm512x_autom_r = ++ SOC_ENUM_SINGLE(PCM512x_AUTO_MUTE, PCM512x_ATMR_SHIFT, 7, ++ pcm512x_autom_text); ++ ++static const char *pcm512x_ramp_rate_text[] = { ++ "1 sample/update", "2 samples/update", "4 samples/update", ++ "Immediate" ++}; ++ ++static const struct soc_enum pcm512x_vndf = ++ SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_1, PCM512x_VNDF_SHIFT, 4, ++ pcm512x_ramp_rate_text); ++ ++static const struct soc_enum pcm512x_vnuf = ++ SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_1, PCM512x_VNUF_SHIFT, 4, ++ pcm512x_ramp_rate_text); ++ ++static const struct soc_enum pcm512x_vedf = ++ SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_2, PCM512x_VEDF_SHIFT, 4, ++ pcm512x_ramp_rate_text); ++ ++static const char *pcm512x_ramp_step_text[] = { ++ "4dB/step", "2dB/step", "1dB/step", "0.5dB/step" ++}; ++ ++static const struct soc_enum pcm512x_vnds = ++ SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_1, PCM512x_VNDS_SHIFT, 4, ++ pcm512x_ramp_step_text); ++ ++static const struct soc_enum pcm512x_vnus = ++ SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_1, PCM512x_VNUS_SHIFT, 4, ++ pcm512x_ramp_step_text); ++ ++static const struct soc_enum pcm512x_veds = ++ SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_2, PCM512x_VEDS_SHIFT, 4, ++ pcm512x_ramp_step_text); ++ ++static const struct snd_kcontrol_new pcm512x_controls[] = { ++SOC_DOUBLE_R_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2, ++ PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv), ++SOC_DOUBLE("Playback Digital Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT, ++ PCM512x_RQMR_SHIFT, 1, 1), ++ ++SOC_SINGLE("Deemphasis Switch", PCM512x_DSP, PCM512x_DEMP_SHIFT, 1, 1), ++SOC_VALUE_ENUM("DSP Program", pcm512x_dsp_program), ++ ++SOC_ENUM("Clock Missing Period", pcm512x_clk_missing), ++SOC_ENUM("Auto Mute Time Left", pcm512x_autom_l), ++SOC_ENUM("Auto Mute Time Right", pcm512x_autom_r), ++SOC_SINGLE("Auto Mute Mono Switch", PCM512x_DIGITAL_MUTE_3, ++ PCM512x_ACTL_SHIFT, 1, 0), ++SOC_DOUBLE("Auto Mute Switch", PCM512x_DIGITAL_MUTE_3, PCM512x_AMLE_SHIFT, ++ PCM512x_AMLR_SHIFT, 1, 0), ++ ++SOC_ENUM("Volume Ramp Down Rate", pcm512x_vndf), ++SOC_ENUM("Volume Ramp Down Step", pcm512x_vnds), ++SOC_ENUM("Volume Ramp Up Rate", pcm512x_vnuf), ++SOC_ENUM("Volume Ramp Up Step", pcm512x_vnus), ++SOC_ENUM("Volume Ramp Down Emergency Rate", pcm512x_vedf), ++SOC_ENUM("Volume Ramp Down Emergency Step", pcm512x_veds), ++}; ++ ++static const struct snd_soc_dapm_widget pcm512x_dapm_widgets[] = { ++SND_SOC_DAPM_DAC("DACL", NULL, SND_SOC_NOPM, 0, 0), ++SND_SOC_DAPM_DAC("DACR", NULL, SND_SOC_NOPM, 0, 0), ++ ++SND_SOC_DAPM_OUTPUT("OUTL"), ++SND_SOC_DAPM_OUTPUT("OUTR"), ++}; ++ ++static const struct snd_soc_dapm_route pcm512x_dapm_routes[] = { ++ { "DACL", NULL, "Playback" }, ++ { "DACR", NULL, "Playback" }, ++ ++ { "OUTL", NULL, "DACL" }, ++ { "OUTR", NULL, "DACR" }, ++}; ++ ++static int pcm512x_set_bias_level(struct snd_soc_codec *codec, ++ enum snd_soc_bias_level level) ++{ ++ struct pcm512x_priv *pcm512x = dev_get_drvdata(codec->dev); ++ int ret; ++ ++ switch (level) { ++ case SND_SOC_BIAS_ON: ++ case SND_SOC_BIAS_PREPARE: ++ break; ++ ++ case SND_SOC_BIAS_STANDBY: ++ ret = regmap_update_bits(pcm512x->regmap, PCM512x_POWER, ++ PCM512x_RQST, 0); ++ if (ret != 0) { ++ dev_err(codec->dev, "Failed to remove standby: %d\n", ++ ret); ++ return ret; ++ } ++ break; ++ ++ case SND_SOC_BIAS_OFF: ++ ret = regmap_update_bits(pcm512x->regmap, PCM512x_POWER, ++ PCM512x_RQST, PCM512x_RQST); ++ if (ret != 0) { ++ dev_err(codec->dev, "Failed to request standby: %d\n", ++ ret); ++ return ret; ++ } ++ break; ++ } ++ ++ codec->dapm.bias_level = level; ++ ++ return 0; ++} ++ ++static struct snd_soc_dai_driver pcm512x_dai = { ++ .name = "pcm512x-hifi", ++ .playback = { ++ .stream_name = "Playback", ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_8000_192000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE | ++ SNDRV_PCM_FMTBIT_S24_LE | ++ SNDRV_PCM_FMTBIT_S32_LE ++ }, ++}; ++ ++static struct snd_soc_codec_driver pcm512x_codec_driver = { ++ .set_bias_level = pcm512x_set_bias_level, ++ .idle_bias_off = true, ++ ++ .controls = pcm512x_controls, ++ .num_controls = ARRAY_SIZE(pcm512x_controls), ++ .dapm_widgets = pcm512x_dapm_widgets, ++ .num_dapm_widgets = ARRAY_SIZE(pcm512x_dapm_widgets), ++ .dapm_routes = pcm512x_dapm_routes, ++ .num_dapm_routes = ARRAY_SIZE(pcm512x_dapm_routes), ++}; ++ ++static const struct regmap_config pcm512x_regmap = { ++ .reg_bits = 8, ++ .val_bits = 8, ++ ++ .readable_reg = pcm512x_readable, ++ .volatile_reg = pcm512x_volatile, ++ ++ .max_register = PCM512x_MAX_REGISTER, ++ .reg_defaults = pcm512x_reg_defaults, ++ .num_reg_defaults = ARRAY_SIZE(pcm512x_reg_defaults), ++ .cache_type = REGCACHE_RBTREE, ++}; ++ ++static const struct of_device_id pcm512x_of_match[] = { ++ { .compatible = "ti,pcm5121", }, ++ { .compatible = "ti,pcm5122", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, pcm512x_of_match); ++ ++static int pcm512x_probe(struct device *dev, struct regmap *regmap) ++{ ++ struct pcm512x_priv *pcm512x; ++ int i, ret; ++ ++ pcm512x = devm_kzalloc(dev, sizeof(struct pcm512x_priv), GFP_KERNEL); ++ if (!pcm512x) ++ return -ENOMEM; ++ ++ dev_set_drvdata(dev, pcm512x); ++ pcm512x->regmap = regmap; ++ ++ for (i = 0; i < ARRAY_SIZE(pcm512x->supplies); i++) ++ pcm512x->supplies[i].supply = pcm512x_supply_names[i]; ++ ++ ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(pcm512x->supplies), ++ pcm512x->supplies); ++ if (ret != 0) { ++ dev_err(dev, "Failed to get supplies: %d\n", ret); ++ return ret; ++ } ++ ++ pcm512x->supply_nb[0].notifier_call = pcm512x_regulator_event_0; ++ pcm512x->supply_nb[1].notifier_call = pcm512x_regulator_event_1; ++ pcm512x->supply_nb[2].notifier_call = pcm512x_regulator_event_2; ++ ++ for (i = 0; i < ARRAY_SIZE(pcm512x->supplies); i++) { ++ ret = regulator_register_notifier(pcm512x->supplies[i].consumer, ++ &pcm512x->supply_nb[i]); ++ if (ret != 0) { ++ dev_err(dev, ++ "Failed to register regulator notifier: %d\n", ++ ret); ++ } ++ } ++ ++ ret = regulator_bulk_enable(ARRAY_SIZE(pcm512x->supplies), ++ pcm512x->supplies); ++ if (ret != 0) { ++ dev_err(dev, "Failed to enable supplies: %d\n", ret); ++ return ret; ++ } ++ ++ /* Reset the device, verifying I/O in the process for I2C */ ++ ret = regmap_write(regmap, PCM512x_RESET, ++ PCM512x_RSTM | PCM512x_RSTR); ++ if (ret != 0) { ++ dev_err(dev, "Failed to reset device: %d\n", ret); ++ goto err; ++ } ++ ++ ret = regmap_write(regmap, PCM512x_RESET, 0); ++ if (ret != 0) { ++ dev_err(dev, "Failed to reset device: %d\n", ret); ++ goto err; ++ } ++ ++ pcm512x->sclk = devm_clk_get(dev, NULL); ++ if (IS_ERR(pcm512x->sclk)) { ++ if (PTR_ERR(pcm512x->sclk) == -EPROBE_DEFER) ++ return -EPROBE_DEFER; ++ ++ dev_info(dev, "No SCLK, using BCLK: %ld\n", ++ PTR_ERR(pcm512x->sclk)); ++ ++ /* Disable reporting of missing SCLK as an error */ ++ regmap_update_bits(regmap, PCM512x_ERROR_DETECT, ++ PCM512x_IDCH, PCM512x_IDCH); ++ ++ /* Switch PLL input to BCLK */ ++ regmap_update_bits(regmap, PCM512x_PLL_REF, ++ PCM512x_SREF, PCM512x_SREF); ++ } else { ++ ret = clk_prepare_enable(pcm512x->sclk); ++ if (ret != 0) { ++ dev_err(dev, "Failed to enable SCLK: %d\n", ret); ++ return ret; ++ } ++ } ++ ++ /* Default to standby mode */ ++ ret = regmap_update_bits(pcm512x->regmap, PCM512x_POWER, ++ PCM512x_RQST, PCM512x_RQST); ++ if (ret != 0) { ++ dev_err(dev, "Failed to request standby: %d\n", ++ ret); ++ goto err_clk; ++ } ++ ++ pm_runtime_set_active(dev); ++ pm_runtime_enable(dev); ++ pm_runtime_idle(dev); ++ ++ ret = snd_soc_register_codec(dev, &pcm512x_codec_driver, ++ &pcm512x_dai, 1); ++ if (ret != 0) { ++ dev_err(dev, "Failed to register CODEC: %d\n", ret); ++ goto err_pm; ++ } ++ ++ dev_info(dev, "Completed initialisation - pcm512x_probe"); ++ ++ return 0; ++ ++err_pm: ++ pm_runtime_disable(dev); ++err_clk: ++ if (!IS_ERR(pcm512x->sclk)) ++ clk_disable_unprepare(pcm512x->sclk); ++err: ++ regulator_bulk_disable(ARRAY_SIZE(pcm512x->supplies), ++ pcm512x->supplies); ++ return ret; ++} ++ ++static void pcm512x_remove(struct device *dev) ++{ ++ struct pcm512x_priv *pcm512x = dev_get_drvdata(dev); ++ ++ snd_soc_unregister_codec(dev); ++ pm_runtime_disable(dev); ++ if (!IS_ERR(pcm512x->sclk)) ++ clk_disable_unprepare(pcm512x->sclk); ++ regulator_bulk_disable(ARRAY_SIZE(pcm512x->supplies), ++ pcm512x->supplies); ++} ++ ++/* TODO ++static int pcm512x_suspend(struct device *dev) ++{ ++ struct pcm512x_priv *pcm512x = dev_get_drvdata(dev); ++ int ret; ++ ++ ret = regmap_update_bits(pcm512x->regmap, PCM512x_POWER, ++ PCM512x_RQPD, PCM512x_RQPD); ++ if (ret != 0) { ++ dev_err(dev, "Failed to request power down: %d\n", ret); ++ return ret; ++ } ++ ++ ret = regulator_bulk_disable(ARRAY_SIZE(pcm512x->supplies), ++ pcm512x->supplies); ++ if (ret != 0) { ++ dev_err(dev, "Failed to disable supplies: %d\n", ret); ++ return ret; ++ } ++ ++ if (!IS_ERR(pcm512x->sclk)) ++ clk_disable_unprepare(pcm512x->sclk); ++ ++ return 0; ++} ++ ++static int pcm512x_resume(struct device *dev) ++{ ++ struct pcm512x_priv *pcm512x = dev_get_drvdata(dev); ++ int ret; ++ ++ if (!IS_ERR(pcm512x->sclk)) { ++ ret = clk_prepare_enable(pcm512x->sclk); ++ if (ret != 0) { ++ dev_err(dev, "Failed to enable SCLK: %d\n", ret); ++ return ret; ++ } ++ } ++ ++ ret = regulator_bulk_enable(ARRAY_SIZE(pcm512x->supplies), ++ pcm512x->supplies); ++ if (ret != 0) { ++ dev_err(dev, "Failed to enable supplies: %d\n", ret); ++ return ret; ++ } ++ ++ regcache_cache_only(pcm512x->regmap, false); ++ ret = regcache_sync(pcm512x->regmap); ++ if (ret != 0) { ++ dev_err(dev, "Failed to sync cache: %d\n", ret); ++ return ret; ++ } ++ ++ ret = regmap_update_bits(pcm512x->regmap, PCM512x_POWER, ++ PCM512x_RQPD, 0); ++ if (ret != 0) { ++ dev_err(dev, "Failed to remove power down: %d\n", ret); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++// END OF PCM512x_suspend and resume calls TODO ++*/ ++ ++static const struct dev_pm_ops pcm512x_pm_ops = { ++ SET_RUNTIME_PM_OPS(pcm512x_suspend, pcm512x_resume, NULL) ++}; ++ ++#if IS_ENABLED(CONFIG_I2C) ++static int pcm512x_i2c_probe(struct i2c_client *i2c, ++ const struct i2c_device_id *id) ++{ ++ struct regmap *regmap; ++ ++ regmap = devm_regmap_init_i2c(i2c, &pcm512x_regmap); ++ if (IS_ERR(regmap)) ++ return PTR_ERR(regmap); ++ ++ return pcm512x_probe(&i2c->dev, regmap); ++} ++ ++static int pcm512x_i2c_remove(struct i2c_client *i2c) ++{ ++ pcm512x_remove(&i2c->dev); ++ return 0; ++} ++ ++static const struct i2c_device_id pcm512x_i2c_id[] = { ++ { "pcm5121", }, ++ { "pcm5122", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, pcm512x_i2c_id); ++ ++static struct i2c_driver pcm512x_i2c_driver = { ++ .probe = pcm512x_i2c_probe, ++ .remove = pcm512x_i2c_remove, ++ .id_table = pcm512x_i2c_id, ++ .driver = { ++ .name = "pcm512x", ++ .owner = THIS_MODULE, ++ .of_match_table = pcm512x_of_match, ++ .pm = &pcm512x_pm_ops, ++ }, ++}; ++#endif ++ ++#if defined(CONFIG_SPI_MASTER) ++static int pcm512x_spi_probe(struct spi_device *spi) ++{ ++ struct regmap *regmap; ++ int ret; ++ ++ regmap = devm_regmap_init_spi(spi, &pcm512x_regmap); ++ if (IS_ERR(regmap)) { ++ ret = PTR_ERR(regmap); ++ return ret; ++ } ++ ++ return pcm512x_probe(&spi->dev, regmap); ++} ++ ++static int pcm512x_spi_remove(struct spi_device *spi) ++{ ++ pcm512x_remove(&spi->dev); ++ return 0; ++} ++ ++static const struct spi_device_id pcm512x_spi_id[] = { ++ { "pcm5121", }, ++ { "pcm5122", }, ++ { }, ++}; ++MODULE_DEVICE_TABLE(spi, pcm512x_spi_id); ++ ++static struct spi_driver pcm512x_spi_driver = { ++ .probe = pcm512x_spi_probe, ++ .remove = pcm512x_spi_remove, ++ .id_table = pcm512x_spi_id, ++ .driver = { ++ .name = "pcm512x", ++ .owner = THIS_MODULE, ++ .of_match_table = pcm512x_of_match, ++ .pm = &pcm512x_pm_ops, ++ }, ++}; ++#endif ++ ++static int __init pcm512x_modinit(void) ++{ ++ int ret = 0; ++ ++#if IS_ENABLED(CONFIG_I2C) ++ ret = i2c_add_driver(&pcm512x_i2c_driver); ++ if (ret) { ++ printk(KERN_ERR "Failed to register pcm512x I2C driver: %d\n", ++ ret); ++ } ++#endif ++#if defined(CONFIG_SPI_MASTER) ++ ret = spi_register_driver(&pcm512x_spi_driver); ++ if (ret != 0) { ++ printk(KERN_ERR "Failed to register pcm512x SPI driver: %d\n", ++ ret); ++ } ++#endif ++ return ret; ++} ++module_init(pcm512x_modinit); ++ ++static void __exit pcm512x_exit(void) ++{ ++#if IS_ENABLED(CONFIG_I2C) ++ i2c_del_driver(&pcm512x_i2c_driver); ++#endif ++#if defined(CONFIG_SPI_MASTER) ++ spi_unregister_driver(&pcm512x_spi_driver); ++#endif ++} ++module_exit(pcm512x_exit); ++ ++MODULE_DESCRIPTION("ASoC PCM512x codec driver"); ++MODULE_AUTHOR("Mark Brown "); ++MODULE_LICENSE("GPL v2"); +diff --git a/sound/soc/codecs/pcm512x.h b/sound/soc/codecs/pcm512x.h +new file mode 100644 +index 0000000..b2f518e +--- /dev/null ++++ b/sound/soc/codecs/pcm512x.h +@@ -0,0 +1,142 @@ ++/* ++ * Driver for the PCM512x CODECs ++ * ++ * Author: Mark Brown ++ * Copyright 2014 Linaro Ltd ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ */ ++ ++#ifndef _SND_SOC_PCM512X ++#define _SND_SOC_PCM512X ++ ++#define PCM512x_PAGE_0_BASE 0 ++ ++#define PCM512x_PAGE 0 ++ ++#define PCM512x_RESET (PCM512x_PAGE_0_BASE + 1) ++#define PCM512x_POWER (PCM512x_PAGE_0_BASE + 2) ++#define PCM512x_MUTE (PCM512x_PAGE_0_BASE + 3) ++#define PCM512x_PLL_EN (PCM512x_PAGE_0_BASE + 4) ++#define PCM512x_SPI_MISO_FUNCTION (PCM512x_PAGE_0_BASE + 6) ++#define PCM512x_DSP (PCM512x_PAGE_0_BASE + 7) ++#define PCM512x_GPIO_EN (PCM512x_PAGE_0_BASE + 8) ++#define PCM512x_BCLK_LRCLK_CFG (PCM512x_PAGE_0_BASE + 9) ++#define PCM512x_DSP_GPIO_INPUT (PCM512x_PAGE_0_BASE + 10) ++#define PCM512x_MASTER_MODE (PCM512x_PAGE_0_BASE + 12) ++#define PCM512x_PLL_REF (PCM512x_PAGE_0_BASE + 13) ++#define PCM512x_PLL_COEFF_0 (PCM512x_PAGE_0_BASE + 20) ++#define PCM512x_PLL_COEFF_1 (PCM512x_PAGE_0_BASE + 21) ++#define PCM512x_PLL_COEFF_2 (PCM512x_PAGE_0_BASE + 22) ++#define PCM512x_PLL_COEFF_3 (PCM512x_PAGE_0_BASE + 23) ++#define PCM512x_PLL_COEFF_4 (PCM512x_PAGE_0_BASE + 24) ++#define PCM512x_DSP_CLKDIV (PCM512x_PAGE_0_BASE + 27) ++#define PCM512x_DAC_CLKDIV (PCM512x_PAGE_0_BASE + 28) ++#define PCM512x_NCP_CLKDIV (PCM512x_PAGE_0_BASE + 29) ++#define PCM512x_OSR_CLKDIV (PCM512x_PAGE_0_BASE + 30) ++#define PCM512x_MASTER_CLKDIV_1 (PCM512x_PAGE_0_BASE + 32) ++#define PCM512x_MASTER_CLKDIV_2 (PCM512x_PAGE_0_BASE + 33) ++#define PCM512x_FS_SPEED_MODE (PCM512x_PAGE_0_BASE + 34) ++#define PCM512x_IDAC_1 (PCM512x_PAGE_0_BASE + 35) ++#define PCM512x_IDAC_2 (PCM512x_PAGE_0_BASE + 36) ++#define PCM512x_ERROR_DETECT (PCM512x_PAGE_0_BASE + 37) ++#define PCM512x_I2S_1 (PCM512x_PAGE_0_BASE + 40) ++#define PCM512x_I2S_2 (PCM512x_PAGE_0_BASE + 41) ++#define PCM512x_DAC_ROUTING (PCM512x_PAGE_0_BASE + 42) ++#define PCM512x_DSP_PROGRAM (PCM512x_PAGE_0_BASE + 43) ++#define PCM512x_CLKDET (PCM512x_PAGE_0_BASE + 44) ++#define PCM512x_AUTO_MUTE (PCM512x_PAGE_0_BASE + 59) ++#define PCM512x_DIGITAL_VOLUME_1 (PCM512x_PAGE_0_BASE + 60) ++#define PCM512x_DIGITAL_VOLUME_2 (PCM512x_PAGE_0_BASE + 61) ++#define PCM512x_DIGITAL_VOLUME_3 (PCM512x_PAGE_0_BASE + 62) ++#define PCM512x_DIGITAL_MUTE_1 (PCM512x_PAGE_0_BASE + 63) ++#define PCM512x_DIGITAL_MUTE_2 (PCM512x_PAGE_0_BASE + 64) ++#define PCM512x_DIGITAL_MUTE_3 (PCM512x_PAGE_0_BASE + 65) ++#define PCM512x_GPIO_OUTPUT_1 (PCM512x_PAGE_0_BASE + 80) ++#define PCM512x_GPIO_OUTPUT_2 (PCM512x_PAGE_0_BASE + 81) ++#define PCM512x_GPIO_OUTPUT_3 (PCM512x_PAGE_0_BASE + 82) ++#define PCM512x_GPIO_OUTPUT_4 (PCM512x_PAGE_0_BASE + 83) ++#define PCM512x_GPIO_OUTPUT_5 (PCM512x_PAGE_0_BASE + 84) ++#define PCM512x_GPIO_OUTPUT_6 (PCM512x_PAGE_0_BASE + 85) ++#define PCM512x_GPIO_CONTROL_1 (PCM512x_PAGE_0_BASE + 86) ++#define PCM512x_GPIO_CONTROL_2 (PCM512x_PAGE_0_BASE + 87) ++#define PCM512x_OVERFLOW (PCM512x_PAGE_0_BASE + 90) ++#define PCM512x_RATE_DET_1 (PCM512x_PAGE_0_BASE + 91) ++#define PCM512x_RATE_DET_2 (PCM512x_PAGE_0_BASE + 92) ++#define PCM512x_RATE_DET_3 (PCM512x_PAGE_0_BASE + 93) ++#define PCM512x_RATE_DET_4 (PCM512x_PAGE_0_BASE + 94) ++#define PCM512x_ANALOG_MUTE_DET (PCM512x_PAGE_0_BASE + 108) ++#define PCM512x_GPIN (PCM512x_PAGE_0_BASE + 119) ++#define PCM512x_DIGITAL_MUTE_DET (PCM512x_PAGE_0_BASE + 120) ++ ++#define PCM512x_MAX_REGISTER (PCM512x_PAGE_0_BASE + 120) ++ ++/* Page 0, Register 1 - reset */ ++#define PCM512x_RSTR (1 << 0) ++#define PCM512x_RSTM (1 << 4) ++ ++/* Page 0, Register 2 - power */ ++#define PCM512x_RQPD (1 << 0) ++#define PCM512x_RQPD_SHIFT 0 ++#define PCM512x_RQST (1 << 4) ++#define PCM512x_RQST_SHIFT 4 ++ ++/* Page 0, Register 3 - mute */ ++#define PCM512x_RQMR_SHIFT 0 ++#define PCM512x_RQML_SHIFT 4 ++ ++/* Page 0, Register 4 - PLL */ ++#define PCM512x_PLCE (1 << 0) ++#define PCM512x_RLCE_SHIFT 0 ++#define PCM512x_PLCK (1 << 4) ++#define PCM512x_PLCK_SHIFT 4 ++ ++/* Page 0, Register 7 - DSP */ ++#define PCM512x_SDSL (1 << 0) ++#define PCM512x_SDSL_SHIFT 0 ++#define PCM512x_DEMP (1 << 4) ++#define PCM512x_DEMP_SHIFT 4 ++ ++/* Page 0, Register 13 - PLL reference */ ++#define PCM512x_SREF (1 << 4) ++ ++/* Page 0, Register 37 - Error detection */ ++#define PCM512x_IPLK (1 << 0) ++#define PCM512x_DCAS (1 << 1) ++#define PCM512x_IDCM (1 << 2) ++#define PCM512x_IDCH (1 << 3) ++#define PCM512x_IDSK (1 << 4) ++#define PCM512x_IDBK (1 << 5) ++#define PCM512x_IDFS (1 << 6) ++ ++/* Page 0, Register 42 - DAC routing */ ++#define PCM512x_AUPR_SHIFT 0 ++#define PCM512x_AUPL_SHIFT 4 ++ ++/* Page 0, Register 59 - auto mute */ ++#define PCM512x_ATMR_SHIFT 0 ++#define PCM512x_ATML_SHIFT 4 ++ ++/* Page 0, Register 63 - ramp rates */ ++#define PCM512x_VNDF_SHIFT 6 ++#define PCM512x_VNDS_SHIFT 4 ++#define PCM512x_VNUF_SHIFT 2 ++#define PCM512x_VNUS_SHIFT 0 ++ ++/* Page 0, Register 64 - emergency ramp rates */ ++#define PCM512x_VEDF_SHIFT 6 ++#define PCM512x_VEDS_SHIFT 4 ++ ++/* Page 0, Register 65 - Digital mute enables */ ++#define PCM512x_ACTL_SHIFT 2 ++#define PCM512x_AMLE_SHIFT 1 ++#define PCM512x_AMLR_SHIFT 0 ++ ++#endif +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0186-Fix-volsw_range-functions-so-SOC_DOUBLE_R_RANGE_TLV-.patch b/target/linux/brcm2708/patches-3.10/0186-Fix-volsw_range-functions-so-SOC_DOUBLE_R_RANGE_TLV-.patch new file mode 100644 index 00000000000..2b49c736588 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0186-Fix-volsw_range-functions-so-SOC_DOUBLE_R_RANGE_TLV-.patch @@ -0,0 +1,78 @@ +From 4c91cfe1cfa38f4e17e96cd7d78ac2a4fa86d5c9 Mon Sep 17 00:00:00 2001 +From: Howard Mitchell +Date: Fri, 28 Mar 2014 16:27:57 +0000 +Subject: [PATCH 186/196] Fix volsw_range functions so SOC_DOUBLE_R_RANGE_TLV + works. + +This is so that the correct rabge of values as specified +with the SOC_DOUBLE_R_RANGE_TLV macro are sent to the +hardware for both the normal and invert cases. +--- + sound/soc/soc-core.c | 22 ++++++++++------------ + 1 file changed, 10 insertions(+), 12 deletions(-) + +diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c +index d18272c..be302e1 100644 +--- a/sound/soc/soc-core.c ++++ b/sound/soc/soc-core.c +@@ -2925,8 +2925,8 @@ int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol, + + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = snd_soc_volsw_is_stereo(mc) ? 2 : 1; +- uinfo->value.integer.min = 0; +- uinfo->value.integer.max = platform_max - min; ++ uinfo->value.integer.min = min; ++ uinfo->value.integer.max = platform_max; + + return 0; + } +@@ -2957,9 +2957,10 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, + unsigned int val, val_mask; + int ret; + +- val = ((ucontrol->value.integer.value[0] + min) & mask); + if (invert) +- val = max - val; ++ val = ((max - ucontrol->value.integer.value[0] + min) & mask); ++ else ++ val = (ucontrol->value.integer.value[0] & mask); + val_mask = mask << shift; + val = val << shift; + +@@ -2968,9 +2969,10 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, + return ret; + + if (snd_soc_volsw_is_stereo(mc)) { +- val = ((ucontrol->value.integer.value[1] + min) & mask); + if (invert) +- val = max - val; ++ val = ((max - ucontrol->value.integer.value[1] + min) & mask); ++ else ++ val = (ucontrol->value.integer.value[1] & mask); + val_mask = mask << shift; + val = val << shift; + +@@ -3008,18 +3010,14 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol, + (snd_soc_read(codec, reg) >> shift) & mask; + if (invert) + ucontrol->value.integer.value[0] = +- max - ucontrol->value.integer.value[0]; +- ucontrol->value.integer.value[0] = +- ucontrol->value.integer.value[0] - min; ++ max - ucontrol->value.integer.value[0] + min; + + if (snd_soc_volsw_is_stereo(mc)) { + ucontrol->value.integer.value[1] = + (snd_soc_read(codec, rreg) >> shift) & mask; + if (invert) + ucontrol->value.integer.value[1] = +- max - ucontrol->value.integer.value[1]; +- ucontrol->value.integer.value[1] = +- ucontrol->value.integer.value[1] - min; ++ max - ucontrol->value.integer.value[1] + min; + } + + return 0; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0187-Use-a-range-macro-for-Playback-Volume.patch b/target/linux/brcm2708/patches-3.10/0187-Use-a-range-macro-for-Playback-Volume.patch new file mode 100644 index 00000000000..a990c5b1812 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0187-Use-a-range-macro-for-Playback-Volume.patch @@ -0,0 +1,29 @@ +From 13d82ae9cf856fd5b58c932181591a9a4fda8659 Mon Sep 17 00:00:00 2001 +From: Howard Mitchell +Date: Fri, 28 Mar 2014 16:40:31 +0000 +Subject: [PATCH 187/196] Use a range macro for Playback Volume. + +This allows limiting the output gain to avoid clipping in the +DAC ouput stages. +--- + sound/soc/codecs/pcm512x.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c +index ed36a4a..5bc96ec 100644 +--- a/sound/soc/codecs/pcm512x.c ++++ b/sound/soc/codecs/pcm512x.c +@@ -240,8 +240,8 @@ static const struct soc_enum pcm512x_veds = + pcm512x_ramp_step_text); + + static const struct snd_kcontrol_new pcm512x_controls[] = { +-SOC_DOUBLE_R_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2, +- PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv), ++SOC_DOUBLE_R_RANGE_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2, ++ PCM512x_DIGITAL_VOLUME_3, 0, 48, 255, 1, digital_tlv), + SOC_DOUBLE("Playback Digital Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT, + PCM512x_RQMR_SHIFT, 1, 1), + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0188-fix-soc-core-s-inverse-range-and-let-IQaudIO-DAC-use.patch b/target/linux/brcm2708/patches-3.10/0188-fix-soc-core-s-inverse-range-and-let-IQaudIO-DAC-use.patch new file mode 100644 index 00000000000..9e1f8e42d11 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0188-fix-soc-core-s-inverse-range-and-let-IQaudIO-DAC-use.patch @@ -0,0 +1,56 @@ +From 23744308d6343449e4a037d6bf35d9566c711983 Mon Sep 17 00:00:00 2001 +From: Gordon Garrity +Date: Sun, 30 Mar 2014 13:52:33 +0100 +Subject: [PATCH 188/196] fix soc-core's inverse range and let IQaudIO DAC use + this fixed SOC_DOUBLE_R_RANGE_TLV support + +--- + sound/soc/codecs/pcm512x.c | 3 ++- + sound/soc/soc-core.c | 8 ++++---- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c +index 5bc96ec..504da38 100644 +--- a/sound/soc/codecs/pcm512x.c ++++ b/sound/soc/codecs/pcm512x.c +@@ -239,9 +239,10 @@ static const struct soc_enum pcm512x_veds = + SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_2, PCM512x_VEDS_SHIFT, 4, + pcm512x_ramp_step_text); + ++/* Don't let the DAC go into clipping by limiting the alsa volume control range */ + static const struct snd_kcontrol_new pcm512x_controls[] = { + SOC_DOUBLE_R_RANGE_TLV("Playback Digital Volume", PCM512x_DIGITAL_VOLUME_2, +- PCM512x_DIGITAL_VOLUME_3, 0, 48, 255, 1, digital_tlv), ++ PCM512x_DIGITAL_VOLUME_3, 0, 40, 255, 1, digital_tlv), + SOC_DOUBLE("Playback Digital Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT, + PCM512x_RQMR_SHIFT, 1, 1), + +diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c +index be302e1..2c28df1 100644 +--- a/sound/soc/soc-core.c ++++ b/sound/soc/soc-core.c +@@ -2959,8 +2959,8 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, + + if (invert) + val = ((max - ucontrol->value.integer.value[0] + min) & mask); +- else +- val = (ucontrol->value.integer.value[0] & mask); ++ else ++ val = (ucontrol->value.integer.value[0] & mask); + val_mask = mask << shift; + val = val << shift; + +@@ -2971,8 +2971,8 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, + if (snd_soc_volsw_is_stereo(mc)) { + if (invert) + val = ((max - ucontrol->value.integer.value[1] + min) & mask); +- else +- val = (ucontrol->value.integer.value[1] & mask); ++ else ++ val = (ucontrol->value.integer.value[1] & mask); + val_mask = mask << shift; + val = val << shift; + +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0189-config-Add-CONFIG_L2TP_IP-and-CONFIG_L2TP_ETH.patch b/target/linux/brcm2708/patches-3.10/0189-config-Add-CONFIG_L2TP_IP-and-CONFIG_L2TP_ETH.patch new file mode 100644 index 00000000000..4533f15396b --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0189-config-Add-CONFIG_L2TP_IP-and-CONFIG_L2TP_ETH.patch @@ -0,0 +1,26 @@ +From 5f9db4323315fa80c43275170ca2a4f02e0b94a3 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Thu, 27 Mar 2014 00:56:15 +0000 +Subject: [PATCH 189/196] config: Add CONFIG_L2TP_IP and CONFIG_L2TP_ETH + +--- + arch/arm/configs/bcmrpi_defconfig | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 90fe241..21e34bd 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -269,6 +269,9 @@ CONFIG_BRIDGE_EBT_ULOG=m + CONFIG_BRIDGE_EBT_NFLOG=m + CONFIG_SCTP_COOKIE_HMAC_SHA1=y + CONFIG_L2TP=m ++CONFIG_L2TP_V3=y ++CONFIG_L2TP_IP=m ++CONFIG_L2TP_ETH=m + CONFIG_BRIDGE=m + CONFIG_VLAN_8021Q=m + CONFIG_VLAN_8021Q_GVRP=y +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0190-V4L2-Add-support-for-more-image-formats.patch b/target/linux/brcm2708/patches-3.10/0190-V4L2-Add-support-for-more-image-formats.patch new file mode 100644 index 00000000000..0c1dd691a10 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0190-V4L2-Add-support-for-more-image-formats.patch @@ -0,0 +1,50 @@ +From 2999c8b8c0b45cf22121f57d8efe4c55d4065898 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Fri, 4 Apr 2014 16:57:45 +0100 +Subject: [PATCH 190/196] V4L2: Add support for more image formats + +Adds YVU420 (YV12), YVU420SP (NV21), and BGR888. + +Signed-off-by: Dave Stevenson +--- + drivers/media/platform/bcm2835/bcm2835-camera.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c +index b1eac21..fd8e2e2 100644 +--- a/drivers/media/platform/bcm2835/bcm2835-camera.c ++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c +@@ -150,6 +150,30 @@ static struct mmal_fmt formats[] = { + .depth = 12, + .mmal_component = MMAL_COMPONENT_CAMERA, + }, ++ { ++ .name = "RGB24 (BE)", ++ .fourcc = V4L2_PIX_FMT_BGR24, ++ .flags = 0, ++ .mmal = MMAL_ENCODING_RGB24, ++ .depth = 24, ++ .mmal_component = MMAL_COMPONENT_CAMERA, ++ }, ++ { ++ .name = "4:2:0, packed YVU", ++ .fourcc = V4L2_PIX_FMT_YVU420, ++ .flags = 0, ++ .mmal = MMAL_ENCODING_YV12, ++ .depth = 12, ++ .mmal_component = MMAL_COMPONENT_CAMERA, ++ }, ++ { ++ .name = "4:2:0, packed, NV21", ++ .fourcc = V4L2_PIX_FMT_NV21, ++ .flags = 0, ++ .mmal = MMAL_ENCODING_NV21, ++ .depth = 12, ++ .mmal_component = MMAL_COMPONENT_CAMERA, ++ }, + }; + + static struct mmal_fmt *get_format(struct v4l2_format *f) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0191-config-Add-support-for-BRCMFMAC-wifi-driver.patch b/target/linux/brcm2708/patches-3.10/0191-config-Add-support-for-BRCMFMAC-wifi-driver.patch new file mode 100644 index 00000000000..5a45f5b67bd --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0191-config-Add-support-for-BRCMFMAC-wifi-driver.patch @@ -0,0 +1,26 @@ +From 55e5205c2c9344a83846289bad177325e8311ec5 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 15 Apr 2014 14:27:22 +0100 +Subject: [PATCH 191/196] config: Add support for BRCMFMAC wifi driver + +--- + arch/arm/configs/bcmrpi_defconfig | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 21e34bd..9810e9d 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -482,6 +482,9 @@ CONFIG_ATH6KL_USB=m + CONFIG_AR5523=m + CONFIG_B43=m + CONFIG_B43LEGACY=m ++CONFIG_BRCMFMAC=m ++# CONFIG_BRCMFMAC_SDIO is not set ++CONFIG_BRCMFMAC_USB=y + CONFIG_HOSTAP=m + CONFIG_LIBERTAS=m + CONFIG_LIBERTAS_USB=m +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0192-mach-bcm2708-Reserve-64-IRQs-for-peripherals.patch b/target/linux/brcm2708/patches-3.10/0192-mach-bcm2708-Reserve-64-IRQs-for-peripherals.patch new file mode 100644 index 00000000000..daf677b3d41 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0192-mach-bcm2708-Reserve-64-IRQs-for-peripherals.patch @@ -0,0 +1,33 @@ +From 4f11f18f656b0c3538bb92cffcea62401f351660 Mon Sep 17 00:00:00 2001 +From: notro +Date: Sun, 20 Apr 2014 18:51:40 +0200 +Subject: [PATCH 192/196] mach-bcm2708: Reserve 64 IRQs for peripherals + +The Raspberry Pi does not support dynamic IRQs. Some peripherals, such +as the STMPE, add IRQ controllers. If there aren't any reserved IRQs, then +these peripherals will just fail. + +Signed-off-by: Sean Cross +Signed-off-by: Noralf Tronnes +--- + arch/arm/mach-bcm2708/include/mach/irqs.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/mach-bcm2708/include/mach/irqs.h b/arch/arm/mach-bcm2708/include/mach/irqs.h +index 9aaedf1..1947d91 100644 +--- a/arch/arm/mach-bcm2708/include/mach/irqs.h ++++ b/arch/arm/mach-bcm2708/include/mach/irqs.h +@@ -192,8 +192,9 @@ + #define HARD_IRQS (64 + 21) + #define FIQ_IRQS (64 + 21) + #define GPIO_IRQS (32*5) ++#define SPARE_IRQS (64) + +-#define NR_IRQS HARD_IRQS+FIQ_IRQS+GPIO_IRQS ++#define NR_IRQS HARD_IRQS+FIQ_IRQS+GPIO_IRQS+SPARE_IRQS + + + #endif /* _BCM2708_IRQS_H_ */ +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0193-bcm2708_gpio-make-room-for-additional-GPIO-chips.patch b/target/linux/brcm2708/patches-3.10/0193-bcm2708_gpio-make-room-for-additional-GPIO-chips.patch new file mode 100644 index 00000000000..a27068264d4 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0193-bcm2708_gpio-make-room-for-additional-GPIO-chips.patch @@ -0,0 +1,77 @@ +From a3d6a8b1bd041e8428b8cd1edeed8fe9259e54b1 Mon Sep 17 00:00:00 2001 +From: notro +Date: Sun, 20 Apr 2014 18:55:24 +0200 +Subject: [PATCH 193/196] bcm2708_gpio: make room for additional GPIO chips + +ARCH_NR_GPIOS is set to 54, and all is used by the onboard gpio controller. +This makes no room for additional gpio controllers to be added. + +ARCH_NR_GPIOS limits how many gpios that can be used on a platform. +From gpiolib.c: +static struct gpio_desc gpio_desc[ARCH_NR_GPIOS]; + +Lift this restraint by using the default value for ARCH_NR_GPIOS, which is 256, +and make a new macro for the on-chip number of gpios. + +Signed-off-by: Noralf Tronnes +--- + arch/arm/mach-bcm2708/bcm2708_gpio.c | 8 ++++---- + arch/arm/mach-bcm2708/include/mach/gpio.h | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c +index bab8a49..120929ff 100644 +--- a/arch/arm/mach-bcm2708/bcm2708_gpio.c ++++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c +@@ -72,7 +72,7 @@ static int bcm2708_set_function(struct gpio_chip *gc, unsigned offset, + unsigned gpio_field_offset = (offset - 10 * gpio_bank) * 3; + + //printk(KERN_ERR DRIVER_NAME ": bcm2708_gpio_set_function %p (%d,%d)\n", gc, offset, function); +- if (offset >= ARCH_NR_GPIOS) ++ if (offset >= BCM2708_NR_GPIOS) + return -EINVAL; + + spin_lock_irqsave(&lock, flags); +@@ -110,7 +110,7 @@ static int bcm2708_gpio_get(struct gpio_chip *gc, unsigned offset) + unsigned gpio_field_offset = (offset - 32 * gpio_bank); + unsigned lev; + +- if (offset >= ARCH_NR_GPIOS) ++ if (offset >= BCM2708_NR_GPIOS) + return 0; + lev = readl(gpio->base + GPIOLEV(gpio_bank)); + //printk(KERN_ERR DRIVER_NAME ": bcm2708_gpio_get %p (%d)=%d\n", gc, offset, 0x1 & (lev>>gpio_field_offset)); +@@ -123,7 +123,7 @@ static void bcm2708_gpio_set(struct gpio_chip *gc, unsigned offset, int value) + unsigned gpio_bank = offset / 32; + unsigned gpio_field_offset = (offset - 32 * gpio_bank); + //printk(KERN_ERR DRIVER_NAME ": bcm2708_gpio_set %p (%d=%d)\n", gc, offset, value); +- if (offset >= ARCH_NR_GPIOS) ++ if (offset >= BCM2708_NR_GPIOS) + return; + if (value) + writel(1 << gpio_field_offset, gpio->base + GPIOSET(gpio_bank)); +@@ -302,7 +302,7 @@ static int bcm2708_gpio_probe(struct platform_device *dev) + + ucb->gc.label = "bcm2708_gpio"; + ucb->gc.base = 0; +- ucb->gc.ngpio = ARCH_NR_GPIOS; ++ ucb->gc.ngpio = BCM2708_NR_GPIOS; + ucb->gc.owner = THIS_MODULE; + + ucb->gc.direction_input = bcm2708_gpio_dir_in; +diff --git a/arch/arm/mach-bcm2708/include/mach/gpio.h b/arch/arm/mach-bcm2708/include/mach/gpio.h +index f600bc7..d8b3a90 100644 +--- a/arch/arm/mach-bcm2708/include/mach/gpio.h ++++ b/arch/arm/mach-bcm2708/include/mach/gpio.h +@@ -9,7 +9,7 @@ + #ifndef __ASM_ARCH_GPIO_H + #define __ASM_ARCH_GPIO_H + +-#define ARCH_NR_GPIOS 54 // number of gpio lines ++#define BCM2708_NR_GPIOS 54 // number of gpio lines + + #define gpio_to_irq(x) ((x) + GPIO_IRQ_START) + #define irq_to_gpio(x) ((x) - GPIO_IRQ_START) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0194-lirc_rpi-Use-read_current_timer-to-determine-transmi.patch b/target/linux/brcm2708/patches-3.10/0194-lirc_rpi-Use-read_current_timer-to-determine-transmi.patch new file mode 100644 index 00000000000..66cd4a476df --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0194-lirc_rpi-Use-read_current_timer-to-determine-transmi.patch @@ -0,0 +1,100 @@ +From fd945928d6fd544d2f4bdde718b097b01bafb048 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Tue, 22 Apr 2014 13:58:14 +0100 +Subject: [PATCH 194/196] lirc_rpi: Use read_current_timer to determine + transmitter delay. Thanks to jjmz and others See: + https://github.com/raspberrypi/linux/issues/525 + +--- + drivers/staging/media/lirc/lirc_rpi.c | 32 +++++++++++++++++--------------- + 1 file changed, 17 insertions(+), 15 deletions(-) + +diff --git a/drivers/staging/media/lirc/lirc_rpi.c b/drivers/staging/media/lirc/lirc_rpi.c +index 8aee83f..57ffacf 100644 +--- a/drivers/staging/media/lirc/lirc_rpi.c ++++ b/drivers/staging/media/lirc/lirc_rpi.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -41,7 +42,7 @@ + + #define LIRC_DRIVER_NAME "lirc_rpi" + #define RBUF_LEN 256 +-#define LIRC_TRANSMITTER_LATENCY 256 ++#define LIRC_TRANSMITTER_LATENCY 50 + + #ifndef MAX_UDELAY_MS + #define MAX_UDELAY_US 5000 +@@ -107,19 +108,15 @@ static void safe_udelay(unsigned long usecs) + static int init_timing_params(unsigned int new_duty_cycle, + unsigned int new_freq) + { +- /* +- * period, pulse/space width are kept with 8 binary places - +- * IE multiplied by 256. +- */ +- if (256 * 1000000L / new_freq * new_duty_cycle / 100 <= ++ if (1000 * 1000000L / new_freq * new_duty_cycle / 100 <= + LIRC_TRANSMITTER_LATENCY) + return -EINVAL; +- if (256 * 1000000L / new_freq * (100 - new_duty_cycle) / 100 <= ++ if (1000 * 1000000L / new_freq * (100 - new_duty_cycle) / 100 <= + LIRC_TRANSMITTER_LATENCY) + return -EINVAL; + duty_cycle = new_duty_cycle; + freq = new_freq; +- period = 256 * 1000000L / freq; ++ period = 1000 * 1000000L / freq; + pulse_width = period * duty_cycle / 100; + space_width = period - pulse_width; + dprintk("in init_timing_params, freq=%d pulse=%ld, " +@@ -130,11 +127,14 @@ static int init_timing_params(unsigned int new_duty_cycle, + static long send_pulse_softcarrier(unsigned long length) + { + int flag; +- unsigned long actual, target, d; ++ unsigned long actual, target; ++ unsigned long actual_us, initial_us, target_us; + +- length <<= 8; ++ length *= 1000; + + actual = 0; target = 0; flag = 0; ++ read_current_timer(&actual_us); ++ + while (actual < length) { + if (flag) { + gpiochip->set(gpiochip, gpio_out_pin, invert); +@@ -143,17 +143,19 @@ static long send_pulse_softcarrier(unsigned long length) + gpiochip->set(gpiochip, gpio_out_pin, !invert); + target += pulse_width; + } +- d = (target - actual - +- LIRC_TRANSMITTER_LATENCY + 128) >> 8; ++ initial_us = actual_us; ++ target_us = actual_us + (target - actual) / 1000; + /* + * Note - we've checked in ioctl that the pulse/space + * widths are big enough so that d is > 0 + */ +- udelay(d); +- actual += (d << 8) + LIRC_TRANSMITTER_LATENCY; ++ if ((int)(target_us - actual_us) > 0) ++ udelay(target_us - actual_us); ++ read_current_timer(&actual_us); ++ actual += (actual_us - initial_us) * 1000; + flag = !flag; + } +- return (actual-length) >> 8; ++ return (actual-length) / 1000; + } + + static long send_pulse(unsigned long length) +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch b/target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch new file mode 100644 index 00000000000..ab4a5559509 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch @@ -0,0 +1,41 @@ +From 08223128145b351a4d47b6d1780c13eac5d8df95 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sun, 27 Apr 2014 17:52:12 +0100 +Subject: [PATCH 195/196] snd-bcm2835: Ensure alsa_stream is null on failure to + avoid kernel panic + +--- + sound/arm/bcm2835-pcm.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c +index 499e225..54a8f87 100755 +--- a/sound/arm/bcm2835-pcm.c ++++ b/sound/arm/bcm2835-pcm.c +@@ -136,6 +136,11 @@ static int snd_bcm2835_playback_open(struct snd_pcm_substream *substream) + alsa_stream->enable_fifo_irq = 0; + alsa_stream->fifo_irq_handler = bcm2835_playback_fifo_irq; + ++ err = bcm2835_audio_open(alsa_stream); ++ if (err != 0) { ++ kfree(alsa_stream); ++ return err; ++ } + runtime->private_data = alsa_stream; + runtime->private_free = snd_bcm2835_playback_free; + runtime->hw = snd_bcm2835_playback_hw; +@@ -143,11 +148,6 @@ static int snd_bcm2835_playback_open(struct snd_pcm_substream *substream) + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + 16); + +- err = bcm2835_audio_open(alsa_stream); +- if (err != 0) { +- kfree(alsa_stream); +- return err; +- } + chip->alsa_stream[idx] = alsa_stream; + + alsa_stream->open = 1; +-- +1.9.1 + diff --git a/target/linux/brcm2708/patches-3.10/0196-config-Add-CONFIG_NFS_SWAP.patch b/target/linux/brcm2708/patches-3.10/0196-config-Add-CONFIG_NFS_SWAP.patch new file mode 100644 index 00000000000..6f9c62656ad --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0196-config-Add-CONFIG_NFS_SWAP.patch @@ -0,0 +1,25 @@ +From 73c46467396a1806c4c82fa0ad28429a6443ebba Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sun, 27 Apr 2014 18:04:54 +0100 +Subject: [PATCH 196/196] config: Add CONFIG_NFS_SWAP + +See: https://github.com/raspberrypi/firmware/issues/266 +--- + arch/arm/configs/bcmrpi_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig +index 9810e9d..e480e7e 100644 +--- a/arch/arm/configs/bcmrpi_defconfig ++++ b/arch/arm/configs/bcmrpi_defconfig +@@ -1018,6 +1018,7 @@ CONFIG_F2FS_FS=y + CONFIG_NFS_FS=y + CONFIG_NFS_V3_ACL=y + CONFIG_NFS_V4=y ++CONFIG_NFS_SWAP=y + CONFIG_ROOT_NFS=y + CONFIG_NFS_FSCACHE=y + CONFIG_NFSD=m +-- +1.9.1 +