diff --git a/arch/arm/boot/dts/qcom/apq8009-512mb-mtp-wcd9326-refboard.dts b/arch/arm/boot/dts/qcom/apq8009-512mb-mtp-wcd9326-refboard.dts index 413416cfbe0..7f93088f612 100644 --- a/arch/arm/boot/dts/qcom/apq8009-512mb-mtp-wcd9326-refboard.dts +++ b/arch/arm/boot/dts/qcom/apq8009-512mb-mtp-wcd9326-refboard.dts @@ -62,7 +62,7 @@ }; &peripheral_mem { - reg = <0x0 0x8a400000 0x0 0x0500000>; + reg = <0x0 0x8a400000 0x0 0x0700000>; }; &i2c_4 { diff --git a/arch/arm/boot/dts/qcom/apq8009-audio-external_codec.dtsi b/arch/arm/boot/dts/qcom/apq8009-audio-external_codec.dtsi index 53eb1bb465f..c8eba01a393 100644 --- a/arch/arm/boot/dts/qcom/apq8009-audio-external_codec.dtsi +++ b/arch/arm/boot/dts/qcom/apq8009-audio-external_codec.dtsi @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2016, 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -98,7 +98,8 @@ <&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>, <&incall_music_2_rx>, <&bt_sco_rx>, - <&bt_sco_tx>, <&int_fm_rx>, <&int_fm_tx>; + <&bt_sco_tx>, <&int_fm_rx>, <&int_fm_tx>, + <&afe_loopback_tx>; asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8", "msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3", @@ -112,7 +113,8 @@ "msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773", "msm-dai-q6-dev.32770", "msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289", - "msm-dai-q6-dev.12292", "msm-dai-q6-dev.12293"; + "msm-dai-q6-dev.12292", "msm-dai-q6-dev.12293", + "msm-dai-q6-dev.24577"; asoc-codec = <&stub_codec>; asoc-codec-names = "msm-stub-codec.1"; qcom,max-aux-codec = <2>; diff --git a/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326-refboard.dts b/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326-refboard.dts index a9c228a5a64..c4f45107565 100644 --- a/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326-refboard.dts +++ b/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326-refboard.dts @@ -62,7 +62,7 @@ }; &peripheral_mem { - reg = <0x0 0x8a400000 0x0 0x0500000>; + reg = <0x0 0x8a400000 0x0 0x0700000>; }; &i2c_4 { diff --git a/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326.dts b/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326.dts index b7599888f6e..86ef61d0dc8 100644 --- a/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326.dts +++ b/arch/arm/boot/dts/qcom/apq8009-mtp-wcd9326.dts @@ -30,6 +30,6 @@ }; &peripheral_mem { - reg = <0x0 0x8a400000 0x0 0x0500000>; + reg = <0x0 0x8a400000 0x0 0x0700000>; }; diff --git a/arch/arm/boot/dts/qcom/msm8909.dtsi b/arch/arm/boot/dts/qcom/msm8909.dtsi index d4e5e8f3918..4cac597d3fb 100644 --- a/arch/arm/boot/dts/qcom/msm8909.dtsi +++ b/arch/arm/boot/dts/qcom/msm8909.dtsi @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2016, 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1465,6 +1465,11 @@ qcom,msm-dai-q6-dev-id = <12292>; }; + afe_loopback_tx: qcom,msm-dai-q6-afe-loopback-tx { + compatible = "qcom,msm-dai-q6-dev"; + qcom,msm-dai-q6-dev-id = <24577>; + }; + int_fm_tx: qcom,msm-dai-q6-int-fm-tx { compatible = "qcom,msm-dai-q6-dev"; qcom,msm-dai-q6-dev-id = <12293>; diff --git a/arch/arm/boot/dts/qcom/msm8916-ze550kl.dtsi b/arch/arm/boot/dts/qcom/msm8916-ze550kl.dtsi index 7d025b0997a..acb0e79e9c8 100644 --- a/arch/arm/boot/dts/qcom/msm8916-ze550kl.dtsi +++ b/arch/arm/boot/dts/qcom/msm8916-ze550kl.dtsi @@ -28,6 +28,23 @@ bootargs = "sched_enable_hmp=1"; }; + firmware: firmware { + android { + compatible = "android,firmware"; + fstab { + compatible = "android,fstab"; + system { + compatible = "android,system"; + dev = "/dev/block/platform/soc.0/7824900.sdhci/by-name/system"; + type = "ext4"; + mnt_flags = "ro,barrier=1,discard"; + fsmgr_flags = "wait"; + status = "ok"; + }; + }; + }; + }; + aliases { sdhc1 = &sdhc_1; /* SDC1 eMMC slot */ sdhc2 = &sdhc_2; /* SDC2 SD card slot */ diff --git a/arch/arm/boot/dts/qcom/msm8939-zd550kl.dtsi b/arch/arm/boot/dts/qcom/msm8939-zd550kl.dtsi index 9b65b728251..a8568884a59 100644 --- a/arch/arm/boot/dts/qcom/msm8939-zd550kl.dtsi +++ b/arch/arm/boot/dts/qcom/msm8939-zd550kl.dtsi @@ -28,6 +28,23 @@ chosen { bootargs = "boot_cpus=0,4,5,6,7 sched_enable_hmp=1"; }; + + firmware: firmware { + android { + compatible = "android,firmware"; + fstab { + compatible = "android,fstab"; + system { + compatible = "android,system"; + dev = "/dev/block/platform/soc.0/7824900.sdhci/by-name/system"; + type = "ext4"; + mnt_flags = "ro,barrier=1,discard"; + fsmgr_flags = "wait"; + status = "ok"; + }; + }; + }; + }; }; &soc { diff --git a/arch/arm/boot/dts/qcom/msm8939-ze550kl.dtsi b/arch/arm/boot/dts/qcom/msm8939-ze550kl.dtsi index fba99ba4968..6da94049d7a 100644 --- a/arch/arm/boot/dts/qcom/msm8939-ze550kl.dtsi +++ b/arch/arm/boot/dts/qcom/msm8939-ze550kl.dtsi @@ -29,6 +29,23 @@ chosen { bootargs = "boot_cpus=0,4,5,6,7 sched_enable_hmp=1"; }; + + firmware: firmware { + android { + compatible = "android,firmware"; + fstab { + compatible = "android,fstab"; + system { + compatible = "android,system"; + dev = "/dev/block/platform/soc.0/7824900.sdhci/by-name/system"; + type = "ext4"; + mnt_flags = "ro,barrier=1,discard"; + fsmgr_flags = "wait"; + status = "ok"; + }; + }; + }; + }; }; &soc { diff --git a/arch/arm/boot/dts/qcom/msm8939-ze600kl.dtsi b/arch/arm/boot/dts/qcom/msm8939-ze600kl.dtsi index 93d2d851cea..0a3744710b5 100644 --- a/arch/arm/boot/dts/qcom/msm8939-ze600kl.dtsi +++ b/arch/arm/boot/dts/qcom/msm8939-ze600kl.dtsi @@ -29,6 +29,23 @@ chosen { bootargs = "boot_cpus=0,4,5,6,7 sched_enable_hmp=1"; }; + + firmware: firmware { + android { + compatible = "android,firmware"; + fstab { + compatible = "android,fstab"; + system { + compatible = "android,system"; + dev = "/dev/block/platform/soc.0/7824900.sdhci/by-name/system"; + type = "ext4"; + mnt_flags = "ro,barrier=1,discard"; + fsmgr_flags = "wait"; + status = "ok"; + }; + }; + }; + }; }; &soc { diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 43876245fc5..0b7f0123471 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h @@ -15,7 +15,17 @@ #include -#define __NR_syscalls (384) +/* + * This may need to be greater than __NR_last_syscall+1 in order to + * account for the padding in the syscall table + */ +#define __NR_syscalls (385) + +/* + * *NOTE*: This is a ghost syscall private to the kernel. Only the + * __kuser_cmpxchg code in entry-armv.S should be aware of its + * existence. Don't ever use this from user code. + */ #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0) #define __ARCH_WANT_STAT64 diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h index eafa35e266a..08c6833a9e2 100644 --- a/arch/arm/include/uapi/asm/unistd.h +++ b/arch/arm/include/uapi/asm/unistd.h @@ -412,11 +412,7 @@ #define __NR_renameat2 (__NR_SYSCALL_BASE+382) */ #define __NR_seccomp (__NR_SYSCALL_BASE+383) - -/* - * This may need to be greater than __NR_last_syscall+1 in order to - * account for the padding in the syscall table - */ +#define __NR_getrandom (__NR_SYSCALL_BASE+384) /* * The following SWIs are ARM private. diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 6f675b8098b..0b8185e795a 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -393,6 +393,7 @@ CALL(sys_sched_getattr) CALL(sys_ni_syscall) /* reserved sys_renameat2 */ CALL(sys_seccomp) + CALL(sys_getrandom) #ifndef syscalls_counted .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls #define syscalls_counted diff --git a/arch/arm64/configs/Z00L_defconfig b/arch/arm64/configs/Z00L_defconfig index 018d6a3729a..d5bb1c78af4 100644 --- a/arch/arm64/configs/Z00L_defconfig +++ b/arch/arm64/configs/Z00L_defconfig @@ -25,6 +25,7 @@ CONFIG_EMBEDDED=y # CONFIG_SLUB_DEBUG is not set # CONFIG_COMPAT_BRK is not set CONFIG_PROFILING=y +CONFIG_CC_STACKPROTECTOR_REGULAR=y CONFIG_PARTITION_ADVANCED=y # CONFIG_IOSCHED_TEST is not set CONFIG_IOSCHED_BFQ=y @@ -211,6 +212,7 @@ CONFIG_IPC_ROUTER=y CONFIG_IPC_ROUTER_SECURITY=y CONFIG_CMA=y CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_PROC_DEVICETREE=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=8192 diff --git a/arch/arm64/configs/Z00T_defconfig b/arch/arm64/configs/Z00T_defconfig index 86a34e839b9..04fb2774745 100644 --- a/arch/arm64/configs/Z00T_defconfig +++ b/arch/arm64/configs/Z00T_defconfig @@ -25,6 +25,7 @@ CONFIG_EMBEDDED=y # CONFIG_SLUB_DEBUG is not set # CONFIG_COMPAT_BRK is not set CONFIG_PROFILING=y +CONFIG_CC_STACKPROTECTOR_REGULAR=y CONFIG_PARTITION_ADVANCED=y # CONFIG_IOSCHED_TEST is not set CONFIG_IOSCHED_BFQ=y @@ -211,6 +212,7 @@ CONFIG_IPC_ROUTER=y CONFIG_IPC_ROUTER_SECURITY=y CONFIG_CMA=y CONFIG_CMA_SIZE_MBYTES=64 +CONFIG_PROC_DEVICETREE=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=8192 diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl index 96bc506ac6d..fc853fb1079 100644 --- a/arch/x86/syscalls/syscall_32.tbl +++ b/arch/x86/syscalls/syscall_32.tbl @@ -359,3 +359,6 @@ 350 i386 finit_module sys_finit_module 351 i386 sched_setattr sys_sched_setattr 352 i386 sched_getattr sys_sched_getattr +# 353 i386 renameat2 sys_renameat2 +354 i386 seccomp sys_seccomp +355 i386 getrandom sys_getrandom diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl index 7f517ca19d3..c16897e6885 100644 --- a/arch/x86/syscalls/syscall_64.tbl +++ b/arch/x86/syscalls/syscall_64.tbl @@ -322,6 +322,9 @@ 313 common finit_module sys_finit_module 314 common sched_setattr sys_sched_setattr 315 common sched_getattr sys_sched_getattr +# 316 common renameat2 sys_renameat2 +317 common seccomp sys_seccomp +318 common getrandom sys_getrandom # # x32-specific system call numbers start at 512 to avoid cache impact diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 490d7cfad80..96cad0df4db 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2012,2018 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -76,7 +76,7 @@ static inline uintptr_t buf_page_offset(void *buf) return offset; } -static inline int buf_num_pages(void *buf, ssize_t len) +static inline int buf_num_pages(void *buf, size_t len) { uintptr_t start = buf_page_start(buf) >> PAGE_SHIFT; uintptr_t end = (((uintptr_t) buf + len - 1) & PAGE_MASK) >> PAGE_SHIFT; @@ -90,7 +90,7 @@ static inline uint32_t buf_page_size(uint32_t size) return sz > PAGE_SIZE ? sz : PAGE_SIZE; } -static inline int buf_get_pages(void *addr, ssize_t sz, int nr_pages, +static inline int buf_get_pages(void *addr, size_t sz, int nr_pages, int access, struct smq_phy_page *pages, int nr_elems, struct smq_phy_page *range) { @@ -141,7 +141,7 @@ struct fastrpc_buf { struct ion_handle *handle; void *virt; ion_phys_addr_t phys; - ssize_t size; + size_t size; int used; }; @@ -224,7 +224,7 @@ struct fastrpc_mmap { ion_phys_addr_t phys; uintptr_t *vaddrin; uintptr_t vaddrout; - ssize_t size; + size_t size; int refs; }; @@ -272,7 +272,7 @@ static int map_iommu_mem(struct ion_handle *handle, struct file_data *fdata, ion_phys_addr_t *iova, unsigned long size) { struct fastrpc_apps *me = &gfa; - struct fastrpc_mmap *map = 0, *mapmatch = 0; + struct fastrpc_mmap *map = NULL, *mapmatch = NULL; struct hlist_node *n; unsigned long len = size; int cid = fdata->cid; @@ -306,7 +306,7 @@ static void unmap_iommu_mem(struct ion_handle *handle, struct file_data *fdata, int cached) { struct fastrpc_apps *me = &gfa; - struct fastrpc_mmap *map = 0, *mapmatch = 0; + struct fastrpc_mmap *map = NULL, *mapmatch = NULL; struct hlist_node *n; int cid = fdata->cid; @@ -341,10 +341,10 @@ static void free_mem(struct fastrpc_buf *buf, struct file_data *fd) } if (!IS_ERR_OR_NULL(buf->virt)) { ion_unmap_kernel(me->iclient, buf->handle); - buf->virt = 0; + buf->virt = NULL; } ion_free(me->iclient, buf->handle); - buf->handle = 0; + buf->handle = NULL; } } @@ -360,11 +360,11 @@ static void free_map(struct fastrpc_mmap *map, struct file_data *fdata) } if (!IS_ERR_OR_NULL(map->virt)) { ion_unmap_kernel(me->iclient, map->handle); - map->virt = 0; + map->virt = NULL; } ion_free(me->iclient, map->handle); } - map->handle = 0; + map->handle = NULL; } static int alloc_mem(struct fastrpc_buf *buf, struct file_data *fdata) @@ -375,8 +375,8 @@ static int alloc_mem(struct fastrpc_buf *buf, struct file_data *fdata) int err = 0; int cid = fdata->cid; unsigned int heap; - buf->handle = 0; - buf->virt = 0; + buf->handle = NULL; + buf->virt = NULL; buf->phys = 0; heap = me->channel[cid].smmu.enabled ? ION_HEAP(ION_IOMMU_HEAP_ID) : ION_HEAP(ION_ADSP_HEAP_ID); @@ -411,7 +411,7 @@ static int context_restore_interrupted(struct fastrpc_apps *me, struct smq_invoke_ctx **po) { int err = 0; - struct smq_invoke_ctx *ctx = 0, *ictx = 0; + struct smq_invoke_ctx *ctx = NULL, *ictx = NULL; struct hlist_node *n; struct fastrpc_ioctl_invoke *invoke = &invokefd->inv; spin_lock(&me->clst.hlock); @@ -507,7 +507,7 @@ static int context_alloc(struct fastrpc_apps *me, uint32_t kernel, struct smq_invoke_ctx **po) { int err = 0, bufs, size = 0; - struct smq_invoke_ctx *ctx = 0; + struct smq_invoke_ctx *ctx = NULL; struct smq_context_list *clst = &me->clst; struct fastrpc_ioctl_invoke *invoke = &invokefd->inv; @@ -520,7 +520,7 @@ static int context_alloc(struct fastrpc_apps *me, uint32_t kernel, bufs * sizeof(*ctx->handles); } - VERIFY(err, 0 != (ctx = kzalloc(sizeof(*ctx) + size, GFP_KERNEL))); + VERIFY(err, NULL != (ctx = kzalloc(sizeof(*ctx) + size, GFP_KERNEL))); if (err) goto bail; @@ -529,8 +529,8 @@ static int context_alloc(struct fastrpc_apps *me, uint32_t kernel, ctx->apps = me; ctx->fdata = fdata; ctx->pra = (remote_arg_t *)(&ctx[1]); - ctx->fds = invokefd->fds == 0 ? 0 : (int *)(&ctx->pra[bufs]); - ctx->handles = invokefd->fds == 0 ? 0 : + ctx->fds = invokefd->fds == NULL ? NULL : (int *)(&ctx->pra[bufs]); + ctx->handles = invokefd->fds == NULL ? NULL : (struct ion_handle **)(&ctx->fds[bufs]); if (!kernel) { VERIFY(err, 0 == copy_from_user(ctx->pra, invoke->pra, @@ -637,7 +637,7 @@ static void context_notify_user(struct smq_invoke_ctx *ctx, int retval) static void context_notify_all_users(struct smq_context_list *me, int cid) { - struct smq_invoke_ctx *ictx = 0; + struct smq_invoke_ctx *ictx = NULL; struct hlist_node *n; spin_lock(&me->hlock); hlist_for_each_entry_safe(ictx, n, &me->pending, hn) { @@ -662,10 +662,10 @@ static void context_list_ctor(struct smq_context_list *me) static void context_list_dtor(struct fastrpc_apps *me, struct smq_context_list *clst) { - struct smq_invoke_ctx *ictx = 0, *ctxfree; + struct smq_invoke_ctx *ictx = NULL, *ctxfree; struct hlist_node *n; do { - ctxfree = 0; + ctxfree = NULL; spin_lock(&clst->hlock); hlist_for_each_entry_safe(ictx, n, &clst->interrupted, hn) { hlist_del(&ictx->hn); @@ -698,7 +698,7 @@ static int get_page_list(uint32_t kernel, struct smq_invoke_ctx *ctx) struct fastrpc_buf *ibuf = &ctx->dev->buf; struct fastrpc_buf *obuf = &ctx->obuf; remote_arg_t *pra = ctx->pra; - ssize_t rlen; + size_t rlen; uint32_t sc = ctx->sc; int cid = ctx->fdata->cid; int i, err = 0; @@ -725,7 +725,7 @@ static int get_page_list(uint32_t kernel, struct smq_invoke_ctx *ctx) for (i = 0; i < inbufs + outbufs; ++i) { void *buf; int num; - ssize_t len; + size_t len; list[i].num = 0; list[i].pgidx = 0; @@ -785,14 +785,14 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx, { struct fastrpc_apps *me = &gfa; struct smq_invoke_buf *list; - struct fastrpc_buf *pbuf = &ctx->obuf, *obufs = 0; + struct fastrpc_buf *pbuf = &ctx->obuf, *obufs = NULL; struct smq_phy_page *pages; struct vm_area_struct *vma; struct ion_handle **handles = ctx->handles; void *args; remote_arg_t *pra = ctx->pra; remote_arg_t *rpra = ctx->rpra; - ssize_t rlen, used, size, copylen = 0; + size_t rlen, used, size, copylen = 0; uint32_t sc = ctx->sc, start; int i, inh, bufs = 0, err = 0, oix; int inbufs = REMOTE_SCALARS_INBUFS(sc); @@ -885,7 +885,7 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx, /* copy non ion buffers */ for (oix = 0; oix < inbufs + outbufs; ++oix) { int i = ctx->overps[oix]->raix; - ssize_t mlen = ctx->overps[oix]->mend - ctx->overps[oix]->mstart; + size_t mlen = ctx->overps[oix]->mend - ctx->overps[oix]->mstart; if (!pra[i].buf.len) continue; if (list[i].num) @@ -1152,7 +1152,7 @@ static void free_dev(struct fastrpc_device *dev, struct file_data *fdata) static int alloc_dev(struct fastrpc_device **dev, struct file_data *fdata) { int err = 0; - struct fastrpc_device *fd = 0; + struct fastrpc_device *fd = NULL; VERIFY(err, 0 != try_module_get(THIS_MODULE)); if (err) @@ -1180,7 +1180,7 @@ static int get_dev(struct fastrpc_apps *me, struct file_data *fdata, struct fastrpc_device **rdev) { struct hlist_head *head; - struct fastrpc_device *dev = 0, *devfree = 0; + struct fastrpc_device *dev = NULL, *devfree = NULL; struct hlist_node *n; uint32_t h = hash_32(current->tgid, RPC_HASH_BITS); int err = 0; @@ -1226,7 +1226,7 @@ static int fastrpc_internal_invoke(struct fastrpc_apps *me, uint32_t mode, struct fastrpc_ioctl_invoke_fd *invokefd, struct file_data *fdata) { - struct smq_invoke_ctx *ctx = 0; + struct smq_invoke_ctx *ctx = NULL; struct fastrpc_ioctl_invoke *invoke = &invokefd->inv; int cid = fdata->cid; int interrupted = 0; @@ -1315,8 +1315,8 @@ static int fastrpc_init_process(struct file_data *fdata, { int err = 0; struct fastrpc_ioctl_invoke_fd ioctl; - struct smq_phy_page *pages = 0; - struct fastrpc_mmap *map = 0; + struct smq_phy_page *pages = NULL; + struct fastrpc_mmap *map = NULL; int npages = 0; struct fastrpc_apps *me = &gfa; if (init->flags == FASTRPC_INIT_ATTACH) { @@ -1465,7 +1465,7 @@ static int fastrpc_munmap_on_dsp(struct fastrpc_apps *me, struct { int pid; uintptr_t vaddrout; - ssize_t size; + size_t size; } inargs; inargs.pid = current->tgid; @@ -1519,9 +1519,9 @@ static int map_buffer(struct fastrpc_apps *me, struct file_data *fdata, struct smq_phy_page **ppages, int *pnpages) { struct ion_client *clnt = gfa.iclient; - struct ion_handle *handle = 0; - struct fastrpc_mmap *map = 0, *mapmatch = 0; - struct smq_phy_page *pages = 0; + struct ion_handle *handle = NULL; + struct fastrpc_mmap *map = NULL, *mapmatch = NULL; + struct smq_phy_page *pages = NULL; struct hlist_node *n; uintptr_t vaddrout = 0; int num; @@ -1598,8 +1598,8 @@ static int fastrpc_internal_mmap(struct fastrpc_apps *me, struct fastrpc_ioctl_mmap *mmap) { - struct fastrpc_mmap *map = 0; - struct smq_phy_page *pages = 0; + struct fastrpc_mmap *map = NULL; + struct smq_phy_page *pages = NULL; int num = 0; int err = 0; VERIFY(err, 0 == map_buffer(me, fdata, mmap->fd, (char *)mmap->vaddrin, @@ -1629,7 +1629,7 @@ static void cleanup_current_dev(struct file_data *fdata) struct fastrpc_device *dev, *devfree; rnext: - devfree = dev = 0; + devfree = dev = NULL; spin_lock(&me->hlock); head = &me->htbl[h]; hlist_for_each_entry_safe(dev, n, head, hn) { @@ -1655,7 +1655,7 @@ static void fastrpc_channel_close(struct kref *kref) ctx = container_of(kref, struct fastrpc_channel_context, kref); smd_close(ctx->chan); - ctx->chan = 0; + ctx->chan = NULL; mutex_unlock(&me->smd_mutex); cid = ctx - &me->channel[0]; pr_info("'closed /dev/%s c %d %d'\n", gcinfo[cid].name, @@ -1667,9 +1667,9 @@ static int fastrpc_device_release(struct inode *inode, struct file *file) struct file_data *fdata = (struct file_data *)file->private_data; struct fastrpc_apps *me = &gfa; struct smq_context_list *clst = &me->clst; - struct smq_invoke_ctx *ictx = 0, *ctxfree; + struct smq_invoke_ctx *ictx = NULL, *ctxfree; struct hlist_node *n; - struct fastrpc_mmap *map = 0; + struct fastrpc_mmap *map = NULL; int cid = MINOR(inode->i_rdev); if (!fdata) @@ -1677,7 +1677,7 @@ static int fastrpc_device_release(struct inode *inode, struct file *file) (void)fastrpc_release_current_dsp_process(fdata); do { - ctxfree = 0; + ctxfree = NULL; spin_lock(&clst->hlock); hlist_for_each_entry_safe(ictx, n, &clst->interrupted, hn) { if ((ictx->tgid == current->tgid) && @@ -1715,7 +1715,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) mutex_lock(&me->smd_mutex); ssrcount = me->channel[cid].ssrcount; if ((kref_get_unless_zero(&me->channel[cid].kref) == 0) || - (me->channel[cid].chan == 0)) { + (me->channel[cid].chan == NULL)) { VERIFY(err, 0 == smd_named_open_on_edge( FASTRPC_SMD_GUID, gcinfo[cid].channel, @@ -1735,9 +1735,9 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) } mutex_unlock(&me->smd_mutex); - filp->private_data = 0; + filp->private_data = NULL; if (0 != try_module_get(THIS_MODULE)) { - struct file_data *fdata = 0; + struct file_data *fdata = NULL; /* This call will cause a dev to be created * which will addref this module */ @@ -1767,7 +1767,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) completion_bail: smd_close(me->channel[cid].chan); - me->channel[cid].chan = 0; + me->channel[cid].chan = NULL; smd_bail: mutex_unlock(&me->smd_mutex); return err; @@ -1789,7 +1789,7 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num, switch (ioctl_num) { case FASTRPC_IOCTL_INVOKE_FD: case FASTRPC_IOCTL_INVOKE: - invokefd.fds = 0; + invokefd.fds = NULL; size = (ioctl_num == FASTRPC_IOCTL_INVOKE) ? sizeof(invokefd.inv) : sizeof(invokefd); VERIFY(err, 0 == copy_from_user(&invokefd, param, size)); @@ -1867,7 +1867,7 @@ static int fastrpc_restart_notifier_cb(struct notifier_block *nb, ctx->ssrcount++; if (ctx->chan) { smd_close(ctx->chan); - ctx->chan = 0; + ctx->chan = NULL; pr_info("'closed /dev/%s c %d %d'\n", gcinfo[cid].name, MAJOR(me->dev_no), cid); } diff --git a/drivers/char/adsprpc_compat.c b/drivers/char/adsprpc_compat.c index ee324dcf91f..160ad1851c9 100644 --- a/drivers/char/adsprpc_compat.c +++ b/drivers/char/adsprpc_compat.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2014,2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -33,7 +33,7 @@ struct compat_remote_buf { compat_uptr_t pv; /* buffer pointer */ - compat_ssize_t len; /* length of buffer */ + compat_size_t len; /* length of buffer */ }; union compat_remote_arg { @@ -56,13 +56,13 @@ struct compat_fastrpc_ioctl_mmap { compat_int_t fd; /* ion fd */ compat_uint_t flags; /* flags for dsp to map with */ compat_uptr_t vaddrin; /* optional virtual address */ - compat_ssize_t size; /* size */ + compat_size_t size; /* size */ compat_uptr_t vaddrout; /* dsps virtual address */ }; struct compat_fastrpc_ioctl_munmap { compat_uptr_t vaddrout; /* address to unmap */ - compat_ssize_t size; /* size */ + compat_size_t size; /* size */ }; struct compat_fastrpc_ioctl_init { @@ -81,7 +81,7 @@ static int compat_get_fastrpc_ioctl_invoke( unsigned int cmd) { compat_uint_t u, sc; - compat_ssize_t s; + compat_size_t s; compat_uptr_t p; struct fastrpc_ioctl_invoke_fd *inv; union compat_remote_arg *pra32; @@ -164,7 +164,7 @@ static int compat_get_fastrpc_ioctl_mmap( { compat_uint_t u; compat_int_t i; - compat_ssize_t s; + compat_size_t s; compat_uptr_t p; int err; @@ -198,7 +198,7 @@ static int compat_get_fastrpc_ioctl_munmap( struct fastrpc_ioctl_munmap __user *unmap) { compat_uptr_t p; - compat_ssize_t s; + compat_size_t s; int err; err = get_user(p, &unmap32->vaddrout); diff --git a/drivers/char/adsprpc_shared.h b/drivers/char/adsprpc_shared.h index c0f8d3cc8c4..244553c6999 100644 --- a/drivers/char/adsprpc_shared.h +++ b/drivers/char/adsprpc_shared.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014,2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -93,7 +93,7 @@ do {\ struct remote_buf { void *pv; /* buffer pointer */ - ssize_t len; /* length of buffer */ + size_t len; /* length of buffer */ }; union remote_arg { @@ -114,25 +114,25 @@ struct fastrpc_ioctl_invoke_fd { struct fastrpc_ioctl_init { uint32_t flags; /* one of FASTRPC_INIT_* macros */ - uintptr_t __user file; /* pointer to elf file */ - int32_t filelen; /* elf file length */ + uintptr_t file; /* pointer to elf file */ + uint32_t filelen; /* elf file length */ int32_t filefd; /* ION fd for the file */ - uintptr_t __user mem; /* mem for the PD */ - int32_t memlen; /* mem length */ + uintptr_t mem; /* mem for the PD */ + uint32_t memlen; /* mem length */ int32_t memfd; /* ION fd for the mem */ }; struct fastrpc_ioctl_munmap { uintptr_t vaddrout; /* address to unmap */ - ssize_t size; /* size */ + size_t size; /* size */ }; struct fastrpc_ioctl_mmap { int fd; /* ion fd */ uint32_t flags; /* flags for dsp to map with */ - uintptr_t __user *vaddrin; /* optional virtual address */ - ssize_t size; /* size */ + uintptr_t vaddrin; /* optional virtual address */ + size_t size; /* size */ uintptr_t vaddrout; /* dsps virtual address */ }; @@ -144,7 +144,7 @@ struct smq_null_invoke { struct smq_phy_page { unsigned long addr; /* physical address */ - ssize_t size; /* size of contiguous region */ + size_t size; /* size of contiguous region */ }; struct smq_invoke_buf { @@ -171,14 +171,15 @@ struct smq_invoke_rsp { static inline struct smq_invoke_buf *smq_invoke_buf_start(remote_arg_t *pra, uint32_t sc) { - int len = REMOTE_SCALARS_LENGTH(sc); + unsigned int len = REMOTE_SCALARS_LENGTH(sc); + return (struct smq_invoke_buf *)(&pra[len]); } static inline struct smq_phy_page *smq_phy_page_start(uint32_t sc, struct smq_invoke_buf *buf) { - int nTotal = REMOTE_SCALARS_INBUFS(sc) + REMOTE_SCALARS_OUTBUFS(sc); + uint32_t nTotal = REMOTE_SCALARS_INBUFS(sc)+REMOTE_SCALARS_OUTBUFS(sc); return (struct smq_phy_page *)(&buf[nTotal]); } diff --git a/drivers/char/random.c b/drivers/char/random.c index b72bcd2af44..5e94330dd2d 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -257,6 +257,8 @@ #include #include #include +#include +#include #include #include @@ -405,6 +407,7 @@ static struct poolinfo { */ static DECLARE_WAIT_QUEUE_HEAD(random_read_wait); static DECLARE_WAIT_QUEUE_HEAD(random_write_wait); +static DECLARE_WAIT_QUEUE_HEAD(urandom_init_wait); static struct fasync_struct *fasync; static bool debug; @@ -612,10 +615,15 @@ static void credit_entropy_bits(struct entropy_store *r, int nbits) if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig) goto retry; - if (!r->initialized && nbits > 0) { - r->entropy_total += nbits; - if (r->entropy_total > 128) - r->initialized = 1; + r->entropy_total += nbits; + if (!r->initialized && r->entropy_total > 128) { + r->initialized = 1; + r->entropy_total = 0; + if (r == &nonblocking_pool) { + prandom_reseed_late(); + wake_up_all(&urandom_init_wait); + pr_notice("random: %s pool is initialized\n", r->name); + } } trace_credit_entropy_bits(r->name, nbits, entropy_count, @@ -1023,13 +1031,14 @@ static ssize_t extract_entropy_user(struct entropy_store *r, void __user *buf, { ssize_t ret = 0, i; __u8 tmp[EXTRACT_SIZE]; + int large_request = (nbytes > 256); trace_extract_entropy_user(r->name, nbytes, r->entropy_count, _RET_IP_); xfer_secondary_pool(r, nbytes); nbytes = account(r, nbytes, 0, 0); while (nbytes) { - if (need_resched()) { + if (large_request && need_resched()) { if (signal_pending(current)) { if (ret == 0) ret = -ERESTARTSYS; @@ -1163,7 +1172,7 @@ void rand_initialize_disk(struct gendisk *disk) #endif static ssize_t -random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) +_random_read(int nonblock, char __user *buf, size_t nbytes) { ssize_t n, retval = 0, count = 0; @@ -1188,7 +1197,7 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) n*8, (nbytes-n)*8); if (n == 0) { - if (file->f_flags & O_NONBLOCK) { + if (nonblock) { retval = -EAGAIN; break; } @@ -1219,6 +1228,12 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) return (count ? count : retval); } +static ssize_t +random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) +{ + return _random_read(file->f_flags & O_NONBLOCK, buf, nbytes); +} + static ssize_t urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) { @@ -1345,6 +1360,29 @@ const struct file_operations urandom_fops = { .llseek = noop_llseek, }; +SYSCALL_DEFINE3(getrandom, char __user *, buf, size_t, count, + unsigned int, flags) +{ + if (flags & ~(GRND_NONBLOCK|GRND_RANDOM)) + return -EINVAL; + + if (count > INT_MAX) + count = INT_MAX; + + if (flags & GRND_RANDOM) + return _random_read(flags & GRND_NONBLOCK, buf, count); + + if (unlikely(nonblocking_pool.initialized == 0)) { + if (flags & GRND_NONBLOCK) + return -EAGAIN; + wait_event_interruptible(urandom_init_wait, + nonblocking_pool.initialized); + if (signal_pending(current)) + return -ERESTARTSYS; + } + return urandom_read(NULL, buf, count, NULL); +} + /*************************************************************** * Random UUID interface * diff --git a/drivers/cpuidle/lpm-levels-of.c b/drivers/cpuidle/lpm-levels-of.c index b737381f95c..cb037922c9c 100644 --- a/drivers/cpuidle/lpm-levels-of.c +++ b/drivers/cpuidle/lpm-levels-of.c @@ -574,14 +574,12 @@ static int parse_cpu_levels(struct device_node *node, struct lpm_cluster *c) void free_cluster_node(struct lpm_cluster *cluster) { - struct list_head *list; int i; + struct lpm_cluster *cl, *m; - list_for_each(list, &cluster->child) { - struct lpm_cluster *n; - n = list_entry(list, typeof(*n), list); - list_del(list); - free_cluster_node(n); + list_for_each_entry_safe(cl, m, &cluster->child, list) { + list_del(&cl->list); + free_cluster_node(cl); }; if (cluster->cpu) { diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c index 0c3f382e456..adea569829b 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c @@ -198,6 +198,12 @@ static void msm_isp_unprepare_v4l2_buf( else domain_num = buf_mgr->iommu_domain_num_secure; + if (buf_info->num_planes > VIDEO_MAX_PLANES) { + pr_err("%s: Invalid num_planes %d \n", + __func__, buf_info->num_planes); + return; + } + for (i = 0; i < buf_info->num_planes; i++) { mapped_info = &buf_info->mapped_info[i]; @@ -236,6 +242,12 @@ static int msm_isp_buf_prepare(struct msm_isp_buf_mgr *buf_mgr, return rc; } + if (buf_info->num_planes > VIDEO_MAX_PLANES) { + pr_err("%s: Invalid num_planes %d \n", + __func__, buf_info->num_planes); + return rc; + } + bufq = msm_isp_get_bufq(buf_mgr, buf_info->bufq_handle); if (!bufq) { pr_err("%s: Invalid bufq\n", __func__); diff --git a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c old mode 100755 new mode 100644 index 323a9a6e086..aeac5fbe86f --- a/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c +++ b/drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c @@ -99,6 +99,11 @@ static int32_t msm_actuator_piezo_set_default_focus( struct msm_camera_i2c_reg_setting reg_setting; CDBG("Enter\n"); + if (a_ctrl->i2c_reg_tbl == NULL) { + pr_err("failed. i2c reg tabl is NULL"); + return -EFAULT; + } + if (a_ctrl->curr_step_pos != 0) { a_ctrl->i2c_tbl_index = 0; a_ctrl->func_tbl->actuator_parse_i2c_params(a_ctrl, @@ -321,6 +326,11 @@ static int32_t msm_actuator_piezo_move_focus( return -EFAULT; } + if (a_ctrl->i2c_reg_tbl == NULL) { + pr_err("failed. i2c reg tabl is NULL"); + return -EFAULT; + } + if (dest_step_position > a_ctrl->total_steps) { pr_err("Step pos greater than total steps = %d\n", dest_step_position); @@ -419,6 +429,10 @@ static int32_t msm_actuator_move_focus( pr_err("Invalid direction = %d\n", dir); return -EFAULT; } + if (a_ctrl->i2c_reg_tbl == NULL) { + pr_err("failed. i2c reg tabl is NULL"); + return -EFAULT; + } if (dest_step_pos > a_ctrl->total_steps) { pr_err("Step pos greater than total steps = %d\n", dest_step_pos); @@ -743,6 +757,18 @@ static int32_t msm_actuator_set_position( return -EFAULT; } + if (!a_ctrl || !a_ctrl->func_tbl || + !a_ctrl->func_tbl->actuator_parse_i2c_params || + !a_ctrl->i2c_reg_tbl) { + pr_err("failed. NULL actuator pointers."); + return -EFAULT; + } + + if (a_ctrl->actuator_state != ACTUATOR_POWER_UP) { + pr_err("failed. Invalid actuator state."); + return -EFAULT; + } + a_ctrl->i2c_tbl_index = 0; for (index = 0; index < set_pos->number_of_steps; index++) { next_lens_position = set_pos->pos[index]; @@ -807,12 +833,10 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, a_ctrl->region_size = set_info->af_tuning_params.region_size; a_ctrl->pwd_step = set_info->af_tuning_params.pwd_step; - a_ctrl->total_steps = set_info->af_tuning_params.total_steps; if (copy_from_user(&a_ctrl->region_params, (void *)set_info->af_tuning_params.region_params, a_ctrl->region_size * sizeof(struct region_params_t))) { - a_ctrl->total_steps = 0; pr_err("Error copying region_params\n"); return -EFAULT; } @@ -843,6 +867,7 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, (a_ctrl->i2c_reg_tbl != NULL)) { kfree(a_ctrl->i2c_reg_tbl); } + a_ctrl->i2c_reg_tbl = NULL; a_ctrl->i2c_reg_tbl = kzalloc(sizeof(struct msm_camera_i2c_reg_array) * @@ -852,6 +877,8 @@ static int32_t msm_actuator_set_param(struct msm_actuator_ctrl_t *a_ctrl, return -ENOMEM; } + a_ctrl->total_steps = set_info->af_tuning_params.total_steps; + if (copy_from_user(&a_ctrl->reg_tbl, (void *)set_info->actuator_params.reg_tbl_params, a_ctrl->reg_tbl_size * diff --git a/drivers/net/usb/rmnet_usb_ctrl.c b/drivers/net/usb/rmnet_usb_ctrl.c index 75e97832efa..1d22f6b2afb 100644 --- a/drivers/net/usb/rmnet_usb_ctrl.c +++ b/drivers/net/usb/rmnet_usb_ctrl.c @@ -1219,12 +1219,13 @@ int rmnet_usb_ctrl_init(int no_rmnet_devs, int no_rmnet_insts_per_dev, "%s%d", rmnet_dev_names[i], n); if (IS_ERR(dev->devicep)) { + struct device *deviceptr = dev->devicep; pr_err("%s: device_create() returned %ld\n", - __func__, PTR_ERR(dev->devicep)); + __func__, PTR_ERR(deviceptr)); cdev_del(&dev->cdev); free_rmnet_ctrl_udev(dev->cudev); kfree(dev); - return PTR_ERR(dev->devicep); + return PTR_ERR(deviceptr); } /*create /sys/class/hsicctl/hsicctlx/modem_wait*/ diff --git a/drivers/platform/msm/ipa/ipa_hdr.c b/drivers/platform/msm/ipa/ipa_hdr.c index a2ca8c69b7d..5fec630c75f 100644 --- a/drivers/platform/msm/ipa/ipa_hdr.c +++ b/drivers/platform/msm/ipa/ipa_hdr.c @@ -809,8 +809,17 @@ int __ipa_del_hdr(u32 hdr_hdl, bool by_user) return -EINVAL; } - if (by_user) + if (by_user) { + if (!strcmp(entry->name, IPA_LAN_RX_HDR_NAME)) { + IPADBG("Trying to delete hdr %s offset=%u\n", + entry->name, entry->offset_entry->offset); + if (!entry->offset_entry->offset) { + IPAERR("User cannot delete default header\n"); + return -EPERM; + } + } entry->user_deleted = true; + } if (--entry->ref_cnt) { IPADBG("hdr_hdl %x ref_cnt %d\n", hdr_hdl, entry->ref_cnt); @@ -1113,8 +1122,19 @@ int ipa_reset_hdr(void) &ipa_ctx->hdr_tbl.head_hdr_entry_list, link) { /* do not remove the default header */ - if (!strcmp(entry->name, IPA_LAN_RX_HDR_NAME)) - continue; + if (!strcmp(entry->name, IPA_LAN_RX_HDR_NAME)) { + IPADBG("Trying to remove hdr %s offset=%u\n", + entry->name, entry->offset_entry->offset); + if (!entry->offset_entry->offset) { + if (entry->is_hdr_proc_ctx) { + mutex_unlock(&ipa_ctx->lock); + WARN_ON(1); + return -EFAULT; + } + IPADBG("skip default header\n"); + continue; + } + } if (ipa_id_find(entry->id) == NULL) { WARN_ON(1); diff --git a/drivers/platform/msm/ipa/rmnet_ipa.c b/drivers/platform/msm/ipa/rmnet_ipa.c index f9b279d42c0..d7b78a61594 100644 --- a/drivers/platform/msm/ipa/rmnet_ipa.c +++ b/drivers/platform/msm/ipa/rmnet_ipa.c @@ -1234,6 +1234,8 @@ static int ipa_wwan_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) mutex_unlock(&add_mux_channel_lock); return -EFAULT; } + extend_ioctl_data.u.rmnet_mux_val.vchannel_name + [IFNAMSIZ-1] = '\0'; IPAWANDBG("ADD_MUX_CHANNEL(%d, name: %s)\n", extend_ioctl_data.u.rmnet_mux_val.mux_id, extend_ioctl_data.u.rmnet_mux_val.vchannel_name); diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 26cc53427dd..a14c42d31f5 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -172,8 +172,8 @@ typedef struct sg_fd { /* holds the state of a file descriptor */ typedef struct sg_device { /* holds the state of each scsi generic device */ struct scsi_device *device; - wait_queue_head_t open_wait; /* queue open() when O_EXCL present */ - struct mutex open_rel_lock; /* held when in open() or release() */ + struct mutex open_rel_lock; + wait_queue_head_t open_wait; /* queue open() when O_EXCL in use */ int sg_tablesize; /* adapter's max scatter-gather table size */ u32 index; /* device index number */ struct list_head sfds; @@ -586,9 +586,6 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos) sg_io_hdr_t *hp; unsigned char cmnd[SG_MAX_CDB_SIZE]; - if (unlikely(segment_eq(get_fs(), KERNEL_DS))) - return -EINVAL; - if (unlikely(segment_eq(get_fs(), KERNEL_DS))) return -EINVAL; @@ -2631,9 +2628,9 @@ static void sg_proc_debug_helper(struct seq_file *s, Sg_device * sdp) seq_puts(s, cp); blen = srp->data.bufflen; usg = srp->data.k_use_sg; - seq_puts(s, srp->done ? - ((1 == srp->done) ? "rcv:" : "fin:") - : "act:"); + seq_printf(s, srp->done ? + ((1 == srp->done) ? "rcv:" : "fin:") + : "act:"); seq_printf(s, " id=%d blen=%d", srp->header.pack_id, blen); if (srp->done) diff --git a/drivers/soc/qcom/rpm-smd-debug.c b/drivers/soc/qcom/rpm-smd-debug.c index 1c0a05c87ed..8194fe0cda5 100644 --- a/drivers/soc/qcom/rpm-smd-debug.c +++ b/drivers/soc/qcom/rpm-smd-debug.c @@ -99,23 +99,23 @@ static ssize_t rsc_ops_write(struct file *fp, const char __user *user_buffer, cmp += pos; if (sscanf(cmp, "%5s %n", key_str, &pos) != 1) { pr_err("Invalid number of arguments passed\n"); - goto err; + goto err_request; } if (strlen(key_str) > 4) { pr_err("Key value cannot be more than 4 charecters"); - goto err; + goto err_request; } key = string_to_uint(key_str); if (!key) { pr_err("Key values entered incorrectly\n"); - goto err; + goto err_request; } cmp += pos; if (sscanf(cmp, "%u %n", &data, &pos) != 1) { pr_err("Invalid number of arguments passed\n"); - goto err; + goto err_request; } if (msm_rpm_add_kvp_data(req, key, diff --git a/drivers/soc/qcom/subsys-pil-tz.c b/drivers/soc/qcom/subsys-pil-tz.c index 3aabf8bd920..5e46137f7bc 100644 --- a/drivers/soc/qcom/subsys-pil-tz.c +++ b/drivers/soc/qcom/subsys-pil-tz.c @@ -970,6 +970,7 @@ static int pil_tz_driver_probe(struct platform_device *pdev) destroy_ramdump_device(d->ramdump_dev); err_ramdump: pil_desc_release(&d->desc); + platform_set_drvdata(pdev, NULL); return rc; } diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig index 62a6df9b170..fe13d07f414 100644 --- a/drivers/staging/android/Kconfig +++ b/drivers/staging/android/Kconfig @@ -26,6 +26,18 @@ config ANDROID_BINDER_IPC_32BIT Enable to support an old 32-bit Android user-space. Breaks the new Android user-space. +config ANDROID_BINDER_DEVICES + string "Android Binder devices" + depends on ANDROID_BINDER_IPC + default "binder,hwbinder,vndbinder" + ---help--- + Default value for the binder.devices parameter. + + The binder.devices parameter is a comma-separated list of strings + that specifies the names of the binder device nodes that will be + created. Each binder device has its own context manager, and is + therefore logically separated from the other devices. + config ASHMEM bool "Enable the Anonymous Shared Memory Subsystem" default n diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index 1a4d9cb1a73..e10ae5a8479 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -46,14 +46,13 @@ static DEFINE_MUTEX(binder_main_lock); static DEFINE_MUTEX(binder_deferred_lock); static DEFINE_MUTEX(binder_mmap_lock); +static HLIST_HEAD(binder_devices); static HLIST_HEAD(binder_procs); static HLIST_HEAD(binder_deferred_list); static HLIST_HEAD(binder_dead_nodes); static struct dentry *binder_debugfs_dir_entry_root; static struct dentry *binder_debugfs_dir_entry_proc; -static struct binder_node *binder_context_mgr_node; -static kuid_t binder_context_mgr_uid = INVALID_UID; static int binder_last_id; static struct workqueue_struct *binder_deferred_workqueue; @@ -112,6 +111,9 @@ module_param_named(debug_mask, binder_debug_mask, uint, S_IWUSR | S_IRUGO); static bool binder_debug_no_lock; module_param_named(proc_no_lock, binder_debug_no_lock, bool, S_IWUSR | S_IRUGO); +static char *binder_devices_param = CONFIG_ANDROID_BINDER_DEVICES; +module_param_named(devices, binder_devices_param, charp, S_IRUGO); + static DECLARE_WAIT_QUEUE_HEAD(binder_user_error_wait); static int binder_stop_on_user_error; @@ -141,6 +143,17 @@ module_param_call(stop_on_user_error, binder_set_stop_on_user_error, binder_stop_on_user_error = 2; \ } while (0) +#define to_flat_binder_object(hdr) \ + container_of(hdr, struct flat_binder_object, hdr) + +#define to_binder_fd_object(hdr) container_of(hdr, struct binder_fd_object, hdr) + +#define to_binder_buffer_object(hdr) \ + container_of(hdr, struct binder_buffer_object, hdr) + +#define to_binder_fd_array_object(hdr) \ + container_of(hdr, struct binder_fd_array_object, hdr) + enum binder_stat_types { BINDER_STAT_PROC, BINDER_STAT_THREAD, @@ -154,7 +167,7 @@ enum binder_stat_types { struct binder_stats { int br[_IOC_NR(BR_FAILED_REPLY) + 1]; - int bc[_IOC_NR(BC_DEAD_BINDER_DONE) + 1]; + int bc[_IOC_NR(BC_REPLY_SG) + 1]; int obj_created[BINDER_STAT_COUNT]; int obj_deleted[BINDER_STAT_COUNT]; }; @@ -182,6 +195,7 @@ struct binder_transaction_log_entry { int to_node; int data_size; int offsets_size; + const char *context_name; }; struct binder_transaction_log { int next; @@ -205,6 +219,18 @@ static struct binder_transaction_log_entry *binder_transaction_log_add( return e; } +struct binder_context { + struct binder_node *binder_context_mgr_node; + kuid_t binder_context_mgr_uid; + const char *name; +}; + +struct binder_device { + struct hlist_node hlist; + struct miscdevice miscdev; + struct binder_context context; +}; + struct binder_work { struct list_head entry; enum { @@ -277,6 +303,7 @@ struct binder_buffer { struct binder_node *target_node; size_t data_size; size_t offsets_size; + size_t extra_buffers_size; uint8_t data[0]; }; @@ -320,6 +347,7 @@ struct binder_proc { int ready_threads; long default_priority; struct dentry *debugfs_entry; + struct binder_context *context; }; enum { @@ -421,6 +449,7 @@ static inline void binder_lock(const char *tag) { trace_binder_lock(tag); mutex_lock(&binder_main_lock); + preempt_disable(); trace_binder_locked(tag); } @@ -428,8 +457,62 @@ static inline void binder_unlock(const char *tag) { trace_binder_unlock(tag); mutex_unlock(&binder_main_lock); + preempt_enable(); +} + +static inline void *kzalloc_preempt_disabled(size_t size) +{ + void *ptr; + + ptr = kzalloc(size, GFP_NOWAIT); + if (ptr) + return ptr; + + preempt_enable_no_resched(); + ptr = kzalloc(size, GFP_KERNEL); + preempt_disable(); + + return ptr; +} + +static inline long copy_to_user_preempt_disabled(void __user *to, const void *from, long n) +{ + long ret; + + preempt_enable_no_resched(); + ret = copy_to_user(to, from, n); + preempt_disable(); + return ret; +} + +static inline long copy_from_user_preempt_disabled(void *to, const void __user *from, long n) +{ + long ret; + + preempt_enable_no_resched(); + ret = copy_from_user(to, from, n); + preempt_disable(); + return ret; } +#define get_user_preempt_disabled(x, ptr) \ +({ \ + int __ret; \ + preempt_enable_no_resched(); \ + __ret = get_user(x, ptr); \ + preempt_disable(); \ + __ret; \ +}) + +#define put_user_preempt_disabled(x, ptr) \ +({ \ + int __ret; \ + preempt_enable_no_resched(); \ + __ret = put_user(x, ptr); \ + preempt_disable(); \ + __ret; \ +}) + static void binder_set_nice(long nice) { long min_nice; @@ -563,6 +646,8 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate, else mm = get_task_mm(proc->tsk); + preempt_enable_no_resched(); + if (mm) { down_write(&mm->mmap_sem); vma = proc->vma; @@ -613,6 +698,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate, } /* vm_insert_page does not seem to increment the refcount */ } + preempt_disable(); if (mm) { up_write(&mm->mmap_sem); mmput(mm); @@ -635,6 +721,7 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate, ; } err_no_vma: + preempt_disable(); if (mm) { up_write(&mm->mmap_sem); mmput(mm); @@ -644,7 +731,9 @@ static int binder_update_page_range(struct binder_proc *proc, int allocate, static struct binder_buffer *binder_alloc_buf(struct binder_proc *proc, size_t data_size, - size_t offsets_size, int is_async) + size_t offsets_size, + size_t extra_buffers_size, + int is_async) { struct rb_node *n = proc->free_buffers.rb_node; struct binder_buffer *buffer; @@ -652,7 +741,7 @@ static struct binder_buffer *binder_alloc_buf(struct binder_proc *proc, struct rb_node *best_fit = NULL; void *has_page_addr; void *end_page_addr; - size_t size; + size_t size, data_offsets_size; if (proc->vma == NULL) { pr_err("%d: binder_alloc_buf, no vma\n", @@ -660,15 +749,20 @@ static struct binder_buffer *binder_alloc_buf(struct binder_proc *proc, return NULL; } - size = ALIGN(data_size, sizeof(void *)) + + data_offsets_size = ALIGN(data_size, sizeof(void *)) + ALIGN(offsets_size, sizeof(void *)); - if (size < data_size || size < offsets_size) { + if (data_offsets_size < data_size || data_offsets_size < offsets_size) { binder_user_error("%d: got transaction with invalid size %zd-%zd\n", proc->pid, data_size, offsets_size); return NULL; } - + size = data_offsets_size + ALIGN(extra_buffers_size, sizeof(void *)); + if (size < data_offsets_size || size < extra_buffers_size) { + binder_user_error("%d: got transaction with invalid extra_buffers_size %zd\n", + proc->pid, extra_buffers_size); + return NULL; + } if (is_async && proc->free_async_space < size + sizeof(struct binder_buffer)) { binder_debug(BINDER_DEBUG_BUFFER_ALLOC, @@ -736,6 +830,7 @@ static struct binder_buffer *binder_alloc_buf(struct binder_proc *proc, proc->pid, size, buffer); buffer->data_size = data_size; buffer->offsets_size = offsets_size; + buffer->extra_buffers_size = extra_buffers_size; buffer->async_transaction = is_async; if (is_async) { proc->free_async_space -= size + sizeof(struct binder_buffer); @@ -810,7 +905,8 @@ static void binder_free_buf(struct binder_proc *proc, buffer_size = binder_buffer_size(proc, buffer); size = ALIGN(buffer->data_size, sizeof(void *)) + - ALIGN(buffer->offsets_size, sizeof(void *)); + ALIGN(buffer->offsets_size, sizeof(void *)) + + ALIGN(buffer->extra_buffers_size, sizeof(void *)); binder_debug(BINDER_DEBUG_BUFFER_ALLOC, "%d: binder_free_buf %pK size %zd buffer_size %zd\n", @@ -895,7 +991,7 @@ static struct binder_node *binder_new_node(struct binder_proc *proc, return NULL; } - node = kzalloc(sizeof(*node), GFP_KERNEL); + node = kzalloc_preempt_disabled(sizeof(*node)); if (node == NULL) return NULL; binder_stats_created(BINDER_STAT_NODE); @@ -922,8 +1018,10 @@ static int binder_inc_node(struct binder_node *node, int strong, int internal, if (internal) { if (target_list == NULL && node->internal_strong_refs == 0 && - !(node == binder_context_mgr_node && - node->has_strong_ref)) { + !(node->proc && + node == node->proc->context-> + binder_context_mgr_node && + node->has_strong_ref)) { pr_err("invalid inc strong node for %d\n", node->debug_id); return -EINVAL; @@ -1024,6 +1122,7 @@ static struct binder_ref *binder_get_ref_for_node(struct binder_proc *proc, struct rb_node **p = &proc->refs_by_node.rb_node; struct rb_node *parent = NULL; struct binder_ref *ref, *new_ref; + struct binder_context *context = proc->context; while (*p) { parent = *p; @@ -1036,7 +1135,7 @@ static struct binder_ref *binder_get_ref_for_node(struct binder_proc *proc, else return ref; } - new_ref = kzalloc(sizeof(*ref), GFP_KERNEL); + new_ref = kzalloc_preempt_disabled(sizeof(*ref)); if (new_ref == NULL) return NULL; binder_stats_created(BINDER_STAT_REF); @@ -1046,7 +1145,7 @@ static struct binder_ref *binder_get_ref_for_node(struct binder_proc *proc, rb_link_node(&new_ref->rb_node_node, parent, p); rb_insert_color(&new_ref->rb_node_node, &proc->refs_by_node); - new_ref->desc = (node == binder_context_mgr_node) ? 0 : 1; + new_ref->desc = (node == context->binder_context_mgr_node) ? 0 : 1; for (n = rb_first(&proc->refs_by_desc); n != NULL; n = rb_next(n)) { ref = rb_entry(n, struct binder_ref, rb_node_desc); if (ref->desc > new_ref->desc) @@ -1232,11 +1331,158 @@ static void binder_send_failed_reply(struct binder_transaction *t, } } +/** + * binder_validate_object() - checks for a valid metadata object in a buffer. + * @buffer: binder_buffer that we're parsing. + * @offset: offset in the buffer at which to validate an object. + * + * Return: If there's a valid metadata object at @offset in @buffer, the + * size of that object. Otherwise, it returns zero. + */ +static size_t binder_validate_object(struct binder_buffer *buffer, u64 offset) +{ + /* Check if we can read a header first */ + struct binder_object_header *hdr; + size_t object_size = 0; + + if (offset > buffer->data_size - sizeof(*hdr) || + buffer->data_size < sizeof(*hdr) || + !IS_ALIGNED(offset, sizeof(u32))) + return 0; + + /* Ok, now see if we can read a complete object. */ + hdr = (struct binder_object_header *)(buffer->data + offset); + switch (hdr->type) { + case BINDER_TYPE_BINDER: + case BINDER_TYPE_WEAK_BINDER: + case BINDER_TYPE_HANDLE: + case BINDER_TYPE_WEAK_HANDLE: + object_size = sizeof(struct flat_binder_object); + break; + case BINDER_TYPE_FD: + object_size = sizeof(struct binder_fd_object); + break; + case BINDER_TYPE_PTR: + object_size = sizeof(struct binder_buffer_object); + break; + case BINDER_TYPE_FDA: + object_size = sizeof(struct binder_fd_array_object); + break; + default: + return 0; + } + if (offset <= buffer->data_size - object_size && + buffer->data_size >= object_size) + return object_size; + else + return 0; +} + +/** + * binder_validate_ptr() - validates binder_buffer_object in a binder_buffer. + * @b: binder_buffer containing the object + * @index: index in offset array at which the binder_buffer_object is + * located + * @start: points to the start of the offset array + * @num_valid: the number of valid offsets in the offset array + * + * Return: If @index is within the valid range of the offset array + * described by @start and @num_valid, and if there's a valid + * binder_buffer_object at the offset found in index @index + * of the offset array, that object is returned. Otherwise, + * %NULL is returned. + * Note that the offset found in index @index itself is not + * verified; this function assumes that @num_valid elements + * from @start were previously verified to have valid offsets. + */ +static struct binder_buffer_object *binder_validate_ptr(struct binder_buffer *b, + binder_size_t index, + binder_size_t *start, + binder_size_t num_valid) +{ + struct binder_buffer_object *buffer_obj; + binder_size_t *offp; + + if (index >= num_valid) + return NULL; + + offp = start + index; + buffer_obj = (struct binder_buffer_object *)(b->data + *offp); + if (buffer_obj->hdr.type != BINDER_TYPE_PTR) + return NULL; + + return buffer_obj; +} + +/** + * binder_validate_fixup() - validates pointer/fd fixups happen in order. + * @b: transaction buffer + * @objects_start start of objects buffer + * @buffer: binder_buffer_object in which to fix up + * @offset: start offset in @buffer to fix up + * @last_obj: last binder_buffer_object that we fixed up in + * @last_min_offset: minimum fixup offset in @last_obj + * + * Return: %true if a fixup in buffer @buffer at offset @offset is + * allowed. + * + * For safety reasons, we only allow fixups inside a buffer to happen + * at increasing offsets; additionally, we only allow fixup on the last + * buffer object that was verified, or one of its parents. + * + * Example of what is allowed: + * + * A + * B (parent = A, offset = 0) + * C (parent = A, offset = 16) + * D (parent = C, offset = 0) + * E (parent = A, offset = 32) // min_offset is 16 (C.parent_offset) + * + * Examples of what is not allowed: + * + * Decreasing offsets within the same parent: + * A + * C (parent = A, offset = 16) + * B (parent = A, offset = 0) // decreasing offset within A + * + * Referring to a parent that wasn't the last object or any of its parents: + * A + * B (parent = A, offset = 0) + * C (parent = A, offset = 0) + * C (parent = A, offset = 16) + * D (parent = B, offset = 0) // B is not A or any of A's parents + */ +static bool binder_validate_fixup(struct binder_buffer *b, + binder_size_t *objects_start, + struct binder_buffer_object *buffer, + binder_size_t fixup_offset, + struct binder_buffer_object *last_obj, + binder_size_t last_min_offset) +{ + if (!last_obj) { + /* Nothing to fix up in */ + return false; + } + + while (last_obj != buffer) { + /* + * Safe to retrieve the parent of last_obj, since it + * was already previously verified by the driver. + */ + if ((last_obj->flags & BINDER_BUFFER_FLAG_HAS_PARENT) == 0) + return false; + last_min_offset = last_obj->parent_offset + sizeof(uintptr_t); + last_obj = (struct binder_buffer_object *) + (b->data + *(objects_start + last_obj->parent)); + } + return (fixup_offset >= last_min_offset); +} + static void binder_transaction_buffer_release(struct binder_proc *proc, struct binder_buffer *buffer, binder_size_t *failed_at) { - binder_size_t *offp, *off_end; + binder_size_t *offp, *off_start, *off_end; int debug_id = buffer->debug_id; binder_debug(BINDER_DEBUG_TRANSACTION, @@ -1247,26 +1493,30 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, if (buffer->target_node) binder_dec_node(buffer->target_node, 1, 0); - offp = (binder_size_t *)(buffer->data + - ALIGN(buffer->data_size, sizeof(void *))); + off_start = (binder_size_t *)(buffer->data + + ALIGN(buffer->data_size, sizeof(void *))); if (failed_at) off_end = failed_at; else - off_end = (void *)offp + buffer->offsets_size; - for (; offp < off_end; offp++) { - struct flat_binder_object *fp; - if (*offp > buffer->data_size - sizeof(*fp) || - buffer->data_size < sizeof(*fp) || - !IS_ALIGNED(*offp, sizeof(u32))) { - pr_err("transaction release %d bad offset %lld, size %zd\n", + off_end = (void *)off_start + buffer->offsets_size; + for (offp = off_start; offp < off_end; offp++) { + struct binder_object_header *hdr; + size_t object_size = binder_validate_object(buffer, *offp); + + if (object_size == 0) { + pr_err("transaction release %d bad object at offset %lld, size %zd\n", debug_id, (u64)*offp, buffer->data_size); continue; } - fp = (struct flat_binder_object *)(buffer->data + *offp); - switch (fp->type) { + hdr = (struct binder_object_header *)(buffer->data + *offp); + switch (hdr->type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_WEAK_BINDER: { - struct binder_node *node = binder_get_node(proc, fp->binder); + struct flat_binder_object *fp; + struct binder_node *node; + + fp = to_flat_binder_object(hdr); + node = binder_get_node(proc, fp->binder); if (node == NULL) { pr_err("transaction release %d bad node %016llx\n", debug_id, (u64)fp->binder); @@ -1275,13 +1525,17 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, binder_debug(BINDER_DEBUG_TRANSACTION, " node %d u%016llx\n", node->debug_id, (u64)node->ptr); - binder_dec_node(node, fp->type == BINDER_TYPE_BINDER, 0); + binder_dec_node(node, hdr->type == BINDER_TYPE_BINDER, + 0); } break; case BINDER_TYPE_HANDLE: case BINDER_TYPE_WEAK_HANDLE: { - struct binder_ref *ref = binder_get_ref(proc, fp->handle, - fp->type == BINDER_TYPE_HANDLE); + struct flat_binder_object *fp; + struct binder_ref *ref; + fp = to_flat_binder_object(hdr); + ref = binder_get_ref(proc, fp->handle, + hdr->type == BINDER_TYPE_HANDLE); if (ref == NULL) { pr_err("transaction release %d bad handle %d\n", debug_id, fp->handle); @@ -1290,32 +1544,348 @@ static void binder_transaction_buffer_release(struct binder_proc *proc, binder_debug(BINDER_DEBUG_TRANSACTION, " ref %d desc %d (node %d)\n", ref->debug_id, ref->desc, ref->node->debug_id); - binder_dec_ref(&ref, fp->type == BINDER_TYPE_HANDLE); + binder_dec_ref(&ref, hdr->type == BINDER_TYPE_HANDLE); } break; - case BINDER_TYPE_FD: + case BINDER_TYPE_FD: { + struct binder_fd_object *fp = to_binder_fd_object(hdr); + binder_debug(BINDER_DEBUG_TRANSACTION, - " fd %d\n", fp->handle); + " fd %d\n", fp->fd); if (failed_at) - task_close_fd(proc, fp->handle); + task_close_fd(proc, fp->fd); + } break; + case BINDER_TYPE_PTR: + /* + * Nothing to do here, this will get cleaned up when the + * transaction buffer gets freed + */ break; - + case BINDER_TYPE_FDA: { + struct binder_fd_array_object *fda; + struct binder_buffer_object *parent; + uintptr_t parent_buffer; + u32 *fd_array; + size_t fd_index; + binder_size_t fd_buf_size; + + fda = to_binder_fd_array_object(hdr); + parent = binder_validate_ptr(buffer, fda->parent, + off_start, + offp - off_start); + if (!parent) { + pr_err("transaction release %d bad parent offset", + debug_id); + continue; + } + /* + * Since the parent was already fixed up, convert it + * back to kernel address space to access it + */ + parent_buffer = parent->buffer - + proc->user_buffer_offset; + + fd_buf_size = sizeof(u32) * fda->num_fds; + if (fda->num_fds >= SIZE_MAX / sizeof(u32)) { + pr_err("transaction release %d invalid number of fds (%lld)\n", + debug_id, (u64)fda->num_fds); + continue; + } + if (fd_buf_size > parent->length || + fda->parent_offset > parent->length - fd_buf_size) { + /* No space for all file descriptors here. */ + pr_err("transaction release %d not enough space for %lld fds in buffer\n", + debug_id, (u64)fda->num_fds); + continue; + } + fd_array = (u32 *)(parent_buffer + fda->parent_offset); + for (fd_index = 0; fd_index < fda->num_fds; fd_index++) + task_close_fd(proc, fd_array[fd_index]); + } break; default: pr_err("transaction release %d bad object type %x\n", - debug_id, fp->type); + debug_id, hdr->type); break; } } } +static int binder_translate_binder(struct flat_binder_object *fp, + struct binder_transaction *t, + struct binder_thread *thread) +{ + struct binder_node *node; + struct binder_ref *ref; + struct binder_proc *proc = thread->proc; + struct binder_proc *target_proc = t->to_proc; + + node = binder_get_node(proc, fp->binder); + if (!node) { + node = binder_new_node(proc, fp->binder, fp->cookie); + if (!node) + return -ENOMEM; + + node->min_priority = fp->flags & FLAT_BINDER_FLAG_PRIORITY_MASK; + node->accept_fds = !!(fp->flags & FLAT_BINDER_FLAG_ACCEPTS_FDS); + } + if (fp->cookie != node->cookie) { + binder_user_error("%d:%d sending u%016llx node %d, cookie mismatch %016llx != %016llx\n", + proc->pid, thread->pid, (u64)fp->binder, + node->debug_id, (u64)fp->cookie, + (u64)node->cookie); + return -EINVAL; + } + if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) + return -EPERM; + + ref = binder_get_ref_for_node(target_proc, node); + if (!ref) + return -EINVAL; + + if (fp->hdr.type == BINDER_TYPE_BINDER) + fp->hdr.type = BINDER_TYPE_HANDLE; + else + fp->hdr.type = BINDER_TYPE_WEAK_HANDLE; + fp->binder = 0; + fp->handle = ref->desc; + fp->cookie = 0; + binder_inc_ref(ref, fp->hdr.type == BINDER_TYPE_HANDLE, &thread->todo); + + trace_binder_transaction_node_to_ref(t, node, ref); + binder_debug(BINDER_DEBUG_TRANSACTION, + " node %d u%016llx -> ref %d desc %d\n", + node->debug_id, (u64)node->ptr, + ref->debug_id, ref->desc); + + return 0; +} + +static int binder_translate_handle(struct flat_binder_object *fp, + struct binder_transaction *t, + struct binder_thread *thread) +{ + struct binder_ref *ref; + struct binder_proc *proc = thread->proc; + struct binder_proc *target_proc = t->to_proc; + + ref = binder_get_ref(proc, fp->handle, + fp->hdr.type == BINDER_TYPE_HANDLE); + if (!ref) { + binder_user_error("%d:%d got transaction with invalid handle, %d\n", + proc->pid, thread->pid, fp->handle); + return -EINVAL; + } + if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) + return -EPERM; + + if (ref->node->proc == target_proc) { + if (fp->hdr.type == BINDER_TYPE_HANDLE) + fp->hdr.type = BINDER_TYPE_BINDER; + else + fp->hdr.type = BINDER_TYPE_WEAK_BINDER; + fp->binder = ref->node->ptr; + fp->cookie = ref->node->cookie; + binder_inc_node(ref->node, fp->hdr.type == BINDER_TYPE_BINDER, + 0, NULL); + trace_binder_transaction_ref_to_node(t, ref); + binder_debug(BINDER_DEBUG_TRANSACTION, + " ref %d desc %d -> node %d u%016llx\n", + ref->debug_id, ref->desc, ref->node->debug_id, + (u64)ref->node->ptr); + } else { + struct binder_ref *new_ref; + + new_ref = binder_get_ref_for_node(target_proc, ref->node); + if (!new_ref) + return -EINVAL; + + fp->binder = 0; + fp->handle = new_ref->desc; + fp->cookie = 0; + binder_inc_ref(new_ref, fp->hdr.type == BINDER_TYPE_HANDLE, + NULL); + trace_binder_transaction_ref_to_ref(t, ref, new_ref); + binder_debug(BINDER_DEBUG_TRANSACTION, + " ref %d desc %d -> ref %d desc %d (node %d)\n", + ref->debug_id, ref->desc, new_ref->debug_id, + new_ref->desc, ref->node->debug_id); + } + return 0; +} + +static int binder_translate_fd(int fd, + struct binder_transaction *t, + struct binder_thread *thread, + struct binder_transaction *in_reply_to) +{ + struct binder_proc *proc = thread->proc; + struct binder_proc *target_proc = t->to_proc; + int target_fd; + struct file *file; + int ret; + bool target_allows_fd; + + if (in_reply_to) + target_allows_fd = !!(in_reply_to->flags & TF_ACCEPT_FDS); + else + target_allows_fd = t->buffer->target_node->accept_fds; + if (!target_allows_fd) { + binder_user_error("%d:%d got %s with fd, %d, but target does not allow fds\n", + proc->pid, thread->pid, + in_reply_to ? "reply" : "transaction", + fd); + ret = -EPERM; + goto err_fd_not_accepted; + } + + file = fget(fd); + if (!file) { + binder_user_error("%d:%d got transaction with invalid fd, %d\n", + proc->pid, thread->pid, fd); + ret = -EBADF; + goto err_fget; + } + ret = security_binder_transfer_file(proc->tsk, target_proc->tsk, file); + if (ret < 0) { + ret = -EPERM; + goto err_security; + } + + target_fd = task_get_unused_fd_flags(target_proc, O_CLOEXEC); + if (target_fd < 0) { + ret = -ENOMEM; + goto err_get_unused_fd; + } + task_fd_install(target_proc, target_fd, file); + trace_binder_transaction_fd(t, fd, target_fd); + binder_debug(BINDER_DEBUG_TRANSACTION, " fd %d -> %d\n", + fd, target_fd); + + return target_fd; + +err_get_unused_fd: +err_security: + fput(file); +err_fget: +err_fd_not_accepted: + return ret; +} + +static int binder_translate_fd_array(struct binder_fd_array_object *fda, + struct binder_buffer_object *parent, + struct binder_transaction *t, + struct binder_thread *thread, + struct binder_transaction *in_reply_to) +{ + binder_size_t fdi, fd_buf_size, num_installed_fds; + int target_fd; + uintptr_t parent_buffer; + u32 *fd_array; + struct binder_proc *proc = thread->proc; + struct binder_proc *target_proc = t->to_proc; + + fd_buf_size = sizeof(u32) * fda->num_fds; + if (fda->num_fds >= SIZE_MAX / sizeof(u32)) { + binder_user_error("%d:%d got transaction with invalid number of fds (%lld)\n", + proc->pid, thread->pid, (u64)fda->num_fds); + return -EINVAL; + } + if (fd_buf_size > parent->length || + fda->parent_offset > parent->length - fd_buf_size) { + /* No space for all file descriptors here. */ + binder_user_error("%d:%d not enough space to store %lld fds in buffer\n", + proc->pid, thread->pid, (u64)fda->num_fds); + return -EINVAL; + } + /* + * Since the parent was already fixed up, convert it + * back to the kernel address space to access it + */ + parent_buffer = parent->buffer - target_proc->user_buffer_offset; + fd_array = (u32 *)(parent_buffer + fda->parent_offset); + if (!IS_ALIGNED((unsigned long)fd_array, sizeof(u32))) { + binder_user_error("%d:%d parent offset not aligned correctly.\n", + proc->pid, thread->pid); + return -EINVAL; + } + for (fdi = 0; fdi < fda->num_fds; fdi++) { + target_fd = binder_translate_fd(fd_array[fdi], t, thread, + in_reply_to); + if (target_fd < 0) + goto err_translate_fd_failed; + fd_array[fdi] = target_fd; + } + return 0; + +err_translate_fd_failed: + /* + * Failed to allocate fd or security error, free fds + * installed so far. + */ + num_installed_fds = fdi; + for (fdi = 0; fdi < num_installed_fds; fdi++) + task_close_fd(target_proc, fd_array[fdi]); + return target_fd; +} + +static int binder_fixup_parent(struct binder_transaction *t, + struct binder_thread *thread, + struct binder_buffer_object *bp, + binder_size_t *off_start, + binder_size_t num_valid, + struct binder_buffer_object *last_fixup_obj, + binder_size_t last_fixup_min_off) +{ + struct binder_buffer_object *parent; + u8 *parent_buffer; + struct binder_buffer *b = t->buffer; + struct binder_proc *proc = thread->proc; + struct binder_proc *target_proc = t->to_proc; + + if (!(bp->flags & BINDER_BUFFER_FLAG_HAS_PARENT)) + return 0; + + parent = binder_validate_ptr(b, bp->parent, off_start, num_valid); + if (!parent) { + binder_user_error("%d:%d got transaction with invalid parent offset or type\n", + proc->pid, thread->pid); + return -EINVAL; + } + + if (!binder_validate_fixup(b, off_start, + parent, bp->parent_offset, + last_fixup_obj, + last_fixup_min_off)) { + binder_user_error("%d:%d got transaction with out-of-order buffer fixup\n", + proc->pid, thread->pid); + return -EINVAL; + } + + if (parent->length < sizeof(binder_uintptr_t) || + bp->parent_offset > parent->length - sizeof(binder_uintptr_t)) { + /* No space for a pointer here! */ + binder_user_error("%d:%d got transaction with invalid parent offset\n", + proc->pid, thread->pid); + return -EINVAL; + } + parent_buffer = (u8 *)(parent->buffer - + target_proc->user_buffer_offset); + *(binder_uintptr_t *)(parent_buffer + bp->parent_offset) = bp->buffer; + + return 0; +} + static void binder_transaction(struct binder_proc *proc, struct binder_thread *thread, - struct binder_transaction_data *tr, int reply) + struct binder_transaction_data *tr, int reply, + binder_size_t extra_buffers_size) { + int ret; struct binder_transaction *t; struct binder_work *tcomplete; - binder_size_t *offp, *off_end; + binder_size_t *offp, *off_end, *off_start; binder_size_t off_min; + u8 *sg_bufp, *sg_buf_end; struct binder_proc *target_proc; struct binder_thread *target_thread = NULL; struct binder_node *target_node = NULL; @@ -1324,6 +1894,9 @@ static void binder_transaction(struct binder_proc *proc, struct binder_transaction *in_reply_to = NULL; struct binder_transaction_log_entry *e; uint32_t return_error; + struct binder_buffer_object *last_fixup_obj = NULL; + binder_size_t last_fixup_min_off = 0; + struct binder_context *context = proc->context; e = binder_transaction_log_add(&binder_transaction_log); e->call_type = reply ? 2 : !!(tr->flags & TF_ONE_WAY); @@ -1332,6 +1905,7 @@ static void binder_transaction(struct binder_proc *proc, e->target_handle = tr->target.handle; e->data_size = tr->data_size; e->offsets_size = tr->offsets_size; + e->context_name = proc->context->name; if (reply) { in_reply_to = thread->transaction_stack; @@ -1384,7 +1958,7 @@ static void binder_transaction(struct binder_proc *proc, } target_node = ref->node; } else { - target_node = binder_context_mgr_node; + target_node = context->binder_context_mgr_node; if (target_node == NULL) { return_error = BR_DEAD_REPLY; goto err_no_context_mgr_node; @@ -1430,14 +2004,14 @@ static void binder_transaction(struct binder_proc *proc, e->to_proc = target_proc->pid; /* TODO: reuse incoming transaction for reply */ - t = kzalloc(sizeof(*t), GFP_KERNEL); + t = kzalloc_preempt_disabled(sizeof(*t)); if (t == NULL) { return_error = BR_FAILED_REPLY; goto err_alloc_t_failed; } binder_stats_created(BINDER_STAT_TRANSACTION); - tcomplete = kzalloc(sizeof(*tcomplete), GFP_KERNEL); + tcomplete = kzalloc_preempt_disabled(sizeof(*tcomplete)); if (tcomplete == NULL) { return_error = BR_FAILED_REPLY; goto err_alloc_tcomplete_failed; @@ -1449,20 +2023,22 @@ static void binder_transaction(struct binder_proc *proc, if (reply) binder_debug(BINDER_DEBUG_TRANSACTION, - "%d:%d BC_REPLY %d -> %d:%d, data %016llx-%016llx size %lld-%lld\n", + "%d:%d BC_REPLY %d -> %d:%d, data %016llx-%016llx size %lld-%lld-%lld\n", proc->pid, thread->pid, t->debug_id, target_proc->pid, target_thread->pid, (u64)tr->data.ptr.buffer, (u64)tr->data.ptr.offsets, - (u64)tr->data_size, (u64)tr->offsets_size); + (u64)tr->data_size, (u64)tr->offsets_size, + (u64)extra_buffers_size); else binder_debug(BINDER_DEBUG_TRANSACTION, - "%d:%d BC_TRANSACTION %d -> %d - node %d, data %016llx-%016llx size %lld-%lld\n", + "%d:%d BC_TRANSACTION %d -> %d - node %d, data %016llx-%016llx size %lld-%lld-%lld\n", proc->pid, thread->pid, t->debug_id, target_proc->pid, target_node->debug_id, (u64)tr->data.ptr.buffer, (u64)tr->data.ptr.offsets, - (u64)tr->data_size, (u64)tr->offsets_size); + (u64)tr->data_size, (u64)tr->offsets_size, + (u64)extra_buffers_size); if (!reply && !(tr->flags & TF_ONE_WAY)) t->from = thread; @@ -1478,7 +2054,8 @@ static void binder_transaction(struct binder_proc *proc, trace_binder_transaction(reply, t, target_node); t->buffer = binder_alloc_buf(target_proc, tr->data_size, - tr->offsets_size, !reply && (t->flags & TF_ONE_WAY)); + tr->offsets_size, extra_buffers_size, + !reply && (t->flags & TF_ONE_WAY)); if (t->buffer == NULL) { return_error = BR_FAILED_REPLY; goto err_binder_alloc_buf_failed; @@ -1491,17 +2068,18 @@ static void binder_transaction(struct binder_proc *proc, if (target_node) binder_inc_node(target_node, 1, 0, NULL); - offp = (binder_size_t *)(t->buffer->data + - ALIGN(tr->data_size, sizeof(void *))); + off_start = (binder_size_t *)(t->buffer->data + + ALIGN(tr->data_size, sizeof(void *))); + offp = off_start; - if (copy_from_user(t->buffer->data, (const void __user *)(uintptr_t) + if (copy_from_user_preempt_disabled(t->buffer->data, (const void __user *)(uintptr_t) tr->data.ptr.buffer, tr->data_size)) { binder_user_error("%d:%d got transaction with invalid data ptr\n", proc->pid, thread->pid); return_error = BR_FAILED_REPLY; goto err_copy_data_failed; } - if (copy_from_user(offp, (const void __user *)(uintptr_t) + if (copy_from_user_preempt_disabled(offp, (const void __user *)(uintptr_t) tr->data.ptr.offsets, tr->offsets_size)) { binder_user_error("%d:%d got transaction with invalid offsets ptr\n", proc->pid, thread->pid); @@ -1514,167 +2092,139 @@ static void binder_transaction(struct binder_proc *proc, return_error = BR_FAILED_REPLY; goto err_bad_offset; } - off_end = (void *)offp + tr->offsets_size; + if (!IS_ALIGNED(extra_buffers_size, sizeof(u64))) { + binder_user_error("%d:%d got transaction with unaligned buffers size, %lld\n", + proc->pid, thread->pid, + extra_buffers_size); + return_error = BR_FAILED_REPLY; + goto err_bad_offset; + } + off_end = (void *)off_start + tr->offsets_size; + sg_bufp = (u8 *)(PTR_ALIGN(off_end, sizeof(void *))); + sg_buf_end = sg_bufp + extra_buffers_size; off_min = 0; for (; offp < off_end; offp++) { - struct flat_binder_object *fp; - if (*offp > t->buffer->data_size - sizeof(*fp) || - *offp < off_min || - t->buffer->data_size < sizeof(*fp) || - !IS_ALIGNED(*offp, sizeof(u32))) { - binder_user_error("%d:%d got transaction with invalid offset, %lld (min %lld, max %lld)\n", + struct binder_object_header *hdr; + size_t object_size = binder_validate_object(t->buffer, *offp); + + if (object_size == 0 || *offp < off_min) { + binder_user_error("%d:%d got transaction with invalid offset (%lld, min %lld max %lld) or object.\n", proc->pid, thread->pid, (u64)*offp, (u64)off_min, - (u64)(t->buffer->data_size - - sizeof(*fp))); + (u64)t->buffer->data_size); return_error = BR_FAILED_REPLY; goto err_bad_offset; } - fp = (struct flat_binder_object *)(t->buffer->data + *offp); - off_min = *offp + sizeof(struct flat_binder_object); - switch (fp->type) { + + hdr = (struct binder_object_header *)(t->buffer->data + *offp); + off_min = *offp + object_size; + switch (hdr->type) { case BINDER_TYPE_BINDER: case BINDER_TYPE_WEAK_BINDER: { - struct binder_ref *ref; - struct binder_node *node = binder_get_node(proc, fp->binder); - if (node == NULL) { - node = binder_new_node(proc, fp->binder, fp->cookie); - if (node == NULL) { - return_error = BR_FAILED_REPLY; - goto err_binder_new_node_failed; - } - node->min_priority = fp->flags & FLAT_BINDER_FLAG_PRIORITY_MASK; - node->accept_fds = !!(fp->flags & FLAT_BINDER_FLAG_ACCEPTS_FDS); - } - if (fp->cookie != node->cookie) { - binder_user_error("%d:%d sending u%016llx node %d, cookie mismatch %016llx != %016llx\n", - proc->pid, thread->pid, - (u64)fp->binder, node->debug_id, - (u64)fp->cookie, (u64)node->cookie); - goto err_binder_get_ref_for_node_failed; - } - if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) { - return_error = BR_FAILED_REPLY; - goto err_binder_get_ref_for_node_failed; - } - ref = binder_get_ref_for_node(target_proc, node); - if (ref == NULL) { + struct flat_binder_object *fp; + + fp = to_flat_binder_object(hdr); + ret = binder_translate_binder(fp, t, thread); + if (ret < 0) { return_error = BR_FAILED_REPLY; - goto err_binder_get_ref_for_node_failed; + goto err_translate_failed; } - if (fp->type == BINDER_TYPE_BINDER) - fp->type = BINDER_TYPE_HANDLE; - else - fp->type = BINDER_TYPE_WEAK_HANDLE; - fp->binder = 0; - fp->handle = ref->desc; - fp->cookie = 0; - binder_inc_ref(ref, fp->type == BINDER_TYPE_HANDLE, - &thread->todo); - - trace_binder_transaction_node_to_ref(t, node, ref); - binder_debug(BINDER_DEBUG_TRANSACTION, - " node %d u%016llx -> ref %d desc %d\n", - node->debug_id, (u64)node->ptr, - ref->debug_id, ref->desc); } break; case BINDER_TYPE_HANDLE: case BINDER_TYPE_WEAK_HANDLE: { - struct binder_ref *ref = binder_get_ref(proc, fp->handle, - fp->type == BINDER_TYPE_HANDLE); + struct flat_binder_object *fp; - if (ref == NULL) { - binder_user_error("%d:%d got transaction with invalid handle, %d\n", - proc->pid, - thread->pid, fp->handle); - return_error = BR_FAILED_REPLY; - goto err_binder_get_ref_failed; - } - if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) { + fp = to_flat_binder_object(hdr); + ret = binder_translate_handle(fp, t, thread); + if (ret < 0) { return_error = BR_FAILED_REPLY; - goto err_binder_get_ref_failed; - } - if (ref->node->proc == target_proc) { - if (fp->type == BINDER_TYPE_HANDLE) - fp->type = BINDER_TYPE_BINDER; - else - fp->type = BINDER_TYPE_WEAK_BINDER; - fp->binder = ref->node->ptr; - fp->cookie = ref->node->cookie; - binder_inc_node(ref->node, fp->type == BINDER_TYPE_BINDER, 0, NULL); - trace_binder_transaction_ref_to_node(t, ref); - binder_debug(BINDER_DEBUG_TRANSACTION, - " ref %d desc %d -> node %d u%016llx\n", - ref->debug_id, ref->desc, ref->node->debug_id, - (u64)ref->node->ptr); - } else { - struct binder_ref *new_ref; - new_ref = binder_get_ref_for_node(target_proc, ref->node); - if (new_ref == NULL) { - return_error = BR_FAILED_REPLY; - goto err_binder_get_ref_for_node_failed; - } - fp->binder = 0; - fp->handle = new_ref->desc; - fp->cookie = 0; - binder_inc_ref(new_ref, fp->type == BINDER_TYPE_HANDLE, NULL); - trace_binder_transaction_ref_to_ref(t, ref, - new_ref); - binder_debug(BINDER_DEBUG_TRANSACTION, - " ref %d desc %d -> ref %d desc %d (node %d)\n", - ref->debug_id, ref->desc, new_ref->debug_id, - new_ref->desc, ref->node->debug_id); + goto err_translate_failed; } } break; case BINDER_TYPE_FD: { - int target_fd; - struct file *file; - - if (reply) { - if (!(in_reply_to->flags & TF_ACCEPT_FDS)) { - binder_user_error("%d:%d got reply with fd, %d, but target does not allow fds\n", - proc->pid, thread->pid, fp->handle); - return_error = BR_FAILED_REPLY; - goto err_fd_not_allowed; - } - } else if (!target_node->accept_fds) { - binder_user_error("%d:%d got transaction with fd, %d, but target does not allow fds\n", - proc->pid, thread->pid, fp->handle); + struct binder_fd_object *fp = to_binder_fd_object(hdr); + int target_fd = binder_translate_fd(fp->fd, t, thread, + in_reply_to); + + if (target_fd < 0) { return_error = BR_FAILED_REPLY; - goto err_fd_not_allowed; + goto err_translate_failed; } - - file = fget(fp->handle); - if (file == NULL) { - binder_user_error("%d:%d got transaction with invalid fd, %d\n", - proc->pid, thread->pid, fp->handle); + fp->pad_binder = 0; + fp->fd = target_fd; + } break; + case BINDER_TYPE_FDA: { + struct binder_fd_array_object *fda = + to_binder_fd_array_object(hdr); + struct binder_buffer_object *parent = + binder_validate_ptr(t->buffer, fda->parent, + off_start, + offp - off_start); + if (!parent) { + binder_user_error("%d:%d got transaction with invalid parent offset or type\n", + proc->pid, thread->pid); return_error = BR_FAILED_REPLY; - goto err_fget_failed; + goto err_bad_parent; } - if (security_binder_transfer_file(proc->tsk, target_proc->tsk, file) < 0) { - fput(file); + if (!binder_validate_fixup(t->buffer, off_start, + parent, fda->parent_offset, + last_fixup_obj, + last_fixup_min_off)) { + binder_user_error("%d:%d got transaction with out-of-order buffer fixup\n", + proc->pid, thread->pid); return_error = BR_FAILED_REPLY; - goto err_get_unused_fd_failed; + goto err_bad_parent; } - target_fd = task_get_unused_fd_flags(target_proc, O_CLOEXEC); - if (target_fd < 0) { - fput(file); + ret = binder_translate_fd_array(fda, parent, t, thread, + in_reply_to); + if (ret < 0) { return_error = BR_FAILED_REPLY; - goto err_get_unused_fd_failed; + goto err_translate_failed; } - task_fd_install(target_proc, target_fd, file); - trace_binder_transaction_fd(t, fp->handle, target_fd); - binder_debug(BINDER_DEBUG_TRANSACTION, - " fd %d -> %d\n", fp->handle, target_fd); - /* TODO: fput? */ - fp->binder = 0; - fp->handle = target_fd; + last_fixup_obj = parent; + last_fixup_min_off = + fda->parent_offset + sizeof(u32) * fda->num_fds; + } break; + case BINDER_TYPE_PTR: { + struct binder_buffer_object *bp = + to_binder_buffer_object(hdr); + size_t buf_left = sg_buf_end - sg_bufp; + + if (bp->length > buf_left) { + binder_user_error("%d:%d got transaction with too large buffer\n", + proc->pid, thread->pid); + return_error = BR_FAILED_REPLY; + goto err_bad_offset; + } + if (copy_from_user_preempt_disabled( + sg_bufp, + (const void __user *)(uintptr_t) + bp->buffer, bp->length)) { + binder_user_error("%d:%d got transaction with invalid offsets ptr\n", + proc->pid, thread->pid); + return_error = BR_FAILED_REPLY; + goto err_copy_data_failed; + } + /* Fixup buffer pointer to target proc address space */ + bp->buffer = (uintptr_t)sg_bufp + + target_proc->user_buffer_offset; + sg_bufp += ALIGN(bp->length, sizeof(u64)); + + ret = binder_fixup_parent(t, thread, bp, off_start, + offp - off_start, + last_fixup_obj, + last_fixup_min_off); + if (ret < 0) { + return_error = BR_FAILED_REPLY; + goto err_translate_failed; + } + last_fixup_obj = bp; + last_fixup_min_off = 0; } break; - default: binder_user_error("%d:%d got transaction with invalid object type, %x\n", - proc->pid, thread->pid, fp->type); + proc->pid, thread->pid, hdr->type); return_error = BR_FAILED_REPLY; goto err_bad_object_type; } @@ -1700,18 +2250,19 @@ static void binder_transaction(struct binder_proc *proc, list_add_tail(&t->work.entry, target_list); tcomplete->type = BINDER_WORK_TRANSACTION_COMPLETE; list_add_tail(&tcomplete->entry, &thread->todo); - if (target_wait) - wake_up_interruptible(target_wait); + if (target_wait) { + if (reply || !(t->flags & TF_ONE_WAY)) { + wake_up_interruptible_sync(target_wait); + } else { + wake_up_interruptible(target_wait); + } + } return; -err_get_unused_fd_failed: -err_fget_failed: -err_fd_not_allowed: -err_binder_get_ref_for_node_failed: -err_binder_get_ref_failed: -err_binder_new_node_failed: +err_translate_failed: err_bad_object_type: err_bad_offset: +err_bad_parent: err_copy_data_failed: trace_binder_transaction_failed_buffer_release(t->buffer); binder_transaction_buffer_release(target_proc, t->buffer, offp); @@ -1754,12 +2305,13 @@ static int binder_thread_write(struct binder_proc *proc, binder_size_t *consumed) { uint32_t cmd; + struct binder_context *context = proc->context; void __user *buffer = (void __user *)(uintptr_t)binder_buffer; void __user *ptr = buffer + *consumed; void __user *end = buffer + size; while (ptr < end && thread->return_error == BR_OK) { - if (get_user(cmd, (uint32_t __user *)ptr)) + if (get_user_preempt_disabled(cmd, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); trace_binder_command(cmd); @@ -1777,13 +2329,13 @@ static int binder_thread_write(struct binder_proc *proc, struct binder_ref *ref; const char *debug_string; - if (get_user(target, (uint32_t __user *)ptr)) + if (get_user_preempt_disabled(target, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); - if (target == 0 && binder_context_mgr_node && + if (target == 0 && context->binder_context_mgr_node && (cmd == BC_INCREFS || cmd == BC_ACQUIRE)) { ref = binder_get_ref_for_node(proc, - binder_context_mgr_node); + context->binder_context_mgr_node); if (ref->desc != target) { binder_user_error("%d:%d tried to acquire reference to desc 0, got %d instead\n", proc->pid, thread->pid, @@ -1836,10 +2388,10 @@ static int binder_thread_write(struct binder_proc *proc, binder_uintptr_t cookie; struct binder_node *node; - if (get_user(node_ptr, (binder_uintptr_t __user *)ptr)) + if (get_user_preempt_disabled(node_ptr, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(binder_uintptr_t); - if (get_user(cookie, (binder_uintptr_t __user *)ptr)) + if (get_user_preempt_disabled(cookie, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(binder_uintptr_t); node = binder_get_node(proc, node_ptr); @@ -1897,7 +2449,7 @@ static int binder_thread_write(struct binder_proc *proc, binder_uintptr_t data_ptr; struct binder_buffer *buffer; - if (get_user(data_ptr, (binder_uintptr_t __user *)ptr)) + if (get_user_preempt_disabled(data_ptr, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(binder_uintptr_t); @@ -1934,14 +2486,27 @@ static int binder_thread_write(struct binder_proc *proc, break; } + case BC_TRANSACTION_SG: + case BC_REPLY_SG: { + struct binder_transaction_data_sg tr; + + if (copy_from_user_preempt_disabled(&tr, ptr, + sizeof(tr))) + return -EFAULT; + ptr += sizeof(tr); + binder_transaction(proc, thread, &tr.transaction_data, + cmd == BC_REPLY_SG, tr.buffers_size); + break; + } case BC_TRANSACTION: case BC_REPLY: { struct binder_transaction_data tr; - if (copy_from_user(&tr, ptr, sizeof(tr))) + if (copy_from_user_preempt_disabled(&tr, ptr, sizeof(tr))) return -EFAULT; ptr += sizeof(tr); - binder_transaction(proc, thread, &tr, cmd == BC_REPLY); + binder_transaction(proc, thread, &tr, + cmd == BC_REPLY, 0); break; } @@ -1988,10 +2553,10 @@ static int binder_thread_write(struct binder_proc *proc, struct binder_ref *ref; struct binder_ref_death *death; - if (get_user(target, (uint32_t __user *)ptr)) + if (get_user_preempt_disabled(target, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); - if (get_user(cookie, (binder_uintptr_t __user *)ptr)) + if (get_user_preempt_disabled(cookie, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(binder_uintptr_t); ref = binder_get_ref(proc, target, false); @@ -2020,7 +2585,7 @@ static int binder_thread_write(struct binder_proc *proc, proc->pid, thread->pid); break; } - death = kzalloc(sizeof(*death), GFP_KERNEL); + death = kzalloc_preempt_disabled(sizeof(*death)); if (death == NULL) { thread->return_error = BR_ERROR; binder_debug(BINDER_DEBUG_FAILED_TRANSACTION, @@ -2073,7 +2638,7 @@ static int binder_thread_write(struct binder_proc *proc, struct binder_work *w; binder_uintptr_t cookie; struct binder_ref_death *death = NULL; - if (get_user(cookie, (binder_uintptr_t __user *)ptr)) + if (get_user_preempt_disabled(cookie, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(void *); @@ -2152,7 +2717,7 @@ static int binder_thread_read(struct binder_proc *proc, int wait_for_proc_work; if (*consumed == 0) { - if (put_user(BR_NOOP, (uint32_t __user *)ptr)) + if (put_user_preempt_disabled(BR_NOOP, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); } @@ -2163,7 +2728,7 @@ static int binder_thread_read(struct binder_proc *proc, if (thread->return_error != BR_OK && ptr < end) { if (thread->return_error2 != BR_OK) { - if (put_user(thread->return_error2, (uint32_t __user *)ptr)) + if (put_user_preempt_disabled(thread->return_error2, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); binder_stat_br(proc, thread, thread->return_error2); @@ -2171,7 +2736,7 @@ static int binder_thread_read(struct binder_proc *proc, goto done; thread->return_error2 = BR_OK; } - if (put_user(thread->return_error, (uint32_t __user *)ptr)) + if (put_user_preempt_disabled(thread->return_error, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); binder_stat_br(proc, thread, thread->return_error); @@ -2245,7 +2810,7 @@ static int binder_thread_read(struct binder_proc *proc, } break; case BINDER_WORK_TRANSACTION_COMPLETE: { cmd = BR_TRANSACTION_COMPLETE; - if (put_user(cmd, (uint32_t __user *)ptr)) + if (put_user_preempt_disabled(cmd, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); @@ -2286,14 +2851,14 @@ static int binder_thread_read(struct binder_proc *proc, node->has_weak_ref = 0; } if (cmd != BR_NOOP) { - if (put_user(cmd, (uint32_t __user *)ptr)) + if (put_user_preempt_disabled(cmd, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); - if (put_user(node->ptr, + if (put_user_preempt_disabled(node->ptr, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(binder_uintptr_t); - if (put_user(node->cookie, + if (put_user_preempt_disabled(node->cookie, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(binder_uintptr_t); @@ -2333,10 +2898,10 @@ static int binder_thread_read(struct binder_proc *proc, cmd = BR_CLEAR_DEATH_NOTIFICATION_DONE; else cmd = BR_DEAD_BINDER; - if (put_user(cmd, (uint32_t __user *)ptr)) + if (put_user_preempt_disabled(cmd, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); - if (put_user(death->cookie, + if (put_user_preempt_disabled(death->cookie, (binder_uintptr_t __user *)ptr)) return -EFAULT; ptr += sizeof(binder_uintptr_t); @@ -2402,10 +2967,10 @@ static int binder_thread_read(struct binder_proc *proc, ALIGN(t->buffer->data_size, sizeof(void *)); - if (put_user(cmd, (uint32_t __user *)ptr)) + if (put_user_preempt_disabled(cmd, (uint32_t __user *)ptr)) return -EFAULT; ptr += sizeof(uint32_t); - if (copy_to_user(ptr, &tr, sizeof(tr))) + if (copy_to_user_preempt_disabled(ptr, &tr, sizeof(tr))) return -EFAULT; ptr += sizeof(tr); @@ -2447,7 +3012,7 @@ static int binder_thread_read(struct binder_proc *proc, binder_debug(BINDER_DEBUG_THREADS, "%d:%d BR_SPAWN_LOOPER\n", proc->pid, thread->pid); - if (put_user(BR_SPAWN_LOOPER, (uint32_t __user *)buffer)) + if (put_user_preempt_disabled(BR_SPAWN_LOOPER, (uint32_t __user *)buffer)) return -EFAULT; binder_stat_br(proc, thread, BR_SPAWN_LOOPER); } @@ -2521,7 +3086,7 @@ static struct binder_thread *binder_get_thread(struct binder_proc *proc) break; } if (*p == NULL) { - thread = kzalloc(sizeof(*thread), GFP_KERNEL); + thread = kzalloc_preempt_disabled(sizeof(*thread)); if (thread == NULL) return NULL; binder_stats_created(BINDER_STAT_THREAD); @@ -2615,6 +3180,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { int ret; struct binder_proc *proc = filp->private_data; + struct binder_context *context = proc->context; struct binder_thread *thread; unsigned int size = _IOC_SIZE(cmd); void __user *ubuf = (void __user *)arg; @@ -2641,7 +3207,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ret = -EINVAL; goto err; } - if (copy_from_user(&bwr, ubuf, sizeof(bwr))) { + if (copy_from_user_preempt_disabled(&bwr, ubuf, sizeof(bwr))) { ret = -EFAULT; goto err; } @@ -2656,7 +3222,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) trace_binder_write_done(ret); if (ret < 0) { bwr.read_consumed = 0; - if (copy_to_user(ubuf, &bwr, sizeof(bwr))) + if (copy_to_user_preempt_disabled(ubuf, &bwr, sizeof(bwr))) ret = -EFAULT; goto err; } @@ -2667,7 +3233,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if (!list_empty(&proc->todo)) wake_up_interruptible(&proc->wait); if (ret < 0) { - if (copy_to_user(ubuf, &bwr, sizeof(bwr))) + if (copy_to_user_preempt_disabled(ubuf, &bwr, sizeof(bwr))) ret = -EFAULT; goto err; } @@ -2677,20 +3243,20 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) proc->pid, thread->pid, (u64)bwr.write_consumed, (u64)bwr.write_size, (u64)bwr.read_consumed, (u64)bwr.read_size); - if (copy_to_user(ubuf, &bwr, sizeof(bwr))) { + if (copy_to_user_preempt_disabled(ubuf, &bwr, sizeof(bwr))) { ret = -EFAULT; goto err; } break; } case BINDER_SET_MAX_THREADS: - if (copy_from_user(&proc->max_threads, ubuf, sizeof(proc->max_threads))) { + if (copy_from_user_preempt_disabled(&proc->max_threads, ubuf, sizeof(proc->max_threads))) { ret = -EINVAL; goto err; } break; case BINDER_SET_CONTEXT_MGR: - if (binder_context_mgr_node != NULL) { + if (context->binder_context_mgr_node) { pr_err("BINDER_SET_CONTEXT_MGR already set\n"); ret = -EBUSY; goto err; @@ -2698,25 +3264,27 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ret = security_binder_set_context_mgr(proc->tsk); if (ret < 0) goto err; - if (uid_valid(binder_context_mgr_uid)) { - if (!uid_eq(binder_context_mgr_uid, current->cred->euid)) { + if (uid_valid(context->binder_context_mgr_uid)) { + if (!uid_eq(context->binder_context_mgr_uid, + current->cred->euid)) { pr_err("BINDER_SET_CONTEXT_MGR bad uid %d != %d\n", from_kuid(&init_user_ns, current->cred->euid), - from_kuid(&init_user_ns, binder_context_mgr_uid)); + from_kuid(&init_user_ns, + context->binder_context_mgr_uid)); ret = -EPERM; goto err; } } else - binder_context_mgr_uid = current->cred->euid; - binder_context_mgr_node = binder_new_node(proc, 0, 0); - if (binder_context_mgr_node == NULL) { + context->binder_context_mgr_uid = current->cred->euid; + context->binder_context_mgr_node = binder_new_node(proc, 0, 0); + if (!context->binder_context_mgr_node) { ret = -ENOMEM; goto err; } - binder_context_mgr_node->local_weak_refs++; - binder_context_mgr_node->local_strong_refs++; - binder_context_mgr_node->has_strong_ref = 1; - binder_context_mgr_node->has_weak_ref = 1; + context->binder_context_mgr_node->local_weak_refs++; + context->binder_context_mgr_node->local_strong_refs++; + context->binder_context_mgr_node->has_strong_ref = 1; + context->binder_context_mgr_node->has_weak_ref = 1; break; case BINDER_THREAD_EXIT: binder_debug(BINDER_DEBUG_THREADS, "%d:%d exit\n", @@ -2729,7 +3297,7 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ret = -EINVAL; goto err; } - if (put_user(BINDER_CURRENT_PROTOCOL_VERSION, &((struct binder_version *)ubuf)->protocol_version)) { + if (put_user_preempt_disabled(BINDER_CURRENT_PROTOCOL_VERSION, &((struct binder_version *)ubuf)->protocol_version)) { ret = -EINVAL; goto err; } @@ -2788,12 +3356,13 @@ static struct vm_operations_struct binder_vm_ops = { static int binder_mmap(struct file *filp, struct vm_area_struct *vma) { int ret; + struct vm_struct *area; struct binder_proc *proc = filp->private_data; const char *failure_string; struct binder_buffer *buffer; - if (proc->tsk != current) + if (proc->tsk != current->group_leader) return -EINVAL; if ((vma->vm_end - vma->vm_start) > SZ_4M) @@ -2848,7 +3417,11 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) vma->vm_ops = &binder_vm_ops; vma->vm_private_data = proc; - if (binder_update_page_range(proc, 1, proc->buffer, proc->buffer + PAGE_SIZE, vma)) { + /* binder_update_page_range assumes preemption is disabled */ + preempt_disable(); + ret = binder_update_page_range(proc, 1, proc->buffer, proc->buffer + PAGE_SIZE, vma); + preempt_enable_no_resched(); + if (ret) { ret = -ENOMEM; failure_string = "alloc small buf"; goto err_alloc_small_buf_failed; @@ -2887,6 +3460,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma) static int binder_open(struct inode *nodp, struct file *filp) { struct binder_proc *proc; + struct binder_device *binder_dev; binder_debug(BINDER_DEBUG_OPEN_CLOSE, "binder_open: %d:%d\n", current->group_leader->pid, current->pid); @@ -2894,11 +3468,14 @@ static int binder_open(struct inode *nodp, struct file *filp) proc = kzalloc(sizeof(*proc), GFP_KERNEL); if (proc == NULL) return -ENOMEM; - get_task_struct(current); - proc->tsk = current; + get_task_struct(current->group_leader); + proc->tsk = current->group_leader; INIT_LIST_HEAD(&proc->todo); init_waitqueue_head(&proc->wait); proc->default_priority = task_nice(current); + binder_dev = container_of(filp->private_data, struct binder_device, + miscdev); + proc->context = &binder_dev->context; binder_lock(__func__); @@ -2913,8 +3490,17 @@ static int binder_open(struct inode *nodp, struct file *filp) if (binder_debugfs_dir_entry_proc) { char strbuf[11]; snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); + /* + * proc debug entries are shared between contexts, so + * this will fail if the process tries to open the driver + * again with a different context. The priting code will + * anyway print all contexts that a given PID has, so this + * is not a problem. + */ proc->debugfs_entry = debugfs_create_file(strbuf, S_IRUGO, - binder_debugfs_dir_entry_proc, proc, &binder_proc_fops); + binder_debugfs_dir_entry_proc, + (void *)(unsigned long)proc->pid, + &binder_proc_fops); } return 0; @@ -3004,6 +3590,7 @@ static int binder_node_release(struct binder_node *node, int refs) static void binder_deferred_release(struct binder_proc *proc) { struct binder_transaction *t; + struct binder_context *context = proc->context; struct rb_node *n; int threads, nodes, incoming_refs, outgoing_refs, buffers, active_transactions, page_count; @@ -3013,11 +3600,12 @@ static void binder_deferred_release(struct binder_proc *proc) hlist_del(&proc->proc_node); - if (binder_context_mgr_node && binder_context_mgr_node->proc == proc) { + if (context->binder_context_mgr_node && + context->binder_context_mgr_node->proc == proc) { binder_debug(BINDER_DEBUG_DEAD_BINDER, "%s: %d context_mgr_node gone\n", __func__, proc->pid); - binder_context_mgr_node = NULL; + context->binder_context_mgr_node = NULL; } threads = 0; @@ -3113,8 +3701,12 @@ static void binder_deferred_func(struct work_struct *work) int defer; do { - binder_lock(__func__); + trace_binder_lock(__func__); + mutex_lock(&binder_main_lock); + trace_binder_locked(__func__); + mutex_lock(&binder_deferred_lock); + preempt_disable(); if (!hlist_empty(&binder_deferred_list)) { proc = hlist_entry(binder_deferred_list.first, struct binder_proc, deferred_work_node); @@ -3140,7 +3732,9 @@ static void binder_deferred_func(struct work_struct *work) if (defer & BINDER_DEFERRED_RELEASE) binder_deferred_release(proc); /* frees proc */ - binder_unlock(__func__); + trace_binder_unlock(__func__); + mutex_unlock(&binder_main_lock); + preempt_enable_no_resched(); if (files) put_files_struct(files); } while (proc); @@ -3303,6 +3897,7 @@ static void print_binder_proc(struct seq_file *m, size_t header_pos; seq_printf(m, "proc %d\n", proc->pid); + seq_printf(m, "context %s\n", proc->context->name); header_pos = m->count; for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) @@ -3372,7 +3967,9 @@ static const char * const binder_command_strings[] = { "BC_EXIT_LOOPER", "BC_REQUEST_DEATH_NOTIFICATION", "BC_CLEAR_DEATH_NOTIFICATION", - "BC_DEAD_BINDER_DONE" + "BC_DEAD_BINDER_DONE", + "BC_TRANSACTION_SG", + "BC_REPLY_SG", }; static const char * const binder_objstat_strings[] = { @@ -3427,6 +4024,7 @@ static void print_binder_proc_stats(struct seq_file *m, int count, strong, weak; seq_printf(m, "proc %d\n", proc->pid); + seq_printf(m, "context %s\n", proc->context->name); count = 0; for (n = rb_first(&proc->threads); n != NULL; n = rb_next(n)) count++; @@ -3534,23 +4132,18 @@ static int binder_transactions_show(struct seq_file *m, void *unused) static int binder_proc_show(struct seq_file *m, void *unused) { struct binder_proc *itr; - struct binder_proc *proc = m->private; + int pid = (unsigned long)m->private; int do_lock = !binder_debug_no_lock; - bool valid_proc = false; if (do_lock) binder_lock(__func__); hlist_for_each_entry(itr, &binder_procs, proc_node) { - if (itr == proc) { - valid_proc = true; - break; + if (itr->pid == pid) { + seq_puts(m, "binder proc state:\n"); + print_binder_proc(m, itr, 1); } } - if (valid_proc) { - seq_puts(m, "binder proc state:\n"); - print_binder_proc(m, proc, 1); - } if (do_lock) binder_unlock(__func__); return 0; @@ -3560,11 +4153,11 @@ static void print_binder_transaction_log_entry(struct seq_file *m, struct binder_transaction_log_entry *e) { seq_printf(m, - "%d: %s from %d:%d to %d:%d node %d handle %d size %d:%d\n", + "%d: %s from %d:%d to %d:%d context %s node %d handle %d size %d:%d\n", e->debug_id, (e->call_type == 2) ? "reply" : ((e->call_type == 1) ? "async" : "call "), e->from_proc, - e->from_thread, e->to_proc, e->to_thread, e->to_node, - e->target_handle, e->data_size, e->offsets_size); + e->from_thread, e->to_proc, e->to_thread, e->context_name, + e->to_node, e->target_handle, e->data_size, e->offsets_size); } static int binder_transaction_log_show(struct seq_file *m, void *unused) @@ -3592,20 +4185,44 @@ static const struct file_operations binder_fops = { .release = binder_release, }; -static struct miscdevice binder_miscdev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "binder", - .fops = &binder_fops -}; - BINDER_DEBUG_ENTRY(state); BINDER_DEBUG_ENTRY(stats); BINDER_DEBUG_ENTRY(transactions); BINDER_DEBUG_ENTRY(transaction_log); +static int __init init_binder_device(const char *name) +{ + int ret; + struct binder_device *binder_device; + + binder_device = kzalloc(sizeof(*binder_device), GFP_KERNEL); + if (!binder_device) + return -ENOMEM; + + binder_device->miscdev.fops = &binder_fops; + binder_device->miscdev.minor = MISC_DYNAMIC_MINOR; + binder_device->miscdev.name = name; + + binder_device->context.binder_context_mgr_uid = INVALID_UID; + binder_device->context.name = name; + + ret = misc_register(&binder_device->miscdev); + if (ret < 0) { + kfree(binder_device); + return ret; + } + + hlist_add_head(&binder_device->hlist, &binder_devices); + + return ret; +} + static int __init binder_init(void) { int ret; + char *device_name, *device_names; + struct binder_device *device; + struct hlist_node *tmp; binder_deferred_workqueue = create_singlethread_workqueue("binder"); if (!binder_deferred_workqueue) @@ -3615,7 +4232,7 @@ static int __init binder_init(void) if (binder_debugfs_dir_entry_root) binder_debugfs_dir_entry_proc = debugfs_create_dir("proc", binder_debugfs_dir_entry_root); - ret = misc_register(&binder_miscdev); + if (binder_debugfs_dir_entry_root) { debugfs_create_file("state", S_IRUGO, @@ -3643,6 +4260,37 @@ static int __init binder_init(void) &binder_transaction_log_failed, &binder_transaction_log_fops); } + + /* + * Copy the module_parameter string, because we don't want to + * tokenize it in-place. + */ + device_names = kzalloc(strlen(binder_devices_param) + 1, GFP_KERNEL); + if (!device_names) { + ret = -ENOMEM; + goto err_alloc_device_names_failed; + } + strcpy(device_names, binder_devices_param); + + while ((device_name = strsep(&device_names, ","))) { + ret = init_binder_device(device_name); + if (ret) + goto err_init_binder_device_failed; + } + + return ret; + +err_init_binder_device_failed: + hlist_for_each_entry_safe(device, tmp, &binder_devices, hlist) { + misc_deregister(&device->miscdev); + hlist_del(&device->hlist); + kfree(device); + } +err_alloc_device_names_failed: + debugfs_remove_recursive(binder_debugfs_dir_entry_root); + + destroy_workqueue(binder_deferred_workqueue); + return ret; } diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 813a8af8298..88bb9057976 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -1481,6 +1481,11 @@ static int ion_sync_for_device(struct ion_client *client, int fd) } buffer = dmabuf->priv; + if (buffer->flags & ION_FLAG_SECURE) { + pr_err("%s: cannot sync a secure dmabuf\n", __func__); + dma_buf_put(dmabuf); + return -EINVAL; + } dma_sync_sg_for_device(NULL, buffer->sg_table->sgl, buffer->sg_table->nents, DMA_BIDIRECTIONAL); dma_buf_put(dmabuf); diff --git a/drivers/staging/android/ion/msm/msm_ion.c b/drivers/staging/android/ion/msm/msm_ion.c index b2f79d2aef3..843c2977b5a 100644 --- a/drivers/staging/android/ion/msm/msm_ion.c +++ b/drivers/staging/android/ion/msm/msm_ion.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014,2016 The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014,2016,2018 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -722,11 +722,11 @@ long msm_ion_custom_ioctl(struct ion_client *client, down_read(&mm->mmap_sem); - start = (unsigned long) data.flush_data.vaddr; - end = (unsigned long) data.flush_data.vaddr - + data.flush_data.length; + start = (unsigned long)data.flush_data.vaddr + + data.flush_data.offset; + end = start + data.flush_data.length; - if (start && check_vaddr_bounds(start, end)) { + if (check_vaddr_bounds(start, end)) { pr_err("%s: virtual address %pK is out of bounds\n", __func__, data.flush_data.vaddr); ret = -EINVAL; diff --git a/drivers/staging/android/uapi/binder.h b/drivers/staging/android/uapi/binder.h index 04c735d7274..9153571407b 100644 --- a/drivers/staging/android/uapi/binder.h +++ b/drivers/staging/android/uapi/binder.h @@ -32,6 +32,8 @@ enum { BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE), BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE), BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE), + BINDER_TYPE_FDA = B_PACK_CHARS('f', 'd', 'a', B_TYPE_LARGE), + BINDER_TYPE_PTR = B_PACK_CHARS('p', 't', '*', B_TYPE_LARGE), }; enum { @@ -47,6 +49,14 @@ typedef __u64 binder_size_t; typedef __u64 binder_uintptr_t; #endif +/** + * struct binder_object_header - header shared by all binder metadata objects. + * @type: type of the object + */ +struct binder_object_header { + __u32 type; +}; + /* * This is the flattened representation of a Binder object for transfer * between processes. The 'offsets' supplied as part of a binder transaction @@ -55,9 +65,8 @@ typedef __u64 binder_uintptr_t; * between processes. */ struct flat_binder_object { - /* 8 bytes for large_flat_header. */ - __u32 type; - __u32 flags; + struct binder_object_header hdr; + __u32 flags; /* 8 bytes of data. */ union { @@ -69,6 +78,84 @@ struct flat_binder_object { binder_uintptr_t cookie; }; +/** + * struct binder_fd_object - describes a filedescriptor to be fixed up. + * @hdr: common header structure + * @pad_flags: padding to remain compatible with old userspace code + * @pad_binder: padding to remain compatible with old userspace code + * @fd: file descriptor + * @cookie: opaque data, used by user-space + */ +struct binder_fd_object { + struct binder_object_header hdr; + __u32 pad_flags; + union { + binder_uintptr_t pad_binder; + __u32 fd; + }; + + binder_uintptr_t cookie; +}; + +/* struct binder_buffer_object - object describing a userspace buffer + * @hdr: common header structure + * @flags: one or more BINDER_BUFFER_* flags + * @buffer: address of the buffer + * @length: length of the buffer + * @parent: index in offset array pointing to parent buffer + * @parent_offset: offset in @parent pointing to this buffer + * + * A binder_buffer object represents an object that the + * binder kernel driver can copy verbatim to the target + * address space. A buffer itself may be pointed to from + * within another buffer, meaning that the pointer inside + * that other buffer needs to be fixed up as well. This + * can be done by setting the BINDER_BUFFER_FLAG_HAS_PARENT + * flag in @flags, by setting @parent buffer to the index + * in the offset array pointing to the parent binder_buffer_object, + * and by setting @parent_offset to the offset in the parent buffer + * at which the pointer to this buffer is located. + */ +struct binder_buffer_object { + struct binder_object_header hdr; + __u32 flags; + binder_uintptr_t buffer; + binder_size_t length; + binder_size_t parent; + binder_size_t parent_offset; +}; + +enum { + BINDER_BUFFER_FLAG_HAS_PARENT = 0x01, +}; + +/* struct binder_fd_array_object - object describing an array of fds in a buffer + * @hdr: common header structure + * @num_fds: number of file descriptors in the buffer + * @parent: index in offset array to buffer holding the fd array + * @parent_offset: start offset of fd array in the buffer + * + * A binder_fd_array object represents an array of file + * descriptors embedded in a binder_buffer_object. It is + * different from a regular binder_buffer_object because it + * describes a list of file descriptors to fix up, not an opaque + * blob of memory, and hence the kernel needs to treat it differently. + * + * An example of how this would be used is with Android's + * native_handle_t object, which is a struct with a list of integers + * and a list of file descriptors. The native_handle_t struct itself + * will be represented by a struct binder_buffer_objct, whereas the + * embedded list of file descriptors is represented by a + * struct binder_fd_array_object with that binder_buffer_object as + * a parent. + */ +struct binder_fd_array_object { + struct binder_object_header hdr; + binder_size_t num_fds; + binder_size_t parent; + binder_size_t parent_offset; +}; + /* * On 64-bit platforms where user code may run in 32-bits the driver must * translate the buffer (and local binder) addresses appropriately. @@ -159,6 +246,11 @@ struct binder_transaction_data { } data; }; +struct binder_transaction_data_sg { + struct binder_transaction_data transaction_data; + binder_size_t buffers_size; +}; + struct binder_ptr_cookie { binder_uintptr_t ptr; binder_uintptr_t cookie; @@ -341,6 +433,12 @@ enum binder_driver_command_protocol { /* * void *: cookie */ + + BC_TRANSACTION_SG = _IOW('c', 17, struct binder_transaction_data_sg), + BC_REPLY_SG = _IOW('c', 18, struct binder_transaction_data_sg), + /* + * binder_transaction_data_sg: the sent command. + */ }; #endif /* _UAPI_LINUX_BINDER_H */ diff --git a/drivers/staging/prima/CORE/BAP/src/bapApiData.c b/drivers/staging/prima/CORE/BAP/src/bapApiData.c index 1a1e67dbc27..e7ba26676e6 100644 --- a/drivers/staging/prima/CORE/BAP/src/bapApiData.c +++ b/drivers/staging/prima/CORE/BAP/src/bapApiData.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2015, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1013,7 +1013,7 @@ WLANBAP_TxCompCB #ifdef BAP_DEBUG /* Trace the bapContext referenced. */ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "WLAN BAP Context Monitor: bapContext value = %p in %s:%d. vosDataBuff=%p", bapContext, __func__, __LINE__, vosDataBuff ); + "WLAN BAP Context Monitor: bapContext value = %pK in %s:%d. vosDataBuff=%pK", bapContext, __func__, __LINE__, vosDataBuff ); #endif //BAP_DEBUG // Sanity check the log_link_handle value @@ -1164,7 +1164,7 @@ WLANBAP_STAPktPending #ifdef BAP_DEBUG /* Trace the tBtampCtx being passed in. */ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "WLAN BAP Context Monitor: pBtampCtx value = %p in %s:%d", pBtampCtx, __func__, __LINE__ ); + "WLAN BAP Context Monitor: pBtampCtx value = %pK in %s:%d", pBtampCtx, __func__, __LINE__ ); #endif //BAP_DEBUG /*------------------------------------------------------------------------ diff --git a/drivers/staging/prima/CORE/BAP/src/bapApiHCBB.c b/drivers/staging/prima/CORE/BAP/src/bapApiHCBB.c index 7fc78005051..58c14687f88 100644 --- a/drivers/staging/prima/CORE/BAP/src/bapApiHCBB.c +++ b/drivers/staging/prima/CORE/BAP/src/bapApiHCBB.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -144,7 +144,7 @@ WLAN_BAPReset tHalHandle hHal = NULL; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if (btampHandle == NULL) @@ -291,7 +291,7 @@ WLAN_BAPFlush ptBtampContext btampContext = (ptBtampContext) btampHandle; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if (btampHandle == NULL) { @@ -364,7 +364,7 @@ WLAN_EnhancedBAPFlush ptBtampContext btampContext; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ /* Validate params */ @@ -444,7 +444,7 @@ WLAN_BAPReadConnectionAcceptTimeout /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIEvent)) @@ -513,7 +513,7 @@ WLAN_BAPWriteConnectionAcceptTimeout /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIWriteConnectionAcceptTimeout) @@ -604,7 +604,7 @@ WLAN_BAPReadLinkSupervisionTimeout /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIReadLinkSupervisionTimeout) || @@ -696,7 +696,7 @@ WLAN_BAPWriteLinkSupervisionTimeout /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIWriteLinkSupervisionTimeout) || @@ -788,7 +788,7 @@ WLAN_BAPReadLogicalLinkAcceptTimeout /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIEvent)) @@ -857,7 +857,7 @@ WLAN_BAPWriteLogicalLinkAcceptTimeout /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIWriteLogicalLinkAcceptTimeout) @@ -945,7 +945,7 @@ WLAN_BAPSetEventMaskPage2 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCISetEventMaskPage2) @@ -1020,7 +1020,7 @@ WLAN_BAPReadLocationData /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIEvent)) @@ -1102,7 +1102,7 @@ WLAN_BAPWriteLocationData /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIWriteLocationData) @@ -1183,7 +1183,7 @@ WLAN_BAPReadFlowControlMode /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIEvent)) @@ -1388,7 +1388,7 @@ WLAN_BAPSetShortRangeMode /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIEvent)) @@ -1529,7 +1529,7 @@ WLAN_BAPVendorSpecificCmd0 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIEvent)) @@ -1629,7 +1629,7 @@ WLAN_BAPVendorSpecificCmd1 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIEvent)) diff --git a/drivers/staging/prima/CORE/BAP/src/bapApiInfo.c b/drivers/staging/prima/CORE/BAP/src/bapApiInfo.c index 0463c4858f8..d2bc3c042c4 100644 --- a/drivers/staging/prima/CORE/BAP/src/bapApiInfo.c +++ b/drivers/staging/prima/CORE/BAP/src/bapApiInfo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -153,7 +153,7 @@ WLAN_BAPReadLocalVersionInfo } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Format the command complete event to return... */ @@ -229,7 +229,7 @@ WLAN_BAPReadLocalSupportedCmds } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Format the command complete event to return... */ @@ -295,7 +295,7 @@ WLAN_BAPReadBufferSize } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Format the command complete event to return... */ @@ -365,7 +365,7 @@ WLAN_BAPReadDataBlockSize } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Format the command complete event to return... */ @@ -526,7 +526,7 @@ WLAN_BAPDisconnect VOS_STATUS vosStatus; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_FATAL, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_FATAL, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if (btampHandle == NULL) @@ -592,7 +592,7 @@ v_BOOL_t WLAN_BAPSessionOn ptBtampContext btampContext = (ptBtampContext) btampHandle; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if (btampHandle == NULL) diff --git a/drivers/staging/prima/CORE/BAP/src/bapApiLinkCntl.c b/drivers/staging/prima/CORE/BAP/src/bapApiLinkCntl.c index e8efab2f272..bbf53b25f9e 100644 --- a/drivers/staging/prima/CORE/BAP/src/bapApiLinkCntl.c +++ b/drivers/staging/prima/CORE/BAP/src/bapApiLinkCntl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -865,12 +865,12 @@ WLAN_BAPPhysicalLinkCreate /* Validate params */ if ((pBapHCIPhysLinkCreate == NULL) || (NULL == btampContext)) { - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR, "%s: btampHandle value: %p, pBapHCIPhysLinkCreate is %p", + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR, "%s: btampHandle value: %pK, pBapHCIPhysLinkCreate is %pK", __func__, btampHandle, pBapHCIPhysLinkCreate); return VOS_STATUS_E_FAULT; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); if(DISCONNECTED != instanceVar->stateVar) { @@ -896,7 +896,7 @@ WLAN_BAPPhysicalLinkCreate &btampContext, /* Handle to return per assoc btampContext value in */ BT_INITIATOR); /* BT_INITIATOR */ - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %p", __func__, btampContext); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %pK", __func__, btampContext); /* Handle event */ vosStatus = btampFsm(btampContext, &bapEvent, &status); @@ -968,12 +968,12 @@ WLAN_BAPPhysicalLinkAccept /* Validate params */ if ((pBapHCIPhysLinkAccept == NULL) || (NULL == btampContext)) { - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR, "%s: btampHandle value: %p, pBapHCIPhysLinkAccept is %p", + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR, "%s: btampHandle value: %pK, pBapHCIPhysLinkAccept is %pK", __func__, btampHandle, pBapHCIPhysLinkAccept); return VOS_STATUS_E_FAULT; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); instanceVar = &(btampContext->bapPhysLinkMachine); if(DISCONNECTED != instanceVar->stateVar) @@ -1000,7 +1000,7 @@ WLAN_BAPPhysicalLinkAccept &btampContext, /* Handle to return per assoc btampContext value in */ BT_RESPONDER); /* BT_RESPONDER */ - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %p", __func__, btampContext); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %pK", __func__, btampContext); /* Handle event */ vosStatus = btampFsm(btampContext, &bapEvent, &status); @@ -1070,7 +1070,7 @@ WLAN_BAPPhysicalLinkDisconnect return VOS_STATUS_E_FAULT; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate the Physical link handle */ if (pBapHCIPhysLinkDisconnect->phy_link_handle != btampContext->phy_link_handle) @@ -1089,7 +1089,7 @@ WLAN_BAPPhysicalLinkDisconnect bapEvent.event = eWLAN_BAP_HCI_PHYSICAL_LINK_DISCONNECT; bapEvent.params = pBapHCIPhysLinkDisconnect; - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %p", __func__, btampContext); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %pK", __func__, btampContext); /* Handle event */ vosStatus = btampFsm(btampContext, &bapEvent, &status); @@ -1175,7 +1175,7 @@ WLAN_BAPLogicalLinkCreate } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate the BAP state to accept the logical link request Logical Link create/accept requests are allowed only in @@ -1365,7 +1365,7 @@ WLAN_BAPLogicalLinkAccept } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate the BAP state to accept the logical link request Logical Link create/accept requests are allowed only in @@ -1573,7 +1573,7 @@ WLAN_BAPLogicalLinkDisconnect #ifdef BAP_DEBUG /* Trace the tBtampCtx being passed in. */ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "WLAN BAP Context Monitor: btampContext value = %p in %s:%d", btampContext, __func__, __LINE__ ); + "WLAN BAP Context Monitor: btampContext value = %pK in %s:%d", btampContext, __func__, __LINE__ ); #endif //BAP_DEBUG bapHCIEvent.bapHCIEventCode = BTAMP_TLV_HCI_COMMAND_STATUS_EVENT; diff --git a/drivers/staging/prima/CORE/BAP/src/bapApiLinkSupervision.c b/drivers/staging/prima/CORE/BAP/src/bapApiLinkSupervision.c index 0dcd4c29a65..c2d08b69a84 100644 --- a/drivers/staging/prima/CORE/BAP/src/bapApiLinkSupervision.c +++ b/drivers/staging/prima/CORE/BAP/src/bapApiLinkSupervision.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -520,7 +520,7 @@ static VOS_STATUS WLANBAP_TxLinkSupervisionCB } } VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO, - "%s:Returned Vos Packet:%p\n", __func__, pPacket ); + "%s:Returned Vos Packet:%pK\n", __func__, pPacket ); vos_pkt_return_packet( pPacket ); diff --git a/drivers/staging/prima/CORE/BAP/src/bapApiStatus.c b/drivers/staging/prima/CORE/BAP/src/bapApiStatus.c index 27bb5dfd5bd..16b96fbd8ed 100644 --- a/drivers/staging/prima/CORE/BAP/src/bapApiStatus.c +++ b/drivers/staging/prima/CORE/BAP/src/bapApiStatus.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -246,7 +246,7 @@ WLAN_BAPReadLinkQuality /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIReadLinkQuality) || @@ -343,7 +343,7 @@ WLAN_BAPReadRSSI /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: btampHandle value: %p", __func__, btampHandle); + "%s: btampHandle value: %pK", __func__, btampHandle); /* Validate params */ if ((NULL == btampHandle) || (NULL == pBapHCIReadRSSI) || @@ -452,7 +452,7 @@ WLAN_BAPReadLocalAMPInfo return VOS_STATUS_E_FAULT; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Format the command complete event to return... */ @@ -564,7 +564,7 @@ WLAN_BAPReadLocalAMPAssoc return VOS_STATUS_E_FAULT; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "In %s, phy_link_handle = %d", __func__, @@ -801,13 +801,13 @@ WLAN_BAPWriteRemoteAMPAssoc return VOS_STATUS_E_FAULT; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %p", __func__, btampHandle); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampHandle value: %pK", __func__, btampHandle); /* Fill in the event structure */ bapEvent.event = eWLAN_BAP_HCI_WRITE_REMOTE_AMP_ASSOC; bapEvent.params = pBapHCIWriteRemoteAMPAssoc; - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %p", __func__, btampContext); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %pK", __func__, btampContext); /* Handle event */ vosStatus = btampFsm(btampContext, &bapEvent, &status); diff --git a/drivers/staging/prima/CORE/BAP/src/bapModule.c b/drivers/staging/prima/CORE/BAP/src/bapModule.c index 5cda7f5ac0b..dd0ab7e1815 100644 --- a/drivers/staging/prima/CORE/BAP/src/bapModule.c +++ b/drivers/staging/prima/CORE/BAP/src/bapModule.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -963,7 +963,7 @@ WLANBAP_CreateNewPhyLinkCtx *hBtampContext = pBtampCtx; VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR, - "Btamp Ctxt = %p", pBtampCtx); + "Btamp Ctxt = %pK", pBtampCtx); return VOS_STATUS_SUCCESS; #else // defined(BTAMP_MULTIPLE_PHY_LINKS) @@ -1098,7 +1098,7 @@ WLANBAP_CreateNewLogLinkCtx #ifdef BAP_DEBUG /* Trace the tBtampCtx being passed in. */ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "WLAN BAP Context Monitor: pBtampContext value = %p in %s:%d", pBtampContext, __func__, __LINE__ ); + "WLAN BAP Context Monitor: pBtampContext value = %pK in %s:%d", pBtampContext, __func__, __LINE__ ); #endif //BAP_DEBUG /*------------------------------------------------------------------------ diff --git a/drivers/staging/prima/CORE/BAP/src/btampFsm.c b/drivers/staging/prima/CORE/BAP/src/btampFsm.c index 183a7a25520..0e1c6f02252 100644 --- a/drivers/staging/prima/CORE/BAP/src/btampFsm.c +++ b/drivers/staging/prima/CORE/BAP/src/btampFsm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -191,7 +191,7 @@ bapSetKey( v_PVOID_t pvosGCtx, tCsrRoamSetKey *pSetKeyInfo ) return VOS_STATUS_E_FAULT; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %p", __func__, btampContext); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: btampContext value: %pK", __func__, btampContext); /* Fill in the event structure */ bapEvent.event = eWLAN_BAP_RSN_SUCCESS; @@ -1398,7 +1398,7 @@ signalHCIPhysLinkDiscEvent #ifdef BAP_DEBUG /* Trace the tBtampCtx being passed in. */ VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "WLAN BAP Context Monitor: btampContext value = %p in %s:%d", btampContext, __func__, __LINE__ ); + "WLAN BAP Context Monitor: btampContext value = %pK in %s:%d", btampContext, __func__, __LINE__ ); #endif //BAP_DEBUG /* Loop disconnecting all Logical Links on this Physical Link */ diff --git a/drivers/staging/prima/CORE/DXE/src/wlan_qct_dxe.c b/drivers/staging/prima/CORE/DXE/src/wlan_qct_dxe.c index de64b93c89e..6d87f2a91a1 100644 --- a/drivers/staging/prima/CORE/DXE/src/wlan_qct_dxe.c +++ b/drivers/staging/prima/CORE/DXE/src/wlan_qct_dxe.c @@ -955,7 +955,7 @@ static wpt_status dxeDescAllocAndLink } memset((wpt_uint8 *)currentDesc, 0, sizeof(WLANDXE_DescType)); HDXE_MSG(eWLAN_MODULE_DAL_DATA, eWLAN_PAL_TRACE_LEVEL_INFO_LOW, - "Allocated Descriptor VA %p, PA %p", currentDesc, physAddressAlloc); + "Allocated Descriptor VA %pK, PA %pK", currentDesc, physAddressAlloc); currentCtrlBlk->linkedDesc = currentDesc; currentCtrlBlk->linkedDescPhyAddr = physAddress; diff --git a/drivers/staging/prima/CORE/HDD/src/bap_hdd_main.c b/drivers/staging/prima/CORE/HDD/src/bap_hdd_main.c index af48daba32e..aa6e3b7936b 100644 --- a/drivers/staging/prima/CORE/HDD/src/bap_hdd_main.c +++ b/drivers/staging/prima/CORE/HDD/src/bap_hdd_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -484,7 +484,7 @@ static VOS_STATUS WLANBAP_STAFetchPktCB return VosStatus; } - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO, "%s: pVosPkt(vos_pkt_t *)=%p", __func__, + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO, "%s: pVosPkt(vos_pkt_t *)=%pK", __func__, pVosPkt ); VosStatus = WLANBAP_XlateTxDataPkt( pctx->bapHdl, pPhyCtx->PhyLinkHdl, @@ -508,7 +508,7 @@ static VOS_STATUS WLANBAP_STAFetchPktCB // provide the meta-info BAP provided previously *tlMetaInfo = TlMetaInfo; - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: *vosDataBuff(vos_pkt_t *)=%p", __func__, *vosDataBuff ); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: *vosDataBuff(vos_pkt_t *)=%pK", __func__, *vosDataBuff ); return(VOS_STATUS_SUCCESS); } // WLANBAP_STAFetchPktCB() @@ -665,7 +665,7 @@ static VOS_STATUS WLANBAP_TxCompCB BslClientCtxType* ppctx; static int num_packets; - VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO, "WLANBAP_TxCompCB. vosDataBuff(vos_pkt_t *)=%p", vosDataBuff ); + VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO, "WLANBAP_TxCompCB. vosDataBuff(vos_pkt_t *)=%pK", vosDataBuff ); // be aware that pHddHdl can be NULL or can point to the per association // BSL context from the register data plane. In either case it does not @@ -4128,7 +4128,7 @@ static int BSL_Write(struct sk_buff *skb) case HCI_ACLDATA_PKT: // Directly execute the data write VOS_TRACE(VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: HCI ACL data tx, skb=%p", + "%s: HCI ACL data tx, skb=%pK", __func__, skb); // ACL data hdev->stat.acl_tx++; @@ -4168,7 +4168,7 @@ static int BSL_Write(struct sk_buff *skb) bslWriteFinish); VOS_TRACE(VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: Scheduling work for skb %p, BT-AMP Client context %p, work %p", + "%s: Scheduling work for skb %pK, BT-AMP Client context %pK, work %pK", __func__, skb, pctx, pHciContext); status = schedule_work(&pHciContext->hciInterfaceProcessing); @@ -4232,7 +4232,7 @@ static void bslWriteFinish(struct work_struct *work) v_SIZE_t written = 0; VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_LOW, - "%s: Entered, context %p", + "%s: Entered, context %pK", __func__, pctx); // Sanity check inputs @@ -4299,7 +4299,7 @@ static void bslWriteFinish(struct work_struct *work) }; VOS_TRACE(VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: Freeing skb %p", + "%s: Freeing skb %pK", __func__, skb); consume_skb(skb); diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c index fa5be713707..d4a53e710e3 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c @@ -1019,7 +1019,7 @@ static void hdd_SendNewAPChannelInfo(struct net_device *dev, hdd_adapter_t *pAda if (descriptor == NULL) { hddLog(LOGE, - "%s: pCsrRoamInfo->pBssDesc=%p", + "%s: pCsrRoamInfo->pBssDesc=%pK", __func__, descriptor); return; } @@ -3744,7 +3744,7 @@ void iw_full_power_cbfn (void *pContext, eHalStatus status) if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pAdapter [%p]", + "%s: Bad param, pAdapter [%pK]", __func__, pAdapter); return; } @@ -4323,6 +4323,7 @@ static tANI_S32 hdd_ProcessGENIE(hdd_adapter_t *pAdapter, tDot11fIERSN dot11RSNIE; tDot11fIEWPA dot11WPAIE; tANI_U32 i; + tANI_U32 status; tANI_U8 *pRsnIe; tANI_U16 RSNIeLen; tPmkidCacheInfo PMKIDCache[4]; // Local transfer memory @@ -4348,10 +4349,17 @@ static tANI_S32 hdd_ProcessGENIE(hdd_adapter_t *pAdapter, pRsnIe = gen_ie + 2; RSNIeLen = gen_ie_len - 2; // Unpack the RSN IE - dot11fUnpackIeRSN((tpAniSirGlobal) halHandle, + status = dot11fUnpackIeRSN((tpAniSirGlobal) halHandle, pRsnIe, RSNIeLen, &dot11RSNIE); + if (DOT11F_FAILED(status)) + { + hddLog(LOGE, + FL("Parse failure in hdd_ProcessGENIE (0x%08x)"), + status); + return -EINVAL; + } // Copy out the encryption and authentication types hddLog(LOG1, FL("%s: pairwise cipher suite count: %d"), __func__, dot11RSNIE.pwise_cipher_suite_count ); diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c index a03d3f702a4..1404f3650e8 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -11763,15 +11763,24 @@ static int __wlan_hdd_cfg80211_add_key( struct wiphy *wiphy, return -EINVAL; } + if (CSR_MAX_RSC_LEN < params->seq_len) + { + hddLog(VOS_TRACE_LEVEL_ERROR,"%s: Invalid seq length %d", __func__, + params->seq_len); + + return -EINVAL; + } + hddLog(VOS_TRACE_LEVEL_INFO, - "%s: called with key index = %d & key length %d", - __func__, key_index, params->key_len); + "%s: called with key index = %d & key length %d & seq length %d", + __func__, key_index, params->key_len, params->seq_len); /*extract key idx, key len and key*/ vos_mem_zero(&setKey,sizeof(tCsrRoamSetKey)); setKey.keyId = key_index; setKey.keyLength = params->key_len; vos_mem_copy(&setKey.Key[0],params->key, params->key_len); + vos_mem_copy(&setKey.keyRsc[0], params->seq, params->seq_len); switch (params->cipher) { @@ -13230,7 +13239,7 @@ static eHalStatus hdd_cfg80211_scan_done_callback(tHalHandle halHandle, pScanInfo = &pHddCtx->scan_info; hddLog(VOS_TRACE_LEVEL_INFO, - "%s called with halHandle = %p, pContext = %p," + "%s called with halHandle = %pK, pContext = %pK," "scanID = %d, returned status = %d", __func__, halHandle, pContext, (int) scanId, (int) status); @@ -13423,7 +13432,7 @@ v_BOOL_t hdd_isConnectionInProgress(hdd_context_t *pHddCtx, v_U8_t *session_id, (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState)) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: %p(%d) Connection is in progress", __func__, + "%s: %pK(%d) Connection is in progress", __func__, WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), pAdapter->sessionId); if (session_id && reason) { @@ -13436,7 +13445,7 @@ v_BOOL_t hdd_isConnectionInProgress(hdd_context_t *pHddCtx, v_U8_t *session_id, smeNeighborMiddleOfRoaming(WLAN_HDD_GET_HAL_CTX(pAdapter))) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: %p(%d) Reassociation is in progress", __func__, + "%s: %pK(%d) Reassociation is in progress", __func__, WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), pAdapter->sessionId); if (session_id && reason) { @@ -17213,7 +17222,7 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device } if (!pmksa->bssid || !pmksa->pmkid) { - hddLog(LOGE, FL("pmksa->bssid(%p) or pmksa->pmkid(%p) is NULL"), + hddLog(LOGE, FL("pmksa->bssid(%pK) or pmksa->pmkid(%pK) is NULL"), pmksa->bssid, pmksa->pmkid); return -EINVAL; } diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_dev_pwr.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_dev_pwr.c index 275eeaf6d3e..a98d736bd6b 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_dev_pwr.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_dev_pwr.c @@ -584,7 +584,7 @@ void hddDevTmTxBlockTimeoutHandler(void *usrData) if ((NULL == staAdapater) || (WLAN_HDD_ADAPTER_MAGIC != staAdapater->magic)) { VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_ERROR, - FL("invalid Adapter %p"), staAdapater); + FL("invalid Adapter %pK"), staAdapater); VOS_ASSERT(0); return; } diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c index 83607cf04ba..b9ebac3cd57 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -660,7 +660,7 @@ void hdd_hostapd_inactivity_timer_cb(v_PVOID_t usrDataForCallback) if ((NULL == pHostapdAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pHostapdAdapter->magic)) { - hddLog(LOGE, FL("invalid adapter: %p"), pHostapdAdapter); + hddLog(LOGE, FL("invalid adapter: %pK"), pHostapdAdapter); return; } pHddCtx = WLAN_HDD_GET_CTX(pHostapdAdapter); @@ -3521,7 +3521,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev, /*Convert from 1-based to 0-based keying*/ key_index--; } - if(!ext->key_len) { + if(!ext->key_len || ext->key_len > CSR_MAX_KEY_LEN) { #if 0 /*Set the encrytion type to NONE*/ #if 0 @@ -3567,7 +3567,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev, retval = -EINVAL; } #endif - return retval; + return -EINVAL; } @@ -3576,9 +3576,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev, setKey.keyId = key_index; setKey.keyLength = ext->key_len; - if(ext->key_len <= CSR_MAX_KEY_LEN) { - vos_mem_copy(&setKey.Key[0],ext->key,ext->key_len); - } + vos_mem_copy(&setKey.Key[0],ext->key,ext->key_len); if(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) { /*Key direction for group is RX only*/ @@ -4940,7 +4938,7 @@ void hdd_sap_indicate_disconnect_for_sta(hdd_adapter_t *adapter) for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++) { if (sap_ctx->aStaInfo[staId].isUsed) { - hddLog(LOG1, FL("staId: %d isUsed: %d %p"), + hddLog(LOG1, FL("staId: %d isUsed: %d %pK"), staId, sap_ctx->aStaInfo[staId].isUsed, sap_ctx); diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c index c5fc30e3c4c..61cb89ca67e 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c @@ -1745,7 +1745,7 @@ static void hdd_batch_scan_result_ind_callback if ((NULL == pBatchScanRsp) || (NULL == pReq)) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - "%s: pBatchScanRsp is %p pReq %p", __func__, pBatchScanRsp, pReq); + "%s: pBatchScanRsp is %pK pReq %pK", __func__, pBatchScanRsp, pReq); isLastAp = TRUE; goto done; } @@ -1769,7 +1769,7 @@ static void hdd_batch_scan_result_ind_callback if (NULL == pScanList) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - "%s: pScanList is %p", __func__, pScanList); + "%s: pScanList is %pK", __func__, pScanList); isLastAp = TRUE; goto done; } @@ -1796,7 +1796,7 @@ static void hdd_batch_scan_result_ind_callback if (NULL == pApMetaInfo) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - "%s: pApMetaInfo is %p", __func__, pApMetaInfo); + "%s: pApMetaInfo is %pK", __func__, pApMetaInfo); isLastAp = TRUE; goto done; } @@ -6453,7 +6453,7 @@ static void hdd_GetTsmStatsCB( tAniTrafStrmMetrics tsmMetrics, const tANI_U32 st if (NULL == pContext) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pContext [%p]", + "%s: Bad param, pContext [%pK]", __func__, pContext); return; } @@ -6471,7 +6471,7 @@ static void hdd_GetTsmStatsCB( tAniTrafStrmMetrics tsmMetrics, const tANI_U32 st /* the caller presumably timed out so there is nothing we can do */ spin_unlock(&hdd_context_lock); hddLog(VOS_TRACE_LEVEL_WARN, - "%s: Invalid context, pAdapter [%p] magic [%08x]", + "%s: Invalid context, pAdapter [%pK] magic [%08x]", __func__, pAdapter, pStatsContext->magic); return; } @@ -8770,7 +8770,7 @@ void hdd_monPostMsgCb(tANI_U32 *magic, struct completion *cmpVar) { if (magic == NULL || cmpVar == NULL) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - FL("invalid arguments %p %p"), magic, cmpVar); + FL("invalid arguments %pK %pK"), magic, cmpVar); return; } if (*magic != MON_MODE_MSG_MAGIC) { @@ -10537,12 +10537,12 @@ static void hdd_full_power_callback(void *callbackContext, eHalStatus status) struct statsContext *pContext = callbackContext; hddLog(VOS_TRACE_LEVEL_INFO, - "%s: context = %p, status = %d", __func__, pContext, status); + "%s: context = %pK, status = %d", __func__, pContext, status); if (NULL == callbackContext) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, context [%p]", + "%s: Bad param, context [%pK]", __func__, callbackContext); return; } @@ -13418,7 +13418,7 @@ VOS_STATUS hdd_softap_sta_deauth(hdd_adapter_t *pAdapter, ENTER(); - hddLog(LOG1, "hdd_softap_sta_deauth:(%p, false)", + hddLog(LOG1, "hdd_softap_sta_deauth:(%pK, false)", (WLAN_HDD_GET_CTX(pAdapter))->pvosContext); //Ignore request to deauth bcmc station @@ -13506,7 +13506,7 @@ void hdd_softap_sta_disassoc(hdd_adapter_t *pAdapter,v_U8_t *pDestMacAddress) ENTER(); - hddLog( LOGE, "hdd_softap_sta_disassoc:(%p, false)", (WLAN_HDD_GET_CTX(pAdapter))->pvosContext); + hddLog( LOGE, "hdd_softap_sta_disassoc:(%pK, false)", (WLAN_HDD_GET_CTX(pAdapter))->pvosContext); //Ignore request to disassoc bcmc station if( pDestMacAddress[0] & 0x1 ) @@ -13521,7 +13521,7 @@ void hdd_softap_tkip_mic_fail_counter_measure(hdd_adapter_t *pAdapter,v_BOOL_t e ENTER(); - hddLog( LOGE, "hdd_softap_tkip_mic_fail_counter_measure:(%p, false)", (WLAN_HDD_GET_CTX(pAdapter))->pvosContext); + hddLog( LOGE, "hdd_softap_tkip_mic_fail_counter_measure:(%pK, false)", (WLAN_HDD_GET_CTX(pAdapter))->pvosContext); WLANSAP_SetCounterMeasure(pVosContext, (v_BOOL_t)enable); } @@ -13865,7 +13865,7 @@ static VOS_STATUS wlan_hdd_framework_restart(hdd_context_t *pHddCtx) if ((NULL == pAdapterNode) || (VOS_STATUS_SUCCESS != status)) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - FL("fail to get adapter: %p %d"), pAdapterNode, status); + FL("fail to get adapter: %pK %d"), pAdapterNode, status); goto end; } diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c index 3560af20603..01d722173a0 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c @@ -285,7 +285,7 @@ eHalStatus wlan_hdd_remain_on_channel_callback( tHalHandle hHal, void* pCtx, vos_mem_free(pRemainChanCtx->action_pkt_buff.frame_ptr); } hddLog( LOG1, FL( - "Freeing ROC ctx cfgState->remain_on_chan_ctx=%p"), + "Freeing ROC ctx cfgState->remain_on_chan_ctx=%pK"), cfgState->remain_on_chan_ctx); vos_mem_free( pRemainChanCtx ); pRemainChanCtx = NULL; @@ -492,7 +492,7 @@ void wlan_hdd_remain_on_chan_timeout(void *data) if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { - hddLog( LOGE, FL("pAdapter is invalid %p !!!"), pAdapter); + hddLog( LOGE, FL("pAdapter is invalid %pK !!!"), pAdapter); return; } pHddCtx = WLAN_HDD_GET_CTX( pAdapter ); @@ -599,7 +599,7 @@ static int wlan_hdd_p2p_start_remain_on_channel( hddLog(VOS_TRACE_LEVEL_ERROR, FL("Not able to initalize remain_on_chan timer")); hddLog( LOG1, FL( - "Freeing ROC ctx cfgState->remain_on_chan_ctx=%p"), + "Freeing ROC ctx cfgState->remain_on_chan_ctx=%pK"), cfgState->remain_on_chan_ctx); cfgState->remain_on_chan_ctx = NULL; vos_mem_free(pRemainChanCtx); @@ -643,7 +643,7 @@ static int wlan_hdd_p2p_start_remain_on_channel( mutex_lock(&pHddCtx->roc_lock); pRemainChanCtx = cfgState->remain_on_chan_ctx; hddLog( LOG1, FL( - "Freeing ROC ctx cfgState->remain_on_chan_ctx=%p"), + "Freeing ROC ctx cfgState->remain_on_chan_ctx=%pK"), cfgState->remain_on_chan_ctx); if (pRemainChanCtx) { @@ -687,7 +687,7 @@ static int wlan_hdd_p2p_start_remain_on_channel( mutex_lock(&pHddCtx->roc_lock); pRemainChanCtx = cfgState->remain_on_chan_ctx; hddLog( LOG1, FL( - "Freeing ROC ctx cfgState->remain_on_chan_ctx=%p"), + "Freeing ROC ctx cfgState->remain_on_chan_ctx=%pK"), cfgState->remain_on_chan_ctx); if (pRemainChanCtx) { @@ -852,7 +852,7 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy, schedule_delayed_work(&pAdapter->roc_work, msecs_to_jiffies(pHddCtx->cfg_ini->gP2PListenDeferInterval)); - hddLog(VOS_TRACE_LEVEL_INFO, "Defer interval is %hu, pAdapter %p", + hddLog(VOS_TRACE_LEVEL_INFO, "Defer interval is %hu, pAdapter %pK", pHddCtx->cfg_ini->gP2PListenDeferInterval, pAdapter); return 0; } @@ -2396,7 +2396,7 @@ void hdd_sendMgmtFrameOverMonitorIface( hdd_adapter_t *pMonAdapter, { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, "HDD [%d]: Insufficient headroom, " - "head[%p], data[%p], req[%d]", + "head[%pK], data[%pK], req[%d]", __LINE__, skb->head, skb->data, nFrameLength); kfree_skb(skb); return ; diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c index 3cc5b1d1970..33deb6d3bd6 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -626,7 +626,7 @@ static eHalStatus hdd_ScanRequestCallback(tHalHandle halHandle, void *pContext, ENTER(); - hddLog(LOGW,"%s called with halHandle = %p, pContext = %p, scanID = %d," + hddLog(LOGW,"%s called with halHandle = %pK, pContext = %pK, scanID = %d," " returned status = %d", __func__, halHandle, pContext, (int) scanId, (int) status); @@ -636,7 +636,7 @@ static eHalStatus hdd_ScanRequestCallback(tHalHandle halHandle, void *pContext, do some quick sanity before proceeding */ if (pAdapter->dev != dev) { - hddLog(LOGW, "%s: device mismatch %p vs %p", + hddLog(LOGW, "%s: device mismatch %pK vs %pK", __func__, pAdapter->dev, dev); return eHAL_STATUS_SUCCESS; } @@ -1014,7 +1014,7 @@ static eHalStatus hdd_CscanRequestCallback(tHalHandle halHandle, void *pContext, VOS_STATUS vos_status = VOS_STATUS_SUCCESS; ENTER(); - hddLog(LOG1,"%s called with halHandle = %p, pContext = %p, scanID = %d," + hddLog(LOG1,"%s called with halHandle = %pK, pContext = %pK, scanID = %d," " returned status = %d", __func__, halHandle, pContext, (int) scanId, (int) status); diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_softap_tx_rx.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_softap_tx_rx.c index 5a3f1de674b..edaba8f5af7 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_softap_tx_rx.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_softap_tx_rx.c @@ -73,10 +73,10 @@ #if 0 static void hdd_softap_dump_sk_buff(struct sk_buff * skb) { - VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: head = %p", __func__, skb->head); - //VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: data = %p", __func__, skb->data); - VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: tail = %p", __func__, skb->tail); - VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: end = %p", __func__, skb->end); + VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: head = %pK", __func__, skb->head); + //VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: data = %pK", __func__, skb->data); + VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: tail = %pK", __func__, skb->tail); + VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: end = %pK", __func__, skb->end); VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: len = %d", __func__, skb->len); VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: data_len = %d", __func__, skb->data_len); VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: mac_len = %d", __func__, skb->mac_len); @@ -1559,7 +1559,7 @@ VOS_STATUS hdd_softap_tx_low_resource_cbk( vos_pkt_t *pVosPacket, if (pAdapter == NULL || WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) { VOS_TRACE(VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR, - FL("Invalid adapter %p"), pAdapter); + FL("Invalid adapter %pK"), pAdapter); return VOS_STATUS_E_FAILURE; } pVosContext = (WLAN_HDD_GET_CTX(pAdapter))->pvosContext; diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tdls.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tdls.c index 460ffe5637f..78e113e02e0 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tdls.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tdls.c @@ -2367,7 +2367,7 @@ tANI_U16 wlan_hdd_tdlsConnectedPeers(hdd_adapter_t *pAdapter) if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - FL("invalid pAdapter: %p"), pAdapter); + FL("invalid pAdapter: %pK"), pAdapter); return 0; } pHddCtx = WLAN_HDD_GET_CTX(pAdapter); @@ -2625,7 +2625,7 @@ void wlan_hdd_tdls_check_bmps(hdd_adapter_t *pAdapter) if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - FL("invalid pAdapter: %p"), pAdapter); + FL("invalid pAdapter: %pK"), pAdapter); return; } @@ -3021,7 +3021,7 @@ void wlan_hdd_tdls_check_power_save_prohibited(hdd_adapter_t *pAdapter) if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - FL("invalid pAdapter: %p"), pAdapter); + FL("invalid pAdapter: %pK"), pAdapter); return; } diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tx_rx.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tx_rx.c index 00ba6f40a13..67a42e7a5dd 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tx_rx.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_tx_rx.c @@ -146,10 +146,10 @@ static struct sk_buff* hdd_mon_tx_fetch_pkt(hdd_adapter_t* pAdapter); //Utility function to dump an sk_buff static void dump_sk_buff(struct sk_buff * skb) { - VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: head = %p", __func__, skb->head); - VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: data = %p", __func__, skb->data); - VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: tail = %p", __func__, skb->tail); - VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: end = %p", __func__, skb->end); + VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: head = %pK", __func__, skb->head); + VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: data = %pK", __func__, skb->data); + VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: tail = %pK", __func__, skb->tail); + VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: end = %pK", __func__, skb->end); VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: len = %d", __func__, skb->len); VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: data_len = %d", __func__, skb->data_len); VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: mac_len = %d", __func__, skb->mac_len); @@ -1686,7 +1686,7 @@ VOS_STATUS hdd_tx_complete_cbk( v_VOID_t *vosContext, if (pAdapter == NULL || WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) { VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO, - "%s: Invalid adapter %p", __func__, pAdapter); + "%s: Invalid adapter %pK", __func__, pAdapter); } else { @@ -2010,7 +2010,7 @@ VOS_STATUS hdd_tx_fetch_packet_cbk( v_VOID_t *vosContext, if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR, - FL("invalid adapter:%p for staId:%u"), pAdapter, *pStaId); + FL("invalid adapter:%pK for staId:%u"), pAdapter, *pStaId); VOS_ASSERT(0); return VOS_STATUS_E_FAILURE; } @@ -2402,7 +2402,7 @@ VOS_STATUS hdd_tx_low_resource_cbk( vos_pkt_t *pVosPacket, if (NULL == pAdapter || WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) { VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR, - FL("Invalid adapter %p"), pAdapter); + FL("Invalid adapter %pK"), pAdapter); return VOS_STATUS_E_FAILURE; } @@ -2554,7 +2554,7 @@ VOS_STATUS hdd_rx_packet_monitor_cbk(v_VOID_t *vosContext,vos_pkt_t *pVosPacket if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) ) { VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR, - FL("Invalid adapter %p for MONITOR MODE"), pAdapter); + FL("Invalid adapter %pK for MONITOR MODE"), pAdapter); vos_pkt_return_packet( pVosPacket ); return VOS_STATUS_E_FAILURE; } @@ -2702,7 +2702,7 @@ VOS_STATUS hdd_rx_packet_cbk( v_VOID_t *vosContext, if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) ) { VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR, - FL("Invalid adapter %p for staId %u"), pAdapter, staId); + FL("Invalid adapter %pK for staId %u"), pAdapter, staId); return VOS_STATUS_E_FAILURE; } diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c index 2dba006adda..18b26fe40ee 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c @@ -909,14 +909,14 @@ static void hdd_GetRssiCB( v_S7_t rssi, tANI_U32 staId, void *pContext ) if (ioctl_debug) { - pr_info("%s: rssi [%d] STA [%d] pContext [%p]\n", + pr_info("%s: rssi [%d] STA [%d] pContext [%pK]\n", __func__, (int)rssi, (int)staId, pContext); } if (NULL == pContext) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pContext [%p]", + "%s: Bad param, pContext [%pK]", __func__, pContext); return; } @@ -935,11 +935,11 @@ static void hdd_GetRssiCB( v_S7_t rssi, tANI_U32 staId, void *pContext ) /* the caller presumably timed out so there is nothing we can do */ spin_unlock(&hdd_context_lock); hddLog(VOS_TRACE_LEVEL_WARN, - "%s: Invalid context, pAdapter [%p] magic [%08x]", + "%s: Invalid context, pAdapter [%pK] magic [%08x]", __func__, pAdapter, pStatsContext->magic); if (ioctl_debug) { - pr_info("%s: Invalid context, pAdapter [%p] magic [%08x]\n", + pr_info("%s: Invalid context, pAdapter [%pK] magic [%08x]\n", __func__, pAdapter, pStatsContext->magic); } return; @@ -972,14 +972,14 @@ static void hdd_GetSnrCB(tANI_S8 snr, tANI_U32 staId, void *pContext) if (ioctl_debug) { - pr_info("%s: snr [%d] STA [%d] pContext [%p]\n", + pr_info("%s: snr [%d] STA [%d] pContext [%pK]\n", __func__, (int)snr, (int)staId, pContext); } if (NULL == pContext) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pContext [%p]", + "%s: Bad param, pContext [%pK]", __func__, pContext); return; } @@ -998,11 +998,11 @@ static void hdd_GetSnrCB(tANI_S8 snr, tANI_U32 staId, void *pContext) /* the caller presumably timed out so there is nothing we can do */ spin_unlock(&hdd_context_lock); hddLog(VOS_TRACE_LEVEL_WARN, - "%s: Invalid context, pAdapter [%p] magic [%08x]", + "%s: Invalid context, pAdapter [%pK] magic [%08x]", __func__, pAdapter, pStatsContext->magic); if (ioctl_debug) { - pr_info("%s: Invalid context, pAdapter [%p] magic [%08x]\n", + pr_info("%s: Invalid context, pAdapter [%pK] magic [%08x]\n", __func__, pAdapter, pStatsContext->magic); } return; @@ -1257,14 +1257,14 @@ static void hdd_GetRoamRssiCB( v_S7_t rssi, tANI_U32 staId, void *pContext ) hdd_adapter_t *pAdapter; if (ioctl_debug) { - pr_info("%s: rssi [%d] STA [%d] pContext [%p]\n", + pr_info("%s: rssi [%d] STA [%d] pContext [%pK]\n", __func__, (int)rssi, (int)staId, pContext); } if (NULL == pContext) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pContext [%p]", + "%s: Bad param, pContext [%pK]", __func__, pContext); return; } @@ -1283,11 +1283,11 @@ static void hdd_GetRoamRssiCB( v_S7_t rssi, tANI_U32 staId, void *pContext ) /* the caller presumably timed out so there is nothing we can do */ spin_unlock(&hdd_context_lock); hddLog(VOS_TRACE_LEVEL_WARN, - "%s: Invalid context, pAdapter [%p] magic [%08x]", + "%s: Invalid context, pAdapter [%pK] magic [%08x]", __func__, pAdapter, pStatsContext->magic); if (ioctl_debug) { - pr_info("%s: Invalid context, pAdapter [%p] magic [%08x]\n", + pr_info("%s: Invalid context, pAdapter [%pK] magic [%08x]\n", __func__, pAdapter, pStatsContext->magic); } return; @@ -3331,7 +3331,7 @@ static void iw_power_callback_fn (void *pContext, eHalStatus status) if (NULL == pContext) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pContext [%p]", + "%s: Bad param, pContext [%pK]", __func__, pContext); return; } @@ -3397,14 +3397,14 @@ void hdd_GetClassA_statisticsCB(void *pStats, void *pContext) if (ioctl_debug) { - pr_info("%s: pStats [%p] pContext [%p]\n", + pr_info("%s: pStats [%pK] pContext [%pK]\n", __func__, pStats, pContext); } if ((NULL == pStats) || (NULL == pContext)) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pStats [%p] pContext [%p]", + "%s: Bad param, pStats [%pK] pContext [%pK]", __func__, pStats, pContext); return; } @@ -3424,11 +3424,11 @@ void hdd_GetClassA_statisticsCB(void *pStats, void *pContext) /* the caller presumably timed out so there is nothing we can do */ spin_unlock(&hdd_context_lock); hddLog(VOS_TRACE_LEVEL_WARN, - "%s: Invalid context, pAdapter [%p] magic [%08x]", + "%s: Invalid context, pAdapter [%pK] magic [%08x]", __func__, pAdapter, pStatsContext->magic); if (ioctl_debug) { - pr_info("%s: Invalid context, pAdapter [%p] magic [%08x]\n", + pr_info("%s: Invalid context, pAdapter [%pK] magic [%08x]\n", __func__, pAdapter, pStatsContext->magic); } return; @@ -3529,14 +3529,14 @@ static void hdd_get_station_statisticsCB(void *pStats, void *pContext) if (ioctl_debug) { - pr_info("%s: pStats [%p] pContext [%p]\n", + pr_info("%s: pStats [%pK] pContext [%pK]\n", __func__, pStats, pContext); } if ((NULL == pStats) || (NULL == pContext)) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pStats [%p] pContext [%p]", + "%s: Bad param, pStats [%pK] pContext [%pK]", __func__, pStats, pContext); return; } @@ -3556,11 +3556,11 @@ static void hdd_get_station_statisticsCB(void *pStats, void *pContext) /* the caller presumably timed out so there is nothing we can do */ spin_unlock(&hdd_context_lock); hddLog(VOS_TRACE_LEVEL_WARN, - "%s: Invalid context, pAdapter [%p] magic [%08x]", + "%s: Invalid context, pAdapter [%pK] magic [%08x]", __func__, pAdapter, pStatsContext->magic); if (ioctl_debug) { - pr_info("%s: Invalid context, pAdapter [%p] magic [%08x]\n", + pr_info("%s: Invalid context, pAdapter [%pK] magic [%08x]\n", __func__, pAdapter, pStatsContext->magic); } return; @@ -6532,7 +6532,7 @@ static void hdd_GetCurrentAntennaIndex(int antennaId, void *pContext) if (NULL == pContext) { hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Bad param, pContext [%p]", + "%s: Bad param, pContext [%pK]", __func__, pContext); return; } @@ -6547,7 +6547,7 @@ static void hdd_GetCurrentAntennaIndex(int antennaId, void *pContext) /* the caller presumably timed out so there is nothing we can do */ spin_unlock(&hdd_context_lock); hddLog(VOS_TRACE_LEVEL_WARN, - "%s: Invalid context, pAdapter [%p] magic [%08x]", + "%s: Invalid context, pAdapter [%pK] magic [%08x]", __func__, pAdapter, context->magic); return; } @@ -7760,7 +7760,7 @@ void hdd_wmm_tx_snapshot(hdd_adapter_t *pAdapter) spin_lock_bh( &pPeerInfo->ibssStaInfo[i].wmm_tx_queue[j].lock); hddLog(LOGE, - "HDD TxQueue Info For AC: %d Count: %d PrevAdress:%p, NextAddress:%p", + "HDD TxQueue Info For AC: %d Count: %d PrevAdress:%pK, NextAddress:%pK", j, pPeerInfo->ibssStaInfo[i].wmm_tx_queue[j].count, pPeerInfo->ibssStaInfo[i].wmm_tx_queue[j].anchor.prev, pPeerInfo->ibssStaInfo[i].wmm_tx_queue[j].anchor.next); @@ -11860,7 +11860,7 @@ int hdd_register_wext(struct net_device *dev) int hdd_UnregisterWext(struct net_device *dev) { - VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"In %s %p", __func__, dev); + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"In %s %pK", __func__, dev); if (dev != NULL) { rtnl_lock(); diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c index b91f0c8407f..2edcdb76143 100644 --- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c +++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c @@ -381,7 +381,7 @@ static void hdd_wmm_free_context (hdd_wmm_qos_context_t* pQosContext) } VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: Entered, context %p", + "%s: Entered, context %pK", __func__, pQosContext); // take the wmmLock since we're manipulating the context list @@ -444,7 +444,7 @@ static void hdd_wmm_notify_app (hdd_wmm_qos_context_t* pQosContext) } VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: Entered, context %p", + "%s: Entered, context %pK", __func__, pQosContext); mutex_lock(&pHddCtx->wmmLock); @@ -589,7 +589,7 @@ void hdd_wmm_inactivity_timer_cb( v_PVOID_t pUserData ) if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, - FL("invalid pAdapter: %p"), pAdapter); + FL("invalid pAdapter: %pK"), pAdapter); return; } @@ -759,7 +759,7 @@ static eHalStatus hdd_wmm_sme_callback (tHalHandle hHal, VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: Entered, context %p", + "%s: Entered, context %pK", __func__, pQosContext); mutex_lock(&pHddCtx->wmmLock); @@ -779,7 +779,7 @@ static eHalStatus hdd_wmm_sme_callback (tHalHandle hHal, pAc = &pAdapter->hddWmmStatus.wmmAcStatus[acType]; VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: status %d flowid %d info %p", + "%s: status %d flowid %d info %pK", __func__, smeStatus, qosFlowId, pCurrentQosInfo); switch (smeStatus) @@ -1455,7 +1455,7 @@ static void __hdd_wmm_do_implicit_qos(struct work_struct *work) } VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: Entered, context %p", + "%s: Entered, context %pK", __func__, pQosContext); mutex_lock(&pHddCtx->wmmLock); @@ -1474,7 +1474,7 @@ static void __hdd_wmm_do_implicit_qos(struct work_struct *work) pAc = &pAdapter->hddWmmStatus.wmmAcStatus[acType]; VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: pAdapter %p acType %d", + "%s: pAdapter %pK acType %d", __func__, pAdapter, acType); if (!pAc->wmmAcAccessNeeded) @@ -2468,7 +2468,7 @@ VOS_STATUS hdd_wmm_acquire_access( hdd_adapter_t* pAdapter, // we need to establish implicit QoS VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO, - "%s: Need to schedule implicit QoS for TL AC %d, pAdapter is %p", + "%s: Need to schedule implicit QoS for TL AC %d, pAdapter is %pK", __func__, acType, pAdapter); pAdapter->hddWmmStatus.wmmAcStatus[acType].wmmAcAccessNeeded = VOS_TRUE; @@ -2493,7 +2493,7 @@ VOS_STATUS hdd_wmm_acquire_access( hdd_adapter_t* pAdapter, hdd_wmm_do_implicit_qos); VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO, - "%s: Scheduling work for AC %d, context %p", + "%s: Scheduling work for AC %d, context %pK", __func__, acType, pQosContext); schedule_work(&pQosContext->wmmAcSetupImplicitQos); @@ -2960,7 +2960,7 @@ hdd_wlan_wmm_status_e hdd_wmm_addts( hdd_adapter_t* pAdapter, pQosContext->qosFlowId = 0; VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO, - "%s: Setting up QoS, context %p", + "%s: Setting up QoS, context %pK", __func__, pQosContext); mutex_lock(&pHddCtx->wmmLock); @@ -3095,7 +3095,7 @@ hdd_wlan_wmm_status_e hdd_wmm_delts( hdd_adapter_t* pAdapter, VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: found handle 0x%x, flow %d, AC %d, context %p", + "%s: found handle 0x%x, flow %d, AC %d, context %pK", __func__, handle, qosFlowId, acType, pQosContext); #ifndef WLAN_MDM_CODE_REDUCTION_OPT @@ -3203,7 +3203,7 @@ hdd_wlan_wmm_status_e hdd_wmm_checkts( hdd_adapter_t* pAdapter, if (pQosContext->handle == handle) { VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO_LOW, - "%s: found handle 0x%x, context %p", + "%s: found handle 0x%x, context %pK", __func__, handle, pQosContext); status = pQosContext->lastStatus; diff --git a/drivers/staging/prima/CORE/MAC/src/cfg/cfgProcMsg.c b/drivers/staging/prima/CORE/MAC/src/cfg/cfgProcMsg.c index 999bd5976b7..f14445764d1 100644 --- a/drivers/staging/prima/CORE/MAC/src/cfg/cfgProcMsg.c +++ b/drivers/staging/prima/CORE/MAC/src/cfg/cfgProcMsg.c @@ -2478,7 +2478,8 @@ ProcSetReqInternal(tpAniSirGlobal pMac, tANI_U16 length, tANI_U32 *pParam, tANI_ // Process string parameter else { - if (valueLenRoundedUp4 > length) + if ((valueLenRoundedUp4 > length) || + (valueLen > CFG_MAX_STR_LEN)) { PELOGE(cfgLog(pMac, LOGE, FL("Invalid string length %d" "in set param %d (tot %d)"), valueLen, diff --git a/drivers/staging/prima/CORE/MAC/src/include/dot11f.h b/drivers/staging/prima/CORE/MAC/src/include/dot11f.h index 022763ca058..cb3ec9cd14e 100644 --- a/drivers/staging/prima/CORE/MAC/src/include/dot11f.h +++ b/drivers/staging/prima/CORE/MAC/src/include/dot11f.h @@ -19,6 +19,11 @@ * PERFORMANCE OF THIS SOFTWARE. */ +/* + * This file was originally distributed by Qualcomm Atheros, Inc. + * under proprietary terms before Copyright ownership was assigned + * to the Linux Foundation. + */ #ifndef DOT11F_H #define DOT11F_H /** @@ -26,11 +31,8 @@ * * \brief Structures, function prototypes & definitions * for working with 802.11 Frames - * - * - * * This file was automatically generated by 'framesc' - * Thu Jul 20 10:59:48 2017 from the following file(s): + * Thu Dec 28 14:04:50 2017 from the following file(s): * * dot11f.frms * @@ -84,8 +86,8 @@ typedef tANI_U32 tDOT11F_U64[2]; #define DOT11F_BUFFER_OVERFLOW ( 0x10000005 ) #define DOT11F_MANDATORY_TLV_MISSING ( 0x00001000 ) #define DOT11F_FAILED(code) ( (code) & 0x10000000 ) +#define DOT11F_WARNED(code) ( ( ( 0 == (code) ) & 0x10000000 ) && code) #define DOT11F_SUCCEEDED(code) ( (code) == 0 ) -#define DOT11F_WARNED(code) (!DOT11F_SUCCEEDED(code) && !DOT11F_FAILED(code)) /********************************************************************* * Fixed Fields * @@ -5168,7 +5170,7 @@ typedef struct sDot11fIERSN { // N.B. These #defines do *not* include the EID & length #define DOT11F_IE_RSN_MIN_LEN ( 6 ) -#define DOT11F_IE_RSN_MAX_LEN ( 255 ) +#define DOT11F_IE_RSN_MAX_LEN ( 114 ) #ifdef __cplusplus extern "C" { @@ -7350,7 +7352,7 @@ typedef struct sDot11fRMC{ tDot11fFfRMCVersion RMCVersion; tDot11fFfAction Action; tDot11fFfRMCDialogToken RMCDialogToken; - tDot11fFfRuler Ruler; + tDot11fFfRuler Ruler; } tDot11fRMC; #define DOT11F_RMC ( 41 ) diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limAdmitControl.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limAdmitControl.c index 9f3cb9dd454..afcf20362de 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limAdmitControl.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limAdmitControl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -554,7 +554,7 @@ void limTspecDelete(tpAniSirGlobal pMac, tpLimTspecInfo pInfo) return; //pierre limLog(pMac, ADMIT_CONTROL_LOGLEVEL, FL("tspec entry = %d"), pInfo->idx); - limLog(pMac, ADMIT_CONTROL_LOGLEVEL, FL("delete tspec %p"), pInfo); + limLog(pMac, ADMIT_CONTROL_LOGLEVEL, FL("delete tspec %pK"), pInfo); pInfo->inuse = 0; // clear the hcca/parameterized queue indicator diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limApi.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limApi.c index 46f759a0182..c7634831d8f 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limApi.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limApi.c @@ -1383,6 +1383,7 @@ VOS_STATUS peHandleMgmtFrame( v_PVOID_t pvosGCtx, v_PVOID_t vosBuff) vos_pkt_t *pVosPkt; VOS_STATUS vosStatus; v_U8_t *pRxPacketInfo; + tANI_U16 frameLen; pVosPkt = (vos_pkt_t *)vosBuff; if (NULL == pVosPkt) @@ -1406,6 +1407,12 @@ VOS_STATUS peHandleMgmtFrame( v_PVOID_t pvosGCtx, v_PVOID_t vosBuff) return VOS_STATUS_E_FAILURE; } + frameLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo); + if (frameLen > WDA_MAX_MGMT_MPDU_LEN) { + PELOG1(limLog(pMac, LOG1, FL("Dropping frame of len %d"), frameLen)); + vos_pkt_return_packet(pVosPkt); + return VOS_STATUS_E_FAILURE; + } // // The MPDU header is now present at a certain "offset" in @@ -1415,7 +1422,7 @@ VOS_STATUS peHandleMgmtFrame( v_PVOID_t pvosGCtx, v_PVOID_t vosBuff) if(mHdr->fc.type == SIR_MAC_MGMT_FRAME) { PELOG1(limLog( pMac, LOG1, - FL ( "RxBd=%p mHdr=%p Type: %d Subtype: %d Sizes:FC%d Mgmt%d"), + FL ( "RxBd=%pK mHdr=%pK Type: %d Subtype: %d Sizes:FC%d Mgmt%d"), pRxPacketInfo, mHdr, mHdr->fc.type, mHdr->fc.subType, sizeof(tSirMacFrameCtl), sizeof(tSirMacMgmtHdr) );) #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limFT.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limFT.c index 7a60cac737e..1c5c17ac002 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limFT.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limFT.c @@ -72,7 +72,7 @@ void limFTCleanup(tpAniSirGlobal pMac) if (pMac->ft.ftPEContext.pFTPreAuthReq) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Freeing pFTPreAuthReq= %p", + PELOGE(limLog( pMac, LOGE, "%s: Freeing pFTPreAuthReq= %pK", __func__, pMac->ft.ftPEContext.pFTPreAuthReq);) #endif if (pMac->ft.ftPEContext.pFTPreAuthReq->pbssDescription) @@ -89,7 +89,7 @@ void limFTCleanup(tpAniSirGlobal pMac) if (pMac->ft.ftPEContext.psavedsessionEntry) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Setting psavedsessionEntry= %p to NULL", + PELOGE(limLog( pMac, LOGE, "%s: Setting psavedsessionEntry= %pK to NULL", __func__, pMac->ft.ftPEContext.psavedsessionEntry);) #endif pMac->ft.ftPEContext.psavedsessionEntry = NULL; @@ -106,7 +106,7 @@ void limFTCleanup(tpAniSirGlobal pMac) peDeleteSession(pMac, pMac->ft.ftPEContext.pftSessionEntry); } #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Setting pftSessionEntry= %p to NULL", + PELOGE(limLog( pMac, LOGE, "%s: Setting pftSessionEntry= %pK to NULL", __func__, pMac->ft.ftPEContext.pftSessionEntry);) #endif pMac->ft.ftPEContext.pftSessionEntry = NULL; @@ -136,7 +136,7 @@ void limFTInit(tpAniSirGlobal pMac) if (pMac->ft.ftPEContext.pFTPreAuthReq) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Freeing pFTPreAuthReq= %p", + PELOGE(limLog( pMac, LOGE, "%s: Freeing pFTPreAuthReq= %pK", __func__, pMac->ft.ftPEContext.pFTPreAuthReq);) #endif if (pMac->ft.ftPEContext.pFTPreAuthReq->pbssDescription) @@ -154,7 +154,7 @@ void limFTInit(tpAniSirGlobal pMac) if (pMac->ft.ftPEContext.psavedsessionEntry) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Setting psavedsessionEntry= %p to NULL", + PELOGE(limLog( pMac, LOGE, "%s: Setting psavedsessionEntry= %pK to NULL", __func__, pMac->ft.ftPEContext.psavedsessionEntry);) #endif pMac->ft.ftPEContext.psavedsessionEntry = NULL; @@ -166,7 +166,7 @@ void limFTInit(tpAniSirGlobal pMac) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Deleting session = %p ", + PELOGE(limLog( pMac, LOGE, "%s: Deleting session = %pK ", __func__, pMac->ft.ftPEContext.pftSessionEntry);) #endif /* Delete the previous valid preauth pesession if it is still in @@ -191,7 +191,7 @@ void limFTInit(tpAniSirGlobal pMac) if (pMac->ft.ftPEContext.pAddBssReq) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Freeing AddBssReq = %p ", + PELOGE(limLog( pMac, LOGE, "%s: Freeing AddBssReq = %pK ", __func__, pMac->ft.ftPEContext.pAddBssReq);) #endif vos_mem_free(pMac->ft.ftPEContext.pAddBssReq); @@ -202,7 +202,7 @@ void limFTInit(tpAniSirGlobal pMac) if (pMac->ft.ftPEContext.pAddStaReq) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOGE, "%s: Freeing AddStaReq = %p ", + PELOGE(limLog( pMac, LOGE, "%s: Freeing AddStaReq = %pK ", __func__, pMac->ft.ftPEContext.pAddStaReq);) #endif vos_mem_free(pMac->ft.ftPEContext.pAddStaReq); @@ -303,14 +303,14 @@ int limProcessFTPreAuthReq(tpAniSirGlobal pMac, tpSirMsgQ pMsg) { // Need to suspend link only if the channels are different limLog(pMac, LOG1, FL(" Performing pre-auth on different" - " channel (session %p)"), psessionEntry); + " channel (session %pK)"), psessionEntry); limSuspendLink(pMac, eSIR_CHECK_ROAMING_SCAN, FTPreAuthSuspendLinkHandler, (tANI_U32 *)psessionEntry); } else { limLog(pMac, LOG1, FL(" Performing pre-auth on same" - " channel (session %p)"), psessionEntry); + " channel (session %pK)"), psessionEntry); // We are in the same channel. Perform pre-auth limPerformFTPreAuth(pMac, eHAL_STATUS_SUCCESS, NULL, psessionEntry); } @@ -349,7 +349,7 @@ void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data, #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG limLog(pMac, LOG1, FL("Entered wait auth2 state for FT" - " (old session %p)"), + " (old session %pK)"), pMac->ft.ftPEContext.psavedsessionEntry); #endif @@ -1097,7 +1097,7 @@ void limPostFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status, } #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - PELOGE(limLog( pMac, LOG1, FL("Auth Rsp = %p"), pFTPreAuthRsp);) + PELOGE(limLog( pMac, LOG1, FL("Auth Rsp = %pK"), pFTPreAuthRsp);) #endif vos_mem_zero(pFTPreAuthRsp, rspLen); @@ -1222,7 +1222,7 @@ void limHandleFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status, pftSessionEntry->limPrevSmeState = pftSessionEntry->limSmeState; pftSessionEntry->limSmeState = eLIM_SME_WT_REASSOC_STATE; pMac->ft.ftPEContext.pftSessionEntry = pftSessionEntry; - PELOGE(limLog(pMac, LOG1,"%s:created session (%p) with id = %d", + PELOGE(limLog(pMac, LOG1,"%s:created session (%pK) with id = %d", __func__, pftSessionEntry, pftSessionEntry->peSessionId);) /* Update the ReAssoc BSSID of the current session */ @@ -1438,7 +1438,7 @@ void limProcessFTPreauthRspTimeout(tpAniSirGlobal pMac) pMac->ft.ftPEContext.pFTPreAuthReq->bPreAuthRspProcessed) { limLog(pMac,LOGE,FL("Auth rsp already posted to SME" - " (session %p)"), psessionEntry); + " (session %pK)"), psessionEntry); return; } else @@ -1451,7 +1451,7 @@ void limProcessFTPreauthRspTimeout(tpAniSirGlobal pMac) * limProcessAuthFrameNoSession. */ limLog(pMac,LOG1,FL("Auth rsp not yet posted to SME" - " (session %p)"), psessionEntry); + " (session %pK)"), psessionEntry); pMac->ft.ftPEContext.pFTPreAuthReq->bPreAuthRspProcessed = eANI_BOOLEAN_TRUE; } diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c index 36b7a68a8b1..e402ece802e 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limLinkMonitoringAlgo.c @@ -309,7 +309,7 @@ limTriggerSTAdeletion(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession pse pStaDs->sta_deletion_in_progress) { /* Already in the process of deleting context for the peer */ limLog(pMac, LOG1, - FL("Deletion is in progress (%d) for peer:%p in mlmState %d"), + FL("Deletion is in progress (%d) for peer:%pK in mlmState %d"), pStaDs->sta_deletion_in_progress, pStaDs->staAddr, pStaDs->mlmStaContext.mlmState); return; diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limLogDump.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limLogDump.c index 9280c7d1c0f..af5c95e2599 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limLogDump.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limLogDump.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -2142,7 +2142,7 @@ dump_lim_ft_event( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 a p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x\n", __func__, psessionEntry->bssId[0], psessionEntry->bssId[1], psessionEntry->bssId[2]); - p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x %p\n", __func__, + p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x %pK\n", __func__, pftPreAuthReq->currbssId[0], pftPreAuthReq->currbssId[1], pftPreAuthReq->currbssId[2], pftPreAuthReq); diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limP2P.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limP2P.c index b420404340e..988e235c8b2 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limP2P.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limP2P.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014, 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -896,7 +896,7 @@ void limSetHtCaps(tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U8 *pIeSt pIe = limGetIEPtr(pMac,pIeStartPtr, nBytes, DOT11F_EID_HTCAPS,ONE_BYTE); - limLog( pMac, LOG2, FL("pIe %p dot11HtCap.supportedMCSSet[0]=0x%x"), + limLog( pMac, LOG2, FL("pIe %pK dot11HtCap.supportedMCSSet[0]=0x%x"), pIe, dot11HtCap.supportedMCSSet[0]); if(pIe) { @@ -1110,7 +1110,7 @@ void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg) } nBytes += noaLen; limLog( pMac, LOGE, - FL("noaLen=%d origLen=%d pP2PIe=%p" + FL("noaLen=%d origLen=%d pP2PIe=%pK" " nBytes=%d nBytesToCopy=%zu"), noaLen,origLen, pP2PIe, nBytes, ((pP2PIe + origLen + 2) - (v_U8_t *)pMbMsg->data)); diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c index 1a35da774c5..a742abe0545 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c @@ -284,7 +284,8 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse goto free; } - if (frameLen < LIM_ENCR_AUTH_BODY_LEN_SAP) + if ((frameLen < LIM_ENCR_AUTH_BODY_LEN_SAP) || + (frameLen > LIM_ENCR_AUTH_BODY_LEN)) { // Log error limLog(pMac, LOGE, @@ -1918,14 +1919,14 @@ tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pBd, vo * pre-auth. */ PELOGE(limLog(pMac,LOG1,"Auth rsp already posted to SME" - " (session %p, FT session %p)", psessionEntry, + " (session %pK, FT session %pK)", psessionEntry, pMac->ft.ftPEContext.pftSessionEntry);); return eSIR_SUCCESS; } else { PELOGE(limLog(pMac,LOGW,"Auth rsp not yet posted to SME" - " (session %p, FT session %p)", psessionEntry, + " (session %pK, FT session %pK)", psessionEntry, pMac->ft.ftPEContext.pftSessionEntry);); pMac->ft.ftPEContext.pFTPreAuthReq->bPreAuthRspProcessed = eANI_BOOLEAN_TRUE; diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c index d0eab9bab7b..acfa6b25b70 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c @@ -274,7 +274,7 @@ limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_ if( pMac->lim.gpLimSuspendCallback || pMac->lim.gLimSystemInScanLearnMode ) { - limLog( pMac, LOGE, FL("Something is wrong, SuspendLinkCbk:%p " + limLog( pMac, LOGE, FL("Something is wrong, SuspendLinkCbk:%pK " "IsSystemInScanLearnMode:%d"), pMac->lim.gpLimSuspendCallback, pMac->lim.gLimSystemInScanLearnMode ); callback( pMac, eHAL_STATUS_FAILURE, data ); diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c index 1393690c514..b799715e3f2 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c @@ -957,7 +957,7 @@ limProcessMlmReassocCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) */ if (pMac->ft.ftPEContext.pFTPreAuthReq) { - limLog(pMac, LOG1, "%s: Freeing pFTPreAuthReq= %p", __func__, + limLog(pMac, LOG1, "%s: Freeing pFTPreAuthReq= %pK", __func__, pMac->ft.ftPEContext.pFTPreAuthReq); if (pMac->ft.ftPEContext.pFTPreAuthReq->pbssDescription) { diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limRMC.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limRMC.c index 86b302e2a0f..5d29ac40ced 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limRMC.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limRMC.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -119,7 +119,7 @@ __rmcGroupInsertHashEntry(tpAniSirGlobal pMac, tSirMacAddr transmitter) { entry = (tLimRmcGroupContext *)vos_mem_malloc(sizeof(*entry)); - PELOG1(limLog(pMac, LOG1, FL("RMC: Hash Insert:new entry %p"), entry);) + PELOG1(limLog(pMac, LOG1, FL("RMC: Hash Insert:new entry %pK"), entry);) if (entry) { @@ -186,7 +186,7 @@ __rmcGroupDeleteHashEntry(tpAniSirGlobal pMac, tSirMacAddr transmitter) prev->next = entry->next; } - PELOG1(limLog(pMac, LOG1, FL("RMC: Hash Delete: entry %p " + PELOG1(limLog(pMac, LOG1, FL("RMC: Hash Delete: entry %pK " " transmitter " MAC_ADDRESS_STR), entry MAC_ADDR_ARRAY(transmitter));) diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c index 8b3d3e32c60..8c4dad56838 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c @@ -433,7 +433,7 @@ limDeletePreAuthNode(tpAniSirGlobal pMac, tSirMacAddr macAddr) limLog(pMac, LOG1, FL(" first node to delete")); limLog(pMac, LOG1, - FL(" Release data entry:%p idx %d peer: " MAC_ADDRESS_STR), + FL(" Release data entry:%pK idx %d peer: " MAC_ADDRESS_STR), pTempNode, pTempNode->authNodeIdx, MAC_ADDR_ARRAY(macAddr)); limReleasePreAuthNode(pMac, pTempNode); @@ -455,7 +455,7 @@ limDeletePreAuthNode(tpAniSirGlobal pMac, tSirMacAddr macAddr) limLog(pMac, LOG1, FL(" subsequent node to delete")); limLog(pMac, LOG1, - FL("Release data entry: %p id %d peer: "MAC_ADDRESS_STR), + FL("Release data entry: %pK id %d peer: "MAC_ADDRESS_STR), pTempNode, pTempNode->authNodeIdx, MAC_ADDR_ARRAY(macAddr)); limReleasePreAuthNode(pMac, pTempNode); diff --git a/drivers/staging/prima/CORE/SAP/src/sapChSelect.c b/drivers/staging/prima/CORE/SAP/src/sapChSelect.c index dda7fa19561..7bf6090f74c 100644 --- a/drivers/staging/prima/CORE/SAP/src/sapChSelect.c +++ b/drivers/staging/prima/CORE/SAP/src/sapChSelect.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014, 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -580,7 +580,9 @@ v_U32_t sapweightRssiCount(v_S7_t rssi, v_U16_t count) SIDE EFFECTS ============================================================================*/ -void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) +void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh, + tSapSpectChInfo *spect_ch_strt_addr, + tSapSpectChInfo *spect_ch_end_addr) { tSapSpectChInfo *pExtSpectCh = NULL; v_S31_t rssi; @@ -596,7 +598,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) { case CHANNEL_1: pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -609,7 +613,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -622,7 +628,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -635,7 +643,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -651,7 +661,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) case CHANNEL_2: pExtSpectCh = (pSpectCh - 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -664,7 +676,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -677,7 +691,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -690,7 +706,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -703,7 +721,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -718,7 +738,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) break; case CHANNEL_3: pExtSpectCh = (pSpectCh - 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -731,7 +753,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -744,7 +768,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -757,7 +783,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -770,7 +798,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -783,7 +813,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -798,7 +830,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) break; case CHANNEL_4: pExtSpectCh = (pSpectCh - 3); - if(pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -811,7 +845,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -824,7 +860,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -837,7 +875,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -850,7 +890,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -863,7 +905,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -876,7 +920,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -894,7 +940,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) case CHANNEL_6: case CHANNEL_7: pExtSpectCh = (pSpectCh - 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -907,7 +955,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -920,7 +970,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -933,7 +985,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 1); - if(pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -946,7 +1000,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -959,7 +1015,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if(pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -972,7 +1030,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 3); - if(pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -985,7 +1045,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1001,7 +1063,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) case CHANNEL_8: pExtSpectCh = (pSpectCh - 4); - if(pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1015,7 +1079,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) } pExtSpectCh = (pSpectCh - 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1028,7 +1094,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1041,7 +1109,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1054,7 +1124,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1067,7 +1139,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1080,7 +1154,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1096,7 +1172,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) case CHANNEL_9: pExtSpectCh = (pSpectCh - 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1110,7 +1188,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) } pExtSpectCh = (pSpectCh - 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1123,7 +1203,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1136,7 +1218,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1149,7 +1233,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1162,7 +1248,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1178,7 +1266,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) case CHANNEL_10: pExtSpectCh = (pSpectCh - 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1192,7 +1282,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) } pExtSpectCh = (pSpectCh - 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1205,7 +1297,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if(pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1218,7 +1312,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1231,7 +1327,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1247,7 +1345,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) case CHANNEL_11: pExtSpectCh = (pSpectCh - 1); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1260,7 +1360,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1273,7 +1375,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 3); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1286,7 +1390,9 @@ void sapInterferenceRssiCount(tSapSpectChInfo *pSpectCh) pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 4); - if (pExtSpectCh != NULL) + if (pExtSpectCh != NULL && + (pExtSpectCh >= spect_ch_strt_addr && + pExtSpectCh < spect_ch_end_addr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + @@ -1345,6 +1451,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, v_U32_t ieLen = 0; tSirProbeRespBeacon *pBeaconStruct; tpAniSirGlobal pMac = (tpAniSirGlobal) halHandle; + tSapSpectChInfo *pSpectChStartAddr = pSpectInfoParams->pSpectCh; + tSapSpectChInfo *pSpectChEndAddr = + pSpectInfoParams->pSpectCh + pSpectInfoParams->numSpectChans; pBeaconStruct = vos_mem_malloc(sizeof(tSirProbeRespBeacon)); if ( NULL == pBeaconStruct ) @@ -1428,7 +1537,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, tSapSpectChInfo *pExtSpectCh = NULL; case PHY_DOUBLE_CHANNEL_LOW_PRIMARY: // Above the Primary Channel pExtSpectCh = (pSpectCh + 1); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; @@ -1444,7 +1555,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, case PHY_DOUBLE_CHANNEL_HIGH_PRIMARY: // Below the Primary channel pExtSpectCh = (pSpectCh - 1); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; if (IS_RSSI_VALID(pExtSpectCh->rssiAgr, rssi)) @@ -1463,7 +1576,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, { tSapSpectChInfo *pExtSpectCh = NULL; pExtSpectCh = (pSpectCh + 1); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; @@ -1475,7 +1590,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND2_RSSI_EFFECT_PRIMARY; @@ -1487,7 +1604,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 3); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND3_RSSI_EFFECT_PRIMARY; @@ -1503,7 +1622,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, { tSapSpectChInfo *pExtSpectCh = NULL; pExtSpectCh = (pSpectCh - 1 ); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; @@ -1515,7 +1636,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; @@ -1527,7 +1650,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 2); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND2_RSSI_EFFECT_PRIMARY; @@ -1543,7 +1668,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, { tSapSpectChInfo *pExtSpectCh = NULL; pExtSpectCh = (pSpectCh - 1 ); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; @@ -1555,7 +1682,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND2_RSSI_EFFECT_PRIMARY; @@ -1567,7 +1696,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh + 1); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; @@ -1583,7 +1714,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, { tSapSpectChInfo *pExtSpectCh = NULL; pExtSpectCh = (pSpectCh - 1 ); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND1_RSSI_EFFECT_PRIMARY; @@ -1595,7 +1728,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 2); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND2_RSSI_EFFECT_PRIMARY; @@ -1607,7 +1742,9 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, pExtSpectCh->rssiAgr = SOFTAP_MIN_RSSI; } pExtSpectCh = (pSpectCh - 3); - if(pExtSpectCh != NULL) + if( pExtSpectCh != NULL && + (pExtSpectCh >= pSpectChStartAddr && + pExtSpectCh < pSpectChEndAddr)) { ++pExtSpectCh->bssCount; rssi = pSpectCh->rssiAgr + SAP_SUBBAND3_RSSI_EFFECT_PRIMARY; @@ -1624,11 +1761,12 @@ void sapComputeSpectWeight( tSapChSelSpectInfo* pSpectInfoParams, } else if(operatingBand == eSAP_RF_SUBBAND_2_4_GHZ) { - sapInterferenceRssiCount(pSpectCh); + sapInterferenceRssiCount(pSpectCh, pSpectChStartAddr, + pSpectChEndAddr); } VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, - "In %s, bssdes.ch_self=%d, bssdes.ch_ID=%d, bssdes.rssi=%d, SpectCh.bssCount=%d, pScanResult=%p, ChannelWidth %d, secondaryChanOffset %d, center frequency %d ", + "In %s, bssdes.ch_self=%d, bssdes.ch_ID=%d, bssdes.rssi=%d, SpectCh.bssCount=%d, pScanResult=%pK, ChannelWidth %d, secondaryChanOffset %d, center frequency %d ", __func__, pScanResult->BssDescriptor.channelIdSelf, pScanResult->BssDescriptor.channelId, pScanResult->BssDescriptor.rssi, pSpectCh->bssCount, pScanResult,pSpectCh->channelWidth,secondaryChannelOffset,centerFreq); pSpectCh++; break; diff --git a/drivers/staging/prima/CORE/SAP/src/sapModule.c b/drivers/staging/prima/CORE/SAP/src/sapModule.c index 5376ce60789..d2d425985d3 100644 --- a/drivers/staging/prima/CORE/SAP/src/sapModule.c +++ b/drivers/staging/prima/CORE/SAP/src/sapModule.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -452,7 +452,7 @@ WLANSAP_CleanCB pSapCtx->sapsMachine= eSAP_DISCONNECTED; - VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: Initializing State: %d, sapContext value = %p", + VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH, "%s: Initializing State: %d, sapContext value = %pK", __func__, pSapCtx->sapsMachine, pSapCtx); pSapCtx->sessionId = 0; pSapCtx->channel = 0; @@ -2095,7 +2095,7 @@ VOS_STATUS WLANSAP_SendAction( v_PVOID_t pvosGCtx, const tANI_U8 *pBuf, if( ( NULL == hHal ) || ( eSAP_TRUE != pSapCtx->isSapSessionOpen ) ) { VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, - "%s: HAL pointer (%p) NULL OR SME session is not open (%d)", + "%s: HAL pointer (%pK) NULL OR SME session is not open (%d)", __func__, hHal, pSapCtx->isSapSessionOpen ); return VOS_STATUS_E_FAULT; } @@ -2163,7 +2163,7 @@ VOS_STATUS WLANSAP_RemainOnChannel( v_PVOID_t pvosGCtx, if( ( NULL == hHal ) || ( eSAP_TRUE != pSapCtx->isSapSessionOpen ) ) { VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, - "%s: HAL pointer (%p) NULL OR SME session is not open (%d)", + "%s: HAL pointer (%pK) NULL OR SME session is not open (%d)", __func__, hHal, pSapCtx->isSapSessionOpen ); return VOS_STATUS_E_FAULT; } @@ -2222,7 +2222,7 @@ VOS_STATUS WLANSAP_CancelRemainOnChannel( v_PVOID_t pvosGCtx ) if ((NULL == hHal) || (eSAP_TRUE != pSapCtx->isSapSessionOpen)) { VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, - "%s: HAL pointer (%p) NULL OR SME session is not open (%d)", + "%s: HAL pointer (%pK) NULL OR SME session is not open (%d)", __func__, hHal, pSapCtx->isSapSessionOpen ); return VOS_STATUS_E_FAULT; } @@ -2284,7 +2284,7 @@ VOS_STATUS WLANSAP_RegisterMgmtFrame( v_PVOID_t pvosGCtx, tANI_U16 frameType, if( ( NULL == hHal ) || ( eSAP_TRUE != pSapCtx->isSapSessionOpen ) ) { VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, - "%s: HAL pointer (%p) NULL OR SME session is not open (%d)", + "%s: HAL pointer (%pK) NULL OR SME session is not open (%d)", __func__, hHal, pSapCtx->isSapSessionOpen ); return VOS_STATUS_E_FAULT; } @@ -2349,7 +2349,7 @@ VOS_STATUS WLANSAP_DeRegisterMgmtFrame( v_PVOID_t pvosGCtx, tANI_U16 frameType, if( ( NULL == hHal ) || ( eSAP_TRUE != pSapCtx->isSapSessionOpen ) ) { VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR, - "%s: HAL pointer (%p) NULL OR SME session is not open (%d)", + "%s: HAL pointer (%pK) NULL OR SME session is not open (%d)", __func__, hHal, pSapCtx->isSapSessionOpen ); return VOS_STATUS_E_FAULT; } diff --git a/drivers/staging/prima/CORE/SME/src/QoS/sme_Qos.c b/drivers/staging/prima/CORE/SME/src/QoS/sme_Qos.c index a4fb0437f95..3b01d8ea829 100644 --- a/drivers/staging/prima/CORE/SME/src/QoS/sme_Qos.c +++ b/drivers/staging/prima/CORE/SME/src/QoS/sme_Qos.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1418,7 +1418,7 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, pentry->tspec_mask = pACInfo->tspec_mask_status; pentry->QoSInfo = Tspec_Info; VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Creating entry on session %d at %p with flowID %d", + "%s: %d: Creating entry on session %d at %pK with flowID %d", __func__, __LINE__, sessionId, pentry, QosFlowID); csrLLInsertTail(&sme_QosCb.flow_list, &pentry->link, VOS_TRUE); @@ -1748,7 +1748,7 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, pentry->tspec_mask = tmask; pentry->QoSInfo = Tspec_Info; VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: On session %d creating entry at %p with flowID %d", + "%s: %d: On session %d creating entry at %pK with flowID %d", __func__, __LINE__, sessionId, pentry, QosFlowID); csrLLInsertTail(&sme_QosCb.flow_list, &pentry->link, VOS_TRUE); @@ -2009,7 +2009,7 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, flow_info->reason = SME_QOS_REASON_MODIFY; VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, "%s: %d: On session %d creating modified " - "entry at %p with flowID %d", + "entry at %pK with flowID %d", __func__, __LINE__, sessionId, pNewEntry, pNewEntry->QosFlowID); //add the new entry under construction to the Flow List @@ -2449,7 +2449,7 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, pACInfo->requested_QoSInfo[flow_info->tspec_mask - 1]; //delete the entry from Flow List VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting entry at %p with flowID %d", + "%s: %d: Deleting entry at %pK with flowID %d", __func__, __LINE__, flow_info, QosFlowID); csrLLRemoveEntry(&sme_QosCb.flow_list, pEntry, VOS_TRUE ); @@ -2494,7 +2494,7 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, //delete the entry from Flow List VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, "%s: %d: On session %d deleting entry at " - "%p with flowID %d", + "%pK with flowID %d", __func__, __LINE__, sessionId, flow_info, QosFlowID); csrLLRemoveEntry(&sme_QosCb.flow_list, pEntry, VOS_TRUE ); @@ -2652,7 +2652,7 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, flow_info->QosFlowID); VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting entry at %p with flowID %d", + "%s: %d: Deleting entry at %pK with flowID %d", __func__, __LINE__, flow_info, flow_info->QosFlowID); } @@ -2702,7 +2702,7 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, pACInfo->num_flows[flow_info->tspec_mask - 1]--; //delete the entry from Flow List VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: On session %d deleting entry at %p with flowID %d", + "%s: %d: On session %d deleting entry at %pK with flowID %d", __func__, __LINE__, sessionId, flow_info, QosFlowID); csrLLRemoveEntry(&sme_QosCb.flow_list, pEntry, VOS_TRUE ); @@ -3153,7 +3153,7 @@ eHalStatus sme_QosESEProcessReassocTspecRsp(tpAniSirGlobal pMac, v_U8_t sessionI } VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_WARN, - "TspecLen = %d, pbFrames = %p, pTspecIE = %p", + "TspecLen = %d, pbFrames = %pK, pTspecIE = %pK", tspecIeLen, pCsrConnectedInfo->pbFrames, pTspecIE); numTspec = (tspecIeLen)/sizeof(tDot11fIEWMMTSPEC); @@ -6242,7 +6242,7 @@ static eHalStatus sme_QosBufferExistingFlows(tpAniSirGlobal pMac, } //delete the entry from Flow List VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting original entry at %p with flowID %d", + "%s: %d: Deleting original entry at %pK with flowID %d", __func__, __LINE__, flow_info, flow_info->QosFlowID); csrLLRemoveEntry(&sme_QosCb.flow_list, pEntry, VOS_TRUE ); @@ -6293,7 +6293,7 @@ static eHalStatus sme_QosDeleteExistingFlows(tpAniSirGlobal pMac, flow_info->QosFlowID); } VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting entry at %p with flowID %d", + "%s: %d: Deleting entry at %pK with flowID %d", __func__, __LINE__, flow_info, flow_info->QosFlowID); //delete the entry from Flow List @@ -6686,7 +6686,7 @@ eHalStatus sme_QosModifyFnp(tpAniSirGlobal pMac, tListElem *pEntry) case SME_QOS_REASON_MODIFY: //delete the original entry from Flow List VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting original entry at %p with flowID %d", + "%s: %d: Deleting original entry at %pK with flowID %d", __func__, __LINE__, flow_info, flow_info->QosFlowID); csrLLRemoveEntry(&sme_QosCb.flow_list, pEntry, VOS_TRUE ); @@ -6885,7 +6885,7 @@ eHalStatus sme_QosReassocSuccessEvFnp(tpAniSirGlobal pMac, tListElem *pEntry) { //delete the entry from Flow List VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting entry at %p with flowID %d", + "%s: %d: Deleting entry at %pK with flowID %d", __func__, __LINE__, flow_info, flow_info->QosFlowID); csrLLRemoveEntry(&sme_QosCb.flow_list, pEntry, VOS_TRUE ); @@ -6988,7 +6988,7 @@ eHalStatus sme_QosAddTsFailureFnp(tpAniSirGlobal pMac, tListElem *pEntry) } //delete the entry from Flow List VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting entry at %p with flowID %d", + "%s: %d: Deleting entry at %pK with flowID %d", __func__, __LINE__, flow_info, flow_info->QosFlowID); csrLLRemoveEntry(&sme_QosCb.flow_list, pEntry, VOS_TRUE ); @@ -7206,7 +7206,7 @@ eHalStatus sme_QosAddTsSuccessFnp(tpAniSirGlobal pMac, tListElem *pEntry) if(delete_entry) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: %d: Deleting entry at %p with flowID %d", + "%s: %d: Deleting entry at %pK with flowID %d", __func__, __LINE__, flow_info, flow_info->QosFlowID); //delete the entry from Flow List diff --git a/drivers/staging/prima/CORE/SME/src/ccm/ccmApi.c b/drivers/staging/prima/CORE/SME/src/ccm/ccmApi.c index 3be9efb086d..38cd438b3df 100644 --- a/drivers/staging/prima/CORE/SME/src/ccm/ccmApi.c +++ b/drivers/staging/prima/CORE/SME/src/ccm/ccmApi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -239,7 +239,7 @@ static void sendQueuedReqToMacSw(tpAniSirGlobal pMac, tHddHandle hHdd) } #ifdef CCM_DEBUG - smsLog(pMac, LOGW, FL("ccmComplete(%p)"), req->done); + smsLog(pMac, LOGW, FL("ccmComplete(%pK)"), req->done); #endif ccmComplete(hHdd, req->done); @@ -382,12 +382,12 @@ static eHalStatus cfgSet(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 type, tANI_S3 if ((status == eHAL_STATUS_SUCCESS) && (sem != NULL)) { #ifdef CCM_DEBUG - smsLog(pMac, LOG1, FL("ccmWaitForCompletion(%p)"), req->done); + smsLog(pMac, LOG1, FL("ccmWaitForCompletion(%pK)"), req->done); #endif ccmWaitForCompletion(hHdd, sem); #ifdef CCM_DEBUG - smsLog(pMac, LOG1, FL("free(%p)"), req->done); + smsLog(pMac, LOG1, FL("free(%pK)"), req->done); #endif palSemaphoreFree( hHdd, sem ) ; } @@ -472,7 +472,7 @@ void ccmCfgCnfMsgHandler(tHalHandle hHal, void *m) /* Wake up the sleeping process */ #ifdef CCM_DEBUG - smsLog(pMac, LOGW, FL("ccmComplete(%p)"), pMac->ccm.replay.done); + smsLog(pMac, LOGW, FL("ccmComplete(%pK)"), pMac->ccm.replay.done); #endif ccmComplete(hHdd, pMac->ccm.replay.done); //Let go with the rest of the set CFGs waiting. @@ -517,7 +517,7 @@ void ccmCfgCnfMsgHandler(tHalHandle hHal, void *m) /* Wake up the sleeping process */ #ifdef CCM_DEBUG - smsLog(pMac, LOGW, FL("cfgId=%ld, calling ccmComplete(%p)"), cfgId, req->done); + smsLog(pMac, LOGW, FL("cfgId=%ld, calling ccmComplete(%pK)"), cfgId, req->done); #endif ccmComplete(hHdd, req->done); @@ -545,7 +545,7 @@ void ccmCfgCnfMsgHandler(tHalHandle hHal, void *m) (int)cfgId, (int)result, req->cfgId, req->state); #ifdef CCM_DEBUG - smsLog(pMac, LOGW, FL("ccmComplete(%p)"), req->done); + smsLog(pMac, LOGW, FL("ccmComplete(%pK)"), req->done); #endif } @@ -815,12 +815,12 @@ eHalStatus ccmCfgUpdate(tHalHandle hHal, tCcmCfgSetCallback callback) if (status == eHAL_STATUS_SUCCESS && pMac->ccm.replay.done) { #ifdef CCM_DEBUG - smsLog(pMac, LOGW, FL("ccmWaitForCompletion(%p)"), pMac->ccm.replay.done); + smsLog(pMac, LOGW, FL("ccmWaitForCompletion(%pK)"), pMac->ccm.replay.done); #endif ccmWaitForCompletion(hHdd, pMac->ccm.replay.done); #ifdef CCM_DEBUG - smsLog(pMac, LOGW, FL("free(%p)"), pMac->ccm.replay.done); + smsLog(pMac, LOGW, FL("free(%pK)"), pMac->ccm.replay.done); #endif palSemaphoreFree( hHdd, pMac->ccm.replay.done) ; } diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c b/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c index aaf8da63261..6c6a5cf92bc 100644 --- a/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c +++ b/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c @@ -1104,7 +1104,7 @@ void csrAbortCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fStop { case eSmeCommandScan: // We need to inform the requester before dropping the scan command - smsLog( pMac, LOGW, "%s: Drop scan reason %d callback %p", + smsLog( pMac, LOGW, "%s: Drop scan reason %d callback %pK", __func__, pCommand->u.scanCmd.reason, pCommand->u.scanCmd.callback); if (NULL != pCommand->u.scanCmd.callback) @@ -10733,7 +10733,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg ) operationChannel, IS_HT40_OBSS_SCAN_FEATURE_ENABLE); smsLog( pMac, LOG1,FL("connectState %d" - "pCurRoamProfile %p"), + "pCurRoamProfile %pK"), pSession->connectState, pSession->pCurRoamProfile); } @@ -18755,7 +18755,7 @@ void csrGetStaticUapsdMask(tpAniSirGlobal pMac, tANI_U8 *staticUapsdMask) if(!pSession || !pSession->pCurRoamProfile) smsLog(pMac, LOGE, FL("Either pSession or Roam profile is NULL," - " pSession:%p"), pSession); + " pSession:%pK"), pSession); else *staticUapsdMask = pSession->pCurRoamProfile->uapsd_mask; } diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c index 0cf87c38ba0..f4832e46b47 100644 --- a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c +++ b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c @@ -479,7 +479,7 @@ eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd ) pChnInfo->numOfChannels = pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels - nNumChanCombinedConc; VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_WARN, - FL(" &channelToScan %p pScanCmd(%p) pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList(%p)numChn(%d)"), + FL(" &channelToScan %pK pScanCmd(%pK) pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList(%pK)numChn(%d)"), &channelToScan[0], pScanCmd, pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList, numChn); diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c b/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c index bce1abd66a3..29143a60595 100644 --- a/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c +++ b/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c @@ -2608,7 +2608,7 @@ eHalStatus csrNeighborRoamIssueBgScanRequest(tpAniSirGlobal pMac, vos_mem_free(scanReq.SSIDs.SSIDList); if (1 == pBgScanParams->ChannelInfo.numOfChannels) - NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Channel List Address = %p, Actual index = %d"), + NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Channel List Address = %pK, Actual index = %d"), &pMac->roam.neighborRoamInfo.roamChannelInfo.currentChannelListInfo.ChannelList[0], pMac->roam.neighborRoamInfo.roamChannelInfo.currentChanIndex); @@ -2655,7 +2655,7 @@ eHalStatus csrNeighborRoamPerformBgScan(tpAniSirGlobal pMac, tANI_U32 sessionId) if ( pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList && pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels ) { - NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Channel List Address = %p"), &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[0]); + NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Channel List Address = %pK"), &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList[0]); } else { diff --git a/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c b/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c index d3456086603..917370d72a0 100644 --- a/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c +++ b/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c @@ -9155,7 +9155,7 @@ eHalStatus sme_8023MulticastList (tHalHandle hHal, tANI_U8 sessionId, tpSirRcvFl tCsrRoamSession *pSession = NULL; VOS_TRACE( VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s: " - "ulMulticastAddrCnt=%d, multicastAddr[0]=%p", __func__, + "ulMulticastAddrCnt=%d, multicastAddr[0]=%pK", __func__, pMulticastAddrs->ulMulticastAddrCnt, pMulticastAddrs->multicastAddr[0]); diff --git a/drivers/staging/prima/CORE/SME/src/sme_common/sme_FTApi.c b/drivers/staging/prima/CORE/SME/src/sme_common/sme_FTApi.c index dd51fdedc92..581399612a1 100644 --- a/drivers/staging/prima/CORE/SME/src/sme_common/sme_FTApi.c +++ b/drivers/staging/prima/CORE/SME/src/sme_common/sme_FTApi.c @@ -166,7 +166,7 @@ void sme_SetFTIEs( tHalHandle hHal, tANI_U8 sessionId, const tANI_U8 *ft_ies, // At this juncture we are ready to start sending Re-Assoc Req. #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - smsLog( pMac, LOGE, "New Reassoc Req=%p in state %d", + smsLog( pMac, LOGE, "New Reassoc Req=%pK in state %d", ft_ies, pMac->ft.ftSmeContext.FTState); #endif if ((pMac->ft.ftSmeContext.reassoc_ft_ies) && @@ -473,7 +473,7 @@ void sme_FTReset(tHalHandle hHal) if (pMac->ft.ftSmeContext.auth_ft_ies != NULL) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - smsLog( pMac, LOGE, FL(" Freeing FT Auth IE %p and setting to NULL"), + smsLog( pMac, LOGE, FL(" Freeing FT Auth IE %pK and setting to NULL"), pMac->ft.ftSmeContext.auth_ft_ies); #endif vos_mem_free(pMac->ft.ftSmeContext.auth_ft_ies); @@ -484,7 +484,7 @@ void sme_FTReset(tHalHandle hHal) if (pMac->ft.ftSmeContext.reassoc_ft_ies != NULL) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - smsLog( pMac, LOGE, FL(" Freeing FT Reassoc IE %p and setting to NULL"), + smsLog( pMac, LOGE, FL(" Freeing FT Reassoc IE %pK and setting to NULL"), pMac->ft.ftSmeContext.auth_ft_ies); #endif vos_mem_free(pMac->ft.ftSmeContext.reassoc_ft_ies); @@ -495,7 +495,7 @@ void sme_FTReset(tHalHandle hHal) if (pMac->ft.ftSmeContext.psavedFTPreAuthRsp != NULL) { #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG - smsLog( pMac, LOGE, FL("Freeing FtPreAuthRsp %p and setting to NULL"), + smsLog( pMac, LOGE, FL("Freeing FtPreAuthRsp %pK and setting to NULL"), pMac->ft.ftSmeContext.psavedFTPreAuthRsp); #endif vos_mem_free(pMac->ft.ftSmeContext.psavedFTPreAuthRsp); diff --git a/drivers/staging/prima/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/drivers/staging/prima/CORE/SVC/src/logging/wlan_logging_sock_svc.c index 64a252b8a95..3ff9664229d 100644 --- a/drivers/staging/prima/CORE/SVC/src/logging/wlan_logging_sock_svc.c +++ b/drivers/staging/prima/CORE/SVC/src/logging/wlan_logging_sock_svc.c @@ -1,5 +1,5 @@ /* -* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. +* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -739,8 +739,8 @@ static int send_fw_log_pkt_to_user(void) msg_header.wmsg.length = skb->len; if (unlikely(skb_headroom(skb) < sizeof(msg_header))) { - pr_err("VPKT [%d]: Insufficient headroom, head[%p]," - " data[%p], req[%zu]", __LINE__, skb->head, + pr_err("VPKT [%d]: Insufficient headroom, head[%pK]," + " data[%pK], req[%zu]", __LINE__, skb->head, skb->data, sizeof(msg_header)); return -EIO; } @@ -835,8 +835,8 @@ static int send_data_mgmt_log_pkt_to_user(void) msg_header.frameSize = WLAN_MGMT_LOGGING_FRAMESIZE_128BYTES; if (unlikely(skb_headroom(skb) < sizeof(msg_header))) { - pr_err("VPKT [%d]: Insufficient headroom, head[%p]," - " data[%p], req[%zu]", __LINE__, skb->head, + pr_err("VPKT [%d]: Insufficient headroom, head[%pK]," + " data[%pK], req[%zu]", __LINE__, skb->head, skb->data, sizeof(msg_header)); return -EIO; } @@ -1066,8 +1066,8 @@ static int send_per_pkt_stats_to_user(void) pktlog.seq_no = gwlan_logging.pkt_stats_msg_idx++; if (unlikely(skb_headroom(plog_msg->skb) < sizeof(vos_log_pktlog_info))) { - pr_err("VPKT [%d]: Insufficient headroom, head[%p]," - " data[%p], req[%zu]", __LINE__, plog_msg->skb->head, + pr_err("VPKT [%d]: Insufficient headroom, head[%pK]," + " data[%pK], req[%zu]", __LINE__, plog_msg->skb->head, plog_msg->skb->data, sizeof(msg_header)); ret = -EIO; free_old_skb = true; @@ -1077,8 +1077,8 @@ static int send_per_pkt_stats_to_user(void) sizeof(vos_log_pktlog_info)); if (unlikely(skb_headroom(plog_msg->skb) < sizeof(int))) { - pr_err("VPKT [%d]: Insufficient headroom, head[%p]," - " data[%p], req[%zu]", __LINE__, plog_msg->skb->head, + pr_err("VPKT [%d]: Insufficient headroom, head[%pK]," + " data[%pK], req[%zu]", __LINE__, plog_msg->skb->head, plog_msg->skb->data, sizeof(int)); ret = -EIO; free_old_skb = true; @@ -1104,8 +1104,8 @@ static int send_per_pkt_stats_to_user(void) msg_header.wmsg.length = cpu_to_be16(plog_msg->skb->len); if (unlikely(skb_headroom(plog_msg->skb) < sizeof(msg_header))) { - pr_err("VPKT [%d]: Insufficient headroom, head[%p]," - " data[%p], req[%zu]", __LINE__, plog_msg->skb->head, + pr_err("VPKT [%d]: Insufficient headroom, head[%pK]," + " data[%pK], req[%zu]", __LINE__, plog_msg->skb->head, plog_msg->skb->data, sizeof(msg_header)); ret = -EIO; free_old_skb = true; @@ -2027,7 +2027,7 @@ size_t wlan_fwr_mem_dump_fsread_handler(char __user *buf, { if (buf == NULL || gwlan_logging.fw_mem_dump_ctx.fw_dump_start_loc == NULL) { - pr_err("%s : start loc : %p buf : %p ",__func__,gwlan_logging.fw_mem_dump_ctx.fw_dump_start_loc,buf); + pr_err("%s : start loc : %pK buf : %pK ",__func__,gwlan_logging.fw_mem_dump_ctx.fw_dump_start_loc,buf); return 0; } diff --git a/drivers/staging/prima/CORE/SVC/src/nlink/wlan_nlink_srv.c b/drivers/staging/prima/CORE/SVC/src/nlink/wlan_nlink_srv.c index facf905e894..0018fc3fa48 100644 --- a/drivers/staging/prima/CORE/SVC/src/nlink/wlan_nlink_srv.c +++ b/drivers/staging/prima/CORE/SVC/src/nlink/wlan_nlink_srv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -246,7 +246,7 @@ static void nl_srv_rcv_skb (struct sk_buff *skb) if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len) { VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN, "NLINK: Invalid " - "Netlink message: skb[%p], len[%d], nlhdr[%p], nlmsg_len[%d]", + "Netlink message: skb[%pK], len[%d], nlhdr[%pK], nlmsg_len[%d]", skb, skb->len, nlh, nlh->nlmsg_len); return; } diff --git a/drivers/staging/prima/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c b/drivers/staging/prima/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c index 5db47dd1576..dd76232030a 100644 --- a/drivers/staging/prima/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c +++ b/drivers/staging/prima/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -73,7 +73,7 @@ static void ptt_sock_dump_buf(const unsigned char * pbuf, int cnt) int i; for (i = 0; i < cnt ; i++) { if ((i%16)==0) - VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"\n%p:", pbuf); + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"\n%pK:", pbuf); VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO," %02X", *pbuf); pbuf++; } diff --git a/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c b/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c index e40fe6983a4..6cb5b0858fe 100644 --- a/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c +++ b/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014, 2016, 2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -19,16 +19,18 @@ * PERFORMANCE OF THIS SOFTWARE. */ +/* + * This file was originally distributed by Qualcomm Atheros, Inc. + * under proprietary terms before Copyright ownership was assigned + * to the Linux Foundation. + */ /** * \file dot11f.c * * \brief Structures, functions & definitions for * working with 802.11 Frames - * - * - * * This file was automatically generated by 'framesc' - * Thu Jul 20 10:59:48 2017 from the following file(s): + * Thu Dec 28 14:04:50 2017 from the following file(s): * * dot11f.frms * @@ -77,6 +79,7 @@ typedef struct sIEDefn { unsigned char oui[5]; unsigned char noui; tANI_U8 eid; + tANI_U8 extn_eid; tFRAMES_BOOL fMandatory; } tIEDefn; @@ -232,6 +235,8 @@ static void framesDump(tpAniSirGlobal pCtx, int nSev, tANI_U8 *pBuf, int nBuf) framesLog((ctx), (sev), (fmt), (p1), (p2)); #define FRAMES_LOG3(ctx, sev, fmt, p1, p2, p3) \ framesLog((ctx), (sev), (fmt), (p1), (p2), (p3)); +#define FRAMES_LOG4(ctx, sev, fmt, p1, p2, p3, p4) \ + framesLog((ctx), (sev), (fmt), (p1), (p2), (p3), (p4)); #define FRAMES_DUMP(ctx, sev, p, n) \ framesDump((ctx), (sev), (p), (n)); #ifndef FRAMES_SEV_FOR_FRAME @@ -245,6 +250,7 @@ static void framesDump(tpAniSirGlobal pCtx, int nSev, tANI_U8 *pBuf, int nBuf) # define FRAMES_LOG1(ctx, sev, fmt, p1) # define FRAMES_LOG2(ctx, sev, fmt, p1, p2) # define FRAMES_LOG3(ctx, sev, fmt, p1, p2, p3) +# define FRAMES_LOG4(ctx, sev, fmt, p1, p2, p3, p4) # define FRAMES_DUMP(ctx, sev, p, n) # ifndef FRAMES_SEV_FOR_FRAME # define FRAMES_SEV_FOR_FRAME(ctx, sig) FRLOG3 @@ -444,15 +450,22 @@ static const tIEDefn* FindIEDefn(tpAniSirGlobal pCtx, (void)pCtx; pIe = &(IEs[0]); - while (0xff != pIe->eid) + while (0xff != pIe->eid || pIe->extn_eid) { if (*pBuf == pIe->eid) { - if (0 == pIe->noui) return pIe; - - if ( ( nBuf > (tANI_U32)(pIe->noui + 2) ) && - ( !DOT11F_MEMCMP(pCtx, pBuf + 2, pIe->oui, pIe->noui) ) ) - return pIe; + if (pIe->eid == 0xff) { + if ((*(pBuf + 2)) == pIe->extn_eid) + return pIe; + } else { + if (0 == pIe->noui) + return pIe; + + if ((nBuf > (tANI_U32)(pIe->noui + 2)) && + (!DOT11F_MEMCMP(pCtx, pBuf + 2, pIe->oui, + pIe->noui))) + return pIe; + } } ++pIe; @@ -482,7 +495,7 @@ static tANI_U32 GetContainerIesLen(tpAniSirGlobal pCtx, len += 2; while ( len < nBuf ) { - if( NULL == (pIe = FindIEDefn(pCtx, pBufRemaining, nBuf + len, IEs))) + if( NULL == (pIe = FindIEDefn(pCtx, pBufRemaining, nBuf - len, IEs))) break; if( pIe->eid == pIeFirst->eid ) break; @@ -490,6 +503,8 @@ static tANI_U32 GetContainerIesLen(tpAniSirGlobal pCtx, pBufRemaining += *(pBufRemaining + 1) + 2; } + if ((len > 0xFF) || (len > nBuf)) + return DOT11F_INTERNAL_ERROR; *pnConsumed = len; return DOT11F_PARSE_SUCCESS; @@ -2811,23 +2826,23 @@ tANI_U32 dot11fUnpackIeAID(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tD }; static const tIEDefn IES_Airgo[ ] = { - {offsetof(tDot11fIEAirgo, PropSuppRates), offsetof(tDot11fIEPropSuppRates, present), 0, "PropSuppRates" , 0, 3, 14, SigIePropSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPSUPPRATES, 0, }, - {offsetof(tDot11fIEAirgo, APName), offsetof(tDot11fIEAPName, present), 0, "APName" , 0, 3, 34, SigIeAPName, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APNAME, 0, }, - {offsetof(tDot11fIEAirgo, HCF), offsetof(tDot11fIEHCF, present), 0, "HCF" , 0, 3, 3, SigIeHCF, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HCF, 0, }, - {offsetof(tDot11fIEAirgo, WDS), offsetof(tDot11fIEWDS, present), 0, "WDS" , 0, 2, 66, SigIeWDS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WDS, 0, }, - {offsetof(tDot11fIEAirgo, BPIndicator), offsetof(tDot11fIEBPIndicator, present), 0, "BPIndicator" , 0, 4, 4, SigIeBPIndicator, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BPINDICATOR, 0, }, - {offsetof(tDot11fIEAirgo, LoadInfo), offsetof(tDot11fIELoadInfo, present), 0, "LoadInfo" , 0, 6, 6, SigIeLoadInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LOADINFO, 0, }, - {offsetof(tDot11fIEAirgo, LoadBalance), offsetof(tDot11fIELoadBalance, present), 0, "LoadBalance" , 0, 9, 9, SigIeLoadBalance, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LOADBALANCE, 0, }, - {offsetof(tDot11fIEAirgo, PropAssocType), offsetof(tDot11fIEPropAssocType, present), 0, "PropAssocType" , 0, 3, 3, SigIePropAssocType, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPASSOCTYPE, 0, }, - {offsetof(tDot11fIEAirgo, LLAttr), offsetof(tDot11fIELLAttr, present), 0, "LLAttr" , 0, 6, 6, SigIeLLAttr, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LLATTR, 0, }, - {offsetof(tDot11fIEAirgo, PropCapability), offsetof(tDot11fIEPropCapability, present), 0, "PropCapability" , 0, 4, 4, SigIePropCapability, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPCAPABILITY, 0, }, - {offsetof(tDot11fIEAirgo, Version), offsetof(tDot11fIEVersion, present), 0, "Version" , 0, 7, 27, SigIeVersion, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VERSION, 0, }, - {offsetof(tDot11fIEAirgo, PropEDCAParams), offsetof(tDot11fIEPropEDCAParams, present), 0, "PropEDCAParams" , 0, 20, 20, SigIePropEDCAParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPEDCAPARAMS, 0, }, - {offsetof(tDot11fIEAirgo, Titan), offsetof(tDot11fIETitan, present), 0, "Titan" , 0, 6, 6, SigIeTitan, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TITAN, 0, }, - {offsetof(tDot11fIEAirgo, PropChannSwitchAnn), offsetof(tDot11fIEPropChannSwitchAnn, present), 0, "PropChannSwitchAnn" , 0, 6, 6, SigIePropChannSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPCHANNSWITCHANN, 0, }, - {offsetof(tDot11fIEAirgo, PropQuietBSS), offsetof(tDot11fIEPropQuietBSS, present), 0, "PropQuietBSS" , 0, 8, 8, SigIePropQuietBSS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPQUIETBSS, 0, }, - {offsetof(tDot11fIEAirgo, TriggerStaBgScan), offsetof(tDot11fIETriggerStaBgScan, present), 0, "TriggerStaBgScan" , 0, 3, 3, SigIeTriggerStaBgScan, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TRIGGERSTABGSCAN, 0, }, - {offsetof(tDot11fIEAirgo, Taurus), offsetof(tDot11fIETaurus, present), 0, "Taurus" , 0, 8, 8, SigIeTaurus, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TAURUS, 0, }, + {offsetof(tDot11fIEAirgo, PropSuppRates), offsetof(tDot11fIEPropSuppRates, present), 0, "PropSuppRates" , 0, 3, 14, SigIePropSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPSUPPRATES, 0, 0, }, + {offsetof(tDot11fIEAirgo, APName), offsetof(tDot11fIEAPName, present), 0, "APName" , 0, 3, 34, SigIeAPName, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APNAME, 0, 0, }, + {offsetof(tDot11fIEAirgo, HCF), offsetof(tDot11fIEHCF, present), 0, "HCF" , 0, 3, 3, SigIeHCF, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HCF, 0, 0, }, + {offsetof(tDot11fIEAirgo, WDS), offsetof(tDot11fIEWDS, present), 0, "WDS" , 0, 2, 66, SigIeWDS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WDS, 0, 0, }, + {offsetof(tDot11fIEAirgo, BPIndicator), offsetof(tDot11fIEBPIndicator, present), 0, "BPIndicator" , 0, 4, 4, SigIeBPIndicator, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BPINDICATOR, 0, 0, }, + {offsetof(tDot11fIEAirgo, LoadInfo), offsetof(tDot11fIELoadInfo, present), 0, "LoadInfo" , 0, 6, 6, SigIeLoadInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LOADINFO, 0, 0, }, + {offsetof(tDot11fIEAirgo, LoadBalance), offsetof(tDot11fIELoadBalance, present), 0, "LoadBalance" , 0, 9, 9, SigIeLoadBalance, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LOADBALANCE, 0, 0, }, + {offsetof(tDot11fIEAirgo, PropAssocType), offsetof(tDot11fIEPropAssocType, present), 0, "PropAssocType" , 0, 3, 3, SigIePropAssocType, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPASSOCTYPE, 0, 0, }, + {offsetof(tDot11fIEAirgo, LLAttr), offsetof(tDot11fIELLAttr, present), 0, "LLAttr" , 0, 6, 6, SigIeLLAttr, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LLATTR, 0, 0, }, + {offsetof(tDot11fIEAirgo, PropCapability), offsetof(tDot11fIEPropCapability, present), 0, "PropCapability" , 0, 4, 4, SigIePropCapability, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPCAPABILITY, 0, 0, }, + {offsetof(tDot11fIEAirgo, Version), offsetof(tDot11fIEVersion, present), 0, "Version" , 0, 7, 27, SigIeVersion, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VERSION, 0, 0, }, + {offsetof(tDot11fIEAirgo, PropEDCAParams), offsetof(tDot11fIEPropEDCAParams, present), 0, "PropEDCAParams" , 0, 20, 20, SigIePropEDCAParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPEDCAPARAMS, 0, 0, }, + {offsetof(tDot11fIEAirgo, Titan), offsetof(tDot11fIETitan, present), 0, "Titan" , 0, 6, 6, SigIeTitan, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TITAN, 0, 0, }, + {offsetof(tDot11fIEAirgo, PropChannSwitchAnn), offsetof(tDot11fIEPropChannSwitchAnn, present), 0, "PropChannSwitchAnn" , 0, 6, 6, SigIePropChannSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPCHANNSWITCHANN, 0, 0, }, + {offsetof(tDot11fIEAirgo, PropQuietBSS), offsetof(tDot11fIEPropQuietBSS, present), 0, "PropQuietBSS" , 0, 8, 8, SigIePropQuietBSS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PROPQUIETBSS, 0, 0, }, + {offsetof(tDot11fIEAirgo, TriggerStaBgScan), offsetof(tDot11fIETriggerStaBgScan, present), 0, "TriggerStaBgScan" , 0, 3, 3, SigIeTriggerStaBgScan, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TRIGGERSTABGSCAN, 0, 0, }, + {offsetof(tDot11fIEAirgo, Taurus), offsetof(tDot11fIETaurus, present), 0, "Taurus" , 0, 8, 8, SigIeTaurus, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TAURUS, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -3299,10 +3314,10 @@ tANI_U32 dot11fUnpackIeFHPattTable(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 i }; static const tIEDefn IES_FTInfo[ ] = { - {offsetof(tDot11fIEFTInfo, R1KH_ID), offsetof(tDot11fIER1KH_ID, present), 0, "R1KH_ID" , 0, 8, 8, SigIeR1KH_ID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_R1KH_ID, 0, }, - {offsetof(tDot11fIEFTInfo, GTK), offsetof(tDot11fIEGTK, present), 0, "GTK" , 0, 18, 45, SigIeGTK, {0, 0, 0, 0, 0}, 0, DOT11F_EID_GTK, 0, }, - {offsetof(tDot11fIEFTInfo, R0KH_ID), offsetof(tDot11fIER0KH_ID, present), 0, "R0KH_ID" , 0, 3, 50, SigIeR0KH_ID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_R0KH_ID, 0, }, - {offsetof(tDot11fIEFTInfo, IGTK), offsetof(tDot11fIEIGTK, present), 0, "IGTK" , 0, 35, 35, SigIeIGTK, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IGTK, 0, }, + {offsetof(tDot11fIEFTInfo, R1KH_ID), offsetof(tDot11fIER1KH_ID, present), 0, "R1KH_ID" , 0, 8, 8, SigIeR1KH_ID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_R1KH_ID, 0, 0, }, + {offsetof(tDot11fIEFTInfo, GTK), offsetof(tDot11fIEGTK, present), 0, "GTK" , 0, 18, 45, SigIeGTK, {0, 0, 0, 0, 0}, 0, DOT11F_EID_GTK, 0, 0, }, + {offsetof(tDot11fIEFTInfo, R0KH_ID), offsetof(tDot11fIER0KH_ID, present), 0, "R0KH_ID" , 0, 3, 50, SigIeR0KH_ID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_R0KH_ID, 0, 0, }, + {offsetof(tDot11fIEFTInfo, IGTK), offsetof(tDot11fIEIGTK, present), 0, "IGTK" , 0, 35, 35, SigIeIGTK, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IGTK, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -3568,7 +3583,7 @@ static const tFFDefn FFS_reportBeacon[ ] = { }; static const tIEDefn IES_reportBeacon[ ] = { - {offsetof(tDot11fIEMeasurementReport, report.Beacon.BeaconReportFrmBody), offsetof(tDot11fIEBeaconReportFrmBody, present), 0, "BeaconReportFrmBody" , 0, 2, 226, SigIeBeaconReportFrmBody, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BEACONREPORTFRMBODY, 0, }, + {offsetof(tDot11fIEMeasurementReport, report.Beacon.BeaconReportFrmBody), offsetof(tDot11fIEBeaconReportFrmBody, present), 0, "BeaconReportFrmBody" , 0, 2, 226, SigIeBeaconReportFrmBody, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BEACONREPORTFRMBODY, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -3726,11 +3741,11 @@ static const tFFDefn FFS_measurement_requestBeacon[ ] = { }; static const tIEDefn IES_measurement_requestBeacon[ ] = { - {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, }, - {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.BeaconReporting), offsetof(tDot11fIEBeaconReporting, present), 0, "BeaconReporting" , 0, 4, 4, SigIeBeaconReporting, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BEACONREPORTING, 0, }, - {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.BcnReportingDetail), offsetof(tDot11fIEBcnReportingDetail, present), 0, "BcnReportingDetail" , 0, 3, 3, SigIeBcnReportingDetail, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BCNREPORTINGDETAIL, 0, }, - {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.RequestedInfo), offsetof(tDot11fIERequestedInfo, present), 0, "RequestedInfo" , 0, 2, 257, SigIeRequestedInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_REQUESTEDINFO, 0, }, - {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.APChannelReport), offsetof(tDot11fIEAPChannelReport, present), offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.num_APChannelReport), "APChannelReport" , 2, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, }, + {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 0, }, + {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.BeaconReporting), offsetof(tDot11fIEBeaconReporting, present), 0, "BeaconReporting" , 0, 4, 4, SigIeBeaconReporting, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BEACONREPORTING, 0, 0, }, + {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.BcnReportingDetail), offsetof(tDot11fIEBcnReportingDetail, present), 0, "BcnReportingDetail" , 0, 3, 3, SigIeBcnReportingDetail, {0, 0, 0, 0, 0}, 0, DOT11F_EID_BCNREPORTINGDETAIL, 0, 0, }, + {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.RequestedInfo), offsetof(tDot11fIERequestedInfo, present), 0, "RequestedInfo" , 0, 2, 257, SigIeRequestedInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_REQUESTEDINFO, 0, 0, }, + {offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.APChannelReport), offsetof(tDot11fIEAPChannelReport, present), offsetof(tDot11fIEMeasurementRequest, measurement_request.Beacon.num_APChannelReport), "APChannelReport" , 2, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -3852,11 +3867,11 @@ tANI_U32 dot11fUnpackIeMobilityDomain(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U }; static const tIEDefn IES_NeighborReport[ ] = { - {offsetof(tDot11fIENeighborReport, TSFInfo), offsetof(tDot11fIETSFInfo, present), 0, "TSFInfo" , 0, 6, 6, SigIeTSFInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSFINFO, 0, }, - {offsetof(tDot11fIENeighborReport, CondensedCountryStr), offsetof(tDot11fIECondensedCountryStr, present), 0, "CondensedCountryStr" , 0, 4, 4, SigIeCondensedCountryStr, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CONDENSEDCOUNTRYSTR, 0, }, - {offsetof(tDot11fIENeighborReport, MeasurementPilot), offsetof(tDot11fIEMeasurementPilot, present), 0, "MeasurementPilot" , 0, 3, 258, SigIeMeasurementPilot, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTPILOT, 0, }, - {offsetof(tDot11fIENeighborReport, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fIENeighborReport, MultiBssid), offsetof(tDot11fIEMultiBssid, present), 0, "MultiBssid" , 0, 3, 258, SigIeMultiBssid, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MULTIBSSID, 0, }, + {offsetof(tDot11fIENeighborReport, TSFInfo), offsetof(tDot11fIETSFInfo, present), 0, "TSFInfo" , 0, 6, 6, SigIeTSFInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSFINFO, 0, 0, }, + {offsetof(tDot11fIENeighborReport, CondensedCountryStr), offsetof(tDot11fIECondensedCountryStr, present), 0, "CondensedCountryStr" , 0, 4, 4, SigIeCondensedCountryStr, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CONDENSEDCOUNTRYSTR, 0, 0, }, + {offsetof(tDot11fIENeighborReport, MeasurementPilot), offsetof(tDot11fIEMeasurementPilot, present), 0, "MeasurementPilot" , 0, 3, 258, SigIeMeasurementPilot, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTPILOT, 0, 0, }, + {offsetof(tDot11fIENeighborReport, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fIENeighborReport, MultiBssid), offsetof(tDot11fIEMultiBssid, present), 0, "MultiBssid" , 0, 3, 258, SigIeMultiBssid, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MULTIBSSID, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -4570,18 +4585,18 @@ tANI_U32 dot11fUnpackIeRCPIIE(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, }; static const tIEDefn IES_RICDataDesc[ ] = { - {offsetof(tDot11fIERICDataDesc, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 1, }, - {offsetof(tDot11fIERICDataDesc, RICDescriptor), offsetof(tDot11fIERICDescriptor, present), 0, "RICDescriptor" , 0, 3, 258, SigIeRICDescriptor, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDESCRIPTOR, 0, }, - {offsetof(tDot11fIERICDataDesc, TSPEC), offsetof(tDot11fIETSPEC, present), 0, "TSPEC" , 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSPEC, 0, }, - {offsetof(tDot11fIERICDataDesc, TCLAS), offsetof(tDot11fIETCLAS, present), offsetof(tDot11fIERICDataDesc, num_TCLAS), "TCLAS" , 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, }, - {offsetof(tDot11fIERICDataDesc, TCLASSPROC), offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC" , 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLASSPROC, 0, }, - {offsetof(tDot11fIERICDataDesc, TSDelay), offsetof(tDot11fIETSDelay, present), 0, "TSDelay" , 0, 6, 6, SigIeTSDelay, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSDELAY, 0, }, - {offsetof(tDot11fIERICDataDesc, Schedule), offsetof(tDot11fIESchedule, present), 0, "Schedule" , 0, 16, 16, SigIeSchedule, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SCHEDULE, 0, }, - {offsetof(tDot11fIERICDataDesc, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, }, - {offsetof(tDot11fIERICDataDesc, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, present), offsetof(tDot11fIERICDataDesc, num_WMMTCLAS), "WMMTCLAS" , 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, 5, DOT11F_EID_WMMTCLAS, 0, }, - {offsetof(tDot11fIERICDataDesc, WMMTCLASPROC), offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC" , 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, 5, DOT11F_EID_WMMTCLASPROC, 0, }, - {offsetof(tDot11fIERICDataDesc, WMMTSDelay), offsetof(tDot11fIEWMMTSDelay, present), 0, "WMMTSDelay" , 0, 12, 12, SigIeWMMTSDelay, {0, 80, 242, 2, 8}, 5, DOT11F_EID_WMMTSDELAY, 0, }, - {offsetof(tDot11fIERICDataDesc, WMMSchedule), offsetof(tDot11fIEWMMSchedule, present), 0, "WMMSchedule" , 0, 22, 22, SigIeWMMSchedule, {0, 80, 242, 2, 9}, 5, DOT11F_EID_WMMSCHEDULE, 0, }, + {offsetof(tDot11fIERICDataDesc, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 0, 1, }, + {offsetof(tDot11fIERICDataDesc, RICDescriptor), offsetof(tDot11fIERICDescriptor, present), 0, "RICDescriptor" , 0, 3, 258, SigIeRICDescriptor, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDESCRIPTOR, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, TSPEC), offsetof(tDot11fIETSPEC, present), 0, "TSPEC" , 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSPEC, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, TCLAS), offsetof(tDot11fIETCLAS, present), offsetof(tDot11fIERICDataDesc, num_TCLAS), "TCLAS" , 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, TCLASSPROC), offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC" , 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLASSPROC, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, TSDelay), offsetof(tDot11fIETSDelay, present), 0, "TSDelay" , 0, 6, 6, SigIeTSDelay, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSDELAY, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, Schedule), offsetof(tDot11fIESchedule, present), 0, "Schedule" , 0, 16, 16, SigIeSchedule, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SCHEDULE, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, present), offsetof(tDot11fIERICDataDesc, num_WMMTCLAS), "WMMTCLAS" , 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, 5, DOT11F_EID_WMMTCLAS, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, WMMTCLASPROC), offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC" , 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, 5, DOT11F_EID_WMMTCLASPROC, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, WMMTSDelay), offsetof(tDot11fIEWMMTSDelay, present), 0, "WMMTSDelay" , 0, 12, 12, SigIeWMMTSDelay, {0, 80, 242, 2, 8}, 5, DOT11F_EID_WMMTSDELAY, 0, 0, }, + {offsetof(tDot11fIERICDataDesc, WMMSchedule), offsetof(tDot11fIEWMMSchedule, present), 0, "WMMSchedule" , 0, 22, 22, SigIeWMMSchedule, {0, 80, 242, 2, 9}, 5, DOT11F_EID_WMMSCHEDULE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; @@ -5784,13 +5799,13 @@ tANI_U32 dot11fUnpackAddBARsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, }; static const tIEDefn IES_AddTSRequest[] = { - {offsetof(tDot11fAddTSRequest, TSPEC), offsetof(tDot11fIETSPEC, present), 0, "TSPEC" , 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSPEC, 1, }, - {offsetof(tDot11fAddTSRequest, TCLAS), offsetof(tDot11fIETCLAS, present), offsetof(tDot11fAddTSRequest, num_TCLAS), "TCLAS" , 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, }, - {offsetof(tDot11fAddTSRequest, TCLASSPROC), offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC" , 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLASSPROC, 0, }, - {offsetof(tDot11fAddTSRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, }, - {offsetof(tDot11fAddTSRequest, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, present), offsetof(tDot11fAddTSRequest, num_WMMTCLAS), "WMMTCLAS" , 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, 5, DOT11F_EID_WMMTCLAS, 0, }, - {offsetof(tDot11fAddTSRequest, WMMTCLASPROC), offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC" , 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, 5, DOT11F_EID_WMMTCLASPROC, 0, }, - {offsetof(tDot11fAddTSRequest, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, + {offsetof(tDot11fAddTSRequest, TSPEC), offsetof(tDot11fIETSPEC, present), 0, "TSPEC" , 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSPEC, 0, 1, }, + {offsetof(tDot11fAddTSRequest, TCLAS), offsetof(tDot11fIETCLAS, present), offsetof(tDot11fAddTSRequest, num_TCLAS), "TCLAS" , 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, 0, }, + {offsetof(tDot11fAddTSRequest, TCLASSPROC), offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC" , 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLASSPROC, 0, 0, }, + {offsetof(tDot11fAddTSRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 0, }, + {offsetof(tDot11fAddTSRequest, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, present), offsetof(tDot11fAddTSRequest, num_WMMTCLAS), "WMMTCLAS" , 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, 5, DOT11F_EID_WMMTCLAS, 0, 0, }, + {offsetof(tDot11fAddTSRequest, WMMTCLASPROC), offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC" , 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, 5, DOT11F_EID_WMMTCLASPROC, 0, 0, }, + {offsetof(tDot11fAddTSRequest, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackAddTSRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAddTSRequest *pFrm) @@ -6021,17 +6036,17 @@ tANI_U32 dot11fUnpackAddTSRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n }; static const tIEDefn IES_AddTSResponse[] = { - {offsetof(tDot11fAddTSResponse, TSDelay), offsetof(tDot11fIETSDelay, present), 0, "TSDelay" , 0, 6, 6, SigIeTSDelay, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSDELAY, 1, }, - {offsetof(tDot11fAddTSResponse, TSPEC), offsetof(tDot11fIETSPEC, present), 0, "TSPEC" , 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSPEC, 1, }, - {offsetof(tDot11fAddTSResponse, TCLAS), offsetof(tDot11fIETCLAS, present), offsetof(tDot11fAddTSResponse, num_TCLAS), "TCLAS" , 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, }, - {offsetof(tDot11fAddTSResponse, TCLASSPROC), offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC" , 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLASSPROC, 0, }, - {offsetof(tDot11fAddTSResponse, Schedule), offsetof(tDot11fIESchedule, present), 0, "Schedule" , 0, 16, 16, SigIeSchedule, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SCHEDULE, 0, }, - {offsetof(tDot11fAddTSResponse, WMMTSDelay), offsetof(tDot11fIEWMMTSDelay, present), 0, "WMMTSDelay" , 0, 12, 12, SigIeWMMTSDelay, {0, 80, 242, 2, 8}, 5, DOT11F_EID_WMMTSDELAY, 0, }, - {offsetof(tDot11fAddTSResponse, WMMSchedule), offsetof(tDot11fIEWMMSchedule, present), 0, "WMMSchedule" , 0, 22, 22, SigIeWMMSchedule, {0, 80, 242, 2, 9}, 5, DOT11F_EID_WMMSCHEDULE, 0, }, - {offsetof(tDot11fAddTSResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, }, - {offsetof(tDot11fAddTSResponse, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, present), offsetof(tDot11fAddTSResponse, num_WMMTCLAS), "WMMTCLAS" , 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, 5, DOT11F_EID_WMMTCLAS, 0, }, - {offsetof(tDot11fAddTSResponse, WMMTCLASPROC), offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC" , 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, 5, DOT11F_EID_WMMTCLASPROC, 0, }, - {offsetof(tDot11fAddTSResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, + {offsetof(tDot11fAddTSResponse, TSDelay), offsetof(tDot11fIETSDelay, present), 0, "TSDelay" , 0, 6, 6, SigIeTSDelay, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSDELAY, 0, 1, }, + {offsetof(tDot11fAddTSResponse, TSPEC), offsetof(tDot11fIETSPEC, present), 0, "TSPEC" , 0, 57, 57, SigIeTSPEC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TSPEC, 0, 1, }, + {offsetof(tDot11fAddTSResponse, TCLAS), offsetof(tDot11fIETCLAS, present), offsetof(tDot11fAddTSResponse, num_TCLAS), "TCLAS" , 2, 7, 45, SigIeTCLAS, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLAS, 0, 0, }, + {offsetof(tDot11fAddTSResponse, TCLASSPROC), offsetof(tDot11fIETCLASSPROC, present), 0, "TCLASSPROC" , 0, 3, 3, SigIeTCLASSPROC, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TCLASSPROC, 0, 0, }, + {offsetof(tDot11fAddTSResponse, Schedule), offsetof(tDot11fIESchedule, present), 0, "Schedule" , 0, 16, 16, SigIeSchedule, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SCHEDULE, 0, 0, }, + {offsetof(tDot11fAddTSResponse, WMMTSDelay), offsetof(tDot11fIEWMMTSDelay, present), 0, "WMMTSDelay" , 0, 12, 12, SigIeWMMTSDelay, {0, 80, 242, 2, 8}, 5, DOT11F_EID_WMMTSDELAY, 0, 0, }, + {offsetof(tDot11fAddTSResponse, WMMSchedule), offsetof(tDot11fIEWMMSchedule, present), 0, "WMMSchedule" , 0, 22, 22, SigIeWMMSchedule, {0, 80, 242, 2, 9}, 5, DOT11F_EID_WMMSCHEDULE, 0, 0, }, + {offsetof(tDot11fAddTSResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 0, }, + {offsetof(tDot11fAddTSResponse, WMMTCLAS), offsetof(tDot11fIEWMMTCLAS, present), offsetof(tDot11fAddTSResponse, num_WMMTCLAS), "WMMTCLAS" , 2, 13, 51, SigIeWMMTCLAS, {0, 80, 242, 2, 6}, 5, DOT11F_EID_WMMTCLAS, 0, 0, }, + {offsetof(tDot11fAddTSResponse, WMMTCLASPROC), offsetof(tDot11fIEWMMTCLASPROC, present), 0, "WMMTCLASPROC" , 0, 9, 9, SigIeWMMTCLASPROC, {0, 80, 242, 2, 7}, 5, DOT11F_EID_WMMTCLASPROC, 0, 0, }, + {offsetof(tDot11fAddTSResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackAddTSResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAddTSResponse *pFrm) @@ -6314,31 +6329,31 @@ tANI_U32 dot11fUnpackAddTSResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_AssocRequest[] = { - {offsetof(tDot11fAssocRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, - {offsetof(tDot11fAssocRequest, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fAssocRequest, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fAssocRequest, PowerCaps), offsetof(tDot11fIEPowerCaps, present), 0, "PowerCaps" , 0, 4, 4, SigIePowerCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCAPS, 0, }, - {offsetof(tDot11fAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, }, - {offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, }, - {offsetof(tDot11fAssocRequest, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, }, - {offsetof(tDot11fAssocRequest, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fAssocRequest, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fAssocRequest, WPAOpaque), offsetof(tDot11fIEWPAOpaque, present), 0, "WPAOpaque" , 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPAOPAQUE, 0, }, - {offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, - {offsetof(tDot11fAssocRequest, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, }, - {offsetof(tDot11fAssocRequest, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fAssocRequest, WscIEOpaque), offsetof(tDot11fIEWscIEOpaque, present), 0, "WscIEOpaque" , 0, 8, 255, SigIeWscIEOpaque, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCIEOPAQUE, 0, }, - {offsetof(tDot11fAssocRequest, WAPIOpaque), offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque" , 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPIOPAQUE, 0, }, - {offsetof(tDot11fAssocRequest, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fAssocRequest, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, - {offsetof(tDot11fAssocRequest, P2PIEOpaque), offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque" , 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PIEOPAQUE, 0, }, - {offsetof(tDot11fAssocRequest, WFDIEOpaque), offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque" , 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, 4, DOT11F_EID_WFDIEOPAQUE, 0, }, - {offsetof(tDot11fAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fAssocRequest, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, - {offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, - {offsetof(tDot11fAssocRequest, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, }, + {offsetof(tDot11fAssocRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 1, }, + {offsetof(tDot11fAssocRequest, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fAssocRequest, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fAssocRequest, PowerCaps), offsetof(tDot11fIEPowerCaps, present), 0, "PowerCaps" , 0, 4, 4, SigIePowerCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCAPS, 0, 0, }, + {offsetof(tDot11fAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, + {offsetof(tDot11fAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, + {offsetof(tDot11fAssocRequest, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, 0, }, + {offsetof(tDot11fAssocRequest, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fAssocRequest, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fAssocRequest, WPAOpaque), offsetof(tDot11fIEWPAOpaque, present), 0, "WPAOpaque" , 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPAOPAQUE, 0, 0, }, + {offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, }, + {offsetof(tDot11fAssocRequest, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, 0, }, + {offsetof(tDot11fAssocRequest, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fAssocRequest, WscIEOpaque), offsetof(tDot11fIEWscIEOpaque, present), 0, "WscIEOpaque" , 0, 8, 255, SigIeWscIEOpaque, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCIEOPAQUE, 0, 0, }, + {offsetof(tDot11fAssocRequest, WAPIOpaque), offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque" , 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPIOPAQUE, 0, 0, }, + {offsetof(tDot11fAssocRequest, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fAssocRequest, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, 0, }, + {offsetof(tDot11fAssocRequest, P2PIEOpaque), offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque" , 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PIEOPAQUE, 0, 0, }, + {offsetof(tDot11fAssocRequest, WFDIEOpaque), offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque" , 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, 4, DOT11F_EID_WFDIEOPAQUE, 0, 0, }, + {offsetof(tDot11fAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fAssocRequest, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, 0, }, + {offsetof(tDot11fAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, 0, }, + {offsetof(tDot11fAssocRequest, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAssocRequest *pFrm) @@ -6966,33 +6981,33 @@ tANI_U32 dot11fUnpackAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n }; static const tIEDefn IES_AssocResponse[] = { - {offsetof(tDot11fAssocResponse, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fAssocResponse, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fAssocResponse, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, }, - {offsetof(tDot11fAssocResponse, RCPIIE), offsetof(tDot11fIERCPIIE, present), 0, "RCPIIE" , 0, 3, 3, SigIeRCPIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RCPIIE, 0, }, - {offsetof(tDot11fAssocResponse, RSNIIE), offsetof(tDot11fIERSNIIE, present), 0, "RSNIIE" , 0, 3, 3, SigIeRSNIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNIIE, 0, }, - {offsetof(tDot11fAssocResponse, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fAssocResponse, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fAssocResponse, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fAssocResponse, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fAssocResponse, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, }, - {offsetof(tDot11fAssocResponse, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, - {offsetof(tDot11fAssocResponse, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, - {offsetof(tDot11fAssocResponse, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fAssocResponse, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, }, - {offsetof(tDot11fAssocResponse, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, }, - {offsetof(tDot11fAssocResponse, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, - {offsetof(tDot11fAssocResponse, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fAssocResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, - {offsetof(tDot11fAssocResponse, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, }, - {offsetof(tDot11fAssocResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), offsetof(tDot11fAssocResponse, num_WMMTSPEC), "WMMTSPEC" , 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, }, - {offsetof(tDot11fAssocResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fAssocResponse, WscAssocRes), offsetof(tDot11fIEWscAssocRes, present), 0, "WscAssocRes" , 0, 6, 37, SigIeWscAssocRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCASSOCRES, 0, }, - {offsetof(tDot11fAssocResponse, P2PAssocRes), offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes" , 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PASSOCRES, 0, }, - {offsetof(tDot11fAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fAssocResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, - {offsetof(tDot11fAssocResponse, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fAssocResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, - {offsetof(tDot11fAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, + {offsetof(tDot11fAssocResponse, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fAssocResponse, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fAssocResponse, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, 0, }, + {offsetof(tDot11fAssocResponse, RCPIIE), offsetof(tDot11fIERCPIIE, present), 0, "RCPIIE" , 0, 3, 3, SigIeRCPIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RCPIIE, 0, 0, }, + {offsetof(tDot11fAssocResponse, RSNIIE), offsetof(tDot11fIERSNIIE, present), 0, "RSNIIE" , 0, 3, 3, SigIeRSNIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNIIE, 0, 0, }, + {offsetof(tDot11fAssocResponse, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fAssocResponse, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fAssocResponse, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fAssocResponse, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fAssocResponse, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, 0, }, + {offsetof(tDot11fAssocResponse, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, 0, }, + {offsetof(tDot11fAssocResponse, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, 0, }, + {offsetof(tDot11fAssocResponse, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fAssocResponse, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, 0, }, + {offsetof(tDot11fAssocResponse, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, 0, }, + {offsetof(tDot11fAssocResponse, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, }, + {offsetof(tDot11fAssocResponse, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fAssocResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, + {offsetof(tDot11fAssocResponse, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, 0, }, + {offsetof(tDot11fAssocResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), offsetof(tDot11fAssocResponse, num_WMMTSPEC), "WMMTSPEC" , 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 0, }, + {offsetof(tDot11fAssocResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fAssocResponse, WscAssocRes), offsetof(tDot11fIEWscAssocRes, present), 0, "WscAssocRes" , 0, 6, 37, SigIeWscAssocRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCASSOCRES, 0, 0, }, + {offsetof(tDot11fAssocResponse, P2PAssocRes), offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes" , 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PASSOCRES, 0, 0, }, + {offsetof(tDot11fAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fAssocResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, 0, }, + {offsetof(tDot11fAssocResponse, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fAssocResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, + {offsetof(tDot11fAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAssocResponse *pFrm) @@ -8111,12 +8126,12 @@ tANI_U32 dot11fUnpackAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_Authentication[] = { - {offsetof(tDot11fAuthentication, ChallengeText), offsetof(tDot11fIEChallengeText, present), 0, "ChallengeText" , 0, 3, 255, SigIeChallengeText, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHALLENGETEXT, 0, }, - {offsetof(tDot11fAuthentication, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, }, - {offsetof(tDot11fAuthentication, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fAuthentication, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fAuthentication, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, - {offsetof(tDot11fAuthentication, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fAuthentication, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, }, + {offsetof(tDot11fAuthentication, ChallengeText), offsetof(tDot11fIEChallengeText, present), 0, "ChallengeText" , 0, 3, 255, SigIeChallengeText, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHALLENGETEXT, 0, 0, }, + {offsetof(tDot11fAuthentication, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, + {offsetof(tDot11fAuthentication, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fAuthentication, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fAuthentication, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, 0, }, + {offsetof(tDot11fAuthentication, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fAuthentication, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackAuthentication(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fAuthentication *pFrm) @@ -8520,51 +8535,51 @@ tANI_U32 dot11fUnpackAuthentication(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_Beacon[] = { - {offsetof(tDot11fBeacon, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, - {offsetof(tDot11fBeacon, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fBeacon, FHParamSet), offsetof(tDot11fIEFHParamSet, present), 0, "FHParamSet" , 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMSET, 0, }, - {offsetof(tDot11fBeacon, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, }, - {offsetof(tDot11fBeacon, CFParams), offsetof(tDot11fIECFParams, present), 0, "CFParams" , 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CFPARAMS, 0, }, - {offsetof(tDot11fBeacon, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, }, - {offsetof(tDot11fBeacon, TIM), offsetof(tDot11fIETIM, present), 0, "TIM" , 0, 6, 256, SigIeTIM, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIM, 0, }, - {offsetof(tDot11fBeacon, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, }, - {offsetof(tDot11fBeacon, FHParams), offsetof(tDot11fIEFHParams, present), 0, "FHParams" , 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMS, 0, }, - {offsetof(tDot11fBeacon, FHPattTable), offsetof(tDot11fIEFHPattTable, present), 0, "FHPattTable" , 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPATTTABLE, 0, }, - {offsetof(tDot11fBeacon, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, - {offsetof(tDot11fBeacon, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, }, - {offsetof(tDot11fBeacon, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, }, - {offsetof(tDot11fBeacon, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, }, - {offsetof(tDot11fBeacon, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, }, - {offsetof(tDot11fBeacon, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fBeacon, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, - {offsetof(tDot11fBeacon, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad" , 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, }, - {offsetof(tDot11fBeacon, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, }, - {offsetof(tDot11fBeacon, QOSCapsAp), offsetof(tDot11fIEQOSCapsAp, present), 0, "QOSCapsAp" , 0, 3, 3, SigIeQOSCapsAp, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSAP, 0, }, - {offsetof(tDot11fBeacon, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, }, - {offsetof(tDot11fBeacon, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fBeacon, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fBeacon, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, - {offsetof(tDot11fBeacon, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fBeacon, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, }, - {offsetof(tDot11fBeacon, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, }, - {offsetof(tDot11fBeacon, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, }, - {offsetof(tDot11fBeacon, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, }, - {offsetof(tDot11fBeacon, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, - {offsetof(tDot11fBeacon, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, - {offsetof(tDot11fBeacon, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fBeacon, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, - {offsetof(tDot11fBeacon, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, }, - {offsetof(tDot11fBeacon, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fBeacon, WscBeacon), offsetof(tDot11fIEWscBeacon, present), 0, "WscBeacon" , 0, 6, 84, SigIeWscBeacon, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACON, 0, }, - {offsetof(tDot11fBeacon, P2PBeacon), offsetof(tDot11fIEP2PBeacon, present), 0, "P2PBeacon" , 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACON, 0, }, - {offsetof(tDot11fBeacon, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fBeacon, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, - {offsetof(tDot11fBeacon, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, - {offsetof(tDot11fBeacon, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fBeacon, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, - {offsetof(tDot11fBeacon, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, - {offsetof(tDot11fBeacon, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, - {offsetof(tDot11fBeacon, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, }, + {offsetof(tDot11fBeacon, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 1, }, + {offsetof(tDot11fBeacon, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fBeacon, FHParamSet), offsetof(tDot11fIEFHParamSet, present), 0, "FHParamSet" , 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMSET, 0, 0, }, + {offsetof(tDot11fBeacon, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, 0, }, + {offsetof(tDot11fBeacon, CFParams), offsetof(tDot11fIECFParams, present), 0, "CFParams" , 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CFPARAMS, 0, 0, }, + {offsetof(tDot11fBeacon, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, 0, }, + {offsetof(tDot11fBeacon, TIM), offsetof(tDot11fIETIM, present), 0, "TIM" , 0, 6, 256, SigIeTIM, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIM, 0, 0, }, + {offsetof(tDot11fBeacon, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, 0, }, + {offsetof(tDot11fBeacon, FHParams), offsetof(tDot11fIEFHParams, present), 0, "FHParams" , 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMS, 0, 0, }, + {offsetof(tDot11fBeacon, FHPattTable), offsetof(tDot11fIEFHPattTable, present), 0, "FHPattTable" , 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPATTTABLE, 0, 0, }, + {offsetof(tDot11fBeacon, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, 0, }, + {offsetof(tDot11fBeacon, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeacon, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, 0, }, + {offsetof(tDot11fBeacon, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, 0, }, + {offsetof(tDot11fBeacon, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, 0, }, + {offsetof(tDot11fBeacon, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fBeacon, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + {offsetof(tDot11fBeacon, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad" , 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, 0, }, + {offsetof(tDot11fBeacon, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, 0, }, + {offsetof(tDot11fBeacon, QOSCapsAp), offsetof(tDot11fIEQOSCapsAp, present), 0, "QOSCapsAp" , 0, 3, 3, SigIeQOSCapsAp, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSAP, 0, 0, }, + {offsetof(tDot11fBeacon, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, 0, }, + {offsetof(tDot11fBeacon, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fBeacon, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fBeacon, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, 0, }, + {offsetof(tDot11fBeacon, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fBeacon, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, 0, }, + {offsetof(tDot11fBeacon, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeacon, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, 0, }, + {offsetof(tDot11fBeacon, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, 0, }, + {offsetof(tDot11fBeacon, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, }, + {offsetof(tDot11fBeacon, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, 0, }, + {offsetof(tDot11fBeacon, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fBeacon, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, + {offsetof(tDot11fBeacon, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, 0, }, + {offsetof(tDot11fBeacon, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fBeacon, WscBeacon), offsetof(tDot11fIEWscBeacon, present), 0, "WscBeacon" , 0, 6, 84, SigIeWscBeacon, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACON, 0, 0, }, + {offsetof(tDot11fBeacon, P2PBeacon), offsetof(tDot11fIEP2PBeacon, present), 0, "P2PBeacon" , 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACON, 0, 0, }, + {offsetof(tDot11fBeacon, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fBeacon, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, 0, }, + {offsetof(tDot11fBeacon, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, 0, }, + {offsetof(tDot11fBeacon, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fBeacon, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, 0, }, + {offsetof(tDot11fBeacon, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeacon, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, + {offsetof(tDot11fBeacon, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeacon *pFrm) @@ -9650,10 +9665,10 @@ tANI_U32 dot11fUnpackBeacon(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, t }; static const tIEDefn IES_Beacon1[] = { - {offsetof(tDot11fBeacon1, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, - {offsetof(tDot11fBeacon1, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fBeacon1, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, }, - {offsetof(tDot11fBeacon1, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, }, + {offsetof(tDot11fBeacon1, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 1, }, + {offsetof(tDot11fBeacon1, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fBeacon1, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, 0, }, + {offsetof(tDot11fBeacon1, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackBeacon1(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeacon1 *pFrm) @@ -9739,40 +9754,40 @@ tANI_U32 dot11fUnpackBeacon1(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, }; static const tIEDefn IES_Beacon2[] = { - {offsetof(tDot11fBeacon2, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, }, - {offsetof(tDot11fBeacon2, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, - {offsetof(tDot11fBeacon2, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, }, - {offsetof(tDot11fBeacon2, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, }, - {offsetof(tDot11fBeacon2, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, }, - {offsetof(tDot11fBeacon2, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, }, - {offsetof(tDot11fBeacon2, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fBeacon2, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, }, - {offsetof(tDot11fBeacon2, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, }, - {offsetof(tDot11fBeacon2, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, }, - {offsetof(tDot11fBeacon2, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fBeacon2, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fBeacon2, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, - {offsetof(tDot11fBeacon2, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fBeacon2, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, }, - {offsetof(tDot11fBeacon2, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, }, - {offsetof(tDot11fBeacon2, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, }, - {offsetof(tDot11fBeacon2, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, }, - {offsetof(tDot11fBeacon2, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, - {offsetof(tDot11fBeacon2, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fBeacon2, WscBeacon), offsetof(tDot11fIEWscBeacon, present), 0, "WscBeacon" , 0, 6, 84, SigIeWscBeacon, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACON, 0, }, - {offsetof(tDot11fBeacon2, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, - {offsetof(tDot11fBeacon2, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fBeacon2, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, - {offsetof(tDot11fBeacon2, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, }, - {offsetof(tDot11fBeacon2, P2PBeacon), offsetof(tDot11fIEP2PBeacon, present), 0, "P2PBeacon" , 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACON, 0, }, - {offsetof(tDot11fBeacon2, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fBeacon2, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, - {offsetof(tDot11fBeacon2, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, - {offsetof(tDot11fBeacon2, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fBeacon2, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, - {offsetof(tDot11fBeacon2, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, - {offsetof(tDot11fBeacon2, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, - {offsetof(tDot11fBeacon2, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, }, + {offsetof(tDot11fBeacon2, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, 0, }, + {offsetof(tDot11fBeacon2, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, 0, }, + {offsetof(tDot11fBeacon2, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeacon2, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, 0, }, + {offsetof(tDot11fBeacon2, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, 0, }, + {offsetof(tDot11fBeacon2, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, 0, }, + {offsetof(tDot11fBeacon2, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fBeacon2, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, + {offsetof(tDot11fBeacon2, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, 0, }, + {offsetof(tDot11fBeacon2, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, 0, }, + {offsetof(tDot11fBeacon2, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fBeacon2, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fBeacon2, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, 0, }, + {offsetof(tDot11fBeacon2, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fBeacon2, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, 0, }, + {offsetof(tDot11fBeacon2, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeacon2, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, 0, }, + {offsetof(tDot11fBeacon2, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, 0, }, + {offsetof(tDot11fBeacon2, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, }, + {offsetof(tDot11fBeacon2, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fBeacon2, WscBeacon), offsetof(tDot11fIEWscBeacon, present), 0, "WscBeacon" , 0, 6, 84, SigIeWscBeacon, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACON, 0, 0, }, + {offsetof(tDot11fBeacon2, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, 0, }, + {offsetof(tDot11fBeacon2, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fBeacon2, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, + {offsetof(tDot11fBeacon2, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, 0, }, + {offsetof(tDot11fBeacon2, P2PBeacon), offsetof(tDot11fIEP2PBeacon, present), 0, "P2PBeacon" , 0, 6, 61, SigIeP2PBeacon, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACON, 0, 0, }, + {offsetof(tDot11fBeacon2, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fBeacon2, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, 0, }, + {offsetof(tDot11fBeacon2, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, 0, }, + {offsetof(tDot11fBeacon2, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fBeacon2, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, 0, }, + {offsetof(tDot11fBeacon2, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeacon2, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, + {offsetof(tDot11fBeacon2, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeacon2 *pFrm) @@ -10703,52 +10718,52 @@ tANI_U32 dot11fUnpackBeacon2(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, }; static const tIEDefn IES_BeaconIEs[] = { - {offsetof(tDot11fBeaconIEs, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, - {offsetof(tDot11fBeaconIEs, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fBeaconIEs, FHParamSet), offsetof(tDot11fIEFHParamSet, present), 0, "FHParamSet" , 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMSET, 0, }, - {offsetof(tDot11fBeaconIEs, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, }, - {offsetof(tDot11fBeaconIEs, CFParams), offsetof(tDot11fIECFParams, present), 0, "CFParams" , 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CFPARAMS, 0, }, - {offsetof(tDot11fBeaconIEs, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, }, - {offsetof(tDot11fBeaconIEs, TIM), offsetof(tDot11fIETIM, present), 0, "TIM" , 0, 6, 256, SigIeTIM, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIM, 0, }, - {offsetof(tDot11fBeaconIEs, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, }, - {offsetof(tDot11fBeaconIEs, FHParams), offsetof(tDot11fIEFHParams, present), 0, "FHParams" , 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMS, 0, }, - {offsetof(tDot11fBeaconIEs, FHPattTable), offsetof(tDot11fIEFHPattTable, present), 0, "FHPattTable" , 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPATTTABLE, 0, }, - {offsetof(tDot11fBeaconIEs, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, - {offsetof(tDot11fBeaconIEs, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, }, - {offsetof(tDot11fBeaconIEs, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, }, - {offsetof(tDot11fBeaconIEs, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, }, - {offsetof(tDot11fBeaconIEs, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, }, - {offsetof(tDot11fBeaconIEs, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fBeaconIEs, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, - {offsetof(tDot11fBeaconIEs, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad" , 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, }, - {offsetof(tDot11fBeaconIEs, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, }, - {offsetof(tDot11fBeaconIEs, QOSCapsAp), offsetof(tDot11fIEQOSCapsAp, present), 0, "QOSCapsAp" , 0, 3, 3, SigIeQOSCapsAp, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSAP, 0, }, - {offsetof(tDot11fBeaconIEs, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, }, - {offsetof(tDot11fBeaconIEs, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fBeaconIEs, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fBeaconIEs, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, - {offsetof(tDot11fBeaconIEs, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fBeaconIEs, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, }, - {offsetof(tDot11fBeaconIEs, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, }, - {offsetof(tDot11fBeaconIEs, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, }, - {offsetof(tDot11fBeaconIEs, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, }, - {offsetof(tDot11fBeaconIEs, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, - {offsetof(tDot11fBeaconIEs, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, - {offsetof(tDot11fBeaconIEs, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, - {offsetof(tDot11fBeaconIEs, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fBeaconIEs, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, - {offsetof(tDot11fBeaconIEs, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, }, - {offsetof(tDot11fBeaconIEs, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fBeaconIEs, WscBeaconProbeRes), offsetof(tDot11fIEWscBeaconProbeRes, present), 0, "WscBeaconProbeRes" , 0, 6, 319, SigIeWscBeaconProbeRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACONPROBERES, 0, }, - {offsetof(tDot11fBeaconIEs, P2PBeaconProbeRes), offsetof(tDot11fIEP2PBeaconProbeRes, present), 0, "P2PBeaconProbeRes" , 0, 6, 1150, SigIeP2PBeaconProbeRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACONPROBERES, 0, }, - {offsetof(tDot11fBeaconIEs, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fBeaconIEs, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, - {offsetof(tDot11fBeaconIEs, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, - {offsetof(tDot11fBeaconIEs, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fBeaconIEs, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, - {offsetof(tDot11fBeaconIEs, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, - {offsetof(tDot11fBeaconIEs, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, - {offsetof(tDot11fBeaconIEs, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, }, + {offsetof(tDot11fBeaconIEs, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 1, }, + {offsetof(tDot11fBeaconIEs, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fBeaconIEs, FHParamSet), offsetof(tDot11fIEFHParamSet, present), 0, "FHParamSet" , 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMSET, 0, 0, }, + {offsetof(tDot11fBeaconIEs, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, CFParams), offsetof(tDot11fIECFParams, present), 0, "CFParams" , 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CFPARAMS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, TIM), offsetof(tDot11fIETIM, present), 0, "TIM" , 0, 6, 256, SigIeTIM, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIM, 0, 0, }, + {offsetof(tDot11fBeaconIEs, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, 0, }, + {offsetof(tDot11fBeaconIEs, FHParams), offsetof(tDot11fIEFHParams, present), 0, "FHParams" , 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, FHPattTable), offsetof(tDot11fIEFHPattTable, present), 0, "FHPattTable" , 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPATTTABLE, 0, 0, }, + {offsetof(tDot11fBeaconIEs, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeaconIEs, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, 0, }, + {offsetof(tDot11fBeaconIEs, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fBeaconIEs, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + {offsetof(tDot11fBeaconIEs, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad" , 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, 0, }, + {offsetof(tDot11fBeaconIEs, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, 0, }, + {offsetof(tDot11fBeaconIEs, QOSCapsAp), offsetof(tDot11fIEQOSCapsAp, present), 0, "QOSCapsAp" , 0, 3, 3, SigIeQOSCapsAp, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSAP, 0, 0, }, + {offsetof(tDot11fBeaconIEs, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, 0, }, + {offsetof(tDot11fBeaconIEs, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fBeaconIEs, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fBeaconIEs, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, 0, }, + {offsetof(tDot11fBeaconIEs, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeaconIEs, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, 0, }, + {offsetof(tDot11fBeaconIEs, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, 0, }, + {offsetof(tDot11fBeaconIEs, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fBeaconIEs, WscBeaconProbeRes), offsetof(tDot11fIEWscBeaconProbeRes, present), 0, "WscBeaconProbeRes" , 0, 6, 319, SigIeWscBeaconProbeRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCBEACONPROBERES, 0, 0, }, + {offsetof(tDot11fBeaconIEs, P2PBeaconProbeRes), offsetof(tDot11fIEP2PBeaconProbeRes, present), 0, "P2PBeaconProbeRes" , 0, 6, 1150, SigIeP2PBeaconProbeRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PBEACONPROBERES, 0, 0, }, + {offsetof(tDot11fBeaconIEs, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, 0, }, + {offsetof(tDot11fBeaconIEs, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, 0, }, + {offsetof(tDot11fBeaconIEs, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fBeaconIEs, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, 0, }, + {offsetof(tDot11fBeaconIEs, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fBeaconIEs, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, + {offsetof(tDot11fBeaconIEs, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackBeaconIEs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fBeaconIEs *pFrm) @@ -11941,9 +11956,9 @@ tANI_U32 dot11fUnpackBeaconIEs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf }; static const tIEDefn IES_ChannelSwitch[] = { - {offsetof(tDot11fChannelSwitch, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 1, }, - {offsetof(tDot11fChannelSwitch, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, }, - {offsetof(tDot11fChannelSwitch, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, }, + {offsetof(tDot11fChannelSwitch, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, 1, }, + {offsetof(tDot11fChannelSwitch, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fChannelSwitch, WiderBWChanSwitchAnn), offsetof(tDot11fIEWiderBWChanSwitchAnn, present), 0, "WiderBWChanSwitchAnn" , 0, 5, 5, SigIeWiderBWChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WIDERBWCHANSWITCHANN, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackChannelSwitch(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fChannelSwitch *pFrm) @@ -12006,7 +12021,7 @@ tANI_U32 dot11fUnpackChannelSwitch(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_DeAuth[] = { - {offsetof(tDot11fDeAuth, P2PDeAuth), offsetof(tDot11fIEP2PDeAuth, present), 0, "P2PDeAuth" , 0, 6, 10, SigIeP2PDeAuth, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDEAUTH, 0, }, + {offsetof(tDot11fDeAuth, P2PDeAuth), offsetof(tDot11fIEP2PDeAuth, present), 0, "P2PDeAuth" , 0, 6, 10, SigIeP2PDeAuth, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDEAUTH, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackDeAuth(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fDeAuth *pFrm) @@ -12144,7 +12159,7 @@ tANI_U32 dot11fUnpackDelTS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tD }; static const tIEDefn IES_DeviceDiscoverabilityReq[] = { - {offsetof(tDot11fDeviceDiscoverabilityReq, P2PDeviceDiscoverabilityReq), offsetof(tDot11fIEP2PDeviceDiscoverabilityReq, present), 0, "P2PDeviceDiscoverabilityReq" , 0, 6, 56, SigIeP2PDeviceDiscoverabilityReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDEVICEDISCOVERABILITYREQ, 1, }, + {offsetof(tDot11fDeviceDiscoverabilityReq, P2PDeviceDiscoverabilityReq), offsetof(tDot11fIEP2PDeviceDiscoverabilityReq, present), 0, "P2PDeviceDiscoverabilityReq" , 0, 6, 56, SigIeP2PDeviceDiscoverabilityReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDEVICEDISCOVERABILITYREQ, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackDeviceDiscoverabilityReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fDeviceDiscoverabilityReq *pFrm) @@ -12214,7 +12229,7 @@ tANI_U32 dot11fUnpackDeviceDiscoverabilityReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf }; static const tIEDefn IES_DeviceDiscoverabilityRes[] = { - {offsetof(tDot11fDeviceDiscoverabilityRes, P2PDeviceDiscoverabilityRes), offsetof(tDot11fIEP2PDeviceDiscoverabilityRes, present), 0, "P2PDeviceDiscoverabilityRes" , 0, 6, 10, SigIeP2PDeviceDiscoverabilityRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDEVICEDISCOVERABILITYRES, 1, }, + {offsetof(tDot11fDeviceDiscoverabilityRes, P2PDeviceDiscoverabilityRes), offsetof(tDot11fIEP2PDeviceDiscoverabilityRes, present), 0, "P2PDeviceDiscoverabilityRes" , 0, 6, 10, SigIeP2PDeviceDiscoverabilityRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDEVICEDISCOVERABILITYRES, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackDeviceDiscoverabilityRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fDeviceDiscoverabilityRes *pFrm) @@ -12269,7 +12284,7 @@ tANI_U32 dot11fUnpackDeviceDiscoverabilityRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf }; static const tIEDefn IES_Disassociation[] = { - {offsetof(tDot11fDisassociation, P2PDisAssoc), offsetof(tDot11fIEP2PDisAssoc, present), 0, "P2PDisAssoc" , 0, 6, 10, SigIeP2PDisAssoc, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDISASSOC, 0, }, + {offsetof(tDot11fDisassociation, P2PDisAssoc), offsetof(tDot11fIEP2PDisAssoc, present), 0, "P2PDisAssoc" , 0, 6, 10, SigIeP2PDisAssoc, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PDISASSOC, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackDisassociation(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fDisassociation *pFrm) @@ -12358,7 +12373,7 @@ tANI_U32 dot11fUnpackGODiscoverabilityReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tA }; static const tIEDefn IES_GONegCnf[] = { - {offsetof(tDot11fGONegCnf, P2PGONegCnf), offsetof(tDot11fIEP2PGONegCnf, present), 0, "P2PGONegCnf" , 0, 6, 321, SigIeP2PGONegCnf, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PGONEGCNF, 1, }, + {offsetof(tDot11fGONegCnf, P2PGONegCnf), offsetof(tDot11fIEP2PGONegCnf, present), 0, "P2PGONegCnf" , 0, 6, 321, SigIeP2PGONegCnf, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PGONEGCNF, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackGONegCnf(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fGONegCnf *pFrm) @@ -12460,8 +12475,8 @@ tANI_U32 dot11fUnpackGONegCnf(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, }; static const tIEDefn IES_GONegReq[] = { - {offsetof(tDot11fGONegReq, P2PGONegWPS), offsetof(tDot11fIEP2PGONegWPS, present), 0, "P2PGONegWPS" , 0, 6, 17, SigIeP2PGONegWPS, {0, 80, 242, 4, 0}, 4, DOT11F_EID_P2PGONEGWPS, 1, }, - {offsetof(tDot11fGONegReq, P2PGONegReq), offsetof(tDot11fIEP2PGONegReq, present), 0, "P2PGONegReq" , 0, 6, 364, SigIeP2PGONegReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PGONEGREQ, 1, }, + {offsetof(tDot11fGONegReq, P2PGONegWPS), offsetof(tDot11fIEP2PGONegWPS, present), 0, "P2PGONegWPS" , 0, 6, 17, SigIeP2PGONegWPS, {0, 80, 242, 4, 0}, 4, DOT11F_EID_P2PGONEGWPS, 0, 1, }, + {offsetof(tDot11fGONegReq, P2PGONegReq), offsetof(tDot11fIEP2PGONegReq, present), 0, "P2PGONegReq" , 0, 6, 364, SigIeP2PGONegReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PGONEGREQ, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackGONegReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fGONegReq *pFrm) @@ -12640,8 +12655,8 @@ tANI_U32 dot11fUnpackGONegReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, }; static const tIEDefn IES_GONegRes[] = { - {offsetof(tDot11fGONegRes, P2PGONegWPS), offsetof(tDot11fIEP2PGONegWPS, present), 0, "P2PGONegWPS" , 0, 6, 17, SigIeP2PGONegWPS, {0, 80, 242, 4, 0}, 4, DOT11F_EID_P2PGONEGWPS, 1, }, - {offsetof(tDot11fGONegRes, P2PGONegRes), offsetof(tDot11fIEP2PGONegRes, present), 0, "P2PGONegRes" , 0, 6, 394, SigIeP2PGONegRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PGONEGRES, 1, }, + {offsetof(tDot11fGONegRes, P2PGONegWPS), offsetof(tDot11fIEP2PGONegWPS, present), 0, "P2PGONegWPS" , 0, 6, 17, SigIeP2PGONegWPS, {0, 80, 242, 4, 0}, 4, DOT11F_EID_P2PGONEGWPS, 0, 1, }, + {offsetof(tDot11fGONegRes, P2PGONegRes), offsetof(tDot11fIEP2PGONegRes, present), 0, "P2PGONegRes" , 0, 6, 394, SigIeP2PGONegRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PGONEGRES, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackGONegRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fGONegRes *pFrm) @@ -12816,8 +12831,8 @@ tANI_U32 dot11fUnpackGONegRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, }; static const tIEDefn IES_HT2040BSSCoexistenceManagementActionFrame[] = { - {offsetof(tDot11fHT2040BSSCoexistenceManagementActionFrame, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 1, }, - {offsetof(tDot11fHT2040BSSCoexistenceManagementActionFrame, HT2040BSSIntolerantReport), offsetof(tDot11fIEHT2040BSSIntolerantReport, present), 0, "HT2040BSSIntolerantReport" , 0, 3, 53, SigIeHT2040BSSIntolerantReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSINTOLERANTREPORT, 1, }, + {offsetof(tDot11fHT2040BSSCoexistenceManagementActionFrame, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, 1, }, + {offsetof(tDot11fHT2040BSSCoexistenceManagementActionFrame, HT2040BSSIntolerantReport), offsetof(tDot11fIEHT2040BSSIntolerantReport, present), 0, "HT2040BSSIntolerantReport" , 0, 3, 53, SigIeHT2040BSSIntolerantReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSINTOLERANTREPORT, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackHT2040BSSCoexistenceManagementActionFrame(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fHT2040BSSCoexistenceManagementActionFrame *pFrm) @@ -12878,7 +12893,7 @@ tANI_U32 dot11fUnpackHT2040BSSCoexistenceManagementActionFrame(tpAniSirGlobal pC }; static const tIEDefn IES_InvitationReq[] = { - {offsetof(tDot11fInvitationReq, P2PInvitationReq), offsetof(tDot11fIEP2PInvitationReq, present), 0, "P2PInvitationReq" , 0, 6, 385, SigIeP2PInvitationReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PINVITATIONREQ, 1, }, + {offsetof(tDot11fInvitationReq, P2PInvitationReq), offsetof(tDot11fIEP2PInvitationReq, present), 0, "P2PInvitationReq" , 0, 6, 385, SigIeP2PInvitationReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PINVITATIONREQ, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackInvitationReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fInvitationReq *pFrm) @@ -13010,7 +13025,7 @@ tANI_U32 dot11fUnpackInvitationReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_InvitationRes[] = { - {offsetof(tDot11fInvitationRes, P2PInvitationRes), offsetof(tDot11fIEP2PInvitationRes, present), 0, "P2PInvitationRes" , 0, 6, 289, SigIeP2PInvitationRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PINVITATIONRES, 1, }, + {offsetof(tDot11fInvitationRes, P2PInvitationRes), offsetof(tDot11fIEP2PInvitationRes, present), 0, "P2PInvitationRes" , 0, 6, 289, SigIeP2PInvitationRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PINVITATIONRES, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackInvitationRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fInvitationRes *pFrm) @@ -13208,7 +13223,7 @@ tANI_U32 dot11fUnpackLinkMeasurementRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, }; static const tIEDefn IES_MeasurementReport[] = { - {offsetof(tDot11fMeasurementReport, MeasurementReport), offsetof(tDot11fIEMeasurementReport, present), 0, "MeasurementReport" , 0, 5, 31, SigIeMeasurementReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREPORT, 1, }, + {offsetof(tDot11fMeasurementReport, MeasurementReport), offsetof(tDot11fIEMeasurementReport, present), 0, "MeasurementReport" , 0, 5, 31, SigIeMeasurementReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREPORT, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackMeasurementReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fMeasurementReport *pFrm) @@ -13304,7 +13319,7 @@ tANI_U32 dot11fUnpackMeasurementReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_ }; static const tIEDefn IES_MeasurementRequest[] = { - {offsetof(tDot11fMeasurementRequest, MeasurementRequest), offsetof(tDot11fIEMeasurementRequest, present), offsetof(tDot11fMeasurementRequest, num_MeasurementRequest), "MeasurementRequest" , 4, 16, 18, SigIeMeasurementRequest, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREQUEST, 1, }, + {offsetof(tDot11fMeasurementRequest, MeasurementRequest), offsetof(tDot11fIEMeasurementRequest, present), offsetof(tDot11fMeasurementRequest, num_MeasurementRequest), "MeasurementRequest" , 4, 16, 18, SigIeMeasurementRequest, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREQUEST, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackMeasurementRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fMeasurementRequest *pFrm) @@ -13385,7 +13400,7 @@ tANI_U32 dot11fUnpackMeasurementRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI }; static const tIEDefn IES_NeighborReportRequest[] = { - {offsetof(tDot11fNeighborReportRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, }, + {offsetof(tDot11fNeighborReportRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackNeighborReportRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fNeighborReportRequest *pFrm) @@ -13431,7 +13446,7 @@ tANI_U32 dot11fUnpackNeighborReportRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t }; static const tIEDefn IES_NeighborReportResponse[] = { - {offsetof(tDot11fNeighborReportResponse, NeighborReport), offsetof(tDot11fIENeighborReport, present), offsetof(tDot11fNeighborReportResponse, num_NeighborReport), "NeighborReport" , 4, 15, 548, SigIeNeighborReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_NEIGHBORREPORT, 0, }, + {offsetof(tDot11fNeighborReportResponse, NeighborReport), offsetof(tDot11fIENeighborReport, present), offsetof(tDot11fNeighborReportResponse, num_NeighborReport), "NeighborReport" , 4, 15, 548, SigIeNeighborReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_NEIGHBORREPORT, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackNeighborReportResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fNeighborReportResponse *pFrm) @@ -13573,7 +13588,7 @@ tANI_U32 dot11fUnpackNeighborReportResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, }; static const tIEDefn IES_NoticeOfAbs[] = { - {offsetof(tDot11fNoticeOfAbs, P2PNoticeOfAbsence), offsetof(tDot11fIEP2PNoticeOfAbsence, present), 0, "P2PNoticeOfAbsence" , 0, 6, 47, SigIeP2PNoticeOfAbsence, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PNOTICEOFABSENCE, 1, }, + {offsetof(tDot11fNoticeOfAbs, P2PNoticeOfAbsence), offsetof(tDot11fIEP2PNoticeOfAbsence, present), 0, "P2PNoticeOfAbsence" , 0, 6, 47, SigIeP2PNoticeOfAbsence, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PNOTICEOFABSENCE, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackNoticeOfAbs(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fNoticeOfAbs *pFrm) @@ -13670,7 +13685,7 @@ tANI_U32 dot11fUnpackOperatingMode(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_PresenceReq[] = { - {offsetof(tDot11fPresenceReq, P2PNoticeOfAbsence), offsetof(tDot11fIEP2PNoticeOfAbsence, present), 0, "P2PNoticeOfAbsence" , 0, 6, 47, SigIeP2PNoticeOfAbsence, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PNOTICEOFABSENCE, 1, }, + {offsetof(tDot11fPresenceReq, P2PNoticeOfAbsence), offsetof(tDot11fIEP2PNoticeOfAbsence, present), 0, "P2PNoticeOfAbsence" , 0, 6, 47, SigIeP2PNoticeOfAbsence, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PNOTICEOFABSENCE, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackPresenceReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fPresenceReq *pFrm) @@ -13729,7 +13744,7 @@ tANI_U32 dot11fUnpackPresenceReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nB }; static const tIEDefn IES_PresenceRes[] = { - {offsetof(tDot11fPresenceRes, P2PPresenceResponse), offsetof(tDot11fIEP2PPresenceResponse, present), 0, "P2PPresenceResponse" , 0, 6, 51, SigIeP2PPresenceResponse, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPRESENCERESPONSE, 1, }, + {offsetof(tDot11fPresenceRes, P2PPresenceResponse), offsetof(tDot11fIEP2PPresenceResponse, present), 0, "P2PPresenceResponse" , 0, 6, 51, SigIeP2PPresenceResponse, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPRESENCERESPONSE, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackPresenceRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fPresenceRes *pFrm) @@ -13793,16 +13808,16 @@ tANI_U32 dot11fUnpackPresenceRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nB }; static const tIEDefn IES_ProbeRequest[] = { - {offsetof(tDot11fProbeRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, - {offsetof(tDot11fProbeRequest, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fProbeRequest, RequestedInfo), offsetof(tDot11fIERequestedInfo, present), 0, "RequestedInfo" , 0, 2, 257, SigIeRequestedInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_REQUESTEDINFO, 0, }, - {offsetof(tDot11fProbeRequest, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fProbeRequest, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, }, - {offsetof(tDot11fProbeRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fProbeRequest, WscProbeReq), offsetof(tDot11fIEWscProbeReq, present), 0, "WscProbeReq" , 0, 6, 286, SigIeWscProbeReq, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCPROBEREQ, 0, }, - {offsetof(tDot11fProbeRequest, WFATPC), offsetof(tDot11fIEWFATPC, present), 0, "WFATPC" , 0, 9, 9, SigIeWFATPC, {0, 80, 242, 8, 0}, 5, DOT11F_EID_WFATPC, 0, }, - {offsetof(tDot11fProbeRequest, P2PProbeReq), offsetof(tDot11fIEP2PProbeReq, present), 0, "P2PProbeReq" , 0, 6, 43, SigIeP2PProbeReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROBEREQ, 0, }, - {offsetof(tDot11fProbeRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, + {offsetof(tDot11fProbeRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 1, }, + {offsetof(tDot11fProbeRequest, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fProbeRequest, RequestedInfo), offsetof(tDot11fIERequestedInfo, present), 0, "RequestedInfo" , 0, 2, 257, SigIeRequestedInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_REQUESTEDINFO, 0, 0, }, + {offsetof(tDot11fProbeRequest, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fProbeRequest, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, 0, }, + {offsetof(tDot11fProbeRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fProbeRequest, WscProbeReq), offsetof(tDot11fIEWscProbeReq, present), 0, "WscProbeReq" , 0, 6, 286, SigIeWscProbeReq, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCPROBEREQ, 0, 0, }, + {offsetof(tDot11fProbeRequest, WFATPC), offsetof(tDot11fIEWFATPC, present), 0, "WFATPC" , 0, 9, 9, SigIeWFATPC, {0, 80, 242, 8, 0}, 5, DOT11F_EID_WFATPC, 0, 0, }, + {offsetof(tDot11fProbeRequest, P2PProbeReq), offsetof(tDot11fIEP2PProbeReq, present), 0, "P2PProbeReq" , 0, 6, 43, SigIeP2PProbeReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROBEREQ, 0, 0, }, + {offsetof(tDot11fProbeRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackProbeRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fProbeRequest *pFrm) @@ -14221,47 +14236,47 @@ tANI_U32 dot11fUnpackProbeRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n }; static const tIEDefn IES_ProbeResponse[] = { - {offsetof(tDot11fProbeResponse, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, - {offsetof(tDot11fProbeResponse, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fProbeResponse, FHParamSet), offsetof(tDot11fIEFHParamSet, present), 0, "FHParamSet" , 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMSET, 0, }, - {offsetof(tDot11fProbeResponse, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, }, - {offsetof(tDot11fProbeResponse, CFParams), offsetof(tDot11fIECFParams, present), 0, "CFParams" , 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CFPARAMS, 0, }, - {offsetof(tDot11fProbeResponse, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, }, - {offsetof(tDot11fProbeResponse, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, }, - {offsetof(tDot11fProbeResponse, FHParams), offsetof(tDot11fIEFHParams, present), 0, "FHParams" , 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMS, 0, }, - {offsetof(tDot11fProbeResponse, FHPattTable), offsetof(tDot11fIEFHPattTable, present), 0, "FHPattTable" , 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPATTTABLE, 0, }, - {offsetof(tDot11fProbeResponse, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, }, - {offsetof(tDot11fProbeResponse, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, }, - {offsetof(tDot11fProbeResponse, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, }, - {offsetof(tDot11fProbeResponse, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, }, - {offsetof(tDot11fProbeResponse, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, }, - {offsetof(tDot11fProbeResponse, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fProbeResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, }, - {offsetof(tDot11fProbeResponse, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad" , 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, }, - {offsetof(tDot11fProbeResponse, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, }, - {offsetof(tDot11fProbeResponse, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fProbeResponse, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, }, - {offsetof(tDot11fProbeResponse, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fProbeResponse, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, - {offsetof(tDot11fProbeResponse, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fProbeResponse, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, }, - {offsetof(tDot11fProbeResponse, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, }, - {offsetof(tDot11fProbeResponse, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, }, - {offsetof(tDot11fProbeResponse, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, }, - {offsetof(tDot11fProbeResponse, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, - {offsetof(tDot11fProbeResponse, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, }, - {offsetof(tDot11fProbeResponse, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fProbeResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, - {offsetof(tDot11fProbeResponse, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, }, - {offsetof(tDot11fProbeResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fProbeResponse, WscProbeRes), offsetof(tDot11fIEWscProbeRes, present), 0, "WscProbeRes" , 0, 6, 319, SigIeWscProbeRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCPROBERES, 0, }, - {offsetof(tDot11fProbeResponse, P2PProbeRes), offsetof(tDot11fIEP2PProbeRes, present), 0, "P2PProbeRes" , 0, 6, 1141, SigIeP2PProbeRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROBERES, 0, }, - {offsetof(tDot11fProbeResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fProbeResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, - {offsetof(tDot11fProbeResponse, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, }, - {offsetof(tDot11fProbeResponse, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fProbeResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, - {offsetof(tDot11fProbeResponse, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, }, + {offsetof(tDot11fProbeResponse, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 1, }, + {offsetof(tDot11fProbeResponse, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fProbeResponse, FHParamSet), offsetof(tDot11fIEFHParamSet, present), 0, "FHParamSet" , 0, 7, 7, SigIeFHParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMSET, 0, 0, }, + {offsetof(tDot11fProbeResponse, DSParams), offsetof(tDot11fIEDSParams, present), 0, "DSParams" , 0, 3, 3, SigIeDSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DSPARAMS, 0, 0, }, + {offsetof(tDot11fProbeResponse, CFParams), offsetof(tDot11fIECFParams, present), 0, "CFParams" , 0, 8, 8, SigIeCFParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CFPARAMS, 0, 0, }, + {offsetof(tDot11fProbeResponse, IBSSParams), offsetof(tDot11fIEIBSSParams, present), 0, "IBSSParams" , 0, 4, 4, SigIeIBSSParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_IBSSPARAMS, 0, 0, }, + {offsetof(tDot11fProbeResponse, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, 0, }, + {offsetof(tDot11fProbeResponse, FHParams), offsetof(tDot11fIEFHParams, present), 0, "FHParams" , 0, 4, 4, SigIeFHParams, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPARAMS, 0, 0, }, + {offsetof(tDot11fProbeResponse, FHPattTable), offsetof(tDot11fIEFHPattTable, present), 0, "FHPattTable" , 0, 6, 257, SigIeFHPattTable, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FHPATTTABLE, 0, 0, }, + {offsetof(tDot11fProbeResponse, PowerConstraints), offsetof(tDot11fIEPowerConstraints, present), 0, "PowerConstraints" , 0, 3, 3, SigIePowerConstraints, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCONSTRAINTS, 0, 0, }, + {offsetof(tDot11fProbeResponse, ChanSwitchAnn), offsetof(tDot11fIEChanSwitchAnn, present), 0, "ChanSwitchAnn" , 0, 5, 5, SigIeChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_CHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fProbeResponse, Quiet), offsetof(tDot11fIEQuiet, present), 0, "Quiet" , 0, 8, 8, SigIeQuiet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QUIET, 0, 0, }, + {offsetof(tDot11fProbeResponse, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, 0, }, + {offsetof(tDot11fProbeResponse, ERPInfo), offsetof(tDot11fIEERPInfo, present), 0, "ERPInfo" , 0, 3, 3, SigIeERPInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_ERPINFO, 0, 0, }, + {offsetof(tDot11fProbeResponse, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fProbeResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, + {offsetof(tDot11fProbeResponse, QBSSLoad), offsetof(tDot11fIEQBSSLoad, present), 0, "QBSSLoad" , 0, 7, 7, SigIeQBSSLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QBSSLOAD, 0, 0, }, + {offsetof(tDot11fProbeResponse, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, 0, }, + {offsetof(tDot11fProbeResponse, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fProbeResponse, APChannelReport), offsetof(tDot11fIEAPChannelReport, present), 0, "APChannelReport" , 0, 3, 53, SigIeAPChannelReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_APCHANNELREPORT, 0, 0, }, + {offsetof(tDot11fProbeResponse, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fProbeResponse, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, 0, }, + {offsetof(tDot11fProbeResponse, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fProbeResponse, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, 0, }, + {offsetof(tDot11fProbeResponse, ExtChanSwitchAnn), offsetof(tDot11fIEExtChanSwitchAnn, present), 0, "ExtChanSwitchAnn" , 0, 3, 3, SigIeExtChanSwitchAnn, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCHANSWITCHANN, 0, 0, }, + {offsetof(tDot11fProbeResponse, WMMInfoAp), offsetof(tDot11fIEWMMInfoAp, present), 0, "WMMInfoAp" , 0, 9, 9, SigIeWMMInfoAp, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOAP, 0, 0, }, + {offsetof(tDot11fProbeResponse, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, 0, }, + {offsetof(tDot11fProbeResponse, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, }, + {offsetof(tDot11fProbeResponse, WAPI), offsetof(tDot11fIEWAPI, present), 0, "WAPI" , 0, 14, 112, SigIeWAPI, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPI, 0, 0, }, + {offsetof(tDot11fProbeResponse, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fProbeResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, + {offsetof(tDot11fProbeResponse, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, 0, }, + {offsetof(tDot11fProbeResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fProbeResponse, WscProbeRes), offsetof(tDot11fIEWscProbeRes, present), 0, "WscProbeRes" , 0, 6, 319, SigIeWscProbeRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCPROBERES, 0, 0, }, + {offsetof(tDot11fProbeResponse, P2PProbeRes), offsetof(tDot11fIEP2PProbeRes, present), 0, "P2PProbeRes" , 0, 6, 1141, SigIeP2PProbeRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROBERES, 0, 0, }, + {offsetof(tDot11fProbeResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fProbeResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, 0, }, + {offsetof(tDot11fProbeResponse, VHTExtBssLoad), offsetof(tDot11fIEVHTExtBssLoad, present), 0, "VHTExtBssLoad" , 0, 7, 7, SigIeVHTExtBssLoad, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTEXTBSSLOAD, 0, 0, }, + {offsetof(tDot11fProbeResponse, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fProbeResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, + {offsetof(tDot11fProbeResponse, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackProbeResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fProbeResponse *pFrm) @@ -15403,7 +15418,7 @@ tANI_U32 dot11fUnpackProbeResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_ProvisionDiscoveryReq[] = { - {offsetof(tDot11fProvisionDiscoveryReq, P2PProvisionDiscoveryReq), offsetof(tDot11fIEP2PProvisionDiscoveryReq, present), 0, "P2PProvisionDiscoveryReq" , 0, 6, 107, SigIeP2PProvisionDiscoveryReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROVISIONDISCOVERYREQ, 1, }, + {offsetof(tDot11fProvisionDiscoveryReq, P2PProvisionDiscoveryReq), offsetof(tDot11fIEP2PProvisionDiscoveryReq, present), 0, "P2PProvisionDiscoveryReq" , 0, 6, 107, SigIeP2PProvisionDiscoveryReq, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PPROVISIONDISCOVERYREQ, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackProvisionDiscoveryReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fProvisionDiscoveryReq *pFrm) @@ -15495,7 +15510,7 @@ tANI_U32 dot11fUnpackProvisionDiscoveryReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t }; static const tIEDefn IES_ProvisionDiscoveryRes[] = { - {offsetof(tDot11fProvisionDiscoveryRes, P2PWSCProvisionDiscoveryRes), offsetof(tDot11fIEP2PWSCProvisionDiscoveryRes, present), 0, "P2PWSCProvisionDiscoveryRes" , 0, 6, 12, SigIeP2PWSCProvisionDiscoveryRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_P2PWSCPROVISIONDISCOVERYRES, 1, }, + {offsetof(tDot11fProvisionDiscoveryRes, P2PWSCProvisionDiscoveryRes), offsetof(tDot11fIEP2PWSCProvisionDiscoveryRes, present), 0, "P2PWSCProvisionDiscoveryRes" , 0, 6, 12, SigIeP2PWSCProvisionDiscoveryRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_P2PWSCPROVISIONDISCOVERYRES, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackProvisionDiscoveryRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fProvisionDiscoveryRes *pFrm) @@ -15551,7 +15566,7 @@ tANI_U32 dot11fUnpackProvisionDiscoveryRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t }; static const tIEDefn IES_QosMapConfigure[] = { - {offsetof(tDot11fQosMapConfigure, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 1, }, + {offsetof(tDot11fQosMapConfigure, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackQosMapConfigure(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fQosMapConfigure *pFrm) @@ -15642,7 +15657,7 @@ tANI_U32 dot11fUnpackRMC(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot }; static const tIEDefn IES_RadioMeasurementReport[] = { - {offsetof(tDot11fRadioMeasurementReport, MeasurementReport), offsetof(tDot11fIEMeasurementReport, present), offsetof(tDot11fRadioMeasurementReport, num_MeasurementReport), "MeasurementReport" , 4, 5, 31, SigIeMeasurementReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREPORT, 1, }, + {offsetof(tDot11fRadioMeasurementReport, MeasurementReport), offsetof(tDot11fIEMeasurementReport, present), offsetof(tDot11fRadioMeasurementReport, num_MeasurementReport), "MeasurementReport" , 4, 5, 31, SigIeMeasurementReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREPORT, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackRadioMeasurementReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fRadioMeasurementReport *pFrm) @@ -15742,7 +15757,7 @@ tANI_U32 dot11fUnpackRadioMeasurementReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, }; static const tIEDefn IES_RadioMeasurementRequest[] = { - {offsetof(tDot11fRadioMeasurementRequest, MeasurementRequest), offsetof(tDot11fIEMeasurementRequest, present), offsetof(tDot11fRadioMeasurementRequest, num_MeasurementRequest), "MeasurementRequest" , 2, 16, 18, SigIeMeasurementRequest, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREQUEST, 1, }, + {offsetof(tDot11fRadioMeasurementRequest, MeasurementRequest), offsetof(tDot11fIEMeasurementRequest, present), offsetof(tDot11fRadioMeasurementRequest, num_MeasurementRequest), "MeasurementRequest" , 2, 16, 18, SigIeMeasurementRequest, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MEASUREMENTREQUEST, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackRadioMeasurementRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fRadioMeasurementRequest *pFrm) @@ -15825,36 +15840,36 @@ tANI_U32 dot11fUnpackRadioMeasurementRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, }; static const tIEDefn IES_ReAssocRequest[] = { - {offsetof(tDot11fReAssocRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 1, }, - {offsetof(tDot11fReAssocRequest, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fReAssocRequest, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fReAssocRequest, PowerCaps), offsetof(tDot11fIEPowerCaps, present), 0, "PowerCaps" , 0, 4, 4, SigIePowerCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCAPS, 0, }, - {offsetof(tDot11fReAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, }, - {offsetof(tDot11fReAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, }, - {offsetof(tDot11fReAssocRequest, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, }, - {offsetof(tDot11fReAssocRequest, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fReAssocRequest, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fReAssocRequest, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fReAssocRequest, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fReAssocRequest, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, }, - {offsetof(tDot11fReAssocRequest, WPAOpaque), offsetof(tDot11fIEWPAOpaque, present), 0, "WPAOpaque" , 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPAOPAQUE, 0, }, - {offsetof(tDot11fReAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fReAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, }, - {offsetof(tDot11fReAssocRequest, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, }, - {offsetof(tDot11fReAssocRequest, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fReAssocRequest, WscIEOpaque), offsetof(tDot11fIEWscIEOpaque, present), 0, "WscIEOpaque" , 0, 8, 255, SigIeWscIEOpaque, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCIEOPAQUE, 0, }, - {offsetof(tDot11fReAssocRequest, WAPIOpaque), offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque" , 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPIOPAQUE, 0, }, - {offsetof(tDot11fReAssocRequest, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fReAssocRequest, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, }, - {offsetof(tDot11fReAssocRequest, ESECckmOpaque), offsetof(tDot11fIEESECckmOpaque, present), 0, "ESECckmOpaque" , 0, 12, 26, SigIeESECckmOpaque, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESECCKMOPAQUE, 0, }, - {offsetof(tDot11fReAssocRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), offsetof(tDot11fReAssocRequest, num_WMMTSPEC), "WMMTSPEC" , 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, }, - {offsetof(tDot11fReAssocRequest, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, - {offsetof(tDot11fReAssocRequest, P2PIEOpaque), offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque" , 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PIEOPAQUE, 0, }, - {offsetof(tDot11fReAssocRequest, WFDIEOpaque), offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque" , 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, 4, DOT11F_EID_WFDIEOPAQUE, 0, }, - {offsetof(tDot11fReAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fReAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fReAssocRequest, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, - {offsetof(tDot11fReAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, - {offsetof(tDot11fReAssocRequest, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, }, + {offsetof(tDot11fReAssocRequest, SSID), offsetof(tDot11fIESSID, present), 0, "SSID" , 0, 2, 34, SigIeSSID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SSID, 0, 1, }, + {offsetof(tDot11fReAssocRequest, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fReAssocRequest, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fReAssocRequest, PowerCaps), offsetof(tDot11fIEPowerCaps, present), 0, "PowerCaps" , 0, 4, 4, SigIePowerCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_POWERCAPS, 0, 0, }, + {offsetof(tDot11fReAssocRequest, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, + {offsetof(tDot11fReAssocRequest, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, 0, }, + {offsetof(tDot11fReAssocRequest, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fReAssocRequest, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fReAssocRequest, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fReAssocRequest, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fReAssocRequest, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, 0, }, + {offsetof(tDot11fReAssocRequest, WPAOpaque), offsetof(tDot11fIEWPAOpaque, present), 0, "WPAOpaque" , 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPAOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fReAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, }, + {offsetof(tDot11fReAssocRequest, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, 0, }, + {offsetof(tDot11fReAssocRequest, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fReAssocRequest, WscIEOpaque), offsetof(tDot11fIEWscIEOpaque, present), 0, "WscIEOpaque" , 0, 8, 255, SigIeWscIEOpaque, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCIEOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, WAPIOpaque), offsetof(tDot11fIEWAPIOpaque, present), 0, "WAPIOpaque" , 0, 8, 255, SigIeWAPIOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_WAPIOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fReAssocRequest, ESEVersion), offsetof(tDot11fIEESEVersion, present), 0, "ESEVersion" , 0, 7, 7, SigIeESEVersion, {0, 64, 150, 3, 0}, 4, DOT11F_EID_ESEVERSION, 0, 0, }, + {offsetof(tDot11fReAssocRequest, ESECckmOpaque), offsetof(tDot11fIEESECckmOpaque, present), 0, "ESECckmOpaque" , 0, 12, 26, SigIeESECckmOpaque, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESECCKMOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), offsetof(tDot11fReAssocRequest, num_WMMTSPEC), "WMMTSPEC" , 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 0, }, + {offsetof(tDot11fReAssocRequest, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, 0, }, + {offsetof(tDot11fReAssocRequest, P2PIEOpaque), offsetof(tDot11fIEP2PIEOpaque, present), 0, "P2PIEOpaque" , 0, 8, 255, SigIeP2PIEOpaque, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PIEOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, WFDIEOpaque), offsetof(tDot11fIEWFDIEOpaque, present), 0, "WFDIEOpaque" , 0, 8, 255, SigIeWFDIEOpaque, {80, 111, 154, 10, 0}, 4, DOT11F_EID_WFDIEOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fReAssocRequest, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fReAssocRequest, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, 0, }, + {offsetof(tDot11fReAssocRequest, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, 0, }, + {offsetof(tDot11fReAssocRequest, hs20vendor_ie), offsetof(tDot11fIEhs20vendor_ie, present), 0, "hs20vendor_ie" , 0, 7, 9, SigIehs20vendor_ie, {80, 111, 154, 16, 0}, 4, DOT11F_EID_HS20VENDOR_IE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackReAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fReAssocRequest *pFrm) @@ -16869,34 +16884,34 @@ tANI_U32 dot11fUnpackReAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 }; static const tIEDefn IES_ReAssocResponse[] = { - {offsetof(tDot11fReAssocResponse, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fReAssocResponse, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fReAssocResponse, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, }, - {offsetof(tDot11fReAssocResponse, RCPIIE), offsetof(tDot11fIERCPIIE, present), 0, "RCPIIE" , 0, 3, 3, SigIeRCPIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RCPIIE, 0, }, - {offsetof(tDot11fReAssocResponse, RSNIIE), offsetof(tDot11fIERSNIIE, present), 0, "RSNIIE" , 0, 3, 3, SigIeRSNIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNIIE, 0, }, - {offsetof(tDot11fReAssocResponse, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, }, - {offsetof(tDot11fReAssocResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, }, - {offsetof(tDot11fReAssocResponse, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, }, - {offsetof(tDot11fReAssocResponse, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fReAssocResponse, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fReAssocResponse, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, }, - {offsetof(tDot11fReAssocResponse, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, }, - {offsetof(tDot11fReAssocResponse, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, - {offsetof(tDot11fReAssocResponse, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fReAssocResponse, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, }, - {offsetof(tDot11fReAssocResponse, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, }, - {offsetof(tDot11fReAssocResponse, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, }, - {offsetof(tDot11fReAssocResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, - {offsetof(tDot11fReAssocResponse, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, }, - {offsetof(tDot11fReAssocResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), offsetof(tDot11fReAssocResponse, num_WMMTSPEC), "WMMTSPEC" , 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, }, - {offsetof(tDot11fReAssocResponse, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, - {offsetof(tDot11fReAssocResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, }, - {offsetof(tDot11fReAssocResponse, WscReassocRes), offsetof(tDot11fIEWscReassocRes, present), 0, "WscReassocRes" , 0, 6, 37, SigIeWscReassocRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCREASSOCRES, 0, }, - {offsetof(tDot11fReAssocResponse, P2PAssocRes), offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes" , 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PASSOCRES, 0, }, - {offsetof(tDot11fReAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fReAssocResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, - {offsetof(tDot11fReAssocResponse, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fReAssocResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, }, - {offsetof(tDot11fReAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, }, + {offsetof(tDot11fReAssocResponse, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fReAssocResponse, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fReAssocResponse, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, 0, }, + {offsetof(tDot11fReAssocResponse, RCPIIE), offsetof(tDot11fIERCPIIE, present), 0, "RCPIIE" , 0, 3, 3, SigIeRCPIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RCPIIE, 0, 0, }, + {offsetof(tDot11fReAssocResponse, RSNIIE), offsetof(tDot11fIERSNIIE, present), 0, "RSNIIE" , 0, 3, 3, SigIeRSNIIE, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNIIE, 0, 0, }, + {offsetof(tDot11fReAssocResponse, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, }, + {offsetof(tDot11fReAssocResponse, RSNOpaque), offsetof(tDot11fIERSNOpaque, present), 0, "RSNOpaque" , 0, 8, 255, SigIeRSNOpaque, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSNOPAQUE, 0, 0, }, + {offsetof(tDot11fReAssocResponse, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, }, + {offsetof(tDot11fReAssocResponse, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fReAssocResponse, RICDataDesc), offsetof(tDot11fIERICDataDesc, present), offsetof(tDot11fReAssocResponse, num_RICDataDesc), "RICDataDesc" , 2, 2, 550, SigIeRICDataDesc, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATADESC, 0, 0, }, + {offsetof(tDot11fReAssocResponse, WPA), offsetof(tDot11fIEWPA, present), 0, "WPA" , 0, 8, 50, SigIeWPA, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPA, 0, 0, }, + {offsetof(tDot11fReAssocResponse, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, 0, }, + {offsetof(tDot11fReAssocResponse, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fReAssocResponse, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, 0, }, + {offsetof(tDot11fReAssocResponse, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, 0, }, + {offsetof(tDot11fReAssocResponse, ESERadMgmtCap), offsetof(tDot11fIEESERadMgmtCap, present), 0, "ESERadMgmtCap" , 0, 8, 8, SigIeESERadMgmtCap, {0, 64, 150, 1, 0}, 4, DOT11F_EID_ESERADMGMTCAP, 0, 0, }, + {offsetof(tDot11fReAssocResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, + {offsetof(tDot11fReAssocResponse, ESETxmitPower), offsetof(tDot11fIEESETxmitPower, present), 0, "ESETxmitPower" , 0, 8, 8, SigIeESETxmitPower, {0, 64, 150, 0, 0}, 4, DOT11F_EID_ESETXMITPOWER, 0, 0, }, + {offsetof(tDot11fReAssocResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), offsetof(tDot11fReAssocResponse, num_WMMTSPEC), "WMMTSPEC" , 4, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 0, }, + {offsetof(tDot11fReAssocResponse, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, 0, }, + {offsetof(tDot11fReAssocResponse, Airgo), offsetof(tDot11fIEAirgo, present), 0, "Airgo" , 0, 5, 232, SigIeAirgo, {0, 10, 245, 0, 0}, 3, DOT11F_EID_AIRGO, 0, 0, }, + {offsetof(tDot11fReAssocResponse, WscReassocRes), offsetof(tDot11fIEWscReassocRes, present), 0, "WscReassocRes" , 0, 6, 37, SigIeWscReassocRes, {0, 80, 242, 4, 0}, 4, DOT11F_EID_WSCREASSOCRES, 0, 0, }, + {offsetof(tDot11fReAssocResponse, P2PAssocRes), offsetof(tDot11fIEP2PAssocRes, present), 0, "P2PAssocRes" , 0, 6, 17, SigIeP2PAssocRes, {80, 111, 154, 9, 0}, 4, DOT11F_EID_P2PASSOCRES, 0, 0, }, + {offsetof(tDot11fReAssocResponse, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fReAssocResponse, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, 0, }, + {offsetof(tDot11fReAssocResponse, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fReAssocResponse, OBSSScanParameters), offsetof(tDot11fIEOBSSScanParameters, present), 0, "OBSSScanParameters" , 0, 16, 16, SigIeOBSSScanParameters, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OBSSSCANPARAMETERS, 0, 0, }, + {offsetof(tDot11fReAssocResponse, QosMapSet), offsetof(tDot11fIEQosMapSet, present), 0, "QosMapSet" , 0, 2, 62, SigIeQosMapSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSMAPSET, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackReAssocResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fReAssocResponse *pFrm) @@ -18129,7 +18144,7 @@ tANI_U32 dot11fUnpackSaQueryRsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBu }; static const tIEDefn IES_TDLSDisReq[] = { - {offsetof(tDot11fTDLSDisReq, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 1, }, + {offsetof(tDot11fTDLSDisReq, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSDisReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSDisReq *pFrm) @@ -18177,19 +18192,19 @@ tANI_U32 dot11fUnpackTDLSDisReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBu }; static const tIEDefn IES_TDLSDisRsp[] = { - {offsetof(tDot11fTDLSDisRsp, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fTDLSDisRsp, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fTDLSDisRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, }, - {offsetof(tDot11fTDLSDisRsp, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, "SuppOperatingClasses" , 0, 3, 34, SigIeSuppOperatingClasses, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, }, - {offsetof(tDot11fTDLSDisRsp, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, - {offsetof(tDot11fTDLSDisRsp, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fTDLSDisRsp, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fTDLSDisRsp, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, - {offsetof(tDot11fTDLSDisRsp, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 0, }, - {offsetof(tDot11fTDLSDisRsp, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fTDLSDisRsp, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, }, - {offsetof(tDot11fTDLSDisRsp, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 1, }, - {offsetof(tDot11fTDLSDisRsp, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, + {offsetof(tDot11fTDLSDisRsp, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fTDLSDisRsp, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, "SuppOperatingClasses" , 0, 3, 34, SigIeSuppOperatingClasses, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, 0, }, + {offsetof(tDot11fTDLSDisRsp, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 1, }, + {offsetof(tDot11fTDLSDisRsp, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSDisRsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSDisRsp *pFrm) @@ -18505,9 +18520,9 @@ tANI_U32 dot11fUnpackTDLSDisRsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBu }; static const tIEDefn IES_TDLSPeerTrafficInd[] = { - {offsetof(tDot11fTDLSPeerTrafficInd, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 1, }, - {offsetof(tDot11fTDLSPeerTrafficInd, PTIControl), offsetof(tDot11fIEPTIControl, present), 0, "PTIControl" , 0, 5, 5, SigIePTIControl, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PTICONTROL, 0, }, - {offsetof(tDot11fTDLSPeerTrafficInd, PUBufferStatus), offsetof(tDot11fIEPUBufferStatus, present), 0, "PUBufferStatus" , 0, 3, 3, SigIePUBufferStatus, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PUBUFFERSTATUS, 1, }, + {offsetof(tDot11fTDLSPeerTrafficInd, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 1, }, + {offsetof(tDot11fTDLSPeerTrafficInd, PTIControl), offsetof(tDot11fIEPTIControl, present), 0, "PTIControl" , 0, 5, 5, SigIePTIControl, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PTICONTROL, 0, 0, }, + {offsetof(tDot11fTDLSPeerTrafficInd, PUBufferStatus), offsetof(tDot11fIEPUBufferStatus, present), 0, "PUBufferStatus" , 0, 3, 3, SigIePUBufferStatus, {0, 0, 0, 0, 0}, 0, DOT11F_EID_PUBUFFERSTATUS, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSPeerTrafficInd(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSPeerTrafficInd *pFrm) @@ -18577,7 +18592,7 @@ tANI_U32 dot11fUnpackTDLSPeerTrafficInd(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI }; static const tIEDefn IES_TDLSPeerTrafficRsp[] = { - {offsetof(tDot11fTDLSPeerTrafficRsp, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 1, }, + {offsetof(tDot11fTDLSPeerTrafficRsp, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSPeerTrafficRsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSPeerTrafficRsp *pFrm) @@ -18625,16 +18640,16 @@ tANI_U32 dot11fUnpackTDLSPeerTrafficRsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI }; static const tIEDefn IES_TDLSSetupCnf[] = { - {offsetof(tDot11fTDLSSetupCnf, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, - {offsetof(tDot11fTDLSSetupCnf, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, }, - {offsetof(tDot11fTDLSSetupCnf, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fTDLSSetupCnf, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, - {offsetof(tDot11fTDLSSetupCnf, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, }, - {offsetof(tDot11fTDLSSetupCnf, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, }, - {offsetof(tDot11fTDLSSetupCnf, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, }, - {offsetof(tDot11fTDLSSetupCnf, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, }, - {offsetof(tDot11fTDLSSetupCnf, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, }, - {offsetof(tDot11fTDLSSetupCnf, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, + {offsetof(tDot11fTDLSSetupCnf, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, EDCAParamSet), offsetof(tDot11fIEEDCAParamSet, present), 0, "EDCAParamSet" , 0, 20, 20, SigIeEDCAParamSet, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EDCAPARAMSET, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, HTInfo), offsetof(tDot11fIEHTInfo, present), 0, "HTInfo" , 0, 24, 56, SigIeHTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTINFO, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, WMMParams), offsetof(tDot11fIEWMMParams, present), 0, "WMMParams" , 0, 26, 26, SigIeWMMParams, {0, 80, 242, 2, 1}, 5, DOT11F_EID_WMMPARAMS, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, VHTOperation), offsetof(tDot11fIEVHTOperation, present), 0, "VHTOperation" , 0, 7, 7, SigIeVHTOperation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTOPERATION, 0, 0, }, + {offsetof(tDot11fTDLSSetupCnf, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSSetupCnf(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSSetupCnf *pFrm) @@ -18914,23 +18929,23 @@ tANI_U32 dot11fUnpackTDLSSetupCnf(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n }; static const tIEDefn IES_TDLSSetupReq[] = { - {offsetof(tDot11fTDLSSetupReq, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 1, }, - {offsetof(tDot11fTDLSSetupReq, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, }, - {offsetof(tDot11fTDLSSetupReq, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fTDLSSetupReq, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, }, - {offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, - {offsetof(tDot11fTDLSSetupReq, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fTDLSSetupReq, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, "SuppOperatingClasses" , 0, 3, 34, SigIeSuppOperatingClasses, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, }, - {offsetof(tDot11fTDLSSetupReq, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, }, - {offsetof(tDot11fTDLSSetupReq, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fTDLSSetupReq, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, - {offsetof(tDot11fTDLSSetupReq, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 0, }, - {offsetof(tDot11fTDLSSetupReq, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fTDLSSetupReq, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, }, - {offsetof(tDot11fTDLSSetupReq, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 1, }, - {offsetof(tDot11fTDLSSetupReq, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, }, - {offsetof(tDot11fTDLSSetupReq, AID), offsetof(tDot11fIEAID, present), 0, "AID" , 0, 4, 4, SigIeAID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_AID, 0, }, - {offsetof(tDot11fTDLSSetupReq, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, + {offsetof(tDot11fTDLSSetupReq, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 1, }, + {offsetof(tDot11fTDLSSetupReq, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, "SuppOperatingClasses" , 0, 3, 34, SigIeSuppOperatingClasses, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 1, }, + {offsetof(tDot11fTDLSSetupReq, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, AID), offsetof(tDot11fIEAID, present), 0, "AID" , 0, 4, 4, SigIeAID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_AID, 0, 0, }, + {offsetof(tDot11fTDLSSetupReq, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSSetupReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSSetupReq *pFrm) @@ -19299,24 +19314,24 @@ tANI_U32 dot11fUnpackTDLSSetupReq(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n }; static const tIEDefn IES_TDLSSetupRsp[] = { - {offsetof(tDot11fTDLSSetupRsp, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, }, - {offsetof(tDot11fTDLSSetupRsp, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, }, - {offsetof(tDot11fTDLSSetupRsp, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, }, - {offsetof(tDot11fTDLSSetupRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, }, - {offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, }, - {offsetof(tDot11fTDLSSetupRsp, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, }, - {offsetof(tDot11fTDLSSetupRsp, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, "SuppOperatingClasses" , 0, 3, 34, SigIeSuppOperatingClasses, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, }, - {offsetof(tDot11fTDLSSetupRsp, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, }, - {offsetof(tDot11fTDLSSetupRsp, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fTDLSSetupRsp, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, }, - {offsetof(tDot11fTDLSSetupRsp, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 0, }, - {offsetof(tDot11fTDLSSetupRsp, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, }, - {offsetof(tDot11fTDLSSetupRsp, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, }, - {offsetof(tDot11fTDLSSetupRsp, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, }, - {offsetof(tDot11fTDLSSetupRsp, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, }, - {offsetof(tDot11fTDLSSetupRsp, AID), offsetof(tDot11fIEAID, present), 0, "AID" , 0, 4, 4, SigIeAID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_AID, 0, }, - {offsetof(tDot11fTDLSSetupRsp, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, }, - {offsetof(tDot11fTDLSSetupRsp, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, }, + {offsetof(tDot11fTDLSSetupRsp, SuppRates), offsetof(tDot11fIESuppRates, present), 0, "SuppRates" , 0, 2, 14, SigIeSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPRATES, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, Country), offsetof(tDot11fIECountry, present), 0, "Country" , 0, 5, 257, SigIeCountry, {0, 0, 0, 0, 0}, 0, DOT11F_EID_COUNTRY, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, ExtSuppRates), offsetof(tDot11fIEExtSuppRates, present), 0, "ExtSuppRates" , 0, 3, 14, SigIeExtSuppRates, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTSUPPRATES, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, SuppChannels), offsetof(tDot11fIESuppChannels, present), 0, "SuppChannels" , 0, 4, 98, SigIeSuppChannels, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPCHANNELS, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, RSN), offsetof(tDot11fIERSN, present), 0, "RSN" , 0, 8, 116, SigIeRSN, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RSN, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, ExtCap), offsetof(tDot11fIEExtCap, present), 0, "ExtCap" , 0, 3, 11, SigIeExtCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_EXTCAP, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, SuppOperatingClasses), offsetof(tDot11fIESuppOperatingClasses, present), 0, "SuppOperatingClasses" , 0, 3, 34, SigIeSuppOperatingClasses, {0, 0, 0, 0, 0}, 0, DOT11F_EID_SUPPOPERATINGCLASSES, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, TimeoutInterval), offsetof(tDot11fIETimeoutInterval, present), 0, "TimeoutInterval" , 0, 7, 7, SigIeTimeoutInterval, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TIMEOUTINTERVAL, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, RICData), offsetof(tDot11fIERICData, present), 0, "RICData" , 0, 6, 6, SigIeRICData, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RICDATA, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, HT2040BSSCoexistence), offsetof(tDot11fIEHT2040BSSCoexistence, present), 0, "HT2040BSSCoexistence" , 0, 3, 3, SigIeHT2040BSSCoexistence, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HT2040BSSCOEXISTENCE, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, WMMInfoStation), offsetof(tDot11fIEWMMInfoStation, present), 0, "WMMInfoStation" , 0, 9, 9, SigIeWMMInfoStation, {0, 80, 242, 2, 0}, 5, DOT11F_EID_WMMINFOSTATION, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, AID), offsetof(tDot11fIEAID, present), 0, "AID" , 0, 4, 4, SigIeAID, {0, 0, 0, 0, 0}, 0, DOT11F_EID_AID, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, VHTCaps), offsetof(tDot11fIEVHTCaps, present), 0, "VHTCaps" , 0, 14, 14, SigIeVHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_VHTCAPS, 0, 0, }, + {offsetof(tDot11fTDLSSetupRsp, OperatingMode), offsetof(tDot11fIEOperatingMode, present), 0, "OperatingMode" , 0, 3, 3, SigIeOperatingMode, {0, 0, 0, 0, 0}, 0, DOT11F_EID_OPERATINGMODE, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSSetupRsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSSetupRsp *pFrm) @@ -19697,8 +19712,8 @@ tANI_U32 dot11fUnpackTDLSSetupRsp(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n }; static const tIEDefn IES_TDLSTeardown[] = { - {offsetof(tDot11fTDLSTeardown, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, }, - {offsetof(tDot11fTDLSTeardown, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 1, }, + {offsetof(tDot11fTDLSTeardown, FTInfo), offsetof(tDot11fIEFTInfo, present), 0, "FTInfo" , 0, 84, 222, SigIeFTInfo, {0, 0, 0, 0, 0}, 0, DOT11F_EID_FTINFO, 0, 0, }, + {offsetof(tDot11fTDLSTeardown, LinkIdentifier), offsetof(tDot11fIELinkIdentifier, present), 0, "LinkIdentifier" , 0, 20, 20, SigIeLinkIdentifier, {0, 0, 0, 0, 0}, 0, DOT11F_EID_LINKIDENTIFIER, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTDLSTeardown(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTDLSTeardown *pFrm) @@ -19803,7 +19818,7 @@ tANI_U32 dot11fUnpackTDLSTeardown(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n }; static const tIEDefn IES_TPCReport[] = { - {offsetof(tDot11fTPCReport, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 1, }, + {offsetof(tDot11fTPCReport, TPCReport), offsetof(tDot11fIETPCReport, present), 0, "TPCReport" , 0, 4, 4, SigIeTPCReport, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREPORT, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTPCReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTPCReport *pFrm) @@ -19849,7 +19864,7 @@ tANI_U32 dot11fUnpackTPCReport(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf }; static const tIEDefn IES_TPCRequest[] = { - {offsetof(tDot11fTPCRequest, TPCRequest), offsetof(tDot11fIETPCRequest, present), 0, "TPCRequest" , 0, 2, 2, SigIeTPCRequest, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREQUEST, 1, }, + {offsetof(tDot11fTPCRequest, TPCRequest), offsetof(tDot11fIETPCRequest, present), 0, "TPCRequest" , 0, 2, 2, SigIeTPCRequest, {0, 0, 0, 0, 0}, 0, DOT11F_EID_TPCREQUEST, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackTPCRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fTPCRequest *pFrm) @@ -19932,8 +19947,8 @@ tANI_U32 dot11fUnpackVHTGidManagementActionFrame(tpAniSirGlobal pCtx, tANI_U8 *p }; static const tIEDefn IES_WMMAddTSRequest[] = { - {offsetof(tDot11fWMMAddTSRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 1, }, - {offsetof(tDot11fWMMAddTSRequest, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, }, + {offsetof(tDot11fWMMAddTSRequest, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 1, }, + {offsetof(tDot11fWMMAddTSRequest, ESETrafStrmRateSet), offsetof(tDot11fIEESETrafStrmRateSet, present), 0, "ESETrafStrmRateSet" , 0, 7, 15, SigIeESETrafStrmRateSet, {0, 64, 150, 8, 0}, 4, DOT11F_EID_ESETRAFSTRMRATESET, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackWMMAddTSRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fWMMAddTSRequest *pFrm) @@ -20018,8 +20033,8 @@ tANI_U32 dot11fUnpackWMMAddTSRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U3 }; static const tIEDefn IES_WMMAddTSResponse[] = { - {offsetof(tDot11fWMMAddTSResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, }, - {offsetof(tDot11fWMMAddTSResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, }, + {offsetof(tDot11fWMMAddTSResponse, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 0, }, + {offsetof(tDot11fWMMAddTSResponse, ESETrafStrmMet), offsetof(tDot11fIEESETrafStrmMet, present), 0, "ESETrafStrmMet" , 0, 10, 10, SigIeESETrafStrmMet, {0, 64, 150, 7, 0}, 4, DOT11F_EID_ESETRAFSTRMMET, 0, 0, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackWMMAddTSResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fWMMAddTSResponse *pFrm) @@ -20104,7 +20119,7 @@ tANI_U32 dot11fUnpackWMMAddTSResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U }; static const tIEDefn IES_WMMDelTS[] = { - {offsetof(tDot11fWMMDelTS, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 1, }, + {offsetof(tDot11fWMMDelTS, WMMTSPEC), offsetof(tDot11fIEWMMTSPEC, present), 0, "WMMTSPEC" , 0, 63, 63, SigIeWMMTSPEC, {0, 80, 242, 2, 2}, 5, DOT11F_EID_WMMTSPEC, 0, 1, }, {0, 0, 0, NULL, 0, 0, 0, 0, {0, 0, 0, 0, 0}, 0, 0xff, 0, }, }; tANI_U32 dot11fUnpackWMMDelTS(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 nBuf, tDot11fWMMDelTS *pFrm) @@ -20181,7 +20196,7 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, const tIEDefn *pIe; tANI_U8 *pBufRemaining; tANI_U32 nBufRemaining, status; - tANI_U8 eid, len; + tANI_U8 eid, len, extn_eid; tFRAMES_BOOL *pfFound; tANI_U32 countOffset = 0; @@ -20194,7 +20209,7 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, nBufRemaining = nBuf; pIe = &IEs[0]; - while (0xff != pIe->eid) + while (0xff != pIe->eid || pIe->extn_eid) { pfFound = (tFRAMES_BOOL*)(pFrm + pIe->offset + pIe->presenceOffset); @@ -20372,14 +20387,18 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, eid = *pBufRemaining++; --nBufRemaining; len = *pBufRemaining++; --nBufRemaining; + if (pIe && pIe->extn_eid) { + extn_eid = *pBufRemaining++; --nBufRemaining; + len--; + } if (pIe && pIe->noui) { if (pIe->noui > nBufRemaining) { - FRAMES_LOG3(pCtx, FRLOGW, FRFL("IE %d reports " + FRAMES_LOG4(pCtx, FRLOGW, FRFL("IE %d extn id %d reports " "length %d, but it has an OUI of %d bytes.\n"), - eid, len, pIe->noui); + eid, extn_eid, len, pIe->noui); FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); FRAMES_LOG2(pCtx, FRLOG1, FRFL("We've parsed %d by" "tes of this buffer, and show %d left.\n"), pBufRemaining - pBuf, nBufRemaining); @@ -20394,9 +20413,9 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, if (len > nBufRemaining) { - FRAMES_LOG3(pCtx, FRLOGW, FRFL("IE %d reports length %" + FRAMES_LOG4(pCtx, FRLOGW, FRFL("IE %d extn id %d reports length %" "d, but there are only %d bytes remaining in this" - " frame.\n"), eid, len, nBufRemaining); + " frame.\n"), eid, extn_eid, len, nBufRemaining); FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); FRAMES_LOG2(pCtx, FRLOG1, FRFL("We've parsed %d by" "tes of this buffer, and show %d left.\n"), pBufRemaining - pBuf, nBufRemaining); @@ -20407,12 +20426,16 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, if (pIe) { - if (nBufRemaining < pIe->minSize - pIe->noui - 2U) + if ((nBufRemaining < pIe->minSize - pIe->noui - 2U) || + (len < pIe->minSize - pIe->noui - 2U)) { - FRAMES_LOG3(pCtx, FRLOGW, FRFL("The IE %s must be " - "at least %d bytes in size, but there are onl" - "y %d bytes remaining in this frame.\n"), - pIe->name, pIe->minSize, nBufRemaining); + FRAMES_LOG4(pCtx, FRLOGW, FRFL("The IE %s must " + "be at least %d bytes in size, but " + "there are only %d bytes remaining in " + "this frame or the IE reports a size " + "of %d bytes.\n"), + pIe->name, pIe->minSize, nBufRemaining, + (len + pIe->noui + 2U)); FRAMES_DUMP(pCtx, FRLOG1, pBuf, nBuf); status |= DOT11F_INCOMPLETE_IE; FRAMES_DBG_BREAK(); @@ -20905,8 +20928,8 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, } else { - FRAMES_LOG2(pCtx, FRLOG3, FRFL("Skipping unknown IE %d" - " (length %d)\n"), eid, len); + FRAMES_LOG3(pCtx, FRLOG3, FRFL("Skipping unknown IE %d extn ID %d" + " (length %d)\n"), eid, extn_eid, len); FRAMES_DUMP(pCtx, FRLOG3, pBufRemaining - 2, len); status |= DOT11F_UNKNOWN_IES; } @@ -20931,7 +20954,7 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx, MandatoryCheck: pIe = &IEs[0]; - while (0xff != pIe->eid) + while (0xff != pIe->eid || pIe->extn_eid) { if (pIe->fMandatory) { @@ -22556,7 +22579,7 @@ static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx, (void)pCtx; /* Shutup the compiler if we have no FFs nor IEs... */ i=0; n=0; pIe = &( IEs[0] ); - while ( 0xff != pIe->eid ) + while (0xff != pIe->eid || pIe->extn_eid) { pfFound = (tFRAMES_BOOL*)(pFrm + pIe->offset + pIe->presenceOffset); @@ -22566,6 +22589,8 @@ static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx, for (i = 0U; i < countOffset; ++i) { *pnNeeded += 2U + pIe->noui; + if (pIe->extn_eid) + (*pnNeeded)++; byteCount = 0; switch (pIe->sig) { @@ -45406,7 +45431,7 @@ static tANI_U32 PackCore(tpAniSirGlobal pCtx, } pIe = &( IEs[0] ); - while ( 0xff != pIe->eid ) + while (0xff != pIe->eid || pIe->extn_eid) { pfFound = (tFRAMES_BOOL*)(pSrc + pIe->offset + pIe->presenceOffset); diff --git a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl.c b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl.c index 09754b8a967..9dbd9e0a674 100644 --- a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl.c +++ b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl.c @@ -623,7 +623,7 @@ WLANTL_Open if (( NULL == pTLCb ) || ( NULL == pTLConfig ) ) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_FATAL, - "WLAN TL: Invalid input pointer on WLANTL_Open TL %p Config %p", pTLCb, pTLConfig )); + "WLAN TL: Invalid input pointer on WLANTL_Open TL %pK Config %pK", pTLCb, pTLConfig )); return VOS_STATUS_E_FAULT; } @@ -5078,7 +5078,7 @@ WLANTL_TxComp } TLLOG2(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_HIGH, - "WLAN TL:Calling Tx complete for pkt %p in function %p", + "WLAN TL:Calling Tx complete for pkt %pK in function %pK", vosDataBuff, pfnTxComp)); vosTempTx = vosDataBuff; @@ -5156,8 +5156,8 @@ WLANTL_CacheSTAFrame if (( NULL == pTLCb ) || ( NULL == vosTempBuff ) ) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL: Invalid input pointer on WLANTL_CacheSTAFrame TL %p" - " Packet %p", pTLCb, vosTempBuff )); + "WLAN TL: Invalid input pointer on WLANTL_CacheSTAFrame TL %pK" + " Packet %pK", pTLCb, vosTempBuff )); return VOS_STATUS_E_FAULT; } @@ -5372,7 +5372,7 @@ WLANTL_ForwardSTAFrames if ( NULL == pTLCb ) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL: Invalid input pointer on WLANTL_ForwardSTAFrames TL %p", + "WLAN TL: Invalid input pointer on WLANTL_ForwardSTAFrames TL %pK", pTLCb )); return VOS_STATUS_E_FAULT; } @@ -6016,6 +6016,7 @@ WLANTL_RxFrames v_U8_t ac; #endif + u64 pn_num; /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ @@ -6194,6 +6195,9 @@ WLANTL_RxFrames { ucSTAId = (v_U8_t)WDA_GET_RX_STAID( pvBDHeader ); ucTid = (v_U8_t)WDA_GET_RX_TID( pvBDHeader ); + pn_num = WDA_GET_RX_REPLAY_COUNT(pvBDHeader); + + vosTempBuff->pn_num = pn_num; TLLOG2(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_HIGH, "WLAN TL:Data packet received for STA %d", ucSTAId)); @@ -7991,7 +7995,7 @@ WLANTL_STATxAuth if (( NULL == pTLCb ) || ( NULL == pvosDataBuff )) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL:Invalid input params on WLANTL_STATxAuth TL %p DB %p", + "WLAN TL:Invalid input params on WLANTL_STATxAuth TL %pK DB %pK", pTLCb, pvosDataBuff)); if (NULL != pvosDataBuff) { @@ -9412,7 +9416,8 @@ WLANTL_STARxAuth WLANTL_MSDUReorder( pTLCb, &vosDataBuff, aucBDHeader, ucSTAId, ucTid ); } -if(0 == ucUnicastBroadcastType +if(WLANTL_IS_DATA_FRAME(WDA_GET_RX_TYPE_SUBTYPE(aucBDHeader)) && + (0 == ucUnicastBroadcastType) #ifdef FEATURE_ON_CHIP_REORDERING && (WLANHAL_IsOnChipReorderingEnabledForTID(pvosGCtx, ucSTAId, ucTid) != TRUE) #endif @@ -9489,30 +9494,36 @@ if(0 == ucUnicastBroadcastType /* It is not AMSDU frame so perform reaply check for each packet, as - each packet contains valid replay counter*/ - status = WLANTL_IsReplayPacket( ullcurrentReplayCounter, ullpreviousReplayCounter); - if(VOS_FALSE == status) - { - /* Not a replay paket, update previous replay counter in TL CB */ - pClientSTA->ullReplayCounter[ucTid] = ullcurrentReplayCounter; - } - else - { - VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL: Non-AMSDU Drop the replay packet with PN : [0x%llX]",ullcurrentReplayCounter); - - pClientSTA->ulTotalReplayPacketsDetected++; - VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL: Non-AMSDU total dropped replay packets on STA ID %X is [0x%X]", - ucSTAId, pClientSTA->ulTotalReplayPacketsDetected); - - /* Repaly packet, drop the packet */ - vos_pkt_return_packet(vosDataBuff); - return VOS_STATUS_SUCCESS; - } + each packet contains valid replay counter*/ + if (vosDataBuff != NULL) { + if (vos_is_pkt_chain(vosDataBuff)) { + WLANTL_ReorderReplayCheck(pClientSTA, &vosDataBuff, ucTid); + } else { + status = WLANTL_IsReplayPacket(ullcurrentReplayCounter, + ullpreviousReplayCounter); + if(VOS_FALSE == status) { + /* Not a replay paket, update previous replay counter in TL CB */ + pClientSTA->ullReplayCounter[ucTid] = ullcurrentReplayCounter; + } else { + VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, + "WLAN TL: Non AMSDU Drop replay packet with PN: [0x%llX], prevPN: [0x%llx]", + ullcurrentReplayCounter, ullpreviousReplayCounter); + + pClientSTA->ulTotalReplayPacketsDetected++; + VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, + "WLAN TL: Non AMSDU total dropped replay packets on STA ID %X is [0x%X]", + ucSTAId, pClientSTA->ulTotalReplayPacketsDetected); + + /* Repaly packet, drop the packet */ + vos_pkt_return_packet(vosDataBuff); + return VOS_STATUS_SUCCESS; + } + } + } } - } + } } + /*It is a broadast packet DPU has already done replay check for broadcast packets no need to do replay check of these packets*/ @@ -9702,7 +9713,7 @@ WLANTL_McProcessMsg // Free the PAL memory, we are done with it. TLLOG2(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_HIGH, - "Flush complete received by TL: Freeing %p", FlushACRspPtr)); + "Flush complete received by TL: Freeing %pK", FlushACRspPtr)); vos_mem_free((v_VOID_t *)FlushACRspPtr); break; @@ -10651,7 +10662,7 @@ static v_VOID_t WLANTL_DebugFrame numBytes = dataSize % WLANTL_DEBUG_FRAME_BYTE_PER_LINE; linePointer = (v_U8_t *)dataPointer; - TLLOGE(VOS_TRACE(VOS_MODULE_ID_SAL, VOS_TRACE_LEVEL_ERROR, "WLAN TL:Frame Debug Frame Size %d, Pointer 0x%p", dataSize, dataPointer)); + TLLOGE(VOS_TRACE(VOS_MODULE_ID_SAL, VOS_TRACE_LEVEL_ERROR, "WLAN TL:Frame Debug Frame Size %d, Pointer 0x%pK", dataSize, dataPointer)); for(idx = 0; idx < numLines; idx++) { memset(lineBuffer, 0, WLANTL_DEBUG_FRAME_BYTE_PER_LINE); @@ -11202,7 +11213,7 @@ WLANTL_FastHwFwdDataFrame if ( NULL == pucBuffPtr ) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL:No enough space in VOSS packet %p for DxE/BD/WLAN header", vosDataBuff)); + "WLAN TL:No enough space in VOSS packet %pK for DxE/BD/WLAN header", vosDataBuff)); *pvosStatus = VOS_STATUS_E_INVAL; return; } @@ -12347,7 +12358,7 @@ WLANTL_EnableUAPSDForAC { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, "WLAN TL:Invalid input params on WLANTL_EnableUAPSDForAC" - " TL: %p STA: %d AC: %d", + " TL: %pK STA: %d AC: %d", pTLCb, ucSTAId, ucAC)); return VOS_STATUS_E_FAULT; } @@ -12445,7 +12456,7 @@ WLANTL_DisableUAPSDForAC { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, "WLAN TL:Invalid input params on WLANTL_DisableUAPSDForAC" - " TL: %p STA: %d AC: %d", pTLCb, ucSTAId, ucAC )); + " TL: %pK STA: %d AC: %d", pTLCb, ucSTAId, ucAC )); return VOS_STATUS_E_FAULT; } @@ -13946,7 +13957,7 @@ WLANTL_RMC_SESSION* WLANTL_RmcLookUpRmcSession if (NULL == pMcastAddr) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "Sanity check failed pMcastAddr %p", pMcastAddr)); + "Sanity check failed pMcastAddr %pK", pMcastAddr)); return NULL; } @@ -14136,7 +14147,7 @@ WLANTL_EnableRMC if ( (NULL == pvosGCtx) || (NULL == pMcastTransmitterAddr) ) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL %s: Sanity check failed pvosGCtx %p aMcastAddr %p", + "WLAN TL %s: Sanity check failed pvosGCtx %pK aMcastAddr %pK", __func__, pvosGCtx, pMcastTransmitterAddr)); return VOS_STATUS_E_FAILURE; } @@ -14170,7 +14181,7 @@ WLANTL_DisableRMC if ((NULL == pvosGCtx) || (NULL == pMcastTransmitterAddr)) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL %s: Sanity check failed pvosGCtx %p aMcastAddr %p", + "WLAN TL %s: Sanity check failed pvosGCtx %pK aMcastAddr %pK", __func__, pvosGCtx, pMcastTransmitterAddr)); return VOS_STATUS_E_FAILURE; } @@ -14429,7 +14440,7 @@ WLANTL_SetMcastDuplicateDetection if (NULL == pvosGCtx) { TLLOGE(VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLAN TL %s: Sanity check failed pvosGCtx %p", + "WLAN TL %s: Sanity check failed pvosGCtx %pK", __func__, pvosGCtx)); return VOS_STATUS_E_FAILURE; } diff --git a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c index ccfcfb0c699..126fb789b8e 100644 --- a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c +++ b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_ba.c @@ -220,66 +220,6 @@ v_VOID_t WLANTL_ReorderingAgingTimerExpierCB fwIdx = ReorderInfo->ucCIndex - 1; } - /* Do replay check before giving packets to upper layer - replay check code : check whether replay check is needed or not */ - if(VOS_TRUE == pClientSTA->ucIsReplayCheckValid) - { - v_U64_t ullpreviousReplayCounter = 0; - v_U64_t ullcurrentReplayCounter = 0; - v_U8_t ucloopCounter = 0; - v_BOOL_t status = 0; - - /*Do replay check for all packets which are in Reorder buffer */ - for(ucloopCounter = 0; ucloopCounter < WLANTL_MAX_WINSIZE; ucloopCounter++) - { - /*Get previous reply counter*/ - ullpreviousReplayCounter = pClientSTA->ullReplayCounter[ucTID]; - - /*Get current replay counter of packet in reorder buffer*/ - ullcurrentReplayCounter = ReorderInfo->reorderBuffer->ullReplayCounter[ucloopCounter]; - - /*Check for holes, if a hole is found in Reorder buffer then - no need to do replay check on it, skip the current - hole and do replay check on other packets*/ - if(NULL != (ReorderInfo->reorderBuffer->arrayBuffer[ucloopCounter])) - { - status = WLANTL_IsReplayPacket(ullcurrentReplayCounter, ullpreviousReplayCounter); - if(VOS_TRUE == status) - { - /*Increment the debug counter*/ - pClientSTA->ulTotalReplayPacketsDetected++; - - /*A replay packet found*/ - VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLANTL_ReorderingAgingTimerExpierCB: total dropped replay packets on STA ID %X is [0x%X]", - ucSTAID, pClientSTA->ulTotalReplayPacketsDetected); - - VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLANTL_ReorderingAgingTimerExpierCB: replay packet found with PN : [0x%llX]", - ullcurrentReplayCounter); - - VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, - "WLANTL_ReorderingAgingTimerExpierCB: Drop the replay packet with PN : [0x%llX]", - ullcurrentReplayCounter); - - ReorderInfo->reorderBuffer->arrayBuffer[ucloopCounter] = NULL; - ReorderInfo->reorderBuffer->ullReplayCounter[ucloopCounter] = 0; - } - else - { - /*Not a replay packet update previous replay counter*/ - pClientSTA->ullReplayCounter[ucTID] = ullcurrentReplayCounter; - } - } - else - { - /* A hole detected in Reorder buffer*/ - //BAMSGERROR("WLANTL_ReorderingAgingTimerExpierCB,hole detected\n",0,0,0); - - } - } - } - cIndex = ReorderInfo->ucCIndex; status = WLANTL_ChainFrontPkts(fwIdx, opCode, &vosDataBuff, ReorderInfo, NULL); @@ -314,6 +254,12 @@ v_VOID_t WLANTL_ReorderingAgingTimerExpierCB return; } + /* Do replay check before giving packets to upper layer + replay check code : check whether replay check is needed or not */ + if(VOS_TRUE == pClientSTA->ucIsReplayCheckValid) { + WLANTL_ReorderReplayCheck(pClientSTA, &vosDataBuff, ucTID); + } + pCurrent = vosDataBuff; while (pCurrent != NULL) @@ -525,7 +471,7 @@ WLANTL_BaSessionAdd pClientSTA->atlBAReorderInfo[ucTid].reorderBuffer = &(pTLCb->reorderBufferPool[idx]); pTLCb->reorderBufferPool[idx].isAvailable = VOS_FALSE; - TLLOG4(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_LOW,"%dth buffer available, buffer PTR 0x%p", + TLLOG4(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_LOW,"%dth buffer available, buffer PTR 0x%pK", idx, pClientSTA->atlBAReorderInfo[ucTid].reorderBuffer )); @@ -755,6 +701,12 @@ WLANTL_BaSessionDel "WLAN TL: Chaining was successful sending all pkts to HDD : %x", vosDataBuff )); + /* Do replay check before giving packets to upper layer + replay check code : check whether replay check is needed or not */ + if(VOS_TRUE == pClientSTA->ucIsReplayCheckValid) { + WLANTL_ReorderReplayCheck(pClientSTA, &vosDataBuff, ucTid); + } + if ( WLAN_STA_SOFTAP == pClientSTA->wSTADesc.wSTAType ) { WLANTL_FwdPktToHDD( pvosGCtx, vosDataBuff, ucSTAId); @@ -1096,7 +1048,7 @@ VOS_STATUS WLANTL_MSDUReorder v_U16_t reorderTime; if((NULL == pTLCb) || (*vosDataBuff == NULL)) { - TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,"Invalid ARG pTLCb 0x%p, vosDataBuff 0x%p", + TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR,"Invalid ARG pTLCb 0x%pK, vosDataBuff 0x%pK", pTLCb, *vosDataBuff)); return VOS_STATUS_E_INVAL; } @@ -1734,7 +1686,7 @@ VOS_STATUS WLANTL_QueueCurrent { VOS_STATUS status = VOS_STATUS_SUCCESS; - TLLOG4(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_LOW,"vos Packet has to be Qed 0x%p", + TLLOG4(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_LOW,"vos Packet has to be Qed 0x%pK", *vosDataBuff)); if(NULL != pwBaReorder->reorderBuffer->arrayBuffer[ucSlotIndex]) { @@ -1818,7 +1770,7 @@ VOS_STATUS WLANTL_ChainFrontPkts fwdIndex = pwBaReorder->ucCIndex + pwBaReorder->winSize; } - TLLOG4(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_LOW,"Current Index %d, FWD Index %d, reorderBuffer 0x%p", + TLLOG4(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO_LOW,"Current Index %d, FWD Index %d, reorderBuffer 0x%pK", pwBaReorder->ucCIndex % pwBaReorder->winSize, fwdIndex % pwBaReorder->winSize, pwBaReorder->reorderBuffer)); @@ -1930,3 +1882,44 @@ void WLANTL_FillReplayCounter return; }/*WLANTL_FillReplayCounter*/ +void WLANTL_ReorderReplayCheck(WLANTL_STAClientType *pClientSTA, + vos_pkt_t **vosDataBuff, v_U8_t ucTid) +{ + vos_pkt_t *pVosCurPkt; + vos_pkt_t *pNextVosPkt; + vos_pkt_t *pVosHeadPkt = NULL; + vos_pkt_t *pfreeVosPkt = NULL; + v_U64_t prevReplayCounter = 0; + v_BOOL_t status; + + pVosCurPkt = *vosDataBuff; + + do { + vos_pkt_walk_packet_chain(pVosCurPkt, &pNextVosPkt, VOS_FALSE); + prevReplayCounter = pClientSTA->ullReplayCounter[ucTid]; + status = WLANTL_IsReplayPacket(pVosCurPkt->pn_num, + prevReplayCounter); + if(VOS_FALSE == status) { + pClientSTA->ullReplayCounter[ucTid] = pVosCurPkt->pn_num; + pVosHeadPkt = pVosCurPkt; + } else { + VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, + "%s: Non-AMSDU Drop the replay packet PN: [0x%llX]", + __func__, pVosCurPkt->pn_num); + pClientSTA->ulTotalReplayPacketsDetected++; + + pfreeVosPkt = pVosCurPkt; + pfreeVosPkt->pNext = NULL; + vos_pkt_return_packet(pfreeVosPkt); + + if (pVosHeadPkt != NULL) { + pVosHeadPkt->pNext = pNextVosPkt; + } + else { + *vosDataBuff = pNextVosPkt; + } + } + + pVosCurPkt = pNextVosPkt; + } while (pVosCurPkt); +} diff --git a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_hosupport.c b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_hosupport.c index 950f3f0f32c..b5c13e222a2 100644 --- a/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_hosupport.c +++ b/drivers/staging/prima/CORE/TL/src/wlan_qct_tl_hosupport.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -357,14 +357,14 @@ void WLANTL_HSDebugDisplay { if(VOS_MODULE_ID_HDD == hoSupport->registeredInd[idx].whoIsClient[sIdx]) { - TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Client HDD pCB %p, triggerEvt %d, RSSI %d", + TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Client HDD pCB %pK, triggerEvt %d, RSSI %d", hoSupport->registeredInd[idx].crossCBFunction[sIdx], hoSupport->registeredInd[idx].triggerEvent[sIdx], hoSupport->registeredInd[idx].rssiValue)); } else { - TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Client SME pCB %p, triggerEvt %d, RSSI %d", + TLLOG1(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Client SME pCB %pK, triggerEvt %d, RSSI %d", hoSupport->registeredInd[idx].crossCBFunction[sIdx], hoSupport->registeredInd[idx].triggerEvent[sIdx], hoSupport->registeredInd[idx].rssiValue)); @@ -1517,12 +1517,12 @@ VOS_STATUS WLANTL_HSRegRSSIIndicationCB { for(sIdx = 0; sIdx < WLANTL_HS_NUM_CLIENT; sIdx++) { - TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Reg CB P %p, registered CB P %p", + TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Reg CB P %pK, registered CB P %pK", crossCBFunction, hoSupport->registeredInd[idx].crossCBFunction[sIdx])); if(crossCBFunction == hoSupport->registeredInd[idx].crossCBFunction[sIdx]) { - TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Same RSSI %d, Same CB %p already registered", + TLLOGE(VOS_TRACE(VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_INFO,"Same RSSI %d, Same CB %pK already registered", rssiValue, crossCBFunction)); WLANTL_HSDebugDisplay(pAdapter); THSRELEASELOCK("WLANTL_HSRegRSSIIndicationCB", &tlCtxt->hoSupport.hosLock); diff --git a/drivers/staging/prima/CORE/TL/src/wlan_qct_tli_ba.h b/drivers/staging/prima/CORE/TL/src/wlan_qct_tli_ba.h index 6265e8921e6..e1d68e627d6 100644 --- a/drivers/staging/prima/CORE/TL/src/wlan_qct_tli_ba.h +++ b/drivers/staging/prima/CORE/TL/src/wlan_qct_tli_ba.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013,2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -394,4 +394,14 @@ void WLANTL_FillReplayCounter v_U8_t ucSlotIndex ); +/** + * WLANTL_ReorderReplayCheck - Do reorder PN replay check + * @pClientSTA: pointer to sta context + * @vosDataBuff: pointer to address of data buffer + * @ucTid: Tid value + * + * Return: None + */ +void WLANTL_ReorderReplayCheck(WLANTL_STAClientType *pClientSTA, + vos_pkt_t **vosDataBuff, v_U8_t ucTid); #endif /* #ifndef WLAN_QCT_TLI_H */ diff --git a/drivers/staging/prima/CORE/VOSS/inc/i_vos_packet.h b/drivers/staging/prima/CORE/VOSS/inc/i_vos_packet.h index f0bc8abb6ee..173d792b77f 100644 --- a/drivers/staging/prima/CORE/VOSS/inc/i_vos_packet.h +++ b/drivers/staging/prima/CORE/VOSS/inc/i_vos_packet.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013,2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -127,6 +127,8 @@ struct vos_pkt_t // user data pointers v_VOID_t *pvUserData[ VOS_PKT_USER_DATA_ID_MAX ]; + v_U64_t pn_num; + // magic number for verifying this is really a struct vos_pkt_t v_U32_t magic; }; diff --git a/drivers/staging/prima/CORE/VOSS/inc/vos_packet.h b/drivers/staging/prima/CORE/VOSS/inc/vos_packet.h index 06e8e2c9ef2..820c53149d5 100644 --- a/drivers/staging/prima/CORE/VOSS/inc/vos_packet.h +++ b/drivers/staging/prima/CORE/VOSS/inc/vos_packet.h @@ -575,6 +575,14 @@ VOS_STATUS vos_pkt_walk_packet_chain( vos_pkt_t *pPacket, vos_pkt_t **ppChainedP v_BOOL_t unchainPacket ); +/** + * vos_is_pkt_chain() - Check for chain of packets + * @pPacket: pointer to chain of packet list + * + * Return: true if chain of packets or false otherwise + */ +bool vos_is_pkt_chain(vos_pkt_t *pPacket); + /**-------------------------------------------------------------------------- \brief vos_pkt_get_data_vector() - Get data vectors from a voss Packet diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_memory.c b/drivers/staging/prima/CORE/VOSS/src/vos_memory.c index e87cfd3ea8d..44e0e4cd62e 100644 --- a/drivers/staging/prima/CORE/VOSS/src/vos_memory.c +++ b/drivers/staging/prima/CORE/VOSS/src/vos_memory.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -492,7 +492,7 @@ v_VOID_t vos_mem_copy( v_VOID_t *pDst, const v_VOID_t *pSrc, v_SIZE_t numBytes ) if ((pDst == NULL) || (pSrc==NULL)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - "%s called with NULL parameter, source:%p destination:%p", + "%s called with NULL parameter, source:%pK destination:%pK", __func__, pSrc, pDst); VOS_ASSERT(0); return; @@ -511,7 +511,7 @@ v_VOID_t vos_mem_move( v_VOID_t *pDst, const v_VOID_t *pSrc, v_SIZE_t numBytes ) if ((pDst == NULL) || (pSrc==NULL)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - "%s called with NULL parameter, source:%p destination:%p", + "%s called with NULL parameter, source:%pK destination:%pK", __func__, pSrc, pDst); VOS_ASSERT(0); return; @@ -541,7 +541,7 @@ v_BOOL_t vos_mem_compare( if ((pMemory1 == NULL) || (pMemory2==NULL)) { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - "%s called with NULL parameter, p1:%p p2:%p", + "%s called with NULL parameter, p1:%pK p2:%pK", __func__, pMemory1, pMemory2); VOS_ASSERT(0); return VOS_FALSE; diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c b/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c index b6f41263870..2f6c35be709 100644 --- a/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c +++ b/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1785,7 +1785,7 @@ VOS_STATUS vos_nv_readMultiMacAddress( v_U8_t *pMacAddress, (NULL == pMacAddress)) { VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, - " Invalid Parameter from NV Client macCount %d, pMacAddress %p", + " Invalid Parameter from NV Client macCount %d, pMacAddress %pK", macCount, pMacAddress); } diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_packet.c b/drivers/staging/prima/CORE/VOSS/src/vos_packet.c index 733217687af..1765c804b77 100644 --- a/drivers/staging/prima/CORE/VOSS/src/vos_packet.c +++ b/drivers/staging/prima/CORE/VOSS/src/vos_packet.c @@ -230,7 +230,7 @@ static void vos_pkti_replenish_raw_pool(void) didOne = VOS_TRUE; VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, - "VPKT [%d]: [%p] Packet replenished", + "VPKT [%d]: [%pK] Packet replenished", __LINE__, pVosPacket); } @@ -256,7 +256,7 @@ static void vos_pkti_replenish_raw_pool(void) pVosPacket->timestamp = vos_timer_get_system_ticks(); VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, - "VPKT [%d]: [%p] Packet replenish callback", + "VPKT [%d]: [%pK] Packet replenish callback", __LINE__, pVosPacket); callback = gpVosPacketContext->rxRawLowResourceInfo.callback; @@ -775,7 +775,7 @@ VOS_STATUS vos_pkt_get_packet( vos_pkt_t **ppPacket, } VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, - "VPKT [%d]: [%p] Packet allocated, type %d[%s]", + "VPKT [%d]: [%pK] Packet allocated, type %d[%s]", __LINE__, pVosPacket, pktType, vos_pkti_packet_type_str(pktType)); *ppPacket = pVosPacket; @@ -959,7 +959,7 @@ VOS_STATUS vos_pkt_wrap_data_packet( vos_pkt_t **ppPacket, pVosPacket->timestamp = vos_timer_get_system_ticks(); VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, - "VPKT [%d]: [%p] Packet allocated, type %s", + "VPKT [%d]: [%pK] Packet allocated, type %s", __LINE__, pVosPacket, vos_pkti_packet_type_str(pktType)); *ppPacket = pVosPacket; @@ -1393,12 +1393,12 @@ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ) if(callback) { // [DEBUG] - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,"VPKT [%d]: recycle %p", __LINE__, pPacket); + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,"VPKT [%d]: recycle %pK", __LINE__, pPacket); // yes, so rather than placing the packet back in the free pool // we will invoke the low resource callback VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, - "VPKT [%d]: [%p] Packet recycled, type %d[%s]", + "VPKT [%d]: [%pK] Packet recycled, type %d[%s]", __LINE__, pPacket, pPacket->packetType, vos_pkti_packet_type_str(pPacket->packetType)); @@ -1424,7 +1424,7 @@ VOS_STATUS vos_pkt_return_packet( vos_pkt_t *pPacket ) // this packet does not satisfy a low resource condition // so put it back in the appropriate free pool VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, - "VPKT [%d]: [%p] Packet returned, type %d[%s]", + "VPKT [%d]: [%pK] Packet returned, type %d[%s]", __LINE__, pPacket, pPacket->packetType, vos_pkti_packet_type_str(pPacket->packetType)); mutex_lock(mlock); @@ -1597,6 +1597,15 @@ VOS_STATUS vos_pkt_walk_packet_chain( vos_pkt_t *pPacket, } } + +bool vos_is_pkt_chain(vos_pkt_t *pPacket) +{ + if (pPacket->pNext != NULL) + return true; + else + return false; +} + /**-------------------------------------------------------------------------- \brief vos_pkt_get_data_vector() - Get data vectors from a voss Packet @@ -2137,7 +2146,7 @@ VOS_STATUS vos_pkt_push_head( vos_pkt_t *pPacket, { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "VPKT [%d]: Insufficient headroom, " - "head[%p], data[%p], req[%d]", + "head[%pK], data[%pK], req[%d]", __LINE__, skb->head, skb->data, dataSize); return VOS_STATUS_E_INVAL; } @@ -2219,7 +2228,7 @@ VOS_STATUS vos_pkt_reserve_head( vos_pkt_t *pPacket, { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_WARN, "VPKT [%d]: Insufficient headroom, " - "head[%p], data[%p], req[%d]", + "head[%pK], data[%pK], req[%d]", __LINE__, skb->head, skb->data, dataSize); if ((newskb = skb_realloc_headroom(skb, dataSize)) == NULL) { @@ -2301,7 +2310,7 @@ VOS_STATUS vos_pkt_reserve_head_fast( vos_pkt_t *pPacket, { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_WARN, "VPKT [%d]: Insufficient headroom, " - "head[%p], data[%p], req[%d]", + "head[%pK], data[%pK], req[%d]", __LINE__, skb->head, skb->data, dataSize); if ((newskb = skb_realloc_headroom(skb, dataSize)) == NULL) { @@ -2528,7 +2537,7 @@ VOS_STATUS vos_pkt_push_tail( vos_pkt_t *pPacket, { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "VPKT [%d]: Insufficient tailroom, " - "tail[%p], end[%p], req[%d]", + "tail[%pK], end[%pK], req[%d]", __LINE__, skb_tail_pointer(skb), skb_end_pointer(skb), dataSize); return VOS_STATUS_E_INVAL; @@ -2609,7 +2618,7 @@ VOS_STATUS vos_pkt_reserve_tail( vos_pkt_t *pPacket, { VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL, "VPKT [%d]: Insufficient tailroom, " - "tail[%p], end[%p], req[%d]", + "tail[%pK], end[%pK], req[%d]", __LINE__, skb_tail_pointer(skb), skb_end_pointer(skb), dataSize); return VOS_STATUS_E_INVAL; diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_timer.c b/drivers/staging/prima/CORE/VOSS/src/vos_timer.c index 44e8681f260..8b6970da4c6 100644 --- a/drivers/staging/prima/CORE/VOSS/src/vos_timer.c +++ b/drivers/staging/prima/CORE/VOSS/src/vos_timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, 2015-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2015-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -780,7 +780,7 @@ VOS_STATUS vos_timer_start( vos_timer_t *timer, v_U32_t expirationTime ) unsigned long flags; VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, - "Timer Addr inside voss_start : 0x%p ", timer ); + "Timer Addr inside voss_start : 0x%pK ", timer ); // Check for invalid pointer if ( NULL == timer ) @@ -875,7 +875,7 @@ VOS_STATUS vos_timer_stop ( vos_timer_t *timer ) unsigned long flags; VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH, - "%s: Timer Addr inside voss_stop : 0x%p",__func__,timer ); + "%s: Timer Addr inside voss_stop : 0x%pK",__func__,timer ); // Check for invalid pointer if ( NULL == timer ) diff --git a/drivers/staging/prima/CORE/WDA/inc/wlan_qct_wda.h b/drivers/staging/prima/CORE/WDA/inc/wlan_qct_wda.h index fdc768d8ca4..f7135c3e627 100644 --- a/drivers/staging/prima/CORE/WDA/inc/wlan_qct_wda.h +++ b/drivers/staging/prima/CORE/WDA/inc/wlan_qct_wda.h @@ -797,6 +797,8 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac); #define WLANWDA_HO_IS_AN_AMPDU 0x4000 #define WLANWDA_HO_LAST_MPDU_OF_AMPDU 0x400 +#define WDA_MAX_MGMT_MPDU_LEN 2000 + /* WDA_IS_RX_AN_AMPDU ********************************************************/ # define WDA_IS_RX_AN_AMPDU(pRxMeta) \ ( ((WDI_DS_RxMetaInfoType*)(pRxMeta))->rxpFlags & WLANWDA_HO_IS_AN_AMPDU ) diff --git a/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c b/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c index 83a5229007c..1a20bf11233 100644 --- a/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c +++ b/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c @@ -4888,7 +4888,7 @@ void WDA_DelSTASelfReqCallback(WDI_Status wdiStatus, tDelStaSelfParams *delStaSelfParams; VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO, - "<------ %s, wdiStatus: %d pWdaParams: %p", + "<------ %s, wdiStatus: %d pWdaParams: %pK", __func__, wdiStatus, pWdaParams); if (NULL == pWdaParams) @@ -12933,7 +12933,7 @@ void WDA_FTMCommandReqCallback(void *ftmCmdRspData, if((NULL == pWDA) || (NULL == ftmCmdRspData)) { VOS_TRACE(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, - "%s, invalid input %p, %p",__func__, pWDA, ftmCmdRspData); + "%s, invalid input %pK, %pK",__func__, pWDA, ftmCmdRspData); return; } /* Release Current FTM Command Request */ @@ -14183,7 +14183,7 @@ VOS_STATUS WDA_TxComplete( v_PVOID_t pVosContext, vos_pkt_t *pData, else { VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_WARN, - "%s:packet (%p) is already freed", + "%s:packet (%pK) is already freed", __func__, pData); //Return from here since we reaching here because the packet already timeout vos_lock_release(&wdaContext->mgmt_pkt_lock); @@ -14193,7 +14193,7 @@ VOS_STATUS WDA_TxComplete( v_PVOID_t pVosContext, vos_pkt_t *pData, else { wdaContext->mgmt_pktfree_fail++; VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, - "%s:packet (%p) userData (%lx) is not freed", + "%s:packet (%pK) userData (%lx) is not freed", __func__, pData, uUserData); } vos_lock_release(&wdaContext->mgmt_pkt_lock); @@ -14242,14 +14242,14 @@ VOS_STATUS WDA_TxPacket(tWDA_CbContext *pWDA, if((NULL == pWDA)||(NULL == pFrmBuf)) { VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR, - "%s:pWDA %p or pFrmBuf %p is NULL", + "%s:pWDA %pK or pFrmBuf %pK is NULL", __func__,pWDA,pFrmBuf); VOS_ASSERT(0); return VOS_STATUS_E_FAILURE; } VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_INFO_HIGH, - "Tx Mgmt Frame Subtype: %d alloc(%p) txBdToken = %u", + "Tx Mgmt Frame Subtype: %d alloc(%pK) txBdToken = %u", pFc->subType, pFrmBuf, txBdToken); pMac = (tpAniSirGlobal )VOS_GET_MAC_CTXT(pWDA->pVosContext); if(NULL == pMac) diff --git a/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c b/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c index 4dd8722b888..8efc5280419 100644 --- a/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c +++ b/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c @@ -7543,7 +7543,7 @@ WDI_MainStart if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Start Started %p %p", + "Invalid parameters on Main Start Started %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7622,7 +7622,7 @@ WDI_MainClose if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Close %p %p", + "Invalid parameters on Main Close %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7660,7 +7660,7 @@ WDI_MainStartStarted if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Start %p %p", + "Invalid parameters on Main Start %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7716,7 +7716,7 @@ WDI_MainStopStarted if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Invalid parameters on Main Stop Started %p %p", + "Invalid parameters on Main Stop Started %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7755,7 +7755,7 @@ WDI_MainReqStarted if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Req Started %p %p", + "Invalid parameters on Main Req Started %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7794,7 +7794,7 @@ WDI_MainRsp if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Response %p %p", + "Invalid parameters on Main Response %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7873,7 +7873,7 @@ WDI_MainStopStopped if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Invalid parameters on Main Stop Stopped %p %p", + "Invalid parameters on Main Stop Stopped %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7917,7 +7917,7 @@ WDI_MainStartBusy if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Start in BUSY %p %p", + "Invalid parameters on Main Start in BUSY %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7958,7 +7958,7 @@ WDI_MainStopBusy if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Stop in BUSY %p %p", + "Invalid parameters on Main Stop in BUSY %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -7997,7 +7997,7 @@ WDI_MainReqBusy if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Request in BUSY %p %p", + "Invalid parameters on Main Request in BUSY %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -8036,7 +8036,7 @@ WDI_MainCloseBusy if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Invalid parameters on Main Close in BUSY %p %p", + "Invalid parameters on Main Close in BUSY %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -8075,7 +8075,7 @@ WDI_MainShutdown if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Invalid parameters on Main Start %p %p", + "Invalid parameters on Main Start %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -8114,7 +8114,7 @@ WDI_MainShutdownBusy if (( NULL == pWDICtx ) || ( NULL == pEventData )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Invalid parameters on Main Start %p %p", + "Invalid parameters on Main Start %pK %pK", pWDICtx, pEventData); return WDI_STATUS_E_FAILURE; } @@ -8193,7 +8193,7 @@ WDI_ProcessStartReq ( usSendSize < (usDataOffset + usLen ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in start req %p %p %p", + "Unable to get send buffer in start req %pK %pK %pK", pEventData, pwdiStartParams, wdiStartRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -8282,7 +8282,7 @@ WDI_ProcessStopReq ( usSendSize < (usDataOffset + sizeof(halStopReq.stopReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in stop req %p %p %p", + "Unable to get send buffer in stop req %pK %pK %pK", pEventData, pwdiStopParams, wdiStopRspCb); WDI_ASSERT(0); goto failRequest; @@ -8502,7 +8502,7 @@ WDI_ProcessInitScanReq ( usSendSize < (usDataOffset + sizeof(halInitScanConReqMsg.initScanParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in init scan req %p %p %p", + "Unable to get send buffer in init scan req %pK %pK %pK", pEventData, pwdiInitScanParams, wdiInitScanRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -8555,7 +8555,7 @@ WDI_ProcessInitScanReq ( usSendSize < (usDataOffset + sizeof(halInitScanReqMsg.initScanParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in init scan req %p %p %p", + "Unable to get send buffer in init scan req %pK %pK %pK", pEventData, pwdiInitScanParams, wdiInitScanRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -8678,7 +8678,7 @@ WDI_ProcessStartScanReq ( usSendSize < (usDataOffset + sizeof(halStartScanReqMsg.startScanParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in start scan req %p %p %p", + "Unable to get send buffer in start scan req %pK %pK %pK", pEventData, pwdiStartScanParams, wdiStartScanRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -8775,7 +8775,7 @@ WDI_ProcessEndScanReq ( usSendSize < (usDataOffset + sizeof(halEndScanReqMsg.endScanParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in start scan req %p %p %p", + "Unable to get send buffer in start scan req %pK %pK %pK", pEventData, pwdiEndScanParams, wdiEndScanRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -8890,7 +8890,7 @@ WDI_ProcessFinishScanReq ( usSendSize < (usDataOffset + sizeof(halFinishScanReqMsg.finishScanParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in start scan req %p %p %p", + "Unable to get send buffer in start scan req %pK %pK %pK", pEventData, pwdiFinishScanParams, wdiFinishScanRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -9032,7 +9032,7 @@ WDI_ProcessBSSSessionJoinReq ( usSendSize < (usDataOffset + sizeof(halJoinReqMsg.joinReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in join req %p %p %p", + "Unable to get send buffer in join req %pK %pK %pK", pUserData, pwdiJoinParams, wdiJoinRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -9313,7 +9313,7 @@ WDI_ProcessConfigBSSReq ( usSendSize < (usDataOffset + uMsgSize ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in config bss req %p %p %p", + "Unable to get send buffer in config bss req %pK %pK %pK", pEventData, pwdiConfigBSSParams, wdiConfigBSSRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -9480,7 +9480,7 @@ WDI_ProcessDelBSSReq ( usSendSize < (usDataOffset + sizeof(halBssReqMsg.deleteBssParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in start req %p %p %p", + "Unable to get send buffer in start req %pK %pK %pK", pEventData, pwdiDelBSSParams, wdiDelBSSRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -9632,7 +9632,7 @@ WDI_ProcessPostAssocReq ( usSendSize < (usDataOffset + uMsgSize ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in start req %p %p %p", + "Unable to get send buffer in start req %pK %pK %pK", pEventData, pwdiPostAssocParams, wdiPostAssocRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -9814,7 +9814,7 @@ WDI_ProcessDelSTAReq ( usSendSize < (usDataOffset + sizeof(halDelStaReqMsg.delStaParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in start req %p %p %p", + "Unable to get send buffer in start req %pK %pK %pK", pEventData, pwdiDelSTAParams, wdiDelSTARspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -9934,7 +9934,7 @@ WDI_ProcessSetBssKeyReq ( usSendSize < (usDataOffset + sizeof(halSetBssKeyReqMsg.setBssKeyParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiSetBSSKeyParams, wdiSetBSSKeyRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -10104,7 +10104,7 @@ WDI_ProcessRemoveBssKeyReq ( usSendSize < (usDataOffset + sizeof(halRemoveBssKeyReqMsg.removeBssKeyParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiRemoveBSSKeyParams, wdiRemoveBSSKeyRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -10240,7 +10240,7 @@ WDI_ProcessSetStaKeyReq ( usSendSize < (usDataOffset + sizeof(halSetStaKeyReqMsg.setStaKeyParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiSetSTAKeyParams, wdiSetSTAKeyRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -10421,7 +10421,7 @@ WDI_ProcessRemoveStaKeyReq ( usSendSize < (usDataOffset + sizeof(halRemoveStaKeyReqMsg.removeStaKeyParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiRemoveSTAKeyParams, wdiRemoveSTAKeyRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -10562,7 +10562,7 @@ WDI_ProcessSetStaBcastKeyReq ( usSendSize < (usDataOffset + sizeof(halSetStaKeyReqMsg.setStaKeyParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiSetSTAKeyParams, wdiSetSTAKeyRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -10742,7 +10742,7 @@ WDI_ProcessRemoveStaBcastKeyReq ( usSendSize < (usDataOffset + sizeof(halRemoveStaBcastKeyReqMsg.removeStaKeyParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiRemoveSTABcastKeyParams, wdiRemoveSTAKeyRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -10885,7 +10885,7 @@ WDI_ProcessAddTSpecReq ( usSendSize < (usDataOffset + sizeof(halAddTsParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiAddTSParams, wdiAddTSRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11058,7 +11058,7 @@ WDI_ProcessDelTSpecReq ( usSendSize < (usDataOffset + sizeof(pwdiDelTSParams->wdiDelTSInfo) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiDelTSParams, wdiDelTSRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11169,7 +11169,7 @@ WDI_ProcessUpdateEDCAParamsReq ( usSendSize < (usDataOffset + sizeof(pwdiUpdateEDCAParams->wdiEDCAInfo) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiUpdateEDCAParams, wdiUpdateEDCARspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11297,7 +11297,7 @@ WDI_ProcessAddBASessionReq (usDataOffset + sizeof(halAddBASessionReq.addBASessionParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Add BA session req %p %p %p", + "Unable to get send buffer in Add BA session req %pK %pK %pK", pEventData, pwdiAddBASessionParams, wdiAddBASessionRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11433,7 +11433,7 @@ WDI_ProcessDelBAReq ( usSendSize < (usDataOffset + sizeof(halDelBAparam) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer for DEL BA req %p %p %p", + "Unable to get send buffer for DEL BA req %pK %pK %pK", pEventData, pwdiDelBAParams, wdiDelBARspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11535,7 +11535,7 @@ WDI_ProcessTSMStatsReq ( usSendSize < (usDataOffset + sizeof(halTsmStatsReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiTSMParams, wdiTSMRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11611,7 +11611,7 @@ WDI_ProcessFlushAcReq ( usSendSize < (usDataOffset + sizeof(pwdiFlushAcParams->wdiFlushAcInfo) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiFlushAcParams, wdiFlushAcRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11681,7 +11681,7 @@ WDI_ProcessBtAmpEventReq ( usSendSize < (usDataOffset + sizeof(haltBtAmpEventMsg.btAmpEventParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in BT AMP event req %p %p %p", + "Unable to get send buffer in BT AMP event req %pK %pK %pK", pEventData, pwdiBtAmpEventParams, wdiBtAmpEventRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11755,7 +11755,7 @@ WDI_ProcessAddSTASelfReq ( usSendSize < (usDataOffset + sizeof(tAddStaSelfParams_V1) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in ADD STA SELF REQ %p %p %p", + "Unable to get send buffer in ADD STA SELF REQ %pK %pK %pK", pEventData, pwdiAddSTASelfReqParams, wdiAddSTASelfReqRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11847,7 +11847,7 @@ WDI_ProcessDelSTASelfReq (usDataOffset + sizeof(pwdiDelStaSelfReqParams->wdiDelStaSelfInfo) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Del Sta Self req %p %p %p", + "Unable to get send buffer in Del Sta Self req %pK %pK %pK", pEventData, pwdiDelStaSelfReqParams, wdiDelStaSelfRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11924,7 +11924,7 @@ WDI_ProcessStartOemDataReq (usSendSize < (usDataOffset + reqLen))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Start Oem Data req %p %p %p", + "Unable to get send buffer in Start Oem Data req %pK %pK %pK", pEventData, pwdiOemDataReqParams, wdiOemDataRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -11998,7 +11998,7 @@ WDI_ProcessHostResumeReq (usSendSize < (usDataOffset + sizeof(halResumeReqParams)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Start Oem Data req %p %p %p", + "Unable to get send buffer in Start Oem Data req %pK %pK %pK", pEventData, pwdiHostResumeParams, wdiHostResumeRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -12072,7 +12072,7 @@ WDI_ProcessSetTxPerTrackingReq ( usSendSize < (usDataOffset + sizeof(halTxPerTrackingReqParam) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set tx per tracking req %p %p %p", + "Unable to get send buffer in set tx per tracking req %pK %pK %pK", pEventData, pwdiSetTxPerTrackingReqParams, pwdiSetTxPerTrackingRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -12554,7 +12554,7 @@ WDI_ProcessChannelSwitchReq ( usSendSize < (usDataOffset + sizeof(halSwitchChannelReq.switchChannelParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in channel switch req %p %p %p", + "Unable to get send buffer in channel switch req %pK %pK %pK", pEventData, pwdiSwitchChParams, wdiSwitchChRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -12643,7 +12643,7 @@ WDI_Status WDI_ProcessChannelSwitchReq_V1 sizeof(halSwitchChannelReq.switchChannelParams_V1) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in channel switch req %p %p %p", + "Unable to get send buffer in channel switch req %pK %pK %pK", pEventData, pwdiSwitchChParams, wdiSwitchChRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -12788,7 +12788,7 @@ WDI_ProcessConfigStaReq ( usSendSize < (usDataOffset + uMsgSize ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in config sta req %p %p %p", + "Unable to get send buffer in config sta req %pK %pK %pK", pEventData, pwdiConfigSTAParams, wdiConfigSTARspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -12940,7 +12940,7 @@ WDI_ProcessSetLinkStateReq ( usSendSize < (usDataOffset + sizeof(halLinkStateReqMsg) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiSetLinkParams, wdiSetLinkRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13072,7 +13072,7 @@ WDI_ProcessGetStatsReq ( usSendSize < (usDataOffset + sizeof(halStatsReqMsg.statsReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiGetStatsParams, wdiGetStatsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13197,7 +13197,7 @@ WDI_ProcessGetRoamRssiReq ( usSendSize < (usDataOffset + sizeof(halRssiRoamReqMsg.roamRssiReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiGetRoamRssiParams, wdiGetStatsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13271,7 +13271,7 @@ WDI_ProcessUpdateCfgReq ( usSendSize < (usDataOffset + pwdiUpdateCfgParams->uConfigBufferLen))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiUpdateCfgParams, wdiUpdateCfgRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13401,7 +13401,7 @@ WDI_ProcessAddBAReq (usDataOffset + sizeof(halAddBAReq.addBAParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Add BA req %p %p %p", + "Unable to get send buffer in Add BA req %pK %pK %pK", pEventData, pwdiAddBAParams, wdiAddBARspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13543,7 +13543,7 @@ WDI_ProcessTriggerBAReq pwdiTriggerBAParams->wdiTriggerBAInfoType.usBACandidateCnt) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Trigger BA req %p %p %p", + "Unable to get send buffer in Trigger BA req %pK %pK %pK", pEventData, pwdiTriggerBAParams, wdiTriggerBARspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13634,7 +13634,7 @@ WDI_ProcessUpdateBeaconParamsReq ( usSendSize < (usDataOffset + sizeof(halUpdateBeaconParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiUpdateBeaconParams, wdiUpdateBeaconParamsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13736,7 +13736,7 @@ WDI_ProcessSendBeaconParamsReq ( usSendSize < (usDataOffset + sizeof(halSendBeaconReq.sendBeaconParam) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in send beacon req %p %p %p", + "Unable to get send buffer in send beacon req %pK %pK %pK", pEventData, pwdiSendBeaconParams, wdiSendBeaconParamsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -13843,7 +13843,7 @@ WDI_ProcessUpdateProbeRspTemplateReq ( usSendSize < (usDataOffset + uMsgSize))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiUpdateProbeRespTmplParams, wdiUpdateProbeRespTmplRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14019,7 +14019,7 @@ if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx, WDI_SET_MAX_TX_POWER_ ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Unable to get Set Max Tx Power req %p %p %p", + "Unable to get Set Max Tx Power req %pK %pK %pK", pEventData, pwdiSetMaxTxPowerParams, wdiSetMaxTxPowerRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14107,7 +14107,7 @@ WDI_Status WDI_ProcessSetMaxTxPowerPerBandReq (usDataOffset + sizeof(tSetMaxTxPwrPerBandParams)))) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Unable to get Set Max Tx Power Per Band req %p %p %p", + "Unable to get Set Max Tx Power Per Band req %pK %pK %pK", pEventData, pwdiSetMaxTxPowerPerBandParams, wdiSetMaxTxPowerPerBandRspCb); WDI_ASSERT(0); @@ -14185,7 +14185,7 @@ WDI_Status WDI_ProcessSetTxPowerReq ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Unable to get Set Max Tx Power req %p %p %p", + "Unable to get Set Max Tx Power req %pK %pK %pK", pEventData, pwdiSetTxPowerParams, wdiSetTxPowerRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14258,7 +14258,7 @@ WDI_ProcessP2PGONOAReq ( usSendSize < (usDataOffset + sizeof(halSetP2PGONOAParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set P2P GO NOA REQ %p %p %p", + "Unable to get send buffer in set P2P GO NOA REQ %pK %pK %pK", pEventData, pwdiP2PGONOAReqParams, wdiP2PGONOAReqRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14349,7 +14349,7 @@ WDI_ProcessTdlsLinkEstablishReq ( usSendSize < (usDataOffset + sizeof(halSetTDLSLinkEstablishParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set P2P GO NOA REQ %p %p %p", + "Unable to get send buffer in set P2P GO NOA REQ %pK %pK %pK", pEventData, pwdiTDLSLinkEstablishReqParams, wdiTDLSLinkEstablishReqRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14455,7 +14455,7 @@ WDI_ProcessTdlsChanSwitchReq ( usSendSize < (usDataOffset + sizeof(halSetTDLSChanSwitchParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Channel Switch REQ %p %p %p", + "Unable to get send buffer in Channel Switch REQ %pK %pK %pK", pEventData, pwdiTDLSChanSwitchReqParams, wdiTDLSChanSwitchReqRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14590,7 +14590,7 @@ WDI_ProcessEnterImpsReq ( usSendSize < (usDataOffset ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Enter IMPS req %p %p", + "Unable to get send buffer in Enter IMPS req %pK %pK", pEventData, wdiEnterImpsRspCb); WDI_ASSERT(0); goto failRequest; @@ -14704,7 +14704,7 @@ WDI_ProcessExitImpsReq ( usSendSize < (usDataOffset ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Exit IMPS req %p %p", + "Unable to get send buffer in Exit IMPS req %pK %pK", pEventData, wdiExitImpsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14768,7 +14768,7 @@ WDI_ProcessEnterBmpsReq ( usSendSize < (usDataOffset + sizeof(enterBmpsReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Enter BMPS req %p %p %p", + "Unable to get send buffer in Enter BMPS req %pK %pK %pK", pEventData, pwdiEnterBmpsReqParams, wdiEnterBmpsRspCb); WDI_ASSERT(0); goto failRequest; @@ -14892,7 +14892,7 @@ WDI_ProcessExitBmpsReq ( usSendSize < (usDataOffset + sizeof(exitBmpsReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Exit BMPS req %p %p %p", + "Unable to get send buffer in Exit BMPS req %pK %pK %pK", pEventData, pwdiExitBmpsReqParams, wdiExitBmpsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -14963,7 +14963,7 @@ WDI_ProcessEnterUapsdReq ( usSendSize < (usDataOffset + sizeof(enterUapsdReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Enter UAPSD req %p %p %p", + "Unable to get send buffer in Enter UAPSD req %pK %pK %pK", pEventData, pwdiEnterUapsdReqParams, wdiEnterUapsdRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15042,7 +15042,7 @@ WDI_ProcessExitUapsdReq ( usSendSize < (usDataOffset + sizeof(wpt_uint8)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Exit UAPSD req %p %p", + "Unable to get send buffer in Exit UAPSD req %pK %pK", pEventData, wdiExitUapsdRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15112,7 +15112,7 @@ WDI_ProcessSetUapsdAcParamsReq ( usSendSize < (usDataOffset + sizeof(uapsdAcParamsReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set UAPSD params req %p %p %p", + "Unable to get send buffer in Set UAPSD params req %pK %pK %pK", pEventData, pwdiSetUapsdAcParams, wdiSetUapsdAcParamsCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15186,7 +15186,7 @@ WDI_ProcessUpdateUapsdParamsReq ( usSendSize < (usDataOffset + sizeof(pwdiUpdateUapsdReqParams->wdiUpdateUapsdInfo) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Update UAPSD params req %p %p %p", + "Unable to get send buffer in Update UAPSD params req %pK %pK %pK", pEventData, pwdiUpdateUapsdReqParams, wdiUpdateUapsdParamsCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15254,7 +15254,7 @@ WDI_ProcessConfigureRxpFilterReq ( usSendSize < (usDataOffset + sizeof(halRxpFilterParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set UAPSD params req %p %p %p", + "Unable to get send buffer in Set UAPSD params req %pK %pK %pK", pEventData, pwdiRxpFilterParams, wdiConfigureRxpFilterCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15326,7 +15326,7 @@ WDI_ProcessSetBeaconFilterReq ( usSendSize < (usDataOffset + sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set beacon filter req %p %p %p", + "Unable to get send buffer in Set beacon filter req %pK %pK %pK", pEventData, pwdiBeaconFilterParams, wdiBeaconFilterCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15396,7 +15396,7 @@ WDI_ProcessRemBeaconFilterReq ( usSendSize < (usDataOffset + sizeof(pwdiBeaconFilterParams->wdiBeaconFilterInfo) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in remove beacon filter req %p %p %p", + "Unable to get send buffer in remove beacon filter req %pK %pK %pK", pEventData, pwdiBeaconFilterParams, wdiBeaconFilterCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15465,7 +15465,7 @@ WDI_ProcessSetRSSIThresholdsReq ( usSendSize < (usDataOffset + sizeof(rssiThresholdsReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in remove beacon filter req %p %p %p", + "Unable to get send buffer in remove beacon filter req %pK %pK %pK", pEventData, pwdiRSSIThresholdsParams, wdiRSSIThresholdsCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -15569,7 +15569,7 @@ WDI_ProcessHostOffloadReq ( usSendSize < (usDataOffset + sizeof(hostOffloadParams) + sizeof(nsOffloadParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in host offload req %p %p %p", + "Unable to get send buffer in host offload req %pK %pK %pK", pEventData, pwdiHostOffloadParams, wdiHostOffloadCb); WDI_ASSERT(0); goto failRequest; @@ -15731,7 +15731,7 @@ WDI_ProcessKeepAliveReq ( usSendSize < (usDataOffset + sizeof(keepAliveReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Unable to get send buffer in keep alive req %p %p %p", + "Unable to get send buffer in keep alive req %pK %pK %pK", pEventData, pwdiKeepAliveParams, wdiKeepAliveCb); WDI_ASSERT(0); goto failRequest; @@ -15849,7 +15849,7 @@ WDI_ProcessWowlAddBcPtrnReq ( usSendSize < (usDataOffset + sizeof(wowlAddBcPtrnReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Wowl add bc ptrn req %p %p %p", + "Unable to get send buffer in Wowl add bc ptrn req %pK %pK %pK", pEventData, pwdiWowlAddBcPtrnParams, wdiWowlAddBcPtrnCb); WDI_ASSERT(0); goto failRequest; @@ -15973,7 +15973,7 @@ WDI_ProcessWowlDelBcPtrnReq ( usSendSize < (usDataOffset + sizeof(wowlDelBcPtrnReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Wowl del bc ptrn req %p %p %p", + "Unable to get send buffer in Wowl del bc ptrn req %pK %pK %pK", pEventData, pwdiWowlDelBcPtrnParams, wdiWowlDelBcPtrnCb); WDI_ASSERT(0); goto failRequest; @@ -16064,7 +16064,7 @@ WDI_ProcessWowlEnterReq ( usSendSize < (usDataOffset + sizeof(wowlEnterReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Wowl enter req %p %p %p", + "Unable to get send buffer in Wowl enter req %pK %pK %pK", pEventData, pwdiWowlEnterParams, wdiWowlEnterCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -16174,7 +16174,7 @@ WDI_ProcessWowlExitReq ( usSendSize < (usDataOffset + sizeof(wowlExitparams)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Wowl Exit req %p %p", + "Unable to get send buffer in Wowl Exit req %pK %pK", pEventData, wdiWowlExitCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -16239,7 +16239,7 @@ WDI_ProcessConfigureAppsCpuWakeupStateReq ( usSendSize < (usDataOffset + sizeof(pwdiAppsCpuWakeupStateParams->bIsAppsAwake) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Apps CPU Wakeup State req %p %p %p", + "Unable to get send buffer in Apps CPU Wakeup State req %pK %pK %pK", pEventData, pwdiAppsCpuWakeupStateParams, wdiConfigureAppsCpuWakeupStateCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -16365,7 +16365,7 @@ WDI_ProcessAggrAddTSpecReq ( usSendSize < (usDataOffset + sizeof(tAggrAddTsParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pwdiAggrAddTSParams, wdiAggrAddTSRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -18926,7 +18926,7 @@ WDI_ProcessStartOemDataRsp if(NULL == wdiOemDataRspParams) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Failed to allocate memory in OEM DATA Response %p %p %p ", + "Failed to allocate memory in OEM DATA Response %pK %pK %pK ", pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -19391,7 +19391,7 @@ WDI_ProcessGetStatsRsp if(NULL == wdiGetStatsRsp) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Failed to allocate memory in Get Stats Response %p %p %p ", + "Failed to allocate memory in Get Stats Response %pK %pK %pK ", pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -19648,7 +19648,7 @@ WDI_ProcessTriggerBARsp if(NULL == wdiTriggerBARsp) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Failed to allocate memory in Trigger BA Response %p %p %p ", + "Failed to allocate memory in Trigger BA Response %pK %pK %pK ", pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -19685,7 +19685,7 @@ WDI_ProcessTriggerBARsp if(NULL == wdiTriggerBARsp) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Failed to allocate memory in Trigger BA Response %p %p %p ", + "Failed to allocate memory in Trigger BA Response %pK %pK %pK ", pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -22563,7 +22563,7 @@ WDI_ProcessHALDumpCmdReq (usDataOffset + sizeof(halDumpCmdReqMsg.dumpCmdReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in HAL Dump Command req %p %p %p", + "Unable to get send buffer in HAL Dump Command req %pK %pK %pK", pEventData, pwdiHALDumpCmdParams, wdiHALDumpCmdRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -22905,7 +22905,7 @@ WDI_ProcessRequest ( NULL != pfnReqProcTbl[pEventData->wdiRequest] )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO, - "Calling request processing function for req %s (%d) %p", + "Calling request processing function for req %s (%d) %pK", WDI_getReqMsgString(pEventData->wdiRequest), pEventData->wdiRequest, pfnReqProcTbl[pEventData->wdiRequest]); return pfnReqProcTbl[pEventData->wdiRequest](pWDICtx, pEventData); @@ -23367,7 +23367,7 @@ WDI_ProcessResponse ( NULL != pfnRspProcTbl[pEventData->wdiResponse] )) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO, - "Calling response processing function for resp %s (%d) %p", + "Calling response processing function for resp %s (%d) %pK", WDI_getRespMsgString(pEventData->wdiResponse), pEventData->wdiResponse, pfnRspProcTbl[pEventData->wdiResponse]); return pfnRspProcTbl[pEventData->wdiResponse](pWDICtx, pEventData); @@ -24442,7 +24442,7 @@ WDI_Status WDI_SendNvBlobReq (usDataOffset + sizeof(halNvImgDownloadParam.nvImageReqParams) + usCurrentFragmentSize ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in NV Download req %p %p ", + "Unable to get send buffer in NV Download req %pK %pK ", pEventData, pwdiNvDownloadReqParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -26551,7 +26551,7 @@ WDI_PackPreferredNetworkList ( usSendSize < (usDataOffset + sizeof(tPrefNetwListParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set PNO req %p", + "Unable to get send buffer in Set PNO req %pK", pwdiPNOScanReqParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -26704,7 +26704,7 @@ WDI_PackPreferredNetworkListNew ( usSendSize < (usDataOffset + sizeof(tPrefNetwListParamsNew) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set PNO req %p", + "Unable to get send buffer in Set PNO req %pK", pwdiPNOScanReqParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -26954,7 +26954,7 @@ WDI_ProcessSetRssiFilterReq ( usSendSize < (usDataOffset + sizeof(ucRssiThreshold) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set PNO req %p %p %p", + "Unable to get send buffer in Set PNO req %pK %pK %pK", pEventData, pwdiRssiFilterReqParams, wdiRssiFilterCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -27144,7 +27144,7 @@ WDI_PackRoamScanOffloadParams ( usSendSize < (usDataOffset + sizeof(tRoamCandidateListParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Start Roam Candidate Lookup Req %p", + "Unable to get send buffer in Start Roam Candidate Lookup Req %pK", pwdiRoamScanOffloadReqParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -27585,7 +27585,7 @@ WDI_PackUpdateScanParamsReq ( usSendSize < (usDataOffset + sizeof(updateScanParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Update Scan Params req %p", + "Unable to get send buffer in Update Scan Params req %pK", pwdiUpdateScanParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -27665,7 +27665,7 @@ WDI_PackUpdateScanParamsReqEx ( usSendSize < (usDataOffset + sizeof(updateScanParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Update Scan Params Ex req %p", + "Unable to get send buffer in Update Scan Params Ex req %pK", pwdiUpdateScanParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -27824,7 +27824,7 @@ WDI_ProcessUpdateChannelParamsReq ( usSendSize < (usDataOffset + usUpdateChanParamSize))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Update Channel Params req %p", + "Unable to get send buffer in Update Channel Params req %pK", pwdiUpdateChanListParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -28063,7 +28063,7 @@ WDI_ProcessUpdateScanParamsRsp } WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO, - "%s: Process UPD scan params ptr : %p", + "%s: Process UPD scan params ptr : %pK", __func__, pEventData->pEventData); wdiUpdateScanParamsCb = (WDI_UpdateScanParamsCb)pWDICtx->pfncRspCB; @@ -28325,7 +28325,7 @@ WDI_Process8023MulticastListReq { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, "Unable to get send buffer in " - "WDI_Process8023MulticastListReq() %p %p %p", + "WDI_Process8023MulticastListReq() %pK %pK %pK", pEventData, pwdiFltPktSetMcListReqParamsType, wdi8023MulticastListCb); wpalMemoryFree(pRcvFltMcAddrListType); @@ -28431,7 +28431,7 @@ WDI_ProcessReceiveFilterSetFilterReq { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, "%s: Failed to allocate memory for " - "tHalRcvPktFilterCfgType: %p %p %p ", + "tHalRcvPktFilterCfgType: %pK %pK %pK ", __func__, pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -28450,7 +28450,7 @@ WDI_ProcessReceiveFilterSetFilterReq { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, "Unable to get send buffer in " - "WDI_ProcessReceiveFilterSetFilterReq() %p %p %p", + "WDI_ProcessReceiveFilterSetFilterReq() %pK %pK %pK", pEventData, pwdiSetRcvPktFilterReqInfo, wdiReceiveFilterSetFilterCb); WDI_ASSERT(0); @@ -28459,7 +28459,7 @@ WDI_ProcessReceiveFilterSetFilterReq } WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "UsData Off %d UsSend %d cfg %p",usDataOffset, + "UsData Off %d UsSend %d cfg %pK",usDataOffset, usSendSize,pSessRcvPktFilterCfg); pSessRcvPktFilterCfg->filterId = pwdiSetRcvPktFilterReqInfo->wdiPktFilterCfg.filterId; @@ -28548,7 +28548,7 @@ WDI_ProcessReceiveFilterSetFilterReq { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, "%s: Failed to allocate memory for " - "tHalRcvPktFilterCfgType: %p %p %p ", + "tHalRcvPktFilterCfgType: %pK %pK %pK ", __func__, pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -28566,7 +28566,7 @@ WDI_ProcessReceiveFilterSetFilterReq { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, "Unable to get send buffer in " - "WDI_ProcessReceiveFilterSetFilterReq() %p %p %p", + "WDI_ProcessReceiveFilterSetFilterReq() %pK %pK %pK", pEventData, pwdiSetRcvPktFilterReqInfo, wdiReceiveFilterSetFilterCb); WDI_ASSERT(0); @@ -28723,7 +28723,7 @@ WDI_ProcessFilterMatchCountReq { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, "Unable to get send buffer in " - "WDI_ProcessFilterMatchCountReq() %p %p %p", + "WDI_ProcessFilterMatchCountReq() %pK %pK %pK", pEventData, pwdiRcvFltPktMatchCntReqParamsType, wdiFilterMatchCountCb); WDI_ASSERT(0); @@ -28815,7 +28815,7 @@ WDI_ProcessReceiveFilterClearFilterReq { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, "Unable to get send buffer in " - "WDI_ProcessReceiveFilterClearFilterReq() %p %p %p", + "WDI_ProcessReceiveFilterClearFilterReq() %pK %pK %pK", pEventData, pwdiRcvFltPktClearReqParamsType, wdiRcvFltPktClearFilterCb); WDI_ASSERT(0); @@ -29223,7 +29223,7 @@ WDI_ProcessSetPowerParamsReq ( usSendSize < (usDataOffset + sizeof(powerParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set PNO req %p %p %p", + "Unable to get send buffer in Set PNO req %pK %pK %pK", pEventData, pwdiPowerParamsReqParams, wdiPowerParamsCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -29485,7 +29485,7 @@ WDI_ProcessDHCPStartInd ( usSendSize < (usDataOffset + usLen ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in DHCP Start req %p ", + "Unable to get send buffer in DHCP Start req %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -29558,7 +29558,7 @@ WDI_ProcessDHCPStopInd ( usSendSize < (usDataOffset + usLen ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in DHCP Start req %p ", + "Unable to get send buffer in DHCP Start req %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -29631,7 +29631,7 @@ WDI_ProcessTXFailMonitor ( usSendSize < (usDataOffset + usLen ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in DHCP Start req %p ", + "Unable to get send buffer in DHCP Start req %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -29821,7 +29821,7 @@ WDI_ProcessGTKOffloadReq ( usSendSize < (usDataOffset + sizeof(gtkOffloadReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in GTK offload req %p %p %p", + "Unable to get send buffer in GTK offload req %pK %pK %pK", pEventData, pwdiGtkOffloadReqMsg, wdiGtkOffloadCb); WDI_ASSERT(0); goto failRequest; @@ -29920,7 +29920,7 @@ WDI_ProcessGTKOffloadGetInfoReq ( usSendSize < ( usDataOffset + sizeof(halGtkOffloadGetInfoReqParams)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in WDI_ProcessGTKOffloadGetInfoReq() %p %p %p", + "Unable to get send buffer in WDI_ProcessGTKOffloadGetInfoReq() %pK %pK %pK", pEventData, pwdiGtkOffloadGetInfoReqMsg, wdiGtkOffloadGetInfoCb); WDI_ASSERT(0); goto failRequest; @@ -30150,7 +30150,7 @@ WDI_ProcessWakeReasonInd if(NULL == pWdiInd) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "%s: Failed to allocate memory for WDI_WakeReasonIndType: %p %p %p ", + "%s: Failed to allocate memory for WDI_WakeReasonIndType: %pK %pK %pK ", __func__, pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -30290,7 +30290,7 @@ WDI_ProcessSetTmLevelReq ( usSendSize < (usDataOffset + sizeof(halTmMsg) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in Set PNO req %p %p %p", + "Unable to get send buffer in Set PNO req %pK %pK %pK", pEventData, pwdiSetTmLevelReq, wdiSetTmLevelCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -30465,7 +30465,7 @@ WDI_ProcessFeatureCapsExchangeReq ( usSendSize < (usDataOffset + usLen ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in feat caps exchange req %p %p", + "Unable to get send buffer in feat caps exchange req %pK %pK", pEventData, (tWlanFeatCaps *)pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -31409,7 +31409,7 @@ WDI_ProcessRateUpdateInd sizeof(tHalRateUpdateParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in Rate Update Indication %p ", + "Unable to get send buffer in Rate Update Indication %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -31702,7 +31702,7 @@ WDI_ProcessRMCRulerReq sizeof(tHalRmcRulerReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in Ruler Req %p ", + "Unable to get send buffer in Ruler Req %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -31780,7 +31780,7 @@ WDI_ProcessRMCUpdateInd sizeof(tHalRmcUpdateIndParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in RMC Update Indication %p ", + "Unable to get send buffer in RMC Update Indication %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -31911,7 +31911,7 @@ WDI_ProcessIbssPeerInfoReq sizeof(tHalIbssPeerInfoReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in IBSS Peer Info Req %p ", + "Unable to get send buffer in IBSS Peer Info Req %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -32022,7 +32022,7 @@ WDI_ProcessIbssPeerInfoRsp if (NULL == pPeerInfoParams) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "Failed to allocate memory in ibss peer info response %p %p %p ", + "Failed to allocate memory in ibss peer info response %pK %pK %pK ", pWDICtx, pEventData, pEventData->pEventData); wdiPeerInfoRspParams.wdiPeerInfoParams = NULL; goto error; @@ -32108,7 +32108,7 @@ WDI_ProcessStopBatchScanInd ( usSendSize < (usDataOffset + sizeof(tHalBatchScanStopIndParam)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in stop batch scan ind %p ", + "Unable to get send buffer in stop batch scan ind %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -32178,7 +32178,7 @@ WDI_ProcessTriggerBatchScanResultInd ( usSendSize < (usDataOffset + sizeof(tHalBatchScanTriggerResultParam)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in stop batch scan ind %p ", + "Unable to get send buffer in stop batch scan ind %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -32243,7 +32243,7 @@ WDI_ProcessSetBatchScanRsp if (NULL == pSetBatchScanRsp) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Failed to allocate memory in set batch scan response %p %p %p ", + "Failed to allocate memory in set batch scan response %pK %pK %pK ", pWDICtx, pEventData, pEventData->pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -32763,7 +32763,7 @@ WDI_ProcessHT40OBSSScanInd ( usSendSize < (usDataOffset + usLen ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in HT40 OBSS Start req %p ", + "Unable to get send buffer in HT40 OBSS Start req %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -32910,7 +32910,7 @@ WDI_ProcessHT40OBSSStopScanInd ( usSendSize < (usDataOffset + usLen ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in HT40 OBSS Start req %p ", + "Unable to get send buffer in HT40 OBSS Start req %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -33178,7 +33178,7 @@ WDI_ProcessGetBcnMissRateReq ( usSendSize < (usDataOffset + sizeof(tHalBcnMissRateReqParams)))) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in get WDI_GET_BCN_MISS_RATE_REQ %p", + "Unable to get send buffer in get WDI_GET_BCN_MISS_RATE_REQ %pK", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -33355,7 +33355,7 @@ WDI_Status ( usSendSize < (usDataOffset + sizeof(tHalfwStatsReqParams)))) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in get WDI_GET_FW_STAS_REQ %p", + "Unable to get send buffer in get WDI_GET_FW_STAS_REQ %pK", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -33462,7 +33462,7 @@ WDI_ProcessLLStatsSetReq ( usSendSize < (usDataOffset + sizeof(halLLStatsSetParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiLLStatsSetReqParams, wdiLLStatsSetCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -33603,7 +33603,7 @@ WDI_ProcessLLStatsGetReq ( usSendSize < (usDataOffset + sizeof(halLLStatsGetParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiLLStatsGetReqParams, wdiLLStatsGetCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -33739,7 +33739,7 @@ WDI_ProcessLLStatsClearReq ( usSendSize < (usDataOffset + sizeof(halLLStatsClearParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiLLStatsClearReqParams, wdiLLStatsClearCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -33886,7 +33886,7 @@ WDI_ProcessMonStartReq ( usSendSize < (usDataOffset + sizeof(halEnableMonitorModeParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiMonStartReqParams, wdiMonStartCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -34013,7 +34013,7 @@ WDI_ProcessMonStopReq ( usSendSize < (usDataOffset + sizeof(wpt_uint8) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p", __func__, + "Unable to get send buffer in %s %pK %pK", __func__, pEventData, wdiMonStopCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -34371,7 +34371,7 @@ WDI_ProcessEXTScanGetCapabilitiesReq ( usSendSize < (usDataOffset + sizeof(halEXTScanGetCapReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiEXTScanGetCapabilitiesReqParams, wdiEXTScanGetCapabilitiesRspCb); WDI_ASSERT(0); @@ -34499,7 +34499,7 @@ WDI_ProcessEXTScanGetCachedResultsReq ( usSendSize < (usDataOffset + sizeof(halEXTScanGetScanReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiEXTScanGetCachedResultsReqParams, wdiEXTScanGetCachedResultsCb); WDI_ASSERT(0); @@ -34627,7 +34627,7 @@ WDI_ProcessEXTScanStopReq ( usSendSize < (usDataOffset + sizeof(halEXTScanStopReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiEXTScanStopReqParams, wdiEXTScanStopCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -34753,7 +34753,7 @@ WDI_ProcessEXTScanStartReq ( usSendSize < (usDataOffset + sizeof(tHalExtScanStartReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiEXTScanStartReqParams, wdiEXTScanStartCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -34950,7 +34950,7 @@ WDI_ProcessEXTScanSetBSSIDHotlistReq ( usSendSize < (usDataOffset + sizeof(tHalBssidHotlistSetReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiEXTScanSetBSSIDHotlistReqParams, wdiEXTScanSetBSSIDHotlistRspCb); WDI_ASSERT(0); @@ -35108,7 +35108,7 @@ WDI_ProcessEXTScanResetBSSIDHotlistReq ( usSendSize < (usDataOffset + sizeof(tHalHotlistResetReq) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiEXTScanResetBSSIDHotlistReqParams, wdiEXTScanResetBSSIDHotlistRspCb); WDI_ASSERT(0); @@ -35218,7 +35218,7 @@ WDI_ProcessHighPriorityDataInfoInd ( usSendSize < (usDataOffset + sizeof(tHalHighPriorityDataInfoInd) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p", __func__, + "Unable to get send buffer in %s %pK %pK", __func__, pEventData, pHighPriorityDataInfoIndParams); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -36252,7 +36252,7 @@ WDI_ProcessFWLoggingDXEdoneInd ( usSendSize < (usDataOffset + sizeof(tFWLoggingDxeDoneInd) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in RTS CTS ind %p ", + "Unable to get send buffer in RTS CTS ind %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -36665,7 +36665,7 @@ WDI_ProcessEncryptMsgReq ( usSendSize < (usDataOffset + sizeof(tSetEncryptedDataReqMsg)))) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in get WDI_ENCRYPT_MSG_REQ %p", + "Unable to get send buffer in get WDI_ENCRYPT_MSG_REQ %pK", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -36819,7 +36819,7 @@ WDI_ProcessNanRequest ( usSendSize < (usDataOffset + pwdiNanRequest->request_data_len))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in NAN request %p %p", + "Unable to get send buffer in NAN request %pK %pK", pEventData, pwdiNanRequest); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -37085,7 +37085,7 @@ WDI_ProcessSetRtsCtsHtvhtInd ( usSendSize < (usDataOffset + sizeof(tHalRtsCtsHtvhtIndParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in RTS CTS ind %p ", + "Unable to get send buffer in RTS CTS ind %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -37177,7 +37177,7 @@ WDI_ProcessEnableDisableCAEventInd ( usSendSize < (usDataOffset + sizeof(tHalAvoidFreqRangeCtrlParam) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in Channel Avoidance Ind %p ", + "Unable to get send buffer in Channel Avoidance Ind %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -37312,7 +37312,7 @@ WDI_WifiConfigSetReq(WDI_WifiConfigSetReqType* pwdiWifConfigSetReqParams, ( usSendSize < (usDataOffset + sizeof(halWifiConfigSetParams.wifiConfigParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p %p", __func__, + "Unable to get send buffer in %s %pK %pK %pK", __func__, pEventData, pwdiWifiConfigSetReqParams, wdiWifiConfigSetRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -37465,7 +37465,7 @@ WDI_ProcessStartOemDataReqIndNew ( usSendSize < (usDataOffset + sizeof(*pHalStartOemDataReqParamsNew) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in %s %p %p", __func__, + "Unable to get send buffer in %s %pK %pK", __func__, pEventData, wdiOemDataReqNewConfig); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -37641,7 +37641,7 @@ WDI_ProcessGetCurrentAntennaIndex sizeof(tHalAntennaDiversitySelectionReqParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in GetCurrentAntennaIndex %p", + "Unable to get send buffer in GetCurrentAntennaIndex %pK", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -37751,7 +37751,7 @@ WDI_ProcessBcnMissPenaltyCount ( usSendSize < (usDataOffset + sizeof(tHalModifyRoamParamsIndParams) ))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer for Modify roam req params %p ", + "Unable to get send buffer for Modify roam req params %pK ", pEventData); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -37855,7 +37855,7 @@ WDI_Status WDI_ProcessSetAllowedActionFramesInd(WDI_ControlBlockType *pWDICtx, (usSendSize < (usDataOffset + usLen))) { WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL, - "Unable to get send buffer in Allowed Action Frames req %p", + "Unable to get send buffer in Allowed Action Frames req %pK", pEventData); return WDI_STATUS_E_FAILURE; } @@ -37948,7 +37948,7 @@ WDI_ProcessSetArpStatsReq ( usSendSize < (usDataOffset + sizeof(statsReqParams.statsArpReqParams)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pSetARPStatsReqParams, wdiSetARPStatsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; @@ -38054,7 +38054,7 @@ WDI_ProcessGetArpStatsReq sizeof(statsReqParams.statsGetArpReqParams)))) { WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Unable to get send buffer in set bss key req %p %p %p", + "Unable to get send buffer in set bss key req %pK %pK %pK", pEventData, pGetARPStatsReqParams, wdiGetARPStatsRspCb); WDI_ASSERT(0); return WDI_STATUS_E_FAILURE; diff --git a/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi_dp.c b/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi_dp.c index 25d627f2388..401c6d1bc59 100644 --- a/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi_dp.c +++ b/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi_dp.c @@ -417,7 +417,7 @@ WDI_FillTxBd ucSubType = (ucTypeSubtype & WDI_FRAME_SUBTYPE_MASK); WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_WARN, - "Type: %d/%d, MAC S: %08x. MAC D: %08x., Tid=%d, frmXlat=%d, pTxBD=%p ucTxFlag 0x%X", + "Type: %d/%d, MAC S: %08x. MAC D: %08x., Tid=%d, frmXlat=%d, pTxBD=%pK ucTxFlag 0x%X", ucType, ucSubType, *((wpt_uint32 *) pAddr2), *((wpt_uint32 *) pDestMacAddr), diff --git a/drivers/staging/prima/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c b/drivers/staging/prima/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c index a43656a1b41..14c353a6c8a 100644 --- a/drivers/staging/prima/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c +++ b/drivers/staging/prima/CORE/WDI/TRP/DTS/src/wlan_qct_wdi_dts.c @@ -437,7 +437,7 @@ wpt_status WDTS_TxPacketComplete(void *pContext, wpt_packet *pFrame, wpt_status // Do Sanity checks if(NULL == pContext || NULL == pFrame){ VOS_TRACE(VOS_MODULE_ID_WDI, VOS_TRACE_LEVEL_WARN, - "%s: Tx complete cannot proceed(%p:%p)", + "%s: Tx complete cannot proceed(%pK:%pK)", __func__, pContext, pFrame); return eWLAN_PAL_STATUS_E_FAILURE; } diff --git a/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c b/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c index da46cba7248..3f06cf8630a 100644 --- a/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c +++ b/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_packet.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2015, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -526,7 +526,7 @@ WPT_STATIC WPT_INLINE void* itGetOSPktAddrFromDevice( wpt_packet *pPacket ) #else WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_FATAL, "%s: skb->data == skb->tail. Attempting recovery " - "skb:%p, head:%p, tail:%p, data:%p", + "skb:%pK, head:%pK, tail:%pK, data:%pK", __func__, skb, skb->head, skb->tail, skb->data); skb->data = skb->head; @@ -576,7 +576,7 @@ wpt_status wpalIteratorInit(wpt_iterator *pIter, wpt_packet *pPacket) if (unlikely((NULL == pPacket)||(NULL==pIter))) { WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - "%s : NULL input pointers %p %p", __func__, pPacket, pIter); + "%s : NULL input pointers %pK %pK", __func__, pPacket, pIter); return eWLAN_PAL_STATUS_E_INVAL; } diff --git a/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c b/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c index 8bb86a12c18..5e6e33aa25e 100644 --- a/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c +++ b/drivers/staging/prima/CORE/WDI/WPAL/src/wlan_qct_pal_timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2013, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -62,7 +62,7 @@ static void wpalTimerCback( void * userData ) else { WPAL_TRACE( eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_WARN, - " %s pTimer(%p) callback after deleted", + " %s pTimer(%pK) callback after deleted", __func__, pTimer ); } }/*wpalTimerCback*/ @@ -82,7 +82,7 @@ wpt_status wpalTimerInit(wpt_timer * pTimer, wpal_timer_callback callback, void if( pTimer == NULL || callback == NULL ) { WPAL_TRACE( eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " %s Wrong param pTimer(%p) callback(%p)", + " %s Wrong param pTimer(%pK) callback(%pK)", __func__, pTimer, callback ); return eWLAN_PAL_STATUS_E_INVAL; } @@ -114,7 +114,7 @@ wpt_status wpalTimerDelete(wpt_timer *pTimer) if( pTimer == NULL ) { WPAL_TRACE( eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " %s Wrong param pTimer(%p)", + " %s Wrong param pTimer(%pK)", __func__, pTimer ); return eWLAN_PAL_STATUS_E_INVAL; } @@ -146,7 +146,7 @@ wpt_status wpalTimerStart(wpt_timer * pTimer, wpt_uint32 timeout) if( pTimer == NULL ) { WPAL_TRACE( eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " %s Wrong param pTimer(%p)", + " %s Wrong param pTimer(%pK)", __func__, pTimer ); return eWLAN_PAL_STATUS_E_INVAL; } @@ -170,7 +170,7 @@ wpt_status wpalTimerStop(wpt_timer * pTimer) if( pTimer == NULL ) { WPAL_TRACE( eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " %s Wrong param pTimer(%p)", + " %s Wrong param pTimer(%pK)", __func__, pTimer ); return eWLAN_PAL_STATUS_E_INVAL; } @@ -191,7 +191,7 @@ WPAL_TIMER_STATE wpalTimerGetCurStatus(wpt_timer * pTimer) if( pTimer == NULL ) { WPAL_TRACE( eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, - " %s Wrong param pTimer(%p)", + " %s Wrong param pTimer(%pK)", __func__, pTimer ); return eWLAN_PAL_STATUS_E_INVAL; } diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index f9c938e21e6..81320a117a3 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2178,6 +2178,8 @@ extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); extern qsize_t *ext4_get_reserved_space(struct inode *inode); extern void ext4_da_update_reserve_space(struct inode *inode, int used, int quota_claim); +extern int ext4_issue_zeroout(struct inode *inode, ext4_lblk_t lblk, + ext4_fsblk_t pblk, ext4_lblk_t len); /* indirect.c */ extern int ext4_ind_map_blocks(handle_t *handle, struct inode *inode, diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 7eea76168d3..37a984cf429 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2990,16 +2990,12 @@ static int ext4_ext_zeroout(struct inode *inode, struct ext4_extent *ex) { ext4_fsblk_t ee_pblock; unsigned int ee_len; - int ret; ee_len = ext4_ext_get_actual_len(ex); ee_pblock = ext4_ext_pblock(ex); - ret = sb_issue_zeroout(inode->i_sb, ee_pblock, ee_len, GFP_NOFS); - if (ret > 0) - ret = 0; - - return ret; + return ext4_issue_zeroout(inode, le32_to_cpu(ex->ee_block), ee_pblock, + ee_len); } /* diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index a788322d0bc..12a2858304d 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -426,6 +426,18 @@ static int __check_block_validity(struct inode *inode, const char *func, return 0; } +int ext4_issue_zeroout(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, + ext4_lblk_t len) +{ + int ret; + + ret = sb_issue_zeroout(inode->i_sb, pblk, len, GFP_NOFS); + if (ret > 0) + ret = 0; + + return ret; +} + #define check_block_validity(inode, map) \ __check_block_validity((inode), __func__, __LINE__, (map)) diff --git a/fs/namespace.c b/fs/namespace.c index 193e674fc1b..c8821404c6a 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -188,6 +188,7 @@ static struct mount *alloc_vfsmnt(const char *name) mnt->mnt_count = 1; mnt->mnt_writers = 0; #endif + mnt->mnt.data = NULL; INIT_LIST_HEAD(&mnt->mnt_hash); INIT_LIST_HEAD(&mnt->mnt_child); @@ -785,7 +786,6 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void if (!mnt) return ERR_PTR(-ENOMEM); - mnt->mnt.data = NULL; if (type->alloc_mnt_data) { mnt->mnt.data = type->alloc_mnt_data(); if (!mnt->mnt.data) { @@ -799,7 +799,6 @@ vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void root = mount_fs(type, flags, name, &mnt->mnt, data); if (IS_ERR(root)) { - kfree(mnt->mnt.data); free_vfsmnt(mnt); return ERR_CAST(root); } @@ -897,7 +896,6 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, return mnt; out_free: - kfree(mnt->mnt.data); free_vfsmnt(mnt); return ERR_PTR(err); } diff --git a/fs/proc/array.c b/fs/proc/array.c index 1c4c7867725..889b809156a 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -312,7 +312,8 @@ static void render_cap_t(struct seq_file *m, const char *header, static inline void task_cap(struct seq_file *m, struct task_struct *p) { const struct cred *cred; - kernel_cap_t cap_inheritable, cap_permitted, cap_effective, cap_bset; + kernel_cap_t cap_inheritable, cap_permitted, cap_effective, + cap_bset, cap_ambient; rcu_read_lock(); cred = __task_cred(p); @@ -320,12 +321,14 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p) cap_permitted = cred->cap_permitted; cap_effective = cred->cap_effective; cap_bset = cred->cap_bset; + cap_ambient = cred->cap_ambient; rcu_read_unlock(); render_cap_t(m, "CapInh:\t", &cap_inheritable); render_cap_t(m, "CapPrm:\t", &cap_permitted); render_cap_t(m, "CapEff:\t", &cap_effective); render_cap_t(m, "CapBnd:\t", &cap_bset); + render_cap_t(m, "CapAmb:\t", &cap_ambient); } static inline void task_seccomp(struct seq_file *m, struct task_struct *p) diff --git a/fs/sdcardfs/derived_perm.c b/fs/sdcardfs/derived_perm.c index fd907931112..a2b4073ce11 100755 --- a/fs/sdcardfs/derived_perm.c +++ b/fs/sdcardfs/derived_perm.c @@ -161,6 +161,9 @@ void fixup_lower_ownership(struct dentry* dentry, const char *name) { gid_t gid = sbi->options.fs_low_gid; struct iattr newattrs; + if (!sbi->options.gid_derivation) + return; + info = SDCARDFS_I(dentry->d_inode); perm = info->perm; if (info->under_obb) { diff --git a/fs/sdcardfs/inode.c b/fs/sdcardfs/inode.c index 42ffc0a6dd3..34fef963aa8 100755 --- a/fs/sdcardfs/inode.c +++ b/fs/sdcardfs/inode.c @@ -33,10 +33,14 @@ const struct cred * override_fsids(struct sdcardfs_sb_info* sbi, struct sdcardfs if (!cred) return NULL; - if (info->under_obb) - uid = AID_MEDIA_OBB; - else - uid = multiuser_get_uid(info->userid, sbi->options.fs_low_uid); + if (sbi->options.gid_derivation) { + if (info->under_obb) + uid = AID_MEDIA_OBB; + else + uid = multiuser_get_uid(info->userid, sbi->options.fs_low_uid); + } else { + uid = sbi->options.fs_low_uid; + } cred->fsuid = uid; cred->fsgid = sbi->options.fs_low_gid; diff --git a/fs/sdcardfs/main.c b/fs/sdcardfs/main.c index 2de823858d1..09b85fdea4e 100755 --- a/fs/sdcardfs/main.c +++ b/fs/sdcardfs/main.c @@ -32,6 +32,7 @@ enum { Opt_multiuser, // May need? Opt_userid, Opt_reserved_mb, + Opt_gid_derivation, Opt_err, }; @@ -43,6 +44,7 @@ static const match_table_t sdcardfs_tokens = { {Opt_mask, "mask=%u"}, {Opt_userid, "userid=%d"}, {Opt_multiuser, "multiuser"}, + {Opt_gid_derivation, "derive_gid"}, {Opt_reserved_mb, "reserved_mb=%u"}, {Opt_err, NULL} }; @@ -64,6 +66,8 @@ static int parse_options(struct super_block *sb, char *options, int silent, vfsopts->gid = 0; /* by default, 0MB is reserved */ opts->reserved_mb = 0; + /* by default, gid derivation is off */ + opts->gid_derivation = false; *debug = 0; @@ -114,6 +118,9 @@ static int parse_options(struct super_block *sb, char *options, int silent, return 0; opts->reserved_mb = option; break; + case Opt_gid_derivation: + opts->gid_derivation = true; + break; /* unknown option */ default: if (!silent) { diff --git a/fs/sdcardfs/sdcardfs.h b/fs/sdcardfs/sdcardfs.h index 2caee49aa8e..f364d5f0492 100755 --- a/fs/sdcardfs/sdcardfs.h +++ b/fs/sdcardfs/sdcardfs.h @@ -205,6 +205,7 @@ struct sdcardfs_mount_options { gid_t fs_low_gid; userid_t fs_user_id; bool multiuser; + bool gid_derivation; unsigned int reserved_mb; }; diff --git a/fs/sdcardfs/super.c b/fs/sdcardfs/super.c index edda32b68dc..041862aaae2 100755 --- a/fs/sdcardfs/super.c +++ b/fs/sdcardfs/super.c @@ -253,6 +253,8 @@ static int sdcardfs_show_options(struct vfsmount *mnt, struct seq_file *m, struc seq_printf(m, ",mask=%u", vfsopts->mask); if (opts->fs_user_id) seq_printf(m, ",userid=%u", opts->fs_user_id); + if (opts->gid_derivation) + seq_puts(m, ",derive_gid"); if (opts->reserved_mb != 0) seq_printf(m, ",reserved=%uMB", opts->reserved_mb); diff --git a/include/linux/cred.h b/include/linux/cred.h index cd3fb73dc42..81ac58cb60c 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -122,6 +122,7 @@ struct cred { kernel_cap_t cap_permitted; /* caps we're permitted */ kernel_cap_t cap_effective; /* caps we can actually use */ kernel_cap_t cap_bset; /* capability bounding set */ + kernel_cap_t cap_ambient; /* Ambient capability set */ #ifdef CONFIG_KEYS unsigned char jit_keyring; /* default keyring to attach requested * keys to */ @@ -197,6 +198,13 @@ static inline void validate_process_creds(void) } #endif +static inline bool cap_ambient_invariant_ok(const struct cred *cred) +{ + return cap_issubset(cred->cap_ambient, + cap_intersect(cred->cap_permitted, + cred->cap_inheritable)); +} + /** * get_new_cred - Get a reference on a new set of credentials * @cred: The new credentials to reference diff --git a/include/linux/random.h b/include/linux/random.h index 1b91d7d186e..efec8336549 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -30,6 +30,7 @@ unsigned long randomize_range(unsigned long start, unsigned long end, unsigned l u32 prandom_u32(void); void prandom_bytes(void *buf, int nbytes); void prandom_seed(u32 seed); +void prandom_reseed_late(void); u32 prandom_u32_state(struct rnd_state *); void prandom_bytes_state(struct rnd_state *state, void *buf, int nbytes); diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 8b4dce41a56..52153754963 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -856,4 +856,8 @@ asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type, asmlinkage long sys_finit_module(int fd, const char __user *uargs, int flags); asmlinkage long sys_seccomp(unsigned int op, unsigned int flags, const char __user *uargs); + +asmlinkage long sys_getrandom(char __user *buf, size_t count, + unsigned int flags); + #endif diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h index b9fbb63b00b..930c30beb7e 100644 --- a/include/sound/apr_audio-v2.h +++ b/include/sound/apr_audio-v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -816,6 +816,8 @@ struct adm_cmd_connect_afe_port_v5 { #define RT_PROXY_PORT_001_RX 0x2000 #define RT_PROXY_PORT_001_TX 0x2001 +#define AFE_LOOPBACK_TX 0x6001 + #define AFE_PORT_INVALID 0xFFFF #define SLIMBUS_INVALID AFE_PORT_INVALID @@ -2803,6 +2805,8 @@ struct asm_softvolume_params { #define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2 0x00010DA5 +#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3 0x00010DDC + #define ASM_MEDIA_FMT_EVRCB_FS 0x00010BEF #define ASM_MEDIA_FMT_EVRCWB_FS 0x00010BF0 @@ -2870,6 +2874,51 @@ struct asm_multi_channel_pcm_fmt_blk_v2 { */ } __packed; +struct asm_multi_channel_pcm_fmt_blk_v3 { + uint16_t num_channels; +/* + * Number of channels + * Supported values: 1 to 8 + */ + + uint16_t bits_per_sample; +/* + * Number of bits per sample per channel + * Supported values: 16, 24 + */ + + uint32_t sample_rate; +/* + * Number of samples per second + * Supported values: 2000 to 48000, 96000,192000 Hz + */ + + uint16_t is_signed; +/* Flag that indicates that PCM samples are signed (1) */ + + uint16_t sample_word_size; +/* + * Size in bits of the word that holds a sample of a channel. + * Supported values: 12,24,32 + */ + + uint8_t channel_mapping[8]; +/* + * Each element, i, in the array describes channel i inside the buffer where + * 0 <= i < num_channels. Unused channels are set to 0. + */ +} __packed; + +/* + * Payload of the multichannel PCM configuration parameters in + * the ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3 media format. + */ +struct asm_multi_channel_pcm_fmt_blk_param_v3 { + struct apr_hdr hdr; + struct asm_data_cmd_media_fmt_update_v2 fmt_blk; + struct asm_multi_channel_pcm_fmt_blk_v3 param; +} __packed; + struct asm_stream_cmd_set_encdec_param { u32 param_id; /* ID of the parameter. */ @@ -2905,6 +2954,66 @@ struct asm_dec_ddp_endp_param_v2 { int endp_param_value; } __packed; + +/* + * Payload of the multichannel PCM encoder configuration parameters in + * the ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3 media format. + */ + +struct asm_multi_channel_pcm_enc_cfg_v3 { + struct apr_hdr hdr; + struct asm_stream_cmd_set_encdec_param encdec; + struct asm_enc_cfg_blk_param_v2 encblk; + uint16_t num_channels; + /* + * Number of PCM channels. + * @values + * - 0 -- Native mode + * - 1 -- 8 channels + * Native mode indicates that encoding must be performed with the number + * of channels at the input. + */ + uint16_t bits_per_sample; + /* + * Number of bits per sample per channel. + * @values 16, 24 + */ + uint32_t sample_rate; + /* + * Number of samples per second. + * @values 0, 8000 to 48000 Hz + * A value of 0 indicates the native sampling rate. Encoding is + * performed at the input sampling rate. + */ + uint16_t is_signed; + /* + * Flag that indicates the PCM samples are signed (1). Currently, only + * signed PCM samples are supported. + */ + uint16_t sample_word_size; + /* + * The size in bits of the word that holds a sample of a channel. + * @values 16, 24, 32 + * 16-bit samples are always placed in 16-bit words: + * sample_word_size = 1. + * 24-bit samples can be placed in 32-bit words or in consecutive + * 24-bit words. + * - If sample_word_size = 32, 24-bit samples are placed in the + * most significant 24 bits of a 32-bit word. + * - If sample_word_size = 24, 24-bit samples are placed in + * 24-bit words. @tablebulletend + */ + uint8_t channel_mapping[8]; + /* + * Channel mapping array expected at the encoder output. + * Channel[i] mapping describes channel i inside the buffer, where + * 0 @le i < num_channels. All valid used channels must be present at + * the beginning of the array. + * If Native mode is set for the channels, this field is ignored. + * @values See Section @xref{dox:PcmChannelDefs} + */ +}; + /* @brief Multichannel PCM encoder configuration structure used * in the #ASM_STREAM_CMD_OPEN_READ_V2(for AVS2.6 image) OR * ASM_PARAM_ID_ENCDEC_ENC_CFG_BLK_V2(FOR AVS2.7 image) command. diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 42d830afcf6..7d0dde42ff8 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -101,7 +101,7 @@ struct snd_pcm_ops { #define SNDRV_PCM_IOCTL1_TRUE ((void *)1) #define SNDRV_PCM_IOCTL1_RESET 0 -#define SNDRV_PCM_IOCTL1_INFO 1 +/* 1 is absent slot. */ #define SNDRV_PCM_IOCTL1_CHANNEL_INFO 2 #define SNDRV_PCM_IOCTL1_GSTATE 3 #define SNDRV_PCM_IOCTL1_FIFO_SIZE 4 @@ -397,6 +397,7 @@ struct snd_pcm_substream { struct snd_pcm_ops *ops; /* -- runtime information -- */ struct snd_pcm_runtime *runtime; + spinlock_t runtime_lock; /* -- timer section -- */ struct snd_timer *timer; /* timer */ unsigned timer_running: 1; /* time is running */ diff --git a/include/sound/q6adm-v2.h b/include/sound/q6adm-v2.h index 21b46c3f34e..c2f58200143 100644 --- a/include/sound/q6adm-v2.h +++ b/include/sound/q6adm-v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -90,7 +90,7 @@ int adm_dolby_dap_send_params(int port_id, int copp_idx, char *params, int adm_open(int port, int path, int rate, int mode, int topology, int perf_mode, uint16_t bits_per_sample, - int app_type, int acdbdev_id); + int app_type, int acdbdev_id, int session_type); int adm_map_rtac_block(struct rtac_cal_block_data *cal_block); diff --git a/include/sound/q6afe-v2.h b/include/sound/q6afe-v2.h index 46da0660919..5c816b1e8f1 100644 --- a/include/sound/q6afe-v2.h +++ b/include/sound/q6afe-v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, 2016, 2018 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -90,6 +90,7 @@ enum { IDX_GLOBAL_CFG, IDX_AUDIO_PORT_ID_I2S_RX, IDX_AFE_PORT_ID_SECONDARY_MI2S_RX_SD1, + IDX_AFE_LOOPBACK_TX, AFE_MAX_PORTS }; diff --git a/include/sound/q6asm-v2.h b/include/sound/q6asm-v2.h index 3c6a456e9ae..03967c01245 100644 --- a/include/sound/q6asm-v2.h +++ b/include/sound/q6asm-v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2014, 2016-2017 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -69,6 +69,11 @@ /* bit 4 represents META enable of encoded data buffer */ #define BUFFER_META_ENABLE 0x0010 +/* bit 5 represents timestamp */ +/* bit 5 - 0 -- ASM_DATA_EVENT_READ_DONE will have relative time-stamp*/ +/* bit 5 - 1 -- ASM_DATA_EVENT_READ_DONE will have absolute time-stamp*/ +#define ABSOLUTE_TIMESTAMP_ENABLE 0x0020 + /* Enable Sample_Rate/Channel_Mode notification event from Decoder */ #define SR_CM_NOTIFY_ENABLE 0x0004 @@ -152,6 +157,7 @@ struct audio_aio_read_param { phys_addr_t paddr; uint32_t len; uint32_t uid; + uint32_t flags;/*meta data flags*/ }; struct audio_port_data { @@ -221,6 +227,12 @@ int q6asm_open_read(struct audio_client *ac, uint32_t format int q6asm_open_read_v2(struct audio_client *ac, uint32_t format, uint16_t bits_per_sample); +int q6asm_open_read_v3(struct audio_client *ac, uint32_t format, + uint16_t bits_per_sample); + +int q6asm_open_read_v4(struct audio_client *ac, uint32_t format, + uint16_t bits_per_sample); + int q6asm_open_write(struct audio_client *ac, uint32_t format /*, uint16_t bits_per_sample*/); @@ -312,10 +324,27 @@ int q6asm_enc_cfg_blk_aac(struct audio_client *ac, int q6asm_enc_cfg_blk_pcm(struct audio_client *ac, uint32_t rate, uint32_t channels); +int q6asm_enc_cfg_blk_pcm_v2(struct audio_client *ac, + uint32_t rate, uint32_t channels, + uint16_t bits_per_sample, + bool use_default_chmap, bool use_back_flavor, + u8 *channel_map); + +int q6asm_enc_cfg_blk_pcm_v3(struct audio_client *ac, + uint32_t rate, uint32_t channels, + uint16_t bits_per_sample, bool use_default_chmap, + bool use_back_flavor, u8 *channel_map, + uint16_t sample_word_size); + int q6asm_enc_cfg_blk_pcm_format_support(struct audio_client *ac, uint32_t rate, uint32_t channels, uint16_t bits_per_sample); +int q6asm_enc_cfg_blk_pcm_format_support_v3(struct audio_client *ac, + uint32_t rate, uint32_t channels, + uint16_t bits_per_sample, + uint16_t sample_word_size); + int q6asm_set_encdec_chan_map(struct audio_client *ac, uint32_t num_channels); @@ -356,6 +385,15 @@ int q6asm_media_format_block_pcm_format_support_v2(struct audio_client *ac, uint16_t bits_per_sample, int stream_id, bool use_default_chmap, char *channel_map); +int q6asm_media_format_block_pcm_format_support_v3(struct audio_client *ac, + uint32_t rate, + uint32_t channels, + uint16_t bits_per_sample, + int stream_id, + bool use_default_chmap, + char *channel_map, + uint16_t sample_word_size); + int q6asm_media_format_block_multi_ch_pcm(struct audio_client *ac, uint32_t rate, uint32_t channels, bool use_default_chmap, char *channel_map); @@ -366,6 +404,13 @@ int q6asm_media_format_block_multi_ch_pcm_v2( bool use_default_chmap, char *channel_map, uint16_t bits_per_sample); +int q6asm_media_format_block_multi_ch_pcm_v3(struct audio_client *ac, + uint32_t rate, uint32_t channels, + bool use_default_chmap, + char *channel_map, + uint16_t bits_per_sample, + uint16_t sample_word_size); + int q6asm_media_format_block_aac(struct audio_client *ac, struct asm_aac_cfg *cfg); diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 0b4e4221b30..1efc240e88e 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -703,9 +703,11 @@ __SYSCALL(__NR_renameat2, sys_renameat2) */ #define __NR_seccomp 277 __SYSCALL(__NR_seccomp, sys_seccomp) +#define __NR_getrandom 278 +__SYSCALL(__NR_getrandom, sys_getrandom) #undef __NR_syscalls -#define __NR_syscalls 278 +#define __NR_syscalls 279 /* * All syscalls below here should go away really, diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h index 28bb0b3a08b..5210e82db05 100644 --- a/include/uapi/linux/prctl.h +++ b/include/uapi/linux/prctl.h @@ -158,4 +158,11 @@ #define PR_SET_VMA 0x53564d41 # define PR_SET_VMA_ANON_NAME 0 +/* Control the ambient capability set */ +#define PR_CAP_AMBIENT 47 +# define PR_CAP_AMBIENT_IS_SET 1 +# define PR_CAP_AMBIENT_RAISE 2 +# define PR_CAP_AMBIENT_LOWER 3 +# define PR_CAP_AMBIENT_CLEAR_ALL 4 + #endif /* _LINUX_PRCTL_H */ diff --git a/include/uapi/linux/random.h b/include/uapi/linux/random.h index 7471b5b3b8b..3017239c9f3 100644 --- a/include/uapi/linux/random.h +++ b/include/uapi/linux/random.h @@ -46,5 +46,13 @@ struct rnd_state { /* Exported functions */ +/* + * Flags for getrandom(2) + * + * GRND_NONBLOCK Don't block and return EAGAIN instead + * GRND_RANDOM Use the /dev/random pool instead of /dev/urandom + */ +#define GRND_NONBLOCK 0x0001 +#define GRND_RANDOM 0x0002 #endif /* _UAPI_LINUX_RANDOM_H */ diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index b2697b41e1f..583ee93ae9d 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h @@ -67,6 +67,11 @@ #define Q6_DTS 0x00010D88 #define Q6_DTS_LBR 0x00010DBB +/* Timestamp flsg */ +/* Bit-0 - 1 : Enable Timestamp mode */ +/* Bit-0 - 0 : Disable Timestamp mode */ +#define COMPRESSED_TIMESTAMP_FLAG 0x0001 + /* Codecs are listed linearly to allow for extensibility */ #define SND_AUDIOCODEC_PCM ((__u32) 0x00000001) #define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002) @@ -471,7 +476,15 @@ struct snd_codec { __u32 align; __u32 compr_passthr; union snd_codec_options options; - __u32 reserved[3]; + __u32 flags; + __u32 reserved[2]; +}; + +struct snd_codec_metadata { + __u32 length; + __u32 offset; + __u64 timestamp; + __u32 reserved[4]; }; #endif diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 76fefb1613b..53bc7c6db4a 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -491,6 +491,7 @@ int do_settimeofday(const struct timespec *tv) struct timekeeper *tk = &timekeeper; struct timespec ts_delta, xt; unsigned long flags; + int ret = 0; if (!timespec_valid_strict(tv)) return -EINVAL; @@ -504,10 +505,15 @@ int do_settimeofday(const struct timespec *tv) ts_delta.tv_sec = tv->tv_sec - xt.tv_sec; ts_delta.tv_nsec = tv->tv_nsec - xt.tv_nsec; + if (timespec_compare(&tk->wall_to_monotonic, &ts_delta) > 0) { + ret = -EINVAL; + goto out; + } + tk_set_wall_to_mono(tk, timespec_sub(tk->wall_to_monotonic, ts_delta)); tk_set_xtime(tk, tv); - +out: timekeeping_update(tk, true, true); write_seqcount_end(&timekeeper_seq); @@ -516,7 +522,7 @@ int do_settimeofday(const struct timespec *tv) /* signal hrtimers about time change */ clock_was_set(); - return 0; + return ret; } EXPORT_SYMBOL(do_settimeofday); @@ -543,7 +549,8 @@ int timekeeping_inject_offset(struct timespec *ts) /* Make sure the proposed value is valid */ tmp = timespec_add(tk_xtime(tk), *ts); - if (!timespec_valid_strict(&tmp)) { + if (timespec_compare(&tk->wall_to_monotonic, ts) > 0 || + !timespec_valid_strict(&tmp)) { ret = -EINVAL; goto error; } diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 3f2fb33d291..5dc3603d8e6 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c @@ -39,6 +39,7 @@ static void set_cred_user_ns(struct cred *cred, struct user_namespace *user_ns) cred->cap_inheritable = CAP_EMPTY_SET; cred->cap_permitted = CAP_FULL_SET; cred->cap_effective = CAP_FULL_SET; + cred->cap_ambient = CAP_EMPTY_SET; cred->cap_bset = CAP_FULL_SET; #ifdef CONFIG_KEYS key_put(cred->request_key_auth); diff --git a/lib/random32.c b/lib/random32.c index 01e8890d108..9f2f2fb03df 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -142,6 +142,7 @@ void prandom_seed(u32 entropy) for_each_possible_cpu (i) { struct rnd_state *state = &per_cpu(net_rand_state, i); state->s1 = __seed(state->s1 ^ entropy, 2); + prandom_u32_state(state); } } EXPORT_SYMBOL(prandom_seed); @@ -174,13 +175,43 @@ static int __init prandom_init(void) } core_initcall(prandom_init); +static void __prandom_timer(unsigned long dontcare); +static DEFINE_TIMER(seed_timer, __prandom_timer, 0, 0); + +static void __prandom_timer(unsigned long dontcare) +{ + u32 entropy; + + get_random_bytes(&entropy, sizeof(entropy)); + prandom_seed(entropy); + /* reseed every ~60 seconds, in [40 .. 80) interval with slack */ + seed_timer.expires = jiffies + (40 * HZ + (prandom_u32() % (40 * HZ))); + add_timer(&seed_timer); +} + +static void prandom_start_seed_timer(void) +{ + set_timer_slack(&seed_timer, HZ); + seed_timer.expires = jiffies + 40 * HZ; + add_timer(&seed_timer); +} + /* * Generate better values after random number generator * is fully initialized. */ -static int __init prandom_reseed(void) +static void __prandom_reseed(bool late) { int i; + unsigned long flags; + static bool latch = false; + static DEFINE_SPINLOCK(lock); + + /* only allow initial seeding (late == false) once */ + spin_lock_irqsave(&lock, flags); + if (latch && !late) + goto out; + latch = true; for_each_possible_cpu(i) { struct rnd_state *state = &per_cpu(net_rand_state,i); @@ -194,6 +225,19 @@ static int __init prandom_reseed(void) /* mix it in */ prandom_u32_state(state); } +out: + spin_unlock_irqrestore(&lock, flags); +} + +void prandom_reseed_late(void) +{ + __prandom_reseed(true); +} + +static int __init prandom_reseed(void) +{ + __prandom_reseed(false); + prandom_start_seed_timer(); return 0; } late_initcall(prandom_reseed); diff --git a/mm/vmscan.c b/mm/vmscan.c index 70336ae6507..db6c440259c 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include @@ -182,39 +181,6 @@ static unsigned long get_lru_size(struct lruvec *lruvec, enum lru_list lru) return zone_page_state(lruvec_zone(lruvec), NR_LRU_BASE + lru); } -struct dentry *debug_file; - -static int debug_shrinker_show(struct seq_file *s, void *unused) -{ - struct shrinker *shrinker; - struct shrink_control sc; - - sc.gfp_mask = -1; - sc.nr_to_scan = 0; - - down_read(&shrinker_rwsem); - list_for_each_entry(shrinker, &shrinker_list, list) { - int num_objs; - - num_objs = shrinker->shrink(shrinker, &sc); - seq_printf(s, "%pf %d\n", shrinker->shrink, num_objs); - } - up_read(&shrinker_rwsem); - return 0; -} - -static int debug_shrinker_open(struct inode *inode, struct file *file) -{ - return single_open(file, debug_shrinker_show, inode->i_private); -} - -static const struct file_operations debug_shrinker_fops = { - .open = debug_shrinker_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - /* * Add a shrinker callback to be called from the vm */ @@ -227,15 +193,6 @@ void register_shrinker(struct shrinker *shrinker) } EXPORT_SYMBOL(register_shrinker); -static int __init add_shrinker_debug(void) -{ - debugfs_create_file("shrinker", 0644, NULL, NULL, - &debug_shrinker_fops); - return 0; -} - -late_initcall(add_shrinker_debug); - /* * Remove one */ diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 529348e6a98..4fdcbbc60aa 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -395,9 +395,8 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt, greh = (const struct gre_base_hdr *)(skb->data + offset); key = key_off ? *(__be32 *)(skb->data + key_off) : 0; - t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr, - key, greh->protocol); - if (t == NULL) + t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr,key, greh->protocol); + if (!t) return; switch (type) { diff --git a/security/commoncap.c b/security/commoncap.c index f2ad12ea60f..47f42d872fa 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -288,6 +288,16 @@ int cap_capset(struct cred *new, new->cap_effective = *effective; new->cap_inheritable = *inheritable; new->cap_permitted = *permitted; + + /* + * Mask off ambient bits that are no longer both permitted and + * inheritable. + */ + new->cap_ambient = cap_intersect(new->cap_ambient, + cap_intersect(*permitted, + *inheritable)); + if (WARN_ON(!cap_ambient_invariant_ok(new))) + return -EINVAL; return 0; } @@ -368,6 +378,7 @@ static inline int bprm_caps_from_vfs_caps(struct cpu_vfs_cap_data *caps, /* * pP' = (X & fP) | (pI & fI) + * The addition of pA' is handled later. */ new->cap_permitted.cap[i] = (new->cap_bset.cap[i] & permitted) | @@ -499,10 +510,13 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) { const struct cred *old = current_cred(); struct cred *new = bprm->cred; - bool effective, has_cap = false; + bool effective, has_cap = false, is_setid; int ret; kuid_t root_uid; + if (WARN_ON(!cap_ambient_invariant_ok(old))) + return -EPERM; + effective = false; ret = get_file_caps(bprm, &effective, &has_cap); if (ret < 0) @@ -547,8 +561,9 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) * * In addition, if NO_NEW_PRIVS, then ensure we get no new privs. */ - if ((!uid_eq(new->euid, old->uid) || - !gid_eq(new->egid, old->gid) || + is_setid = !uid_eq(new->euid, old->uid) || !gid_eq(new->egid, old->gid); + + if ((is_setid || !cap_issubset(new->cap_permitted, old->cap_permitted)) && bprm->unsafe & ~LSM_UNSAFE_PTRACE_CAP) { /* downgrade; they get no more than they had, and maybe less */ @@ -564,10 +579,28 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) new->suid = new->fsuid = new->euid; new->sgid = new->fsgid = new->egid; + /* File caps or setid cancels ambient. */ + if (has_cap || is_setid) + cap_clear(new->cap_ambient); + + /* + * Now that we've computed pA', update pP' to give: + * pP' = (X & fP) | (pI & fI) | pA' + */ + new->cap_permitted = cap_combine(new->cap_permitted, new->cap_ambient); + + /* + * Set pE' = (fE ? pP' : pA'). Because pA' is zero if fE is set, + * this is the same as pE' = (fE ? pP' : 0) | pA'. + */ if (effective) new->cap_effective = new->cap_permitted; else - cap_clear(new->cap_effective); + new->cap_effective = new->cap_ambient; + + if (WARN_ON(!cap_ambient_invariant_ok(new))) + return -EPERM; + bprm->cap_effective = effective; /* @@ -582,7 +615,7 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) * Number 1 above might fail if you don't have a full bset, but I think * that is interesting information to audit. */ - if (!cap_isclear(new->cap_effective)) { + if (!cap_issubset(new->cap_effective, new->cap_ambient)) { if (!cap_issubset(CAP_FULL_SET, new->cap_effective) || !uid_eq(new->euid, root_uid) || !uid_eq(new->uid, root_uid) || issecure(SECURE_NOROOT)) { @@ -593,6 +626,10 @@ int cap_bprm_set_creds(struct linux_binprm *bprm) } new->securebits &= ~issecure_mask(SECURE_KEEP_CAPS); + + if (WARN_ON(!cap_ambient_invariant_ok(new))) + return -EPERM; + return 0; } @@ -614,7 +651,7 @@ int cap_bprm_secureexec(struct linux_binprm *bprm) if (!uid_eq(cred->uid, root_uid)) { if (bprm->cap_effective) return 1; - if (!cap_isclear(cred->cap_permitted)) + if (!cap_issubset(cred->cap_permitted, cred->cap_ambient)) return 1; } @@ -716,10 +753,18 @@ static inline void cap_emulate_setxuid(struct cred *new, const struct cred *old) uid_eq(old->suid, root_uid)) && (!uid_eq(new->uid, root_uid) && !uid_eq(new->euid, root_uid) && - !uid_eq(new->suid, root_uid)) && - !issecure(SECURE_KEEP_CAPS)) { - cap_clear(new->cap_permitted); - cap_clear(new->cap_effective); + !uid_eq(new->suid, root_uid))) { + if (!issecure(SECURE_KEEP_CAPS)) { + cap_clear(new->cap_permitted); + cap_clear(new->cap_effective); + } + + /* + * Pre-ambient programs expect setresuid to nonroot followed + * by exec to drop capabilities. We should make sure that + * this remains the case. + */ + cap_clear(new->cap_ambient); } if (uid_eq(old->euid, root_uid) && !uid_eq(new->euid, root_uid)) cap_clear(new->cap_effective); @@ -841,15 +886,20 @@ int cap_task_setnice(struct task_struct *p, int nice) * Implement PR_CAPBSET_DROP. Attempt to remove the specified capability from * the current task's bounding set. Returns 0 on success, -ve on error. */ -static long cap_prctl_drop(struct cred *new, unsigned long cap) +static int cap_prctl_drop(unsigned long cap) { - if (!capable(CAP_SETPCAP)) + struct cred *new; + + if (!ns_capable(current_user_ns(), CAP_SETPCAP)) return -EPERM; if (!cap_valid(cap)) return -EINVAL; + new = prepare_creds(); + if (!new) + return -ENOMEM; cap_lower(new->cap_bset, cap); - return 0; + return commit_creds(new); } /** @@ -867,26 +917,17 @@ static long cap_prctl_drop(struct cred *new, unsigned long cap) int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) { + const struct cred *old = current_cred(); struct cred *new; - long error = 0; - - new = prepare_creds(); - if (!new) - return -ENOMEM; switch (option) { case PR_CAPBSET_READ: - error = -EINVAL; if (!cap_valid(arg2)) - goto error; - error = !!cap_raised(new->cap_bset, arg2); - goto no_change; + return -EINVAL; + return !!cap_raised(old->cap_bset, arg2); case PR_CAPBSET_DROP: - error = cap_prctl_drop(new, arg2); - if (error < 0) - goto error; - goto changed; + return cap_prctl_drop(arg2); /* * The next four prctl's remain to assist with transitioning a @@ -908,10 +949,9 @@ int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, * capability-based-privilege environment. */ case PR_SET_SECUREBITS: - error = -EPERM; - if ((((new->securebits & SECURE_ALL_LOCKS) >> 1) - & (new->securebits ^ arg2)) /*[1]*/ - || ((new->securebits & SECURE_ALL_LOCKS & ~arg2)) /*[2]*/ + if ((((old->securebits & SECURE_ALL_LOCKS) >> 1) + & (old->securebits ^ arg2)) /*[1]*/ + || ((old->securebits & SECURE_ALL_LOCKS & ~arg2)) /*[2]*/ || (arg2 & ~(SECURE_ALL_LOCKS | SECURE_ALL_BITS)) /*[3]*/ || (cap_capable(current_cred(), current_cred()->user_ns, CAP_SETPCAP, @@ -925,46 +965,76 @@ int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, */ ) /* cannot change a locked bit */ - goto error; + return -EPERM; + + new = prepare_creds(); + if (!new) + return -ENOMEM; new->securebits = arg2; - goto changed; + return commit_creds(new); case PR_GET_SECUREBITS: - error = new->securebits; - goto no_change; + return old->securebits; case PR_GET_KEEPCAPS: - if (issecure(SECURE_KEEP_CAPS)) - error = 1; - goto no_change; + return !!issecure(SECURE_KEEP_CAPS); case PR_SET_KEEPCAPS: - error = -EINVAL; if (arg2 > 1) /* Note, we rely on arg2 being unsigned here */ - goto error; - error = -EPERM; + return -EINVAL; if (issecure(SECURE_KEEP_CAPS_LOCKED)) - goto error; + return -EPERM; + + new = prepare_creds(); + if (!new) + return -ENOMEM; if (arg2) new->securebits |= issecure_mask(SECURE_KEEP_CAPS); else new->securebits &= ~issecure_mask(SECURE_KEEP_CAPS); - goto changed; + return commit_creds(new); + + case PR_CAP_AMBIENT: + if (arg2 == PR_CAP_AMBIENT_CLEAR_ALL) { + if (arg3 | arg4 | arg5) + return -EINVAL; + + new = prepare_creds(); + if (!new) + return -ENOMEM; + cap_clear(new->cap_ambient); + return commit_creds(new); + } + + if (((!cap_valid(arg3)) | arg4 | arg5)) + return -EINVAL; + + if (arg2 == PR_CAP_AMBIENT_IS_SET) { + return !!cap_raised(current_cred()->cap_ambient, arg3); + } else if (arg2 != PR_CAP_AMBIENT_RAISE && + arg2 != PR_CAP_AMBIENT_LOWER) { + return -EINVAL; + } else { + if (arg2 == PR_CAP_AMBIENT_RAISE && + (!cap_raised(current_cred()->cap_permitted, arg3) || + !cap_raised(current_cred()->cap_inheritable, + arg3))) + return -EPERM; + + new = prepare_creds(); + if (!new) + return -ENOMEM; + if (arg2 == PR_CAP_AMBIENT_RAISE) + cap_raise(new->cap_ambient, arg3); + else + cap_lower(new->cap_ambient, arg3); + return commit_creds(new); + } default: /* No functionality available - continue with default */ - error = -ENOSYS; - goto error; + return -ENOSYS; } - - /* Functionality provided */ -changed: - return commit_creds(new); - -no_change: -error: - abort_creds(new); - return error; } /** diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c index f58a5aa05fa..1c963ff8968 100644 --- a/security/keys/process_keys.c +++ b/security/keys/process_keys.c @@ -861,6 +861,7 @@ void key_change_session_keyring(struct callback_head *twork) new->cap_inheritable = old->cap_inheritable; new->cap_permitted = old->cap_permitted; new->cap_effective = old->cap_effective; + new->cap_ambient = old->cap_ambient; new->cap_bset = old->cap_bset; new->jit_keyring = old->jit_keyring; diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 10dde140427..520d0b246de 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -700,7 +700,12 @@ static int selinux_set_mnt_opts(struct super_block *sb, } if (strcmp(sb->s_type->name, "proc") == 0) - sbsec->flags |= SE_SBPROC; + sbsec->flags |= SE_SBPROC | SE_SBGENFS; + + if (!strcmp(sb->s_type->name, "debugfs") || + !strcmp(sb->s_type->name, "sysfs") || + !strcmp(sb->s_type->name, "pstore")) + sbsec->flags |= SE_SBGENFS; /* Determine the labeling behavior to use for this filesystem type. */ rc = security_fs_use((sbsec->flags & SE_SBPROC) ? "proc" : sb->s_type->name, &sbsec->behavior, &sbsec->sid); @@ -1185,12 +1190,13 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc return SECCLASS_SOCKET; } -#ifdef CONFIG_PROC_FS -static int selinux_proc_get_sid(struct dentry *dentry, - u16 tclass, - u32 *sid) +static int selinux_genfs_get_sid(struct dentry *dentry, + u16 tclass, + u16 flags, + u32 *sid) { int rc; + struct super_block *sb = dentry->d_inode->i_sb; char *buffer, *path; buffer = (char *)__get_free_page(GFP_KERNEL); @@ -1201,26 +1207,20 @@ static int selinux_proc_get_sid(struct dentry *dentry, if (IS_ERR(path)) rc = PTR_ERR(path); else { - /* each process gets a /proc/PID/ entry. Strip off the - * PID part to get a valid selinux labeling. - * e.g. /proc/1/net/rpc/nfs -> /net/rpc/nfs */ - while (path[1] >= '0' && path[1] <= '9') { - path[1] = '/'; - path++; + if (flags & SE_SBPROC) { + /* each process gets a /proc/PID/ entry. Strip off the + * PID part to get a valid selinux labeling. + * e.g. /proc/1/net/rpc/nfs -> /net/rpc/nfs */ + while (path[1] >= '0' && path[1] <= '9') { + path[1] = '/'; + path++; + } } - rc = security_genfs_sid("proc", path, tclass, sid); + rc = security_genfs_sid(sb->s_type->name, path, tclass, sid); } free_page((unsigned long)buffer); return rc; } -#else -static int selinux_proc_get_sid(struct dentry *dentry, - u16 tclass, - u32 *sid) -{ - return -EINVAL; -} -#endif /* The inode's security attributes must be initialized before first use. */ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry) @@ -1375,7 +1375,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent /* Default to the fs superblock SID. */ isec->sid = sbsec->sid; - if ((sbsec->flags & SE_SBPROC) && !S_ISLNK(inode->i_mode)) { + if ((sbsec->flags & SE_SBGENFS) && !S_ISLNK(inode->i_mode)) { /* We must have a dentry to determine the label on * procfs inodes */ if (opt_dentry) @@ -1398,7 +1398,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent if (!dentry) goto out_unlock; isec->sclass = inode_mode_to_security_class(inode->i_mode); - rc = selinux_proc_get_sid(dentry, isec->sclass, &sid); + rc = selinux_genfs_get_sid(dentry, isec->sclass, + sbsec->flags, &sid); dput(dentry); if (rc) goto out_unlock; diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index eb25aa9fb31..c290ec31a75 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h @@ -55,6 +55,7 @@ #define SE_SBINITIALIZED 0x10 #define SE_SBPROC 0x20 #define SE_SBLABELSUPP 0x40 +#define SE_SBGENFS 0x80 #define CONTEXT_STR "context=" #define FSCONTEXT_STR "fscontext=" diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 6548b3af383..aea7b748ae1 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -698,6 +698,7 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count) } substream->group = &substream->self_group; spin_lock_init(&substream->self_group.lock); + spin_lock_init(&substream->runtime_lock); INIT_LIST_HEAD(&substream->self_group.substreams); list_add_tail(&substream->link_list, &substream->self_group.substreams); atomic_set(&substream->mmap_count, 0); @@ -977,9 +978,11 @@ int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, void snd_pcm_detach_substream(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime; + unsigned long flags = 0; if (PCM_RUNTIME_CHECK(substream)) return; + spin_lock_irqsave(&substream->runtime_lock, flags); runtime = substream->runtime; if (runtime->private_free != NULL) runtime->private_free(runtime); @@ -996,6 +999,7 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream) put_pid(substream->pid); substream->pid = NULL; substream->pstr->substream_opened--; + spin_unlock_irqrestore(&substream->runtime_lock, flags); } static ssize_t show_pcm_class(struct device *dev, diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 46bf55e351c..885890ed7be 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -1825,8 +1825,6 @@ int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg) { switch (cmd) { - case SNDRV_PCM_IOCTL1_INFO: - return 0; case SNDRV_PCM_IOCTL1_RESET: return snd_pcm_lib_ioctl_reset(substream, arg); case SNDRV_PCM_IOCTL1_CHANNEL_INFO: diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index a41e87a549c..b97eb49c938 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -96,7 +96,6 @@ static inline void snd_leave_user(mm_segment_t fs) int snd_pcm_info(struct snd_pcm_substream *substream, struct snd_pcm_info *info) { - struct snd_pcm_runtime *runtime; struct snd_pcm *pcm = substream->pcm; struct snd_pcm_str *pstr = substream->pstr; @@ -112,12 +111,7 @@ int snd_pcm_info(struct snd_pcm_substream *substream, struct snd_pcm_info *info) info->subdevices_count = pstr->substream_count; info->subdevices_avail = pstr->substream_count - pstr->substream_opened; strlcpy(info->subname, substream->name, sizeof(info->subname)); - runtime = substream->runtime; - /* AB: FIXME!!! This is definitely nonsense */ - if (runtime) { - info->sync = runtime->sync; - substream->ops->ioctl(substream, SNDRV_PCM_IOCTL1_INFO, info); - } + return 0; } diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index b01d9481d63..00c106c7137 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c @@ -63,9 +63,16 @@ void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) static unsigned long snd_pcm_timer_resolution(struct snd_timer * timer) { struct snd_pcm_substream *substream; + unsigned long ret = 0, flags = 0; substream = timer->private_data; - return substream->runtime ? substream->runtime->timer_resolution : 0; + spin_lock_irqsave(&substream->runtime_lock, flags); + if (substream->runtime) + ret = substream->runtime->timer_resolution; + else + ret = 0; + spin_unlock_irqrestore(&substream->runtime_lock, flags); + return ret; } static int snd_pcm_timer_start(struct snd_timer * timer) diff --git a/sound/soc/msm/msm-dai-fe.c b/sound/soc/msm/msm-dai-fe.c index 0299298548c..164659e7a8d 100644 --- a/sound/soc/msm/msm-dai-fe.c +++ b/sound/soc/msm/msm-dai-fe.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -102,7 +102,8 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .rates = (SNDRV_PCM_RATE_8000_48000| SNDRV_PCM_RATE_KNOT), .formats = (SNDRV_PCM_FMTBIT_S16_LE | - SNDRV_PCM_FMTBIT_S24_LE), + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE), .channels_min = 1, .channels_max = 4, .rate_min = 8000, @@ -227,8 +228,10 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .aif_name = "MM_UL4", .rates = (SNDRV_PCM_RATE_8000_48000| SNDRV_PCM_RATE_KNOT), - .formats = SNDRV_PCM_FMTBIT_S16_LE, - .channels_min = 1, + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE), + .channels_min = 0, .channels_max = 8, .rate_min = 8000, .rate_max = 48000, @@ -256,7 +259,9 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .aif_name = "MM_UL5", .rates = (SNDRV_PCM_RATE_8000_48000| SNDRV_PCM_RATE_KNOT), - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE), .channels_min = 1, .channels_max = 8, .rate_min = 8000, @@ -1250,6 +1255,63 @@ static struct snd_soc_dai_driver msm_fe_dais[] = { .name = "VoiceMMode2", .probe = fe_dai_probe, }, + { + .capture = { + .stream_name = "MultiMedia17 Capture", + .aif_name = "MM_UL17", + .rates = (SNDRV_PCM_RATE_8000_192000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE), + .channels_min = 1, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 48000, + }, + .ops = &msm_fe_Multimedia_dai_ops, + .compress_dai = 1, + .name = "MultiMedia17", + .probe = fe_dai_probe, + }, + { + .capture = { + .stream_name = "MultiMedia18 Capture", + .aif_name = "MM_UL18", + .rates = (SNDRV_PCM_RATE_8000_192000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE), + .channels_min = 1, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 48000, + }, + .ops = &msm_fe_Multimedia_dai_ops, + .compress_dai = 1, + .name = "MultiMedia18", + .probe = fe_dai_probe, + }, + { + .capture = { + .stream_name = "MultiMedia19 Capture", + .aif_name = "MM_UL19", + .rates = (SNDRV_PCM_RATE_8000_192000| + SNDRV_PCM_RATE_KNOT), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S24_3LE), + .channels_min = 1, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 48000, + }, + .ops = &msm_fe_Multimedia_dai_ops, + .compress_dai = 1, + .name = "MultiMedia19", + .probe = fe_dai_probe, + }, }; static int msm_fe_dai_dev_probe(struct platform_device *pdev) diff --git a/sound/soc/msm/msm8x16.c b/sound/soc/msm/msm8x16.c index f5bcf7a99f5..72905e5e03f 100644 --- a/sound/soc/msm/msm8x16.c +++ b/sound/soc/msm/msm8x16.c @@ -1,4 +1,4 @@ - /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. + /* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1754,6 +1754,8 @@ static int msm_mi2s_snd_startup(struct snd_pcm_substream *substream) if (ret < 0) pr_err("%s: set fmt cpu dai failed; ret=%d\n", __func__, ret); + pr_debug("%s() exit: substream = %s stream = %d\n", __func__, + substream->name, substream->stream); return ret; } @@ -1994,6 +1996,18 @@ static struct snd_soc_dai_link msm8x16_9326_dai[] = { .codec_dai_name = "tasha_mad1", .codec_name = "tasha_codec", }, + { + .name = LPASS_BE_AFE_LOOPBACK_TX, + .stream_name = "AFE Loopback Capture", + .cpu_dai_name = "msm-dai-q6-dev.24577", + .platform_name = "msm-pcm-routing", + .codec_name = "msm-stub-codec.1", + .codec_dai_name = "msm-stub-tx", + .no_pcm = 1, + .be_id = MSM_BACKEND_DAI_AFE_LOOPBACK_TX, + .ignore_pmdown_time = 1, + .ignore_suspend = 1, + }, }; static struct snd_soc_aux_dev msm8909_aux_dev[] = { @@ -2539,6 +2553,51 @@ static struct snd_soc_dai_link msm8x16_dai[] = { .codec_name = "snd-soc-dummy", .be_id = MSM_FRONTEND_DAI_VOICEMMODE2, }, + {/* hw:x,29 */ + .name = "MSM8X16 Compress1", + .stream_name = "Compress1", + .cpu_dai_name = "MultiMedia17", + .platform_name = "msm-compress-dsp", + .dynamic = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .codec_dai_name = "snd-soc-dummy-dai", + .codec_name = "snd-soc-dummy", + .ignore_suspend = 1, + .ignore_pmdown_time = 1, + /* this dai link has playback support */ + .be_id = MSM_FRONTEND_DAI_MULTIMEDIA17, + }, + {/* hw:x,30 */ + .name = "MSM8X16 Compress2", + .stream_name = "Compress2", + .cpu_dai_name = "MultiMedia18", + .platform_name = "msm-compress-dsp", + .dynamic = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .codec_dai_name = "snd-soc-dummy-dai", + .codec_name = "snd-soc-dummy", + .ignore_suspend = 1, + .ignore_pmdown_time = 1, + /* this dai link has playback support */ + .be_id = MSM_FRONTEND_DAI_MULTIMEDIA18, + }, + {/* hw:x,31 */ + .name = "MSM8X16 Compress3", + .stream_name = "Compress3", + .cpu_dai_name = "MultiMedia19", + .platform_name = "msm-compress-dsp", + .dynamic = 1, + .trigger = {SND_SOC_DPCM_TRIGGER_POST, + SND_SOC_DPCM_TRIGGER_POST}, + .codec_dai_name = "snd-soc-dummy-dai", + .codec_name = "snd-soc-dummy", + .ignore_suspend = 1, + .ignore_pmdown_time = 1, + /* this dai link has playback support */ + .be_id = MSM_FRONTEND_DAI_MULTIMEDIA19, + }, /* Primary AUX PCM Backend DAI Links */ { .name = LPASS_BE_AUXPCM_RX, diff --git a/sound/soc/msm/qdsp6v2/audio_cal_utils.c b/sound/soc/msm/qdsp6v2/audio_cal_utils.c index b51259223f1..1995403b480 100644 --- a/sound/soc/msm/qdsp6v2/audio_cal_utils.c +++ b/sound/soc/msm/qdsp6v2/audio_cal_utils.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014, 2016-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -19,6 +19,8 @@ #include #include +static int unmap_memory(struct cal_type_data *cal_type, + struct cal_block_data *cal_block); size_t get_cal_info_size(int32_t cal_type) { @@ -388,16 +390,12 @@ static void destroy_all_cal_blocks(struct cal_type_data *cal_type) cal_block = list_entry(ptr, struct cal_block_data, list); - if (cal_type->info.cal_util_callbacks.unmap_cal != NULL) { - ret = cal_type->info.cal_util_callbacks. - unmap_cal(cal_type->info.reg.cal_type, - cal_block); - if (ret < 0) { - pr_err("%s: unmap_cal failed, cal type %d, ret = %d!\n", - __func__, - cal_type->info.reg.cal_type, - ret); - } + ret = unmap_memory(cal_type, cal_block); + if (ret < 0) { + pr_err("%s: unmap_memory failed, cal type %d, ret = %d!\n", + __func__, + cal_type->info.reg.cal_type, + ret); } delete_cal_block(cal_block); cal_block = NULL; @@ -643,6 +641,7 @@ static int realloc_memory(struct cal_block_data *cal_block) cal_block->map_data.ion_handle); cal_block->map_data.ion_client = NULL; cal_block->map_data.ion_handle = NULL; + cal_block->cal_data.size = 0; ret = cal_block_ion_alloc(cal_block); if (ret < 0) diff --git a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c index 39b7c03288c..656a1a99d86 100644 --- a/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c @@ -99,6 +99,7 @@ struct msm_compr_pdata { bool use_dsp_gapless_mode; struct msm_compr_dec_params *dec_params[MSM_FRONTEND_DAI_MAX]; struct msm_compr_ch_map *ch_map[MSM_FRONTEND_DAI_MAX]; + bool is_in_use[MSM_FRONTEND_DAI_MAX]; }; struct msm_compr_audio { @@ -119,6 +120,13 @@ struct msm_compr_audio { uint32_t bytes_received; /* from userspace */ uint32_t bytes_sent; /* to DSP */ + uint64_t received_total; /* bytes received from DSP */ + uint64_t bytes_copied; /* to userspace */ + uint64_t bytes_read; /* from DSP */ + uint32_t bytes_read_offset; /* bytes read offset*/ + + uint32_t ts_header_offset; /*holds the timestamp header size*/ + int32_t first_buffer; int32_t last_buffer; int32_t partial_drain_delay; @@ -380,6 +388,51 @@ static int msm_compr_send_buffer(struct msm_compr_audio *prtd) return 0; } +static int msm_compr_read_buffer(struct msm_compr_audio *prtd) +{ + int buffer_length; + uint64_t bytes_available; + uint64_t buffer_sent; + struct audio_aio_read_param param; + + pr_debug("In %s\n", __func__); + if (!atomic_read(&prtd->start)) { + pr_err("%s: stream is not in started state\n", __func__); + return -EINVAL; + } + + buffer_length = prtd->codec_param.buffer.fragment_size - + prtd->ts_header_offset; + bytes_available = prtd->received_total - prtd->bytes_copied; + buffer_sent = prtd->bytes_read - prtd->bytes_copied; + if (buffer_sent + buffer_length + prtd->ts_header_offset + > prtd->buffer_size) { + pr_debug(" %s : Buffer is Full bytes_available: %llu\n", + __func__, bytes_available); + return 0; + } + + param.paddr = prtd->buffer_paddr + prtd->bytes_read_offset + + prtd->ts_header_offset; + param.len = buffer_length; + param.uid = buffer_length; + param.flags = prtd->codec_param.codec.flags; + + pr_debug("%s: reading %d bytes from DSP byte_offset = %llu\n", + __func__, buffer_length, prtd->bytes_read); + if (q6asm_async_read(prtd->audio_client, ¶m) < 0) { + pr_err("%s:q6asm_async_read failed\n", __func__); + } else { + prtd->bytes_read += buffer_length + prtd->ts_header_offset; + prtd->bytes_read_offset += buffer_length + + prtd->ts_header_offset; + if (prtd->bytes_read_offset >= prtd->buffer_size) + prtd->bytes_read_offset -= prtd->buffer_size; + } + + return 0; +} + static void compr_event_handler(uint32_t opcode, uint32_t token, uint32_t *payload, void *priv) { @@ -391,6 +444,8 @@ static void compr_event_handler(uint32_t opcode, int bytes_available, stream_id; uint32_t stream_index; unsigned long flags; + uint64_t read_size; + uint32_t *buff_addr; if (!prtd) { pr_err("%s: prtd is NULL\n", __func__); @@ -463,6 +518,49 @@ static void compr_event_handler(uint32_t opcode, spin_unlock_irqrestore(&prtd->lock, flags); break; + + case ASM_DATA_EVENT_READ_DONE_V2: + spin_lock_irqsave(&prtd->lock, flags); + + pr_debug("ASM_DATA_EVENT_READ_DONE_V2 offset %d, length %d\n", + prtd->byte_offset, payload[4]); + + if (prtd->ts_header_offset) { + /*Update the header for received buffer*/ + buff_addr = prtd->buffer + prtd->byte_offset; + /* Write the length of the buffer*/ + *buff_addr = prtd->codec_param.buffer.fragment_size + - prtd->ts_header_offset; + buff_addr++; + /* Write the offset*/ + *buff_addr = prtd->ts_header_offset; + buff_addr++; + /*Write the TS LSW*/ + *buff_addr = payload[6]; + buff_addr++; + /*Write the TS MSW*/ + *buff_addr = payload[7]; + } + /*Always assume read_size is same as fragment_size*/ + read_size = prtd->codec_param.buffer.fragment_size; + prtd->byte_offset += read_size; + prtd->received_total += read_size; + if (prtd->byte_offset >= prtd->buffer_size) + prtd->byte_offset -= prtd->buffer_size; + + snd_compr_fragment_elapsed(cstream); + + if (!atomic_read(&prtd->start)) { + pr_debug("read_done received while not started, treat as xrun"); + atomic_set(&prtd->xrun, 1); + spin_unlock_irqrestore(&prtd->lock, flags); + break; + } + msm_compr_read_buffer(prtd); + + spin_unlock_irqrestore(&prtd->lock, flags); + break; + case ASM_DATA_EVENT_RENDERED_EOS: spin_lock_irqsave(&prtd->lock, flags); pr_debug("%s: ASM_DATA_CMDRSP_EOS token 0x%x,stream id %d\n", @@ -513,9 +611,16 @@ static void compr_event_handler(uint32_t opcode, case ASM_SESSION_CMD_RUN_V2: /* check if the first buffer need to be sent to DSP */ pr_debug("ASM_SESSION_CMD_RUN_V2\n"); - /* FIXME: A state is a better way, dealing with this*/ spin_lock_irqsave(&prtd->lock, flags); + + if (cstream->direction == SND_COMPRESS_CAPTURE) { + atomic_set(&prtd->start, 1); + msm_compr_read_buffer(prtd); + spin_unlock_irqrestore(&prtd->lock, flags); + break; + } + if (!prtd->bytes_sent) { bytes_available = prtd->bytes_received - prtd->copied_total; if (bytes_available < cstream->runtime->fragment_size) { @@ -701,13 +806,13 @@ static int msm_compr_send_media_format_block(struct snd_compr_stream *cstream, } if (prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S24_LE) bit_width = 24; - ret = q6asm_media_format_block_pcm_format_support_v2( + ret = q6asm_media_format_block_pcm_format_support_v3( prtd->audio_client, prtd->sample_rate, prtd->num_channels, bit_width, stream_id, use_default_chmap, - chmap); + chmap, 16); if (ret < 0) pr_err("%s: CMD Format block failed\n", __func__); @@ -892,7 +997,8 @@ static int msm_compr_init_pp_params(struct snd_compr_stream *cstream, return ret; } -static int msm_compr_configure_dsp(struct snd_compr_stream *cstream) +static int msm_compr_configure_dsp_for_playback + (struct snd_compr_stream *cstream) { struct snd_compr_runtime *runtime = cstream->runtime; struct msm_compr_audio *prtd = runtime->private_data; @@ -1016,15 +1122,121 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream) return ret; } -static int msm_compr_open(struct snd_compr_stream *cstream) +static int msm_compr_configure_dsp_for_capture(struct snd_compr_stream *cstream) +{ + struct snd_compr_runtime *runtime = cstream->runtime; + struct msm_compr_audio *prtd = runtime->private_data; + struct snd_soc_pcm_runtime *soc_prtd = cstream->private_data; + uint16_t bits_per_sample; + uint16_t sample_word_size; + int dir = OUT, ret = 0; + struct audio_client *ac = prtd->audio_client; + uint32_t stream_index; + + pr_debug("%s:\n", __func__); + + switch (prtd->codec_param.codec.format) { + case SNDRV_PCM_FORMAT_S24_LE: + bits_per_sample = 24; + sample_word_size = 32; + break; + case SNDRV_PCM_FORMAT_S24_3LE: + bits_per_sample = 24; + sample_word_size = 24; + break; + case SNDRV_PCM_FORMAT_S32_LE: + bits_per_sample = 32; + sample_word_size = 32; + break; + case SNDRV_PCM_FORMAT_S16_LE: + default: + bits_per_sample = 16; + sample_word_size = 16; + break; + } + + pr_debug("%s: stream_id %d bits_per_sample %d\n", + __func__, ac->stream_id, bits_per_sample); + + ret = q6asm_open_read_v4(prtd->audio_client, FORMAT_LINEAR_PCM, + bits_per_sample); + if (ret < 0) + pr_err("%s: q6asm_open_read failed\n", __func__); + + ret = msm_pcm_routing_reg_phy_stream(soc_prtd->dai_link->be_id, + ac->perf_mode, + prtd->session_id, + SNDRV_PCM_STREAM_CAPTURE); + if (ret) { + pr_err("%s: stream reg failed:%d\n", __func__, ret); + return ret; + } + + ret = q6asm_set_io_mode(ac, (COMPRESSED_STREAM_IO | ASYNC_IO_MODE)); + if (ret < 0) { + pr_err("%s: Set IO mode failed\n", __func__); + return -EINVAL; + } + + stream_index = STREAM_ARRAY_INDEX(ac->stream_id); + if (stream_index >= MAX_NUMBER_OF_STREAMS || stream_index < 0) { + pr_err("%s: Invalid stream index:%d", __func__, stream_index); + return -EINVAL; + } + + runtime->fragments = prtd->codec_param.buffer.fragments; + runtime->fragment_size = prtd->codec_param.buffer.fragment_size; + pr_debug("allocate %d buffers each of size %d\n", + runtime->fragments, + runtime->fragment_size); + ret = q6asm_audio_client_buf_alloc_contiguous(dir, ac, + runtime->fragment_size, + runtime->fragments); + if (ret < 0) { + pr_err("Audio Start: Buffer Allocation failed rc = %d\n", ret); + return -ENOMEM; + } + + prtd->byte_offset = 0; + prtd->received_total = 0; + prtd->app_pointer = 0; + prtd->bytes_copied = 0; + prtd->bytes_read = 0; + prtd->bytes_read_offset = 0; + prtd->buffer = ac->port[dir].buf[0].data; + prtd->buffer_paddr = ac->port[dir].buf[0].phys; + prtd->buffer_size = runtime->fragments * runtime->fragment_size; + + /* Bit-0 of flags represent timestamp mode*/ + if (prtd->codec_param.codec.flags & COMPRESSED_TIMESTAMP_FLAG) + prtd->ts_header_offset = sizeof(struct snd_codec_metadata); + else + prtd->ts_header_offset = 0; + + pr_debug("sample_rate = %d num_channels = %d bits_per_sample = %dsample_word_size = %d\n", + prtd->sample_rate, prtd->num_channels, bits_per_sample, + sample_word_size); + ret = q6asm_enc_cfg_blk_pcm_format_support_v3(prtd->audio_client, + prtd->sample_rate, prtd->num_channels, + bits_per_sample, sample_word_size); + + return ret; +} + +static int msm_compr_playback_open(struct snd_compr_stream *cstream) { struct snd_compr_runtime *runtime = cstream->runtime; struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct msm_compr_audio *prtd; + struct msm_compr_audio *prtd = NULL; struct msm_compr_pdata *pdata = snd_soc_platform_get_drvdata(rtd->platform); pr_debug("%s\n", __func__); + if (pdata->is_in_use[rtd->dai_link->be_id] == true) { + pr_err("%s: %s is already in use,err: %d ", + __func__, rtd->dai_link->cpu_dai_name, -EBUSY); + return -EBUSY; + } prtd = kzalloc(sizeof(struct msm_compr_audio), GFP_KERNEL); if (prtd == NULL) { pr_err("Failed to allocate memory for msm_compr_audio\n"); @@ -1036,7 +1248,7 @@ static int msm_compr_open(struct snd_compr_stream *cstream) pdata->cstream[rtd->dai_link->be_id] = cstream; pdata->audio_effects[rtd->dai_link->be_id] = kzalloc(sizeof(struct msm_compr_audio_effects), GFP_KERNEL); - if (!pdata->audio_effects[rtd->dai_link->be_id]) { + if (pdata->audio_effects[rtd->dai_link->be_id] == NULL) { pr_err("%s: Could not allocate memory for effects\n", __func__); pdata->cstream[rtd->dai_link->be_id] = NULL; kfree(prtd); @@ -1044,10 +1256,11 @@ static int msm_compr_open(struct snd_compr_stream *cstream) } pdata->dec_params[rtd->dai_link->be_id] = kzalloc(sizeof(struct msm_compr_dec_params), GFP_KERNEL); - if (!pdata->dec_params[rtd->dai_link->be_id]) { + if (pdata->dec_params[rtd->dai_link->be_id] == NULL) { pr_err("%s: Could not allocate memory for dec params\n", __func__); kfree(pdata->audio_effects[rtd->dai_link->be_id]); + pdata->audio_effects[rtd->dai_link->be_id] = NULL; pdata->cstream[rtd->dai_link->be_id] = NULL; kfree(prtd); return -ENOMEM; @@ -1057,7 +1270,9 @@ static int msm_compr_open(struct snd_compr_stream *cstream) if (!prtd->audio_client) { pr_err("%s: Could not allocate memory for client\n", __func__); kfree(pdata->audio_effects[rtd->dai_link->be_id]); + pdata->audio_effects[rtd->dai_link->be_id] = NULL; kfree(pdata->dec_params[rtd->dai_link->be_id]); + pdata->dec_params[rtd->dai_link->be_id] = NULL; pdata->cstream[rtd->dai_link->be_id] = NULL; kfree(prtd); return -ENOMEM; @@ -1105,21 +1320,83 @@ static int msm_compr_open(struct snd_compr_stream *cstream) runtime->private_data = prtd; populate_codec_list(prtd); - if (cstream->direction == SND_COMPRESS_PLAYBACK) { - if (!atomic_cmpxchg(&pdata->audio_ocmem_req, 0, 1)) - audio_ocmem_process_req(AUDIO, true); - else - atomic_inc(&pdata->audio_ocmem_req); - pr_debug("%s: ocmem_req: %d\n", __func__, - atomic_read(&pdata->audio_ocmem_req)); - } else { - pr_err("%s: Unsupported stream type", __func__); + if (!atomic_cmpxchg(&pdata->audio_ocmem_req, 0, 1)) + audio_ocmem_process_req(AUDIO, true); + else + atomic_inc(&pdata->audio_ocmem_req); + pr_debug("%s: ocmem_req: %d\n", __func__, + atomic_read(&pdata->audio_ocmem_req)); + + return 0; +} + +static int msm_compr_capture_open(struct snd_compr_stream *cstream) +{ + struct snd_compr_runtime *runtime = cstream->runtime; + struct snd_soc_pcm_runtime *rtd = cstream->private_data; + struct msm_compr_audio *prtd; + struct msm_compr_pdata *pdata = + snd_soc_platform_get_drvdata(rtd->platform); + + pr_debug("%s\n", __func__); + prtd = kzalloc(sizeof(struct msm_compr_audio), GFP_KERNEL); + if (prtd == NULL) { + pr_err("Failed to allocate memory for msm_compr_audio\n"); + return -ENOMEM; + } + + runtime->private_data = NULL; + prtd->cstream = cstream; + pdata->cstream[rtd->dai_link->be_id] = cstream; + + prtd->audio_client = q6asm_audio_client_alloc( + (app_cb)compr_event_handler, prtd); + if (!prtd->audio_client) { + pr_err("%s: Could not allocate memory for client\n", __func__); + pdata->cstream[rtd->dai_link->be_id] = NULL; + kfree(prtd); + return -ENOMEM; } + pr_debug("%s: session ID %d\n", __func__, prtd->audio_client->session); + prtd->audio_client->perf_mode = false; + prtd->session_id = prtd->audio_client->session; + prtd->codec = FORMAT_LINEAR_PCM; + prtd->bytes_copied = 0; + prtd->bytes_read = 0; + prtd->bytes_read_offset = 0; + prtd->received_total = 0; + prtd->byte_offset = 0; + prtd->sample_rate = 48000; + prtd->num_channels = 2; + prtd->first_buffer = 0; + + spin_lock_init(&prtd->lock); + + atomic_set(&prtd->eos, 0); + atomic_set(&prtd->start, 0); + atomic_set(&prtd->drain, 0); + atomic_set(&prtd->xrun, 0); + atomic_set(&prtd->close, 0); + atomic_set(&prtd->wait_on_close, 0); + atomic_set(&prtd->error, 0); + + runtime->private_data = prtd; return 0; } -static int msm_compr_free(struct snd_compr_stream *cstream) +static int msm_compr_open(struct snd_compr_stream *cstream) +{ + int ret = 0; + + if (cstream->direction == SND_COMPRESS_PLAYBACK) + ret = msm_compr_playback_open(cstream); + else if (cstream->direction == SND_COMPRESS_CAPTURE) + ret = msm_compr_capture_open(cstream); + return ret; +} + +static int msm_compr_playback_free(struct snd_compr_stream *cstream) { struct snd_compr_runtime *runtime; struct msm_compr_audio *prtd; @@ -1209,18 +1486,99 @@ static int msm_compr_free(struct snd_compr_stream *cstream) atomic_read(&pdata->audio_ocmem_req)); q6asm_audio_client_buf_free_contiguous(dir, ac); + q6asm_audio_client_free(ac); + if (pdata->audio_effects[soc_prtd->dai_link->be_id] != NULL) { + kfree(pdata->audio_effects[soc_prtd->dai_link->be_id]); + pdata->audio_effects[soc_prtd->dai_link->be_id] = NULL; + } + if (pdata->dec_params[soc_prtd->dai_link->be_id] != NULL) { + kfree(pdata->dec_params[soc_prtd->dai_link->be_id]); + pdata->dec_params[soc_prtd->dai_link->be_id] = NULL; + } + pdata->is_in_use[soc_prtd->dai_link->be_id] = false; + kfree(prtd); + runtime->private_data = NULL; + + return 0; +} + +static int msm_compr_capture_free(struct snd_compr_stream *cstream) +{ + struct snd_compr_runtime *runtime; + struct msm_compr_audio *prtd; + struct snd_soc_pcm_runtime *soc_prtd; + struct msm_compr_pdata *pdata; + struct audio_client *ac; + int dir = OUT, stream_id; + unsigned long flags; + uint32_t stream_index; + + pr_debug("%s\n", __func__); + + if (!cstream) { + pr_err("%s cstream is null\n", __func__); + return 0; + } + runtime = cstream->runtime; + soc_prtd = cstream->private_data; + if (!runtime || !soc_prtd || !(soc_prtd->platform)) { + pr_err("%s runtime or soc_prtd or platform is null\n", + __func__); + return 0; + } + prtd = runtime->private_data; + if (!prtd) { + pr_err("%s prtd is null\n", __func__); + return 0; + } + pdata = snd_soc_platform_get_drvdata(soc_prtd->platform); + ac = prtd->audio_client; + if (!pdata || !ac) { + pr_err("%s pdata or ac is null\n", __func__); + return 0; + } + + spin_lock_irqsave(&prtd->lock, flags); + stream_id = ac->stream_id; + + stream_index = STREAM_ARRAY_INDEX(stream_id); + if ((stream_index < MAX_NUMBER_OF_STREAMS && stream_index >= 0)) { + spin_unlock_irqrestore(&prtd->lock, flags); + pr_debug("close stream %d", stream_id); + q6asm_stream_cmd(ac, CMD_CLOSE, stream_id); + spin_lock_irqsave(&prtd->lock, flags); + } + spin_unlock_irqrestore(&prtd->lock, flags); + + pdata->cstream[soc_prtd->dai_link->be_id] = NULL; + if (atomic_read(&pdata->audio_ocmem_req) > 1) + atomic_dec(&pdata->audio_ocmem_req); + else if (atomic_cmpxchg(&pdata->audio_ocmem_req, 1, 0)) + audio_ocmem_process_req(AUDIO, false); + msm_pcm_routing_dereg_phy_stream(soc_prtd->dai_link->be_id, + SNDRV_PCM_STREAM_CAPTURE); + + q6asm_audio_client_buf_free_contiguous(dir, ac); + q6asm_audio_client_free(ac); - kfree(pdata->audio_effects[soc_prtd->dai_link->be_id]); - pdata->audio_effects[soc_prtd->dai_link->be_id] = NULL; - kfree(pdata->dec_params[soc_prtd->dai_link->be_id]); - pdata->dec_params[soc_prtd->dai_link->be_id] = NULL; kfree(prtd); runtime->private_data = NULL; return 0; } +static int msm_compr_free(struct snd_compr_stream *cstream) +{ + int ret = 0; + + if (cstream->direction == SND_COMPRESS_PLAYBACK) + ret = msm_compr_playback_free(cstream); + else if (cstream->direction == SND_COMPRESS_CAPTURE) + ret = msm_compr_capture_free(cstream); + return ret; +} + static bool msm_compr_validate_codec_compr(__u32 codec_id) { int32_t i; @@ -1370,8 +1728,12 @@ static int msm_compr_set_params(struct snd_compr_stream *cstream, /* ToDo: remove duplicates */ prtd->num_channels = prtd->codec_param.codec.ch_in; prtd->sample_rate = prtd->codec_param.codec.sample_rate; - pr_debug("%s: sample_rate %d\n", __func__, prtd->sample_rate); - ret = msm_compr_configure_dsp(cstream); + pr_debug("%s: sample_rate %d num_channels %d\n", __func__, + prtd->sample_rate, prtd->num_channels); + if (cstream->direction == SND_COMPRESS_PLAYBACK) + ret = msm_compr_configure_dsp_for_playback(cstream); + else if (cstream->direction == SND_COMPRESS_CAPTURE) + ret = msm_compr_configure_dsp_for_capture(cstream); return ret; } @@ -1459,11 +1821,6 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd) int stream_id; uint32_t stream_index; - if (cstream->direction != SND_COMPRESS_PLAYBACK) { - pr_err("%s: Unsupported stream type\n", __func__); - return -EINVAL; - } - spin_lock_irqsave(&prtd->lock, flags); if (atomic_read(&prtd->error)) { pr_err("%s Got RESET EVENTS notification, return immediately", @@ -1478,17 +1835,21 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd) pr_debug("%s: SNDRV_PCM_TRIGGER_START\n", __func__); atomic_set(&prtd->start, 1); - /* set volume for the stream before RUN */ - rc = msm_compr_set_volume(cstream, volume[0], volume[1]); - if (rc) - pr_err("%s : Set Volume failed : %d\n", - __func__, rc); - - rc = msm_compr_init_pp_params(cstream, ac); - if (rc) - pr_err("%s : init PP params failed : %d\n", - __func__, rc); + if (cstream->direction == SND_COMPRESS_PLAYBACK) { + /* set volume for the stream before RUN */ + rc = msm_compr_set_volume(cstream, volume[0], + volume[1]); + if (rc) + pr_err("%s : Set Volume failed : %d\n", + __func__, rc); + rc = msm_compr_init_pp_params(cstream, ac); + if (rc) + pr_err("%s : init PP params failed : %d\n", + __func__, rc); + } else { + msm_compr_read_buffer(prtd); + } /* issue RUN command for the stream */ q6asm_run_nowait(prtd->audio_client, 0, 0, 0); break; @@ -1498,6 +1859,18 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd) prtd->gapless_state.gapless_transition); stream_id = ac->stream_id; atomic_set(&prtd->start, 0); + if (cstream->direction == SND_COMPRESS_CAPTURE) { + q6asm_cmd_nowait(prtd->audio_client, CMD_PAUSE); + atomic_set(&prtd->xrun, 0); + prtd->received_total = 0; + prtd->bytes_copied = 0; + prtd->bytes_read = 0; + prtd->bytes_read_offset = 0; + prtd->byte_offset = 0; + prtd->app_pointer = 0; + spin_unlock_irqrestore(&prtd->lock, flags); + break; + } if (prtd->next_stream) { pr_debug("%s: interrupt next track wait queues\n", __func__); @@ -1874,7 +2247,7 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd) } static int msm_compr_pointer(struct snd_compr_stream *cstream, - struct snd_compr_tstamp *arg) + struct snd_compr_tstamp *arg) { struct snd_compr_runtime *runtime = cstream->runtime; struct msm_compr_audio *prtd = runtime->private_data; @@ -1890,61 +2263,69 @@ static int msm_compr_pointer(struct snd_compr_stream *cstream, spin_lock_irqsave(&prtd->lock, flags); tstamp.sampling_rate = prtd->sample_rate; tstamp.byte_offset = prtd->byte_offset; - tstamp.copied_total = prtd->copied_total; - first_buffer = prtd->first_buffer; - if (atomic_read(&prtd->error)) { - pr_err("%s Got RESET EVENTS notification, return error", - __func__); - tstamp.pcm_io_frames = 0; - memcpy(arg, &tstamp, sizeof(struct snd_compr_tstamp)); - spin_unlock_irqrestore(&prtd->lock, flags); - return -ENETRESET; - } + if (cstream->direction == SND_COMPRESS_PLAYBACK) + tstamp.copied_total = prtd->copied_total; + else if (cstream->direction == SND_COMPRESS_CAPTURE) + tstamp.copied_total = prtd->received_total; - gapless_transition = prtd->gapless_state.gapless_transition; - spin_unlock_irqrestore(&prtd->lock, flags); + if (cstream->direction == SND_COMPRESS_PLAYBACK) { + first_buffer = prtd->first_buffer; + if (atomic_read(&prtd->error)) { + pr_err("%s Got RESET EVENTS notification, return error", + __func__); + tstamp.pcm_io_frames = 0; + memcpy(arg, &tstamp, sizeof(struct snd_compr_tstamp)); + spin_unlock_irqrestore(&prtd->lock, flags); + return -ENETRESET; + } - /* - Query timestamp from DSP if some data is with it. - This prevents timeouts. - */ - if (!first_buffer || gapless_transition) { - if (gapless_transition) - pr_debug("%s session time in gapless transition", - __func__); + gapless_transition = prtd->gapless_state.gapless_transition; + spin_unlock_irqrestore(&prtd->lock, flags); - switch (q6core_get_avs_version()) { - case (Q6_SUBSYS_AVS2_7): - case (Q6_SUBSYS_AVS2_8): - { - rc = q6asm_get_session_time(prtd->audio_client, - ×tamp); - break; - } - case (Q6_SUBSYS_AVS2_6): - { - rc = q6asm_get_session_time_legacy( - prtd->audio_client, ×tamp); - break; - } - case (Q6_SUBSYS_INVALID): - default: - { - pr_err("%s: UNKNOWN AVS IMAGE VERSION\n", __func__); - rc = -EINVAL; - break; - } - } - if (rc < 0) { - pr_err("%s: Get Session Time return value =%lld\n", - __func__, timestamp); - if (atomic_read(&prtd->error)) - return -ENETRESET; - else - return -EAGAIN; + /* + *Query timestamp from DSP if some data is with it. + *This prevents timeouts. + */ + if (!first_buffer || gapless_transition) { + if (gapless_transition) + pr_debug("%s session time in gapless transition", + __func__); + switch (q6core_get_avs_version()) { + case (Q6_SUBSYS_AVS2_7): + case (Q6_SUBSYS_AVS2_8): + { + rc = q6asm_get_session_time(prtd->audio_client, + ×tamp); + break; + } + case (Q6_SUBSYS_AVS2_6): + { + rc = q6asm_get_session_time_legacy( + prtd->audio_client, ×tamp); + break; + } + case (Q6_SUBSYS_INVALID): + default: + { + pr_err("%s: UNKNOWN AVS IMAGE VERSION\n", + __func__); + rc = -EINVAL; + break; + } + } + if (rc < 0) { + pr_err("%s: Get Session Time return value =%lld\n", + __func__, timestamp); + if (atomic_read(&prtd->error)) + return -ENETRESET; + else + return -EAGAIN; + } + } else { + timestamp = prtd->marker_timestamp; } } else { - timestamp = prtd->marker_timestamp; + spin_unlock_irqrestore(&prtd->lock, flags); } /* DSP returns timestamp in usec */ @@ -2004,8 +2385,8 @@ static int msm_compr_ack(struct snd_compr_stream *cstream, return 0; } -static int msm_compr_copy(struct snd_compr_stream *cstream, - char __user *buf, size_t count) +static int msm_compr_playback_copy(struct snd_compr_stream *cstream, + char __user *buf, size_t count) { struct snd_compr_runtime *runtime = cstream->runtime; struct msm_compr_audio *prtd = runtime->private_data; @@ -2067,6 +2448,60 @@ static int msm_compr_copy(struct snd_compr_stream *cstream, return count; } +static int msm_compr_capture_copy(struct snd_compr_stream *cstream, + char __user *buf, size_t count) +{ + struct snd_compr_runtime *runtime = cstream->runtime; + struct msm_compr_audio *prtd = runtime->private_data; + void *source; + unsigned long flags; + + pr_debug("%s: count = %zd\n", __func__, count); + if (!prtd->buffer) { + pr_err("%s: Buffer is not allocated yet ??", __func__); + return 0; + } + + spin_lock_irqsave(&prtd->lock, flags); + if (atomic_read(&prtd->error)) { + pr_err("%s Got RESET EVENTS notification", __func__); + spin_unlock_irqrestore(&prtd->lock, flags); + return -ENETRESET; + } + + source = prtd->buffer + prtd->app_pointer; + /* check if we have requested amount of data to copy to user*/ + if (count <= prtd->received_total - prtd->bytes_copied) { + spin_unlock_irqrestore(&prtd->lock, flags); + if (copy_to_user(buf, source, count)) { + pr_err("copy_to_user failed"); + return -EFAULT; + } + spin_lock_irqsave(&prtd->lock, flags); + prtd->app_pointer += count; + if (prtd->app_pointer >= prtd->buffer_size) + prtd->app_pointer -= prtd->buffer_size; + prtd->bytes_copied += count; + } + msm_compr_read_buffer(prtd); + + spin_unlock_irqrestore(&prtd->lock, flags); + return count; +} + +static int msm_compr_copy(struct snd_compr_stream *cstream, + char __user *buf, size_t count) +{ + int ret = 0; + + pr_debug(" In %s\n", __func__); + if (cstream->direction == SND_COMPRESS_PLAYBACK) + ret = msm_compr_playback_copy(cstream, buf, count); + else if (cstream->direction == SND_COMPRESS_CAPTURE) + ret = msm_compr_capture_copy(cstream, buf, count); + return ret; +} + static int msm_compr_get_caps(struct snd_compr_stream *cstream, struct snd_compr_caps *arg) { @@ -2506,7 +2941,7 @@ static int msm_compr_dec_params_get(struct snd_kcontrol *kcontrol, return 0; } -static int msm_compr_app_type_cfg_put(struct snd_kcontrol *kcontrol, +static int msm_compr_playback_app_type_cfg_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { u64 fe_id = kcontrol->private_value; @@ -2528,17 +2963,79 @@ static int msm_compr_app_type_cfg_put(struct snd_kcontrol *kcontrol, pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, app_type, acdb_dev_id, sample_rate); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, - acdb_dev_id, sample_rate); + acdb_dev_id, sample_rate, SESSION_TYPE_RX); return 0; } -static int msm_compr_app_type_cfg_get(struct snd_kcontrol *kcontrol, +static int msm_compr_playback_app_type_cfg_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { return 0; } +static int msm_compr_capture_app_type_cfg_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + u64 fe_id = kcontrol->private_value; + int app_type; + int acdb_dev_id; + int sample_rate = 48000; + + pr_debug("%s: fe_id- %llu\n", __func__, fe_id); + if (fe_id >= MSM_FRONTEND_DAI_MAX) { + pr_err("%s Received out of bounds fe_id %llu\n", + __func__, fe_id); + return -EINVAL; + } + + app_type = ucontrol->value.integer.value[0]; + acdb_dev_id = ucontrol->value.integer.value[1]; + if (0 != ucontrol->value.integer.value[2]) + sample_rate = ucontrol->value.integer.value[2]; + pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", + __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); + msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, + acdb_dev_id, sample_rate, SESSION_TYPE_TX); + + return 0; +} + +static int msm_compr_capture_app_type_cfg_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + u64 fe_id = kcontrol->private_value; + int ret = 0; + int app_type; + int acdb_dev_id; + int sample_rate; + + pr_debug("%s: fe_id- %llu\n", __func__, fe_id); + if (fe_id >= MSM_FRONTEND_DAI_MAX) { + pr_err("%s Received out of bounds fe_id %llu\n", + __func__, fe_id); + ret = -EINVAL; + goto done; + } + + ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, + &app_type, &acdb_dev_id, &sample_rate); + if (ret < 0) { + pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", + __func__, ret); + goto done; + } + + ucontrol->value.integer.value[0] = app_type; + ucontrol->value.integer.value[1] = acdb_dev_id; + ucontrol->value.integer.value[2] = sample_rate; + pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", + __func__, fe_id, SESSION_TYPE_TX, + app_type, acdb_dev_id, sample_rate); +done: + return ret; +} + static int msm_compr_channel_map_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { @@ -2619,6 +3116,7 @@ static int msm_compr_probe(struct snd_soc_platform *platform) pdata->dec_params[i] = NULL; pdata->cstream[i] = NULL; pdata->ch_map[i] = NULL; + pdata->is_in_use[i] = false; } /* @@ -2860,7 +3358,8 @@ static int msm_compr_add_dec_runtime_params_control( static int msm_compr_add_app_type_cfg_control(struct snd_soc_pcm_runtime *rtd) { - const char *mixer_ctl_name = "Audio Stream"; + const char *playback_mixer_ctl_name = "Audio Stream"; + const char *capture_mixer_ctl_name = "Audio Stream Capture"; const char *deviceNo = "NN"; const char *suffix = "App Type Cfg"; char *mixer_str = NULL; @@ -2871,8 +3370,8 @@ static int msm_compr_add_app_type_cfg_control(struct snd_soc_pcm_runtime *rtd) .name = "?", .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, .info = msm_compr_app_type_cfg_info, - .put = msm_compr_app_type_cfg_put, - .get = msm_compr_app_type_cfg_get, + .put = msm_compr_playback_app_type_cfg_put, + .get = msm_compr_playback_app_type_cfg_get, .private_value = 0, } }; @@ -2883,11 +3382,15 @@ static int msm_compr_add_app_type_cfg_control(struct snd_soc_pcm_runtime *rtd) } pr_debug("%s: added new compr FE ctl with name %s, id %d, cpu dai %s, device no %d\n", - __func__, rtd->dai_link->name, rtd->dai_link->be_id, - rtd->dai_link->cpu_dai_name, rtd->pcm->device); + __func__, rtd->dai_link->name, rtd->dai_link->be_id, + rtd->dai_link->cpu_dai_name, rtd->pcm->device); + if (rtd->compr->direction == SND_COMPRESS_PLAYBACK) + ctl_len = strlen(playback_mixer_ctl_name) + 1 + strlen(deviceNo) + + 1 + strlen(suffix) + 1; + else + ctl_len = strlen(capture_mixer_ctl_name) + 1 + strlen(deviceNo) + + 1 + strlen(suffix) + 1; - ctl_len = strlen(mixer_ctl_name) + 1 + strlen(deviceNo) + 1 + - strlen(suffix) + 1; mixer_str = kzalloc(ctl_len, GFP_KERNEL); if (!mixer_str) { @@ -2895,14 +3398,31 @@ static int msm_compr_add_app_type_cfg_control(struct snd_soc_pcm_runtime *rtd) return 0; } - snprintf(mixer_str, ctl_len, "%s %d %s", mixer_ctl_name, - rtd->pcm->device, suffix); + if (rtd->compr->direction == SND_COMPRESS_PLAYBACK) + snprintf(mixer_str, ctl_len, "%s %d %s", + playback_mixer_ctl_name, rtd->pcm->device, suffix); + else + snprintf(mixer_str, ctl_len, "%s %d %s", + capture_mixer_ctl_name, rtd->pcm->device, suffix); + fe_app_type_cfg_control[0].name = mixer_str; fe_app_type_cfg_control[0].private_value = rtd->dai_link->be_id; + + if (rtd->compr->direction == SND_COMPRESS_PLAYBACK) { + fe_app_type_cfg_control[0].put = + msm_compr_playback_app_type_cfg_put; + fe_app_type_cfg_control[0].get = + msm_compr_playback_app_type_cfg_get; + } else { + fe_app_type_cfg_control[0].put = + msm_compr_capture_app_type_cfg_put; + fe_app_type_cfg_control[0].get = + msm_compr_capture_app_type_cfg_get; + } pr_debug("Registering new mixer ctl %s", mixer_str); snd_soc_add_platform_controls(rtd->platform, - fe_app_type_cfg_control, - ARRAY_SIZE(fe_app_type_cfg_control)); + fe_app_type_cfg_control, + ARRAY_SIZE(fe_app_type_cfg_control)); kfree(mixer_str); return 0; } diff --git a/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c index c05cf943c81..7e5677a833e 100644 --- a/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-dai-q6-v2.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1487,6 +1487,25 @@ static struct snd_soc_dai_driver msm_dai_q6_afe_tx_dai[] = { }, }; +static struct snd_soc_dai_driver msm_dai_q6_afe_lb_tx_dai[] = { + { + .capture = { + .stream_name = "AFE Loopback Capture", + .aif_name = "AFE_LOOPBACK_TX", + .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | + SNDRV_PCM_RATE_16000, + .formats = SNDRV_PCM_FMTBIT_S16_LE, + .channels_min = 1, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 48000, + }, + .id = AFE_LOOPBACK_TX, + .probe = msm_dai_q6_dai_probe, + .remove = msm_dai_q6_dai_remove, + }, +}; + static struct snd_soc_dai_driver msm_dai_q6_bt_sco_rx_dai = { .playback = { .stream_name = "Internal BT-SCO Playback", @@ -3087,6 +3106,11 @@ static int msm_dai_q6_dev_probe(struct platform_device *pdev) pr_err("%s: Device not found stream name %s\n", __func__, stream_name); break; + case AFE_LOOPBACK_TX: + rc = snd_soc_register_component(&pdev->dev, + &msm_dai_q6_component, + &msm_dai_q6_afe_lb_tx_dai[0], 1); + break; case INT_BT_SCO_RX: rc = snd_soc_register_component(&pdev->dev, &msm_dai_q6_component, &msm_dai_q6_bt_sco_rx_dai, 1); diff --git a/sound/soc/msm/qdsp6v2/msm-lsm-client.c b/sound/soc/msm/qdsp6v2/msm-lsm-client.c index 8e7554be560..13b9dd46b46 100644 --- a/sound/soc/msm/qdsp6v2/msm-lsm-client.c +++ b/sound/soc/msm/qdsp6v2/msm-lsm-client.c @@ -1960,6 +1960,109 @@ static int msm_lsm_pcm_copy(struct snd_pcm_substream *substream, int ch, return 0; } +static int msm_lsm_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + u64 fe_id = kcontrol->private_value; + int app_type; + int acdb_dev_id; + int sample_rate; + + pr_debug("%s: fe_id- %llu\n", __func__, fe_id); + if ((fe_id < MSM_FRONTEND_DAI_LSM1) || + (fe_id > MSM_FRONTEND_DAI_LSM8)) { + pr_err("%s: Received out of bounds fe_id %llu\n", + __func__, fe_id); + return -EINVAL; + } + + app_type = ucontrol->value.integer.value[0]; + acdb_dev_id = ucontrol->value.integer.value[1]; + sample_rate = ucontrol->value.integer.value[2]; + + pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d session_type- %d\n", + __func__, app_type, acdb_dev_id, sample_rate, SESSION_TYPE_TX); + msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, + acdb_dev_id, sample_rate, SESSION_TYPE_TX); + + return 0; +} + +static int msm_lsm_app_type_cfg_ctl_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + u64 fe_id = kcontrol->private_value; + int ret = 0; + int app_type; + int acdb_dev_id; + int sample_rate; + + pr_debug("%s: fe_id- %llu\n", __func__, fe_id); + if ((fe_id < MSM_FRONTEND_DAI_LSM1) || + (fe_id > MSM_FRONTEND_DAI_LSM8)) { + pr_err("%s: Received out of bounds fe_id %llu\n", + __func__, fe_id); + return -EINVAL; + } + + ret = msm_pcm_routing_get_stream_app_type_cfg(fe_id, SESSION_TYPE_TX, + &app_type, &acdb_dev_id, &sample_rate); + if (ret < 0) { + pr_err("%s: msm_pcm_routing_get_stream_app_type_cfg failed returned %d\n", + __func__, ret); + goto done; + } + + ucontrol->value.integer.value[0] = app_type; + ucontrol->value.integer.value[1] = acdb_dev_id; + ucontrol->value.integer.value[2] = sample_rate; + pr_debug("%s: fedai_id %llu, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", + __func__, fe_id, SESSION_TYPE_TX, + app_type, acdb_dev_id, sample_rate); +done: + return ret; +} + +static int msm_lsm_add_app_type_controls(struct snd_soc_pcm_runtime *rtd) +{ + struct snd_pcm *pcm = rtd->pcm; + struct snd_pcm_usr *app_type_info; + struct snd_kcontrol *kctl; + const char *mixer_ctl_name = "Listen Stream"; + const char *deviceNo = "NN"; + const char *suffix = "App Type Cfg"; + int ctl_len, ret = 0; + + ctl_len = strlen(mixer_ctl_name) + 1 + + strlen(deviceNo) + 1 + strlen(suffix) + 1; + pr_debug("%s: Listen app type cntrl add\n", __func__); + ret = snd_pcm_add_usr_ctls(pcm, SNDRV_PCM_STREAM_CAPTURE, + NULL, 1, ctl_len, rtd->dai_link->be_id, + &app_type_info); + if (ret < 0) { + pr_err("%s: Listen app type cntrl add failed: %d\n", + __func__, ret); + return ret; + } + kctl = app_type_info->kctl; + snprintf(kctl->id.name, ctl_len, "%s %d %s", + mixer_ctl_name, rtd->pcm->device, suffix); + kctl->put = msm_lsm_app_type_cfg_ctl_put; + kctl->get = msm_lsm_app_type_cfg_ctl_get; + return 0; +} + +static int msm_lsm_add_controls(struct snd_soc_pcm_runtime *rtd) +{ + int ret = 0; + + ret = msm_lsm_add_app_type_controls(rtd); + if (ret) + pr_err("%s, add app type controls failed:%d\n", __func__, ret); + + return ret; +} + static struct snd_pcm_ops msm_lsm_ops = { .open = msm_lsm_open, .close = msm_lsm_close, @@ -1974,11 +2077,16 @@ static struct snd_pcm_ops msm_lsm_ops = { static int msm_asoc_lsm_new(struct snd_soc_pcm_runtime *rtd) { struct snd_card *card = rtd->card->snd_card; + int ret = 0; if (!card->dev->coherent_dma_mask) card->dev->coherent_dma_mask = DMA_BIT_MASK(32); - return 0; + ret = msm_lsm_add_controls(rtd); + if (ret) + pr_err("%s, kctl add failed:%d\n", __func__, ret); + + return ret; } static int msm_asoc_lsm_probe(struct snd_soc_platform *platform) diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c index a8f1263488a..4e694a70a0b 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-q6-v2.c @@ -1123,7 +1123,7 @@ static int msm_pcm_app_type_cfg_ctl_put(struct snd_kcontrol *kcontrol, pr_debug("%s: app_type- %d acdb_dev_id- %d sample_rate- %d\n", __func__, app_type, acdb_dev_id, sample_rate); msm_pcm_routing_reg_stream_app_type_cfg(fe_id, app_type, - acdb_dev_id, sample_rate); + acdb_dev_id, sample_rate, SESSION_TYPE_RX); return 0; } diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c index e1dccede1c7..80f99203b1e 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c +++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -63,6 +63,7 @@ static uint32_t voc_session_id = ALL_SESSION_VSID; static int msm_route_ext_ec_ref = AFE_PORT_INVALID; static bool is_custom_stereo_on; static bool is_ds2_on; +static int msm_ec_ref_port_id; enum { MADNONE, @@ -266,7 +267,10 @@ struct msm_pcm_routing_bdai_data msm_bedais[MSM_BACKEND_DAI_MAX] = { { SLIMBUS_6_RX, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_SLIMBUS_6_RX}, { SLIMBUS_6_TX, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_SLIMBUS_6_TX}, { AFE_PORT_ID_SPDIF_RX, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_SPDIF_RX}, + { AFE_PORT_ID_SECONDARY_MI2S_RX_SD1, 0, 0, 0, 0, 0, 0, 0, + LPASS_BE_SEC_MI2S_RX_SD1}, { INT_BT_A2DP_RX, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_INT_BT_A2DP_RX}, + { AFE_LOOPBACK_TX, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_AFE_LOOPBACK_TX}, }; @@ -321,6 +325,15 @@ static struct msm_pcm_routing_fdai_data {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, /* MULTIMEDIA16 */ + {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, + {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, + /* MULTIMEDIA17 */ + {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, + {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, + /* MULTIMEDIA18 */ + {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, + {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, + /* MULTIMEDIA19 */ {{0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} }, {0, INVALID_SESSION, LEGACY_PCM_MODE, {NULL, NULL} } }, /* CS_VOICE */ @@ -388,8 +401,9 @@ static struct msm_pcm_routing_fdai_data static unsigned long session_copp_map[MSM_FRONTEND_DAI_MAX][2] [MSM_BACKEND_DAI_MAX]; static struct msm_pcm_routing_app_type_data app_type_cfg[MAX_APP_TYPES]; +static struct msm_pcm_routing_app_type_data lsm_app_type_cfg[MAX_APP_TYPES]; static struct msm_pcm_stream_app_type_cfg - fe_dai_app_type_cfg[MSM_FRONTEND_DAI_MAX]; + fe_dai_app_type_cfg[MSM_FRONTEND_DAI_MAX][2]; /* The caller of this should aqcuire routing lock */ void msm_pcm_routing_get_bedai_info(int be_idx, @@ -432,21 +446,114 @@ static int msm_pcm_routing_get_app_type_idx(int app_type) return 0; } +static int msm_pcm_routing_get_lsm_app_type_idx(int app_type) +{ + int idx; + + pr_debug("%s: app_type: %d\n", __func__, app_type); + for (idx = 0; idx < MAX_APP_TYPES; idx++) { + if (lsm_app_type_cfg[idx].app_type == app_type) + return idx; + } + pr_info("%s: App type not available, fallback to default\n", __func__); + return 0; +} + +static int get_port_id(int port_id) +{ + return (port_id == AFE_LOOPBACK_TX ? msm_ec_ref_port_id : port_id); +} + +static bool is_mm_lsm_fe_id(int fe_id) +{ + bool rc = true; + + if (fe_id > MSM_FRONTEND_DAI_MM_MAX_ID && + ((fe_id < MSM_FRONTEND_DAI_LSM1) || + (fe_id > MSM_FRONTEND_DAI_LSM8))) { + rc = false; + } + return rc; +} + + void msm_pcm_routing_reg_stream_app_type_cfg(int fedai_id, int app_type, - int acdb_dev_id, int sample_rate) + int acdb_dev_id, int sample_rate, int session_type) { - pr_debug("%s: fedai_id %d, app_type %d, sample_rate %d\n", - __func__, fedai_id, app_type, sample_rate); - if (fedai_id > MSM_FRONTEND_DAI_MM_MAX_ID) { - /* bad ID assigned in machine driver */ - pr_err("%s: bad MM ID %d\n", __func__, fedai_id); + pr_debug("%s: fedai_id %d, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", + __func__, fedai_id, session_type, app_type, + acdb_dev_id, sample_rate); + if (!is_mm_lsm_fe_id(fedai_id)) { + pr_err("%s: Invalid machine driver ID %d\n", + __func__, fedai_id); + return; + } + + if (session_type != SESSION_TYPE_RX && + session_type != SESSION_TYPE_TX) { + pr_err("%s: Invalid session type %d\n", + __func__, session_type); return; } - fe_dai_app_type_cfg[fedai_id].app_type = app_type; - fe_dai_app_type_cfg[fedai_id].acdb_dev_id = acdb_dev_id; - fe_dai_app_type_cfg[fedai_id].sample_rate = sample_rate; + fe_dai_app_type_cfg[fedai_id][session_type].app_type = app_type; + fe_dai_app_type_cfg[fedai_id][session_type].acdb_dev_id = acdb_dev_id; + fe_dai_app_type_cfg[fedai_id][session_type].sample_rate = sample_rate; } +/** + * msm_pcm_routing_get_stream_app_type_cfg + * + * Receives fedai_id, session_type and populates app_type, acdb_dev_id, & + * sample rate. Returns 0 on success. On failure returns + * -EINVAL and does not alter passed values. + * + * fedai_id - Passed value, front end ID for which app type config is wanted + * session_type - Passed value, session type for which app type config + * is wanted + * app_type - Returned value, app type used by app type config + * acdb_dev_id - Returned value, ACDB device ID used by app type config + * sample_rate - Returned value, sample rate used by app type config + */ +int msm_pcm_routing_get_stream_app_type_cfg(int fedai_id, int session_type, + int *app_type, int *acdb_dev_id, int *sample_rate) +{ + int ret = 0; + + if (app_type == NULL) { + pr_err("%s: NULL pointer sent for app_type\n", __func__); + ret = -EINVAL; + goto done; + } else if (acdb_dev_id == NULL) { + pr_err("%s: NULL pointer sent for acdb_dev_id\n", __func__); + ret = -EINVAL; + goto done; + } else if (sample_rate == NULL) { + pr_err("%s: NULL pointer sent for sample rate\n", __func__); + ret = -EINVAL; + goto done; + } else if (!is_mm_lsm_fe_id(fedai_id)) { + pr_err("%s: Invalid FE ID %d\n", + __func__, fedai_id); + ret = -EINVAL; + goto done; + } else if (session_type != SESSION_TYPE_RX && + session_type != SESSION_TYPE_TX) { + pr_err("%s: Invalid session type %d\n", + __func__, session_type); + ret = -EINVAL; + goto done; + } + *app_type = fe_dai_app_type_cfg[fedai_id][session_type].app_type; + *acdb_dev_id = fe_dai_app_type_cfg[fedai_id][session_type].acdb_dev_id; + *sample_rate = fe_dai_app_type_cfg[fedai_id][session_type].sample_rate; + + pr_debug("%s: fedai_id %d, session_type %d, app_type %d, acdb_dev_id %d, sample_rate %d\n", + __func__, fedai_id, session_type, + *app_type, *acdb_dev_id, *sample_rate); +done: + return ret; +} +EXPORT_SYMBOL(msm_pcm_routing_get_stream_app_type_cfg); static struct cal_block_data *msm_routing_find_topology_by_path(int path) { @@ -499,7 +606,7 @@ static struct cal_block_data *msm_routing_find_topology(int path, return msm_routing_find_topology_by_path(path); } -static int msm_routing_get_adm_topology(int path, int fedai_id) +static int msm_routing_get_adm_topology(int path, int fedai_id, int session_type) { int topology = NULL_COPP_TOPOLOGY; struct cal_block_data *cal_block = NULL; @@ -512,11 +619,10 @@ static int msm_routing_get_adm_topology(int path, int fedai_id) mutex_lock(&cal_data->lock); - if (path == RX_DEVICE) { - app_type = fe_dai_app_type_cfg[fedai_id].app_type; - acdb_dev_id = fe_dai_app_type_cfg[fedai_id].acdb_dev_id; - sample_rate = fe_dai_app_type_cfg[fedai_id].sample_rate; - } + app_type = fe_dai_app_type_cfg[fedai_id][session_type].app_type; + acdb_dev_id = fe_dai_app_type_cfg[fedai_id][session_type].acdb_dev_id; + sample_rate = fe_dai_app_type_cfg[fedai_id][session_type].sample_rate; + cal_block = msm_routing_find_topology(path, app_type, acdb_dev_id, sample_rate); if (cal_block == NULL) @@ -557,12 +663,12 @@ static void msm_pcm_routing_build_matrix(int fedai_id, int sess_type, (afe_get_port_type(msm_bedais[i].port_id) == port_type) && (msm_bedais[i].active) && (test_bit(fedai_id, &msm_bedais[i].fe_sessions))) { + int port_id = get_port_id(msm_bedais[i].port_id); for (j = 0; j < MAX_COPPS_PER_PORT; j++) { unsigned long copp = session_copp_map[fedai_id][sess_type][i]; if (test_bit(j, &copp)) { - payload.port_id[num_copps] = - msm_bedais[i].port_id; + payload.port_id[num_copps] = port_id; payload.copp_idx[num_copps] = j; num_copps++; } @@ -573,9 +679,9 @@ static void msm_pcm_routing_build_matrix(int fedai_id, int sess_type, if (num_copps) { payload.num_copps = num_copps; payload.session_id = fe_dai_map[fedai_id][sess_type].strm_id; - payload.app_type = fe_dai_app_type_cfg[fedai_id].app_type; - payload.acdb_dev_id = fe_dai_app_type_cfg[fedai_id].acdb_dev_id; - payload.sample_rate = fe_dai_app_type_cfg[fedai_id].sample_rate; + payload.app_type = fe_dai_app_type_cfg[fedai_id][sess_type].app_type; + payload.acdb_dev_id = fe_dai_app_type_cfg[fedai_id][sess_type].acdb_dev_id; + payload.sample_rate = fe_dai_app_type_cfg[fedai_id][sess_type].sample_rate; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } @@ -637,18 +743,6 @@ static bool route_check_fe_id_adm_support(int fe_id) return rc; } -static bool is_mm_lsm_fe_id(int fe_id) -{ - bool rc = true; - - if (fe_id > MSM_FRONTEND_DAI_MM_MAX_ID && - ((fe_id < MSM_FRONTEND_DAI_LSM1) || - (fe_id > MSM_FRONTEND_DAI_LSM8))) { - rc = false; - } - return rc; -} - int msm_pcm_routing_reg_phy_compr_stream(int fe_id, bool perf_mode, int dspst_id, int stream_type, uint32_t passthr_mode) @@ -657,6 +751,7 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, bool perf_mode, struct route_payload payload; u32 channels, sample_rate; u16 bit_width = 16; + bool is_lsm; pr_debug("%s:fe_id[%d] perf_mode[%d] id[%d] stream_type[%d] passt[%d]", __func__, fe_id, perf_mode, dspst_id, @@ -689,6 +784,8 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, bool perf_mode, return -EINVAL; } + is_lsm = (fe_id >= MSM_FRONTEND_DAI_LSM1) && + (fe_id <= MSM_FRONTEND_DAI_LSM8); mutex_lock(&routing_lock); payload.num_copps = 0; /* only RX needs to use payload */ @@ -705,6 +802,7 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, bool perf_mode, (msm_bedais[i].active) && (test_bit(fe_id, &msm_bedais[i].fe_sessions))) { int app_type, app_type_idx, copp_idx, acdb_dev_id; + int port_id = get_port_id(msm_bedais[i].port_id); channels = msm_bedais[i].channel; if (msm_bedais[i].format == SNDRV_PCM_FORMAT_S16_LE) @@ -712,9 +810,16 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, bool perf_mode, else if (msm_bedais[i].format == SNDRV_PCM_FORMAT_S24_LE) bit_width = 24; - app_type = (stream_type == SNDRV_PCM_STREAM_PLAYBACK) ? - fe_dai_app_type_cfg[fe_id].app_type : 0; - if (app_type) { + app_type = fe_dai_app_type_cfg[fe_id][session_type].app_type; + if (app_type && is_lsm) { + app_type_idx = + msm_pcm_routing_get_lsm_app_type_idx(app_type); + sample_rate = + fe_dai_app_type_cfg[fe_id][session_type]. + sample_rate; + bit_width = + lsm_app_type_cfg[app_type_idx].bit_width; + } else if (app_type) { app_type_idx = msm_pcm_routing_get_app_type_idx( app_type); @@ -725,16 +830,15 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, bool perf_mode, } else { sample_rate = msm_bedais[i].sample_rate; } - acdb_dev_id = fe_dai_app_type_cfg[fe_id].acdb_dev_id; + acdb_dev_id = fe_dai_app_type_cfg[fe_id][session_type].acdb_dev_id; topology = msm_routing_get_adm_topology(path_type, - fe_id); + fe_id, session_type); pr_debug("%s: Before adm open topology %d\n", __func__, topology); copp_idx = - adm_open(msm_bedais[i].port_id, - path_type, sample_rate, channels, + adm_open(port_id, path_type, sample_rate, channels, topology, perf_mode, bit_width, - app_type, acdb_dev_id); + app_type, acdb_dev_id, session_type); if ((copp_idx < 0) || (copp_idx >= MAX_COPPS_PER_PORT)) { pr_err("%s:adm open failed coppid:%d\n", @@ -750,21 +854,22 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, bool perf_mode, unsigned long copp = session_copp_map[fe_id][session_type][i]; if (test_bit(j, &copp)) { - payload.port_id[num_copps] = - msm_bedais[i].port_id; + payload.port_id[num_copps] = port_id; payload.copp_idx[num_copps] = j; num_copps++; } } - msm_routing_send_device_pp_params(msm_bedais[i].port_id, + msm_routing_send_device_pp_params(port_id, copp_idx); } } if (num_copps) { payload.num_copps = num_copps; payload.session_id = fe_dai_map[fe_id][session_type].strm_id; - payload.app_type = fe_dai_app_type_cfg[fe_id].app_type; - payload.acdb_dev_id = fe_dai_app_type_cfg[fe_id].acdb_dev_id; + payload.app_type = fe_dai_app_type_cfg[fe_id][session_type].app_type; + payload.acdb_dev_id = fe_dai_app_type_cfg[fe_id][session_type].acdb_dev_id; + payload.sample_rate = + fe_dai_app_type_cfg[fe_id][session_type].sample_rate; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } @@ -811,6 +916,7 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode, (msm_bedais[i].active) && (test_bit(fedai_id, &msm_bedais[i].fe_sessions))) { int app_type, app_type_idx, copp_idx, acdb_dev_id; + int port_id = get_port_id(msm_bedais[i].port_id); channels = msm_bedais[i].channel; msm_bedais[i].passthr_mode = passthr_mode; @@ -820,28 +926,26 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode, SNDRV_PCM_FORMAT_S24_LE) bits_per_sample = 24; - app_type = (stream_type == SNDRV_PCM_STREAM_PLAYBACK) ? - fe_dai_app_type_cfg[fedai_id].app_type : 0; + app_type = fe_dai_app_type_cfg[fedai_id][session_type].app_type; if (app_type) { app_type_idx = msm_pcm_routing_get_app_type_idx(app_type); sample_rate = - fe_dai_app_type_cfg[fedai_id].sample_rate; + fe_dai_app_type_cfg[fedai_id][session_type].sample_rate; bits_per_sample = app_type_cfg[app_type_idx].bit_width; } else sample_rate = msm_bedais[i].sample_rate; - acdb_dev_id = fe_dai_app_type_cfg[fedai_id].acdb_dev_id; + acdb_dev_id = fe_dai_app_type_cfg[fedai_id][session_type].acdb_dev_id; topology = msm_routing_get_adm_topology(path_type, - fedai_id); + fedai_id, session_type); if (msm_bedais[i].port_id == VOICE_RECORD_RX || msm_bedais[i].port_id == VOICE_RECORD_TX) topology = NULL_COPP_TOPOLOGY; - copp_idx = adm_open(msm_bedais[i].port_id, path_type, - sample_rate, channels, topology, - perf_mode, bits_per_sample, - app_type, acdb_dev_id); + copp_idx = adm_open(port_id, path_type, sample_rate, + channels, topology, perf_mode, bits_per_sample, + app_type, acdb_dev_id, session_type); if ((copp_idx < 0) || (copp_idx >= MAX_COPPS_PER_PORT)) { pr_err("%s: adm open failed copp_idx:%d\n", @@ -857,8 +961,7 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode, unsigned long copp = session_copp_map[fedai_id][session_type][i]; if (test_bit(j, &copp)) { - payload.port_id[num_copps] = - msm_bedais[i].port_id; + payload.port_id[num_copps] = port_id; payload.copp_idx[num_copps] = j; num_copps++; } @@ -866,17 +969,16 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode, if ((perf_mode == LEGACY_PCM_MODE) && (msm_bedais[i].passthr_mode == LEGACY_PCM)) - msm_pcm_routing_cfg_pp(msm_bedais[i].port_id, - copp_idx, topology, - channels); + msm_pcm_routing_cfg_pp(port_id, copp_idx, + topology, channels); } } if (num_copps) { payload.num_copps = num_copps; payload.session_id = fe_dai_map[fedai_id][session_type].strm_id; - payload.app_type = fe_dai_app_type_cfg[fedai_id].app_type; - payload.acdb_dev_id = fe_dai_app_type_cfg[fedai_id].acdb_dev_id; - payload.sample_rate = fe_dai_app_type_cfg[fedai_id].sample_rate; + payload.app_type = fe_dai_app_type_cfg[fedai_id][session_type].app_type; + payload.acdb_dev_id = fe_dai_app_type_cfg[fedai_id][session_type].acdb_dev_id; + payload.sample_rate = fe_dai_app_type_cfg[fedai_id][session_type].sample_rate; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } @@ -928,11 +1030,11 @@ void msm_pcm_routing_dereg_phy_stream(int fedai_id, int stream_type) (afe_get_port_type(msm_bedais[i].port_id) == port_type) && (msm_bedais[i].active) && (test_bit(fedai_id, &msm_bedais[i].fe_sessions))) { - int idx; + int idx, port_id; unsigned long copp = session_copp_map[fedai_id][session_type][i]; fdai = &fe_dai_map[fedai_id][session_type]; - + port_id = get_port_id(msm_bedais[i].port_id); for (idx = 0; idx < MAX_COPPS_PER_PORT; idx++) if (test_bit(idx, &copp)) break; @@ -948,8 +1050,8 @@ void msm_pcm_routing_dereg_phy_stream(int fedai_id, int stream_type) to msm_routing_get_adm_topology in that case */ if (topology == 0) topology = msm_routing_get_adm_topology( - path_type, fedai_id); - adm_close(msm_bedais[i].port_id, fdai->perf_mode, idx); + path_type, fedai_id, session_type); + adm_close(port_id, fdai->perf_mode, idx); pr_debug("%s:copp:%ld,idx bit fe:%d,type:%d,be:%d\n", __func__, copp, fedai_id, session_type, i); clear_bit(idx, @@ -959,7 +1061,7 @@ void msm_pcm_routing_dereg_phy_stream(int fedai_id, int stream_type) (fdai->perf_mode == LEGACY_PCM_MODE) && (msm_bedais[i].passthr_mode == LEGACY_PCM)) - msm_pcm_routing_deinit_pp(msm_bedais[i].port_id, + msm_pcm_routing_deinit_pp(port_id, topology); } } @@ -993,6 +1095,7 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) uint16_t bits_per_sample = 16; struct msm_pcm_routing_fdai_data *fdai; uint32_t passthr_mode = msm_bedais[reg].passthr_mode; + bool is_lsm; pr_debug("%s: reg %x val %x set %x\n", __func__, reg, val, set); @@ -1019,6 +1122,8 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) session_type = SESSION_TYPE_TX; path_type = ADM_PATH_LIVE_REC; } + is_lsm = (val >= MSM_FRONTEND_DAI_LSM1) && + (val <= MSM_FRONTEND_DAI_LSM8); mutex_lock(&routing_lock); if (set) { @@ -1032,6 +1137,7 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) if (msm_bedais[reg].active && fdai->strm_id != INVALID_SESSION) { int app_type, app_type_idx, copp_idx, acdb_dev_id; + int port_id = get_port_id(msm_bedais[reg].port_id); channels = msm_bedais[reg].channel; if (session_type == SESSION_TYPE_TX && fdai->be_srate && @@ -1048,27 +1154,34 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) if (msm_bedais[reg].format == SNDRV_PCM_FORMAT_S24_LE) bits_per_sample = 24; - app_type = (session_type == SESSION_TYPE_RX) ? - fe_dai_app_type_cfg[val].app_type : 0; - if (app_type) { + app_type = fe_dai_app_type_cfg[val][session_type].app_type; + if (app_type && is_lsm) { + app_type_idx = + msm_pcm_routing_get_lsm_app_type_idx(app_type); + sample_rate = + fe_dai_app_type_cfg[val][session_type]. + sample_rate; + bits_per_sample = + lsm_app_type_cfg[app_type_idx].bit_width; + } else if (app_type) { app_type_idx = msm_pcm_routing_get_app_type_idx(app_type); sample_rate = - fe_dai_app_type_cfg[val].sample_rate; + fe_dai_app_type_cfg[val][session_type].sample_rate; bits_per_sample = app_type_cfg[app_type_idx].bit_width; } else sample_rate = msm_bedais[reg].sample_rate; - topology = msm_routing_get_adm_topology(path_type, val); - acdb_dev_id = fe_dai_app_type_cfg[val].acdb_dev_id; + topology = msm_routing_get_adm_topology(path_type, val, session_type); + acdb_dev_id = fe_dai_app_type_cfg[val][session_type].acdb_dev_id; if (msm_bedais[reg].port_id == VOICE_RECORD_RX || msm_bedais[reg].port_id == VOICE_RECORD_TX) topology = NULL_COPP_TOPOLOGY; - copp_idx = adm_open(msm_bedais[reg].port_id, path_type, + copp_idx = adm_open(port_id, path_type, sample_rate, channels, topology, fdai->perf_mode, bits_per_sample, - app_type, acdb_dev_id); + app_type, acdb_dev_id, session_type); if ((copp_idx < 0) || (copp_idx >= MAX_COPPS_PER_PORT)) { pr_err("%s: adm open failed\n", __func__); @@ -1092,7 +1205,7 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) passthr_mode); if ((fdai->perf_mode == LEGACY_PCM_MODE) && (passthr_mode == LEGACY_PCM)) - msm_pcm_routing_cfg_pp(msm_bedais[reg].port_id, + msm_pcm_routing_cfg_pp(port_id, copp_idx, topology, channels); } @@ -1105,14 +1218,15 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) fdai = &fe_dai_map[val][session_type]; if (msm_bedais[reg].active && fdai->strm_id != INVALID_SESSION) { - int idx; + int idx, port_id; unsigned long copp = session_copp_map[val][session_type][reg]; for (idx = 0; idx < MAX_COPPS_PER_PORT; idx++) if (test_bit(idx, &copp)) break; - topology = msm_routing_get_adm_topology(path_type, val); - adm_close(msm_bedais[reg].port_id, fdai->perf_mode, + port_id = get_port_id(msm_bedais[reg].port_id); + topology = msm_routing_get_adm_topology(path_type, val, session_type); + adm_close(port_id, fdai->perf_mode, idx); pr_debug("%s: copp: %ld, reset idx bit fe:%d, type: %d, be:%d\n", __func__, copp, val, session_type, reg); @@ -1123,8 +1237,7 @@ static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set) (fdai->perf_mode == LEGACY_PCM_MODE) && (passthr_mode == LEGACY_PCM)) msm_pcm_routing_deinit_pp( - msm_bedais[reg].port_id, - topology); + port_id, topology); msm_pcm_routing_build_matrix(val, session_type, path_type, fdai->perf_mode, @@ -1791,6 +1904,7 @@ static int msm_routing_ec_ref_rx_put(struct snd_kcontrol *kcontrol, ec_ref_port_id = AFE_PORT_INVALID; break; } + msm_ec_ref_port_id = ec_ref_port_id; adm_ec_ref_rx_id(ec_ref_port_id); pr_debug("%s: msm_route_ec_ref_rx = %d\n", __func__, msm_route_ec_ref_rx); @@ -1841,6 +1955,21 @@ static const struct snd_kcontrol_new ext_ec_ref_mux_ul9 = msm_route_ec_ref_rx_enum[0], msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put); +static const struct snd_kcontrol_new ext_ec_ref_mux_ul17 = + SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL17 MUX Mux", + msm_route_ec_ref_rx_enum[0], + msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put); + +static const struct snd_kcontrol_new ext_ec_ref_mux_ul18 = + SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL18 MUX Mux", + msm_route_ec_ref_rx_enum[0], + msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put); + +static const struct snd_kcontrol_new ext_ec_ref_mux_ul19 = + SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL19 MUX Mux", + msm_route_ec_ref_rx_enum[0], + msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put); + static int msm_routing_ext_ec_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { @@ -1984,6 +2113,15 @@ static const struct snd_kcontrol_new pri_i2s_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_PRI_I2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_PRI_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_PRI_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_PRI_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new sec_i2s_rx_mixer_controls[] = { @@ -2035,8 +2173,16 @@ static const struct snd_kcontrol_new sec_i2s_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_SEC_I2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_SEC_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_SEC_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_SEC_I2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; - static const struct snd_kcontrol_new spdif_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_SPDIF_RX , MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, @@ -2086,6 +2232,16 @@ static const struct snd_kcontrol_new spdif_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_SPDIF_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_SPDIF_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_SPDIF_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_SPDIF_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + }; static const struct snd_kcontrol_new slimbus_rx_mixer_controls[] = { @@ -2137,6 +2293,15 @@ static const struct snd_kcontrol_new slimbus_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_SLIMBUS_0_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_SLIMBUS_0_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_SLIMBUS_0_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_SLIMBUS_0_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mi2s_rx_mixer_controls[] = { @@ -2188,6 +2353,15 @@ static const struct snd_kcontrol_new mi2s_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_MI2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new quaternary_mi2s_rx_mixer_controls[] = { @@ -2239,6 +2413,15 @@ static const struct snd_kcontrol_new quaternary_mi2s_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new tertiary_mi2s_rx_mixer_controls[] = { @@ -2278,6 +2461,15 @@ static const struct snd_kcontrol_new tertiary_mi2s_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_TERTIARY_MI2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_TERTIARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_TERTIARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_TERTIARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new secondary_mi2s_rx2_mixer_controls[] = { @@ -2335,6 +2527,15 @@ static const struct snd_kcontrol_new secondary_mi2s_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_SECONDARY_MI2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_SECONDARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_SECONDARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_SECONDARY_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mi2s_hl_mixer_controls[] = { @@ -2395,6 +2596,15 @@ static const struct snd_kcontrol_new primary_mi2s_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_PRI_MI2S_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_PRI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_PRI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_PRI_MI2S_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new hdmi_mixer_controls[] = { @@ -2446,6 +2656,15 @@ static const struct snd_kcontrol_new hdmi_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_HDMI_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_HDMI_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_HDMI_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_HDMI_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; /* incall music delivery mixer */ static const struct snd_kcontrol_new incall_music_delivery_mixer_controls[] = { @@ -2557,6 +2776,15 @@ static const struct snd_kcontrol_new int_bt_sco_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_INT_BT_SCO_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_INT_BT_SCO_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_INT_BT_SCO_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_INT_BT_SCO_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new int_bt_a2dp_rx_mixer_controls[] = { @@ -2661,6 +2889,15 @@ static const struct snd_kcontrol_new int_fm_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_INT_FM_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_INT_FM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_INT_FM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_INT_FM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new afe_pcm_rx_mixer_controls[] = { @@ -2712,6 +2949,15 @@ static const struct snd_kcontrol_new afe_pcm_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_AFE_PCM_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_AFE_PCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_AFE_PCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_AFE_PCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new auxpcm_rx_mixer_controls[] = { @@ -2763,6 +3009,15 @@ static const struct snd_kcontrol_new auxpcm_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_AUXPCM_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_AUXPCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_AUXPCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_AUXPCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new sec_auxpcm_rx_mixer_controls[] = { @@ -2814,6 +3069,15 @@ static const struct snd_kcontrol_new sec_auxpcm_rx_mixer_controls[] = { SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_SEC_AUXPCM_RX, MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia17", MSM_BACKEND_DAI_SEC_AUXPCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia18", MSM_BACKEND_DAI_SEC_AUXPCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("MultiMedia19", MSM_BACKEND_DAI_SEC_AUXPCM_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mmul1_mixer_controls[] = { @@ -2865,6 +3129,9 @@ static const struct snd_kcontrol_new mmul1_mixer_controls[] = { SOC_SINGLE_EXT("SLIM_6_TX", MSM_BACKEND_DAI_SLIMBUS_6_TX, MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_LOOPBACK_TX", MSM_BACKEND_DAI_AFE_LOOPBACK_TX, + MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mmul2_mixer_controls[] = { @@ -2883,6 +3150,9 @@ static const struct snd_kcontrol_new mmul2_mixer_controls[] = { SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX, MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_LOOPBACK_TX", MSM_BACKEND_DAI_AFE_LOOPBACK_TX, + MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mmul4_mixer_controls[] = { @@ -2907,6 +3177,9 @@ static const struct snd_kcontrol_new mmul4_mixer_controls[] = { SOC_SINGLE_EXT("VOC_REC_UL", MSM_BACKEND_DAI_INCALL_RECORD_TX, MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_LOOPBACK_TX", MSM_BACKEND_DAI_AFE_LOOPBACK_TX, + MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mmul5_mixer_controls[] = { @@ -2937,6 +3210,9 @@ static const struct snd_kcontrol_new mmul5_mixer_controls[] = { SOC_SINGLE_EXT("TERT_MI2S_TX", MSM_BACKEND_DAI_TERTIARY_MI2S_TX, MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_LOOPBACK_TX", MSM_BACKEND_DAI_AFE_LOOPBACK_TX, + MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mmul6_mixer_controls[] = { @@ -2958,6 +3234,9 @@ static const struct snd_kcontrol_new mmul6_mixer_controls[] = { SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_SEC_AUXPCM_TX, MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_LOOPBACK_TX", MSM_BACKEND_DAI_AFE_LOOPBACK_TX, + MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; static const struct snd_kcontrol_new mmul8_mixer_controls[] = { @@ -2985,8 +3264,100 @@ static const struct snd_kcontrol_new mmul8_mixer_controls[] = { SOC_SINGLE_EXT("SLIM_6_TX", MSM_BACKEND_DAI_SLIMBUS_6_TX, MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_LOOPBACK_TX", MSM_BACKEND_DAI_AFE_LOOPBACK_TX, + MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), }; +static const struct snd_kcontrol_new mmul17_mixer_controls[] = { + SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("QUAT_MI2S_TX", MSM_BACKEND_DAI_QUATERNARY_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_PCM_TX", MSM_BACKEND_DAI_AFE_PCM_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("VOC_REC_DL", MSM_BACKEND_DAI_INCALL_RECORD_RX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("VOC_REC_UL", MSM_BACKEND_DAI_INCALL_RECORD_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("TERT_MI2S_TX", MSM_BACKEND_DAI_TERTIARY_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA17, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new mmul18_mixer_controls[] = { + SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("QUAT_MI2S_TX", MSM_BACKEND_DAI_QUATERNARY_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_PCM_TX", MSM_BACKEND_DAI_AFE_PCM_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("VOC_REC_DL", MSM_BACKEND_DAI_INCALL_RECORD_RX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("VOC_REC_UL", MSM_BACKEND_DAI_INCALL_RECORD_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("TERT_MI2S_TX", MSM_BACKEND_DAI_TERTIARY_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA18, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; + +static const struct snd_kcontrol_new mmul19_mixer_controls[] = { + SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("QUAT_MI2S_TX", MSM_BACKEND_DAI_QUATERNARY_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("AFE_PCM_TX", MSM_BACKEND_DAI_AFE_PCM_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("VOC_REC_DL", MSM_BACKEND_DAI_INCALL_RECORD_RX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("VOC_REC_UL", MSM_BACKEND_DAI_INCALL_RECORD_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), + SOC_SINGLE_EXT("TERT_MI2S_TX", MSM_BACKEND_DAI_TERTIARY_MI2S_TX, + MSM_FRONTEND_DAI_MULTIMEDIA19, 1, 0, msm_routing_get_audio_mixer, + msm_routing_put_audio_mixer), +}; static const struct snd_kcontrol_new pri_rx_voice_mixer_controls[] = { SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_PRI_I2S_RX, MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer, @@ -4390,6 +4761,47 @@ static const struct snd_kcontrol_new app_type_cfg_controls[] = { msm_routing_put_app_type_cfg_control), }; +static int msm_routing_get_lsm_app_type_cfg_control( + struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + return 0; +} + +static int msm_routing_put_lsm_app_type_cfg_control( + struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + int i = 0, j; + int num_app_types = ucontrol->value.integer.value[i++]; + + pr_debug("%s\n", __func__); + + memset(lsm_app_type_cfg, 0, MAX_APP_TYPES* + sizeof(struct msm_pcm_routing_app_type_data)); + if (num_app_types > MAX_APP_TYPES) { + pr_err("%s: number of app types exceed the max supported\n", + __func__); + return -EINVAL; + } + for (j = 0; j < num_app_types; j++) { + lsm_app_type_cfg[j].app_type = + ucontrol->value.integer.value[i++]; + lsm_app_type_cfg[j].sample_rate = + ucontrol->value.integer.value[i++]; + lsm_app_type_cfg[j].bit_width = + ucontrol->value.integer.value[i++]; + } + + return 0; +} + +static const struct snd_kcontrol_new lsm_app_type_cfg_controls[] = { + SOC_SINGLE_MULTI_EXT("Listen App Type Config", SND_SOC_NOPM, 0, + 0xFFFFFFFF, 0, 128, msm_routing_get_lsm_app_type_cfg_control, + msm_routing_put_lsm_app_type_cfg_control), +}; + static int msm_routing_get_use_ds1_or_ds2_control( struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) @@ -5007,6 +5419,9 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { SND_SOC_DAPM_AIF_OUT("MM_UL6", "MultiMedia6 Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("MM_UL8", "MultiMedia8 Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("MM_UL9", "MultiMedia9 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_OUT("MM_UL17", "MultiMedia17 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_OUT("MM_UL18", "MultiMedia18 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_OUT("MM_UL19", "MultiMedia19 Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_IN("CS-VOICE_DL1", "CS-VOICE Playback", 0, 0, 0, 0), SND_SOC_DAPM_AIF_OUT("CS-VOICE_UL1", "CS-VOICE Capture", 0, 0, 0, 0), SND_SOC_DAPM_AIF_IN("VOICE2_DL", "Voice2 Playback", 0, 0, 0, 0), @@ -5187,6 +5602,7 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { /* In- call recording */ SND_SOC_DAPM_AIF_OUT("SLIMBUS_6_RX", "Slimbus6 Playback", 0, 0, 0 , 0), SND_SOC_DAPM_AIF_IN("SLIMBUS_6_TX", "Slimbus6 Capture", 0, 0, 0, 0), + SND_SOC_DAPM_AIF_IN("AFE_LOOPBACK_TX", "AFE Loopback Capture", 0, 0, 0, 0), /* Switch Definitions */ SND_SOC_DAPM_SWITCH("SLIMBUS_DL_HL", SND_SOC_NOPM, 0, 0, @@ -5254,6 +5670,12 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { mmul6_mixer_controls, ARRAY_SIZE(mmul6_mixer_controls)), SND_SOC_DAPM_MIXER("MultiMedia8 Mixer", SND_SOC_NOPM, 0, 0, mmul8_mixer_controls, ARRAY_SIZE(mmul8_mixer_controls)), + SND_SOC_DAPM_MIXER("MultiMedia17 Mixer", SND_SOC_NOPM, 0, 0, + mmul17_mixer_controls, ARRAY_SIZE(mmul17_mixer_controls)), + SND_SOC_DAPM_MIXER("MultiMedia18 Mixer", SND_SOC_NOPM, 0, 0, + mmul18_mixer_controls, ARRAY_SIZE(mmul18_mixer_controls)), + SND_SOC_DAPM_MIXER("MultiMedia19 Mixer", SND_SOC_NOPM, 0, 0, + mmul19_mixer_controls, ARRAY_SIZE(mmul19_mixer_controls)), SND_SOC_DAPM_MIXER("AUX_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, auxpcm_rx_mixer_controls, ARRAY_SIZE(auxpcm_rx_mixer_controls)), SND_SOC_DAPM_MIXER("SEC_AUX_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, @@ -5441,6 +5863,12 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { &ext_ec_ref_mux_ul8), SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL9 MUX", SND_SOC_NOPM, 0, 0, &ext_ec_ref_mux_ul9), + SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL17 MUX", SND_SOC_NOPM, 0, 0, + &ext_ec_ref_mux_ul17), + SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL18 MUX", SND_SOC_NOPM, 0, 0, + &ext_ec_ref_mux_ul18), + SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL19 MUX", SND_SOC_NOPM, 0, 0, + &ext_ec_ref_mux_ul19), }; static const struct snd_soc_dapm_route intercon[] = { @@ -5566,9 +5994,15 @@ static const struct snd_soc_dapm_route intercon[] = { {"MultiMedia1 Mixer", "SLIM_6_TX", "SLIMBUS_6_TX"}, {"MultiMedia8 Mixer", "SLIM_6_TX", "SLIMBUS_6_TX"}, {"MultiMedia4 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"}, + {"MultiMedia17 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"}, + {"MultiMedia18 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"}, + {"MultiMedia19 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"}, {"MultiMedia8 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"}, {"MultiMedia2 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"}, {"MultiMedia4 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"}, + {"MultiMedia17 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"}, + {"MultiMedia18 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"}, + {"MultiMedia19 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"}, {"MultiMedia8 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"}, {"MultiMedia5 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"}, {"MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, @@ -5663,7 +6097,13 @@ static const struct snd_soc_dapm_route intercon[] = { {"MultiMedia5 Mixer", "MI2S_TX", "MI2S_TX"}, {"MultiMedia1 Mixer", "QUAT_MI2S_TX", "QUAT_MI2S_TX"}, {"MultiMedia2 Mixer", "QUAT_MI2S_TX", "QUAT_MI2S_TX"}, + {"MultiMedia17 Mixer", "QUAT_MI2S_TX", "QUAT_MI2S_TX"}, + {"MultiMedia18 Mixer", "QUAT_MI2S_TX", "QUAT_MI2S_TX"}, + {"MultiMedia19 Mixer", "QUAT_MI2S_TX", "QUAT_MI2S_TX"}, {"MultiMedia1 Mixer", "TERT_MI2S_TX", "TERT_MI2S_TX"}, + {"MultiMedia17 Mixer", "TERT_MI2S_TX", "TERT_MI2S_TX"}, + {"MultiMedia18 Mixer", "TERT_MI2S_TX", "TERT_MI2S_TX"}, + {"MultiMedia19 Mixer", "TERT_MI2S_TX", "TERT_MI2S_TX"}, {"MultiMedia1 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"}, {"MultiMedia1 Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"}, {"MultiMedia5 Mixer", "AUX_PCM_TX", "AUX_PCM_TX"}, @@ -5678,6 +6118,12 @@ static const struct snd_soc_dapm_route intercon[] = { {"MultiMedia6 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"}, {"MultiMedia6 Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"}, {"MultiMedia6 Mixer", "SEC_AUX_PCM_UL_TX", "SEC_AUX_PCM_TX"}, + {"MultiMedia1 Mixer", "AFE_LOOPBACK_TX", "AFE_LOOPBACK_TX"}, + {"MultiMedia2 Mixer", "AFE_LOOPBACK_TX", "AFE_LOOPBACK_TX"}, + {"MultiMedia4 Mixer", "AFE_LOOPBACK_TX", "AFE_LOOPBACK_TX"}, + {"MultiMedia5 Mixer", "AFE_LOOPBACK_TX", "AFE_LOOPBACK_TX"}, + {"MultiMedia6 Mixer", "AFE_LOOPBACK_TX", "AFE_LOOPBACK_TX"}, + {"MultiMedia8 Mixer", "AFE_LOOPBACK_TX", "AFE_LOOPBACK_TX"}, {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia2", "MM_DL2"}, @@ -5756,16 +6202,25 @@ static const struct snd_soc_dapm_route intercon[] = { {"MultiMedia1 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"}, {"MultiMedia4 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"}, + {"MultiMedia17 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"}, + {"MultiMedia18 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"}, + {"MultiMedia19 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"}, {"MultiMedia5 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"}, {"MultiMedia8 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"}, {"MultiMedia1 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, {"MultiMedia4 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, + {"MultiMedia17 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, + {"MultiMedia18 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, + {"MultiMedia19 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, {"MultiMedia5 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, {"MultiMedia6 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, {"MultiMedia8 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"}, {"MultiMedia1 Mixer", "AFE_PCM_TX", "PCM_TX"}, {"MultiMedia4 Mixer", "AFE_PCM_TX", "PCM_TX"}, + {"MultiMedia17 Mixer", "AFE_PCM_TX", "PCM_TX"}, + {"MultiMedia18 Mixer", "AFE_PCM_TX", "PCM_TX"}, + {"MultiMedia19 Mixer", "AFE_PCM_TX", "PCM_TX"}, {"MultiMedia5 Mixer", "AFE_PCM_TX", "PCM_TX"}, {"MultiMedia8 Mixer", "AFE_PCM_TX", "PCM_TX"}, {"MM_UL1", NULL, "MultiMedia1 Mixer"}, @@ -5775,6 +6230,9 @@ static const struct snd_soc_dapm_route intercon[] = { {"MM_UL5", NULL, "MultiMedia5 Mixer"}, {"MM_UL6", NULL, "MultiMedia6 Mixer"}, {"MM_UL8", NULL, "MultiMedia8 Mixer"}, + {"MM_UL17", NULL, "MultiMedia17 Mixer"}, + {"MM_UL18", NULL, "MultiMedia18 Mixer"}, + {"MM_UL19", NULL, "MultiMedia19 Mixer"}, {"AUX_PCM_RX Audio Mixer", "MultiMedia1", "MM_DL1"}, {"AUX_PCM_RX Audio Mixer", "MultiMedia2", "MM_DL2"}, @@ -6012,6 +6470,21 @@ static const struct snd_soc_dapm_route intercon[] = { {"AUDIO_REF_EC_UL9 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"}, {"AUDIO_REF_EC_UL9 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"}, + {"AUDIO_REF_EC_UL17 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"}, + {"AUDIO_REF_EC_UL17 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"}, + {"AUDIO_REF_EC_UL17 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"}, + {"AUDIO_REF_EC_UL17 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"}, + + {"AUDIO_REF_EC_UL18 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"}, + {"AUDIO_REF_EC_UL18 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"}, + {"AUDIO_REF_EC_UL18 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"}, + {"AUDIO_REF_EC_UL18 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"}, + + {"AUDIO_REF_EC_UL19 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"}, + {"AUDIO_REF_EC_UL19 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"}, + {"AUDIO_REF_EC_UL19 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"}, + {"AUDIO_REF_EC_UL19 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"}, + {"MM_UL1", NULL, "AUDIO_REF_EC_UL1 MUX"}, {"MM_UL2", NULL, "AUDIO_REF_EC_UL2 MUX"}, {"MM_UL4", NULL, "AUDIO_REF_EC_UL4 MUX"}, @@ -6019,6 +6492,9 @@ static const struct snd_soc_dapm_route intercon[] = { {"MM_UL6", NULL, "AUDIO_REF_EC_UL6 MUX"}, {"MM_UL8", NULL, "AUDIO_REF_EC_UL8 MUX"}, {"MM_UL9", NULL, "AUDIO_REF_EC_UL9 MUX"}, + {"MM_UL17", NULL, "AUDIO_REF_EC_UL17 MUX"}, + {"MM_UL18", NULL, "AUDIO_REF_EC_UL18 MUX"}, + {"MM_UL19", NULL, "AUDIO_REF_EC_UL19 MUX"}, {"Voice_Tx Mixer", "PRI_TX_Voice", "PRI_I2S_TX"}, {"Voice_Tx Mixer", "PRI_MI2S_TX_Voice", "PRI_MI2S_TX"}, @@ -6395,6 +6871,7 @@ static const struct snd_soc_dapm_route intercon[] = { {"SLIM0_RX_VI_FB_RCH_MUX", "SLIM4_TX", "SLIMBUS_4_TX"}, {"SLIMBUS_0_RX", NULL, "SLIM0_RX_VI_FB_LCH_MUX"}, {"SLIMBUS_0_RX", NULL, "SLIM0_RX_VI_FB_RCH_MUX"}, + {"AFE_LOOPBACK_TX", NULL, "BE_IN"}, }; static int msm_pcm_routing_hw_params(struct snd_pcm_substream *substream, @@ -6445,12 +6922,13 @@ static int msm_pcm_routing_close(struct snd_pcm_substream *substream) int idx; unsigned long copp = session_copp_map[i][session_type][be_id]; + int port_id = get_port_id(bedai->port_id); for (idx = 0; idx < MAX_COPPS_PER_PORT; idx++) if (test_bit(idx, &copp)) break; fdai->be_srate = bedai->sample_rate; - topology = msm_routing_get_adm_topology(path_type, i); - adm_close(bedai->port_id, fdai->perf_mode, idx); + topology = msm_routing_get_adm_topology(path_type, i, session_type); + adm_close(port_id, fdai->perf_mode, idx); pr_debug("%s: copp:%ld,idx bit fe:%d, type:%d,be:%d\n", __func__, copp, i, session_type, be_id); clear_bit(idx, @@ -6480,6 +6958,7 @@ static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream) bool playback, capture; uint16_t bits_per_sample = 16; struct msm_pcm_routing_fdai_data *fdai; + bool is_lsm; if (be_id >= MSM_BACKEND_DAI_MAX) { pr_err("%s: unexpected be_id %d\n", __func__, be_id); @@ -6516,9 +6995,13 @@ static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream) if (!(is_mm_lsm_fe_id(i) && route_check_fe_id_adm_support(i))) continue; + + is_lsm = (i >= MSM_FRONTEND_DAI_LSM1) && + (i <= MSM_FRONTEND_DAI_LSM8); fdai = &fe_dai_map[i][session_type]; if (fdai->strm_id != INVALID_SESSION) { int app_type, app_type_idx, copp_idx, acdb_dev_id; + int port_id = get_port_id(bedai->port_id); if (session_type == SESSION_TYPE_TX && fdai->be_srate && (fdai->be_srate != bedai->sample_rate)) { @@ -6535,27 +7018,35 @@ static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream) if (bedai->format == SNDRV_PCM_FORMAT_S24_LE) bits_per_sample = 24; - app_type = playback ? - fe_dai_app_type_cfg[i].app_type : 0; - if (app_type) { + app_type = + fe_dai_app_type_cfg[i][session_type].app_type; + if (app_type && is_lsm) { + app_type_idx = + msm_pcm_routing_get_lsm_app_type_idx(app_type); + sample_rate = + fe_dai_app_type_cfg[i][session_type]. + sample_rate; + bits_per_sample = + lsm_app_type_cfg[app_type_idx].bit_width; + } else if (app_type) { app_type_idx = msm_pcm_routing_get_app_type_idx(app_type); sample_rate = - fe_dai_app_type_cfg[i].sample_rate; + fe_dai_app_type_cfg[i][session_type].sample_rate; bits_per_sample = app_type_cfg[app_type_idx].bit_width; } else sample_rate = bedai->sample_rate; channels = bedai->channel; - acdb_dev_id = fe_dai_app_type_cfg[i].acdb_dev_id; - topology = msm_routing_get_adm_topology(path_type, i); + acdb_dev_id = fe_dai_app_type_cfg[i][session_type].acdb_dev_id; + topology = msm_routing_get_adm_topology(path_type, i, session_type); if (bedai->port_id == VOICE_RECORD_RX || bedai->port_id == VOICE_RECORD_TX) topology = NULL_COPP_TOPOLOGY; - copp_idx = adm_open(bedai->port_id, path_type, + copp_idx = adm_open(port_id, path_type, sample_rate, channels, topology, fdai->perf_mode, bits_per_sample, - app_type, acdb_dev_id); + app_type, acdb_dev_id, session_type); if ((copp_idx < 0) || (copp_idx >= MAX_COPPS_PER_PORT)) { pr_err("%s: adm open failed\n", __func__); @@ -6571,7 +7062,7 @@ static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream) bedai->passthr_mode); if ((fdai->perf_mode == LEGACY_PCM_MODE) && (bedai->passthr_mode == LEGACY_PCM)) - msm_pcm_routing_cfg_pp(bedai->port_id, copp_idx, + msm_pcm_routing_cfg_pp(port_id, copp_idx, topology, channels); } } @@ -6794,6 +7285,9 @@ static int msm_routing_probe(struct snd_soc_platform *platform) snd_soc_add_platform_controls(platform, app_type_cfg_controls, ARRAY_SIZE(app_type_cfg_controls)); + snd_soc_add_platform_controls(platform, lsm_app_type_cfg_controls, + ARRAY_SIZE(lsm_app_type_cfg_controls)); + snd_soc_add_platform_controls(platform, stereo_to_custom_stereo_controls, ARRAY_SIZE(stereo_to_custom_stereo_controls)); diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h index cc875bb1438..e65488da994 100644 --- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h +++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -60,6 +60,7 @@ #define LPASS_BE_SLIMBUS_5_TX "SLIMBUS_5_TX" #define LPASS_BE_SLIMBUS_6_RX "SLIMBUS_6_RX" #define LPASS_BE_SLIMBUS_6_TX "SLIMBUS_6_TX" +#define LPASS_BE_AFE_LOOPBACK_TX "AFE_LOOPBACK_TX" /* For multimedia front-ends, asm session is allocated dynamically. * Hence, asm session/multimedia front-end mapping has to be maintained. @@ -84,6 +85,9 @@ enum { MSM_FRONTEND_DAI_MULTIMEDIA14, MSM_FRONTEND_DAI_MULTIMEDIA15, MSM_FRONTEND_DAI_MULTIMEDIA16, + MSM_FRONTEND_DAI_MULTIMEDIA17, + MSM_FRONTEND_DAI_MULTIMEDIA18, + MSM_FRONTEND_DAI_MULTIMEDIA19, MSM_FRONTEND_DAI_CS_VOICE, MSM_FRONTEND_DAI_VOIP, MSM_FRONTEND_DAI_AFE_RX, @@ -109,8 +113,8 @@ enum { MSM_FRONTEND_DAI_MAX, }; -#define MSM_FRONTEND_DAI_MM_SIZE (MSM_FRONTEND_DAI_MULTIMEDIA16 + 1) -#define MSM_FRONTEND_DAI_MM_MAX_ID MSM_FRONTEND_DAI_MULTIMEDIA16 +#define MSM_FRONTEND_DAI_MM_SIZE (MSM_FRONTEND_DAI_MULTIMEDIA19 + 1) +#define MSM_FRONTEND_DAI_MM_MAX_ID MSM_FRONTEND_DAI_MULTIMEDIA19 enum { MSM_BACKEND_DAI_PRI_I2S_RX = 0, @@ -159,6 +163,7 @@ enum { MSM_BACKEND_DAI_SPDIF_RX, MSM_BACKEND_DAI_SECONDARY_MI2S_RX_SD1, MSM_BACKEND_DAI_INT_BT_A2DP_RX, + MSM_BACKEND_DAI_AFE_LOOPBACK_TX, MSM_BACKEND_DAI_MAX, }; @@ -253,5 +258,7 @@ void msm_pcm_routing_acquire_lock(void); void msm_pcm_routing_release_lock(void); void msm_pcm_routing_reg_stream_app_type_cfg(int fedai_id, int app_type, - int acdb_dev_id, int sample_rate); + int acdb_dev_id, int sample_rate, int session_type); +int msm_pcm_routing_get_stream_app_type_cfg(int fedai_id, int session_type, + int *app_type, int *acdb_dev_id, int *sample_rate); #endif /*_MSM_PCM_H*/ diff --git a/sound/soc/msm/qdsp6v2/q6adm.c b/sound/soc/msm/qdsp6v2/q6adm.c index e7bcdf2f230..9e08848aba6 100644 --- a/sound/soc/msm/qdsp6v2/q6adm.c +++ b/sound/soc/msm/qdsp6v2/q6adm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2014, 2016-2017 The Linux Foundation. All rights +/* Copyright (c) 2012-2014, 2016-2018 The Linux Foundation. All rights * reserved. * * This program is free software; you can redistribute it and/or modify @@ -51,6 +51,7 @@ struct adm_copp { atomic_t bit_width[AFE_MAX_PORTS][MAX_COPPS_PER_PORT]; atomic_t app_type[AFE_MAX_PORTS][MAX_COPPS_PER_PORT]; atomic_t acdb_id[AFE_MAX_PORTS][MAX_COPPS_PER_PORT]; + atomic_t session_type[AFE_MAX_PORTS][MAX_COPPS_PER_PORT]; wait_queue_head_t wait[AFE_MAX_PORTS][MAX_COPPS_PER_PORT]; wait_queue_head_t adm_delay_wait[AFE_MAX_PORTS][MAX_COPPS_PER_PORT]; atomic_t adm_delay_stat[AFE_MAX_PORTS][MAX_COPPS_PER_PORT]; @@ -198,7 +199,7 @@ static int adm_get_copp_id(int port_idx, int copp_idx) } static int adm_get_idx_if_copp_exists(int port_idx, int topology, int mode, - int rate, int bit_width, int app_type) + int rate, int bit_width, int app_type, int session_type) { int idx; @@ -212,6 +213,8 @@ static int adm_get_idx_if_copp_exists(int port_idx, int topology, int mode, (rate == atomic_read(&this_adm.copp.rate[port_idx][idx])) && (bit_width == atomic_read(&this_adm.copp.bit_width[port_idx][idx])) && + (session_type == + atomic_read(&this_adm.copp.session_type[port_idx][idx])) && (app_type == atomic_read(&this_adm.copp.app_type[port_idx][idx]))) return idx; @@ -956,6 +959,8 @@ static int32_t adm_callback(struct apr_client_data *data, void *priv) &this_adm.copp.app_type[i][j], 0); atomic_set( &this_adm.copp.acdb_id[i][j], 0); + atomic_set( + &this_adm.copp.session_type[i][j], 0); } } this_adm.apr = NULL; @@ -1368,10 +1373,17 @@ static int adm_memory_unmap_regions(void) return ret; } -static void remap_cal_data(struct cal_block_data *cal_block, int cal_index) +static int remap_cal_data(struct cal_block_data *cal_block, int cal_index) { int ret = 0; + if (cal_block->map_data.ion_client == NULL) { + pr_err("%s: No ION allocation for cal index %d!\n", + __func__, cal_index); + ret = -EINVAL; + goto done; + } + if ((cal_block->map_data.map_size > 0) && (cal_block->map_data.q6map_handle == 0)) { atomic_set(&this_adm.mem_map_index, cal_index); @@ -1391,7 +1403,7 @@ static void remap_cal_data(struct cal_block_data *cal_block, int cal_index) mem_map_handles[cal_index]); } done: - return; + return ret; } static void send_adm_custom_topology(void) @@ -1415,7 +1427,13 @@ static void send_adm_custom_topology(void) pr_debug("%s: Sending cal_index %d\n", __func__, cal_index); - remap_cal_data(cal_block, cal_index); + result = remap_cal_data(cal_block, cal_index); + if (result) { + pr_err("%s: Remap_cal_data failed for cal %d!\n", + __func__, cal_index); + goto unlock; + } + atomic_set(&this_adm.mem_map_index, cal_index); atomic_set(&this_adm.mem_map_handles[cal_index], cal_block->map_data.q6map_handle); @@ -1789,7 +1807,8 @@ static bool is_vptx_topology(int topology) } int adm_open(int port_id, int path, int rate, int channel_mode, int topology, - int perf_mode, uint16_t bit_width, int app_type, int acdb_id) + int perf_mode, uint16_t bit_width, int app_type, int acdb_id, + int session_type) { struct adm_cmd_device_open_v5 open; struct adm_cmd_device_open_v6 open_v6; @@ -1841,7 +1860,7 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology, rate = 16000; copp_idx = adm_get_idx_if_copp_exists(port_idx, topology, perf_mode, - rate, bit_width, app_type); + rate, bit_width, app_type, session_type); if (copp_idx < 0) { copp_idx = adm_get_next_available_copp(port_idx); if (copp_idx >= MAX_COPPS_PER_PORT) { @@ -1862,6 +1881,8 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology, app_type); atomic_set(&this_adm.copp.acdb_id[port_idx][copp_idx], acdb_id); + atomic_set(&this_adm.copp.session_type[port_idx][copp_idx], + session_type); if (path != ADM_PATH_COMPRESSED_RX) send_adm_custom_topology(); } @@ -1912,7 +1933,8 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology, if (this_adm.ec_ref_cfg.port_id == -1) { open.endpoint_id_2 = 0xFFFF; } else if ((this_adm.ec_ref_cfg.port_id) && - (path != ADM_PATH_PLAYBACK)) { + (path != ADM_PATH_PLAYBACK) && + afe_get_port_type(tmp_port) == MSM_AFE_PORT_TYPE_TX) { open.endpoint_id_2 = this_adm.ec_ref_cfg.port_id; this_adm.ec_ref_cfg.port_id = -1; } @@ -2284,6 +2306,7 @@ int adm_close(int port_id, int perf_mode, int copp_idx) atomic_set(&this_adm.copp.rate[port_idx][copp_idx], 0); atomic_set(&this_adm.copp.bit_width[port_idx][copp_idx], 0); atomic_set(&this_adm.copp.app_type[port_idx][copp_idx], 0); + atomic_set(&this_adm.copp.session_type[port_idx][copp_idx], 0); ret = apr_send_pkt(this_adm.apr, (uint32_t *)&close); if (ret < 0) { @@ -2558,6 +2581,18 @@ static int adm_unmap_cal_data(int32_t cal_type, goto done; } + if (cal_block == NULL) { + pr_err("%s: Cal block is NULL!\n", + __func__); + goto done; + } + + if (cal_block->map_data.q6map_handle == 0) { + pr_err("%s: Map handle is NULL, nothing to unmap\n", + __func__); + goto done; + } + atomic_set(&this_adm.mem_map_handles[cal_index], cal_block->map_data.q6map_handle); atomic_set(&this_adm.mem_map_index, cal_index); @@ -3616,6 +3651,7 @@ static int __init adm_init(void) atomic_set(&this_adm.copp.bit_width[i][j], 0); atomic_set(&this_adm.copp.app_type[i][j], 0); atomic_set(&this_adm.copp.acdb_id[i][j], 0); + atomic_set(&this_adm.copp.session_type[i][j], 0); init_waitqueue_head(&this_adm.copp.wait[i][j]); atomic_set(&this_adm.copp.adm_delay_stat[i][j], 0); init_waitqueue_head( diff --git a/sound/soc/msm/qdsp6v2/q6afe.c b/sound/soc/msm/qdsp6v2/q6afe.c index b8dfafe39e9..b3188416b46 100644 --- a/sound/soc/msm/qdsp6v2/q6afe.c +++ b/sound/soc/msm/qdsp6v2/q6afe.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -342,6 +342,7 @@ int afe_get_port_type(u16 port_id) case AFE_PORT_ID_TERTIARY_MI2S_TX: case AFE_PORT_ID_QUATERNARY_MI2S_TX: case AFE_PORT_ID_SECONDARY_PCM_TX: + case AFE_LOOPBACK_TX: ret = MSM_AFE_PORT_TYPE_TX; break; @@ -824,10 +825,17 @@ static int afe_send_hw_delay(u16 port_id, u32 rate) return ret; } -static void remap_cal_data(struct cal_block_data *cal_block, int cal_index) +static int remap_cal_data(struct cal_block_data *cal_block, int cal_index) { int ret = 0; + if (cal_block->map_data.ion_client == NULL) { + pr_err("%s: No ION allocation for cal index %d!\n", + __func__, cal_index); + ret = -EINVAL; + goto done; + } + if ((cal_block->map_data.map_size > 0) && (cal_block->map_data.q6map_handle == 0)) { atomic_set(&this_afe.mem_map_cal_index, cal_index); @@ -848,7 +856,7 @@ static void remap_cal_data(struct cal_block_data *cal_block, int cal_index) mem_map_cal_handles[cal_index]); } done: - return; + return ret; } static void send_afe_cal_type(int cal_index, int port_id) @@ -872,7 +880,13 @@ static void send_afe_cal_type(int cal_index, int port_id) pr_debug("%s: Sending cal_index cal %d\n", __func__, cal_index); - remap_cal_data(cal_block, cal_index); + ret = remap_cal_data(cal_block, cal_index); + if (ret) { + pr_err("%s: Remap_cal_data failed for cal %d!\n", + __func__, cal_index); + goto done; + } + ret = afe_send_cal_block(port_id, cal_block); if (ret < 0) pr_debug("%s: No cal sent for cal_index %d, port_id = 0x%x! ret %d\n", @@ -1953,7 +1967,8 @@ int afe_get_port_index(u16 port_id) return IDX_AFE_PORT_ID_TERTIARY_MI2S_TX; case AFE_PORT_ID_SECONDARY_MI2S_RX_SD1: return IDX_AFE_PORT_ID_SECONDARY_MI2S_RX_SD1; - + case AFE_LOOPBACK_TX: + return IDX_AFE_LOOPBACK_TX; default: pr_err("%s: port 0x%x\n", __func__, port_id); return -EINVAL; @@ -4438,6 +4453,17 @@ static int afe_unmap_cal_data(int32_t cal_type, goto done; } + if (cal_block == NULL) { + pr_err("%s: Cal block is NULL!\n", + __func__); + goto done; + } + + if (cal_block->map_data.q6map_handle == 0) { + pr_err("%s: Map handle is NULL, nothing to unmap\n", + __func__); + goto done; + } atomic_set(&this_afe.mem_map_cal_handles[cal_index], cal_block->map_data.q6map_handle); diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index bbebb759dd0..aa72024ccaf 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include #define TRUE 0x01 #define FALSE 0x00 @@ -91,6 +93,7 @@ static int q6asm_map_channels(u8 *channel_mapping, uint32_t channels); void *q6asm_mmap_apr_reg(void); static int q6asm_is_valid_session(struct apr_client_data *data, void *priv); +static int q6asm_send_asm_cal(struct audio_client *ac); /* for ASM custom topology */ static struct cal_type_data *cal_data[ASM_MAX_CAL_TYPES]; @@ -425,15 +428,8 @@ static void q6asm_session_free(struct audio_client *ac) return; } -static uint32_t q6asm_get_next_buf(uint32_t curr_buf, uint32_t max_buf_cnt) -{ - pr_debug("%s: curr_buf = %d, max_buf_cnt = %d\n", - __func__, curr_buf, max_buf_cnt); - curr_buf += 1; - return (curr_buf >= max_buf_cnt) ? 0 : curr_buf; -} - -static int q6asm_map_cal_memory(struct cal_block_data *cal_block) +static int q6asm_map_cal_memory(int32_t cal_type, + struct cal_block_data *cal_block) { int result = 0; struct asm_buffer_node *buf_node = NULL; @@ -501,14 +497,21 @@ static int q6asm_map_cal_memory(struct cal_block_data *cal_block) return result; } -static void remap_cal_data(struct cal_block_data *cal_block) +static int remap_cal_data(int32_t cal_type, struct cal_block_data *cal_block) { int ret = 0; + if (cal_block->map_data.ion_client == NULL) { + pr_err("%s: No ION allocation for cal type %d!\n", + __func__, cal_type); + ret = -EINVAL; + goto done; + } + if ((cal_block->map_data.map_size > 0) && (cal_block->map_data.q6map_handle == 0)) { - ret = q6asm_map_cal_memory(cal_block); + ret = q6asm_map_cal_memory(cal_type, cal_block); if (ret < 0) { pr_err("%s: mmap did not work! size = %zd ret %d\n", __func__, cal_block->map_data.map_size, ret); @@ -516,10 +519,11 @@ static void remap_cal_data(struct cal_block_data *cal_block) } } done: - return; + return ret; } -static int q6asm_unmap_cal_memory(struct cal_block_data *cal_block) +static int q6asm_unmap_cal_memory(int32_t cal_type, + struct cal_block_data *cal_block) { int result = 0; int result2 = 0; @@ -560,14 +564,14 @@ static int q6asm_unmap_cal_memory(struct cal_block_data *cal_block) return result; } -void q6asm_unmap_cal_data(int cal_type, struct cal_block_data *cal_block) +int q6asm_unmap_cal_data(int cal_type, struct cal_block_data *cal_block) { int ret = 0; if ((cal_block->map_data.map_size > 0) && (cal_block->map_data.q6map_handle != 0)) { - ret = q6asm_unmap_cal_memory(cal_block); + ret = q6asm_unmap_cal_memory(cal_type, cal_block); if (ret < 0) { pr_err("%s: unmap did not work! size = %zd ret %d\n", __func__, cal_block->map_data.map_size, ret); @@ -575,7 +579,7 @@ void q6asm_unmap_cal_data(int cal_type, struct cal_block_data *cal_block) } } done: - return; + return ret; } int send_asm_custom_topology(struct audio_client *ac) @@ -583,6 +587,7 @@ int send_asm_custom_topology(struct audio_client *ac) struct cal_block_data *cal_block = NULL; struct cmd_set_topologies asm_top; int result = 0; + int result1 = 0; if (cal_data[ASM_CUSTOM_TOP_CAL] == NULL) goto done; @@ -603,10 +608,13 @@ int send_asm_custom_topology(struct audio_client *ac) pr_debug("%s: Sending cal_index %d\n", __func__, ASM_CUSTOM_TOP_CAL); - remap_cal_data(cal_block); - q6asm_add_hdr_custom_topology(ac, &asm_top.hdr, - APR_PKT_SIZE(APR_HDR_SIZE, - sizeof(asm_top)), TRUE); + result = remap_cal_data(ASM_CUST_TOPOLOGY_CAL_TYPE, cal_block); + if (result) { + pr_err("%s: Remap_cal_data failed for cal %d!\n", + __func__, ASM_CUSTOM_TOP_CAL); + goto unlock; + } + q6asm_add_hdr_custom_topology(ac, &asm_top.hdr, sizeof(asm_top), TRUE); atomic_set(&ac->mem_state, 1); asm_top.hdr.opcode = ASM_CMD_ADD_TOPOLOGIES; asm_top.payload_addr_lsw = lower_32_bits(cal_block->cal_data.paddr); @@ -645,9 +653,12 @@ int send_asm_custom_topology(struct audio_client *ac) } unmap: - result = q6asm_unmap_cal_memory(cal_block); - if (result < 0) + result1 = q6asm_unmap_cal_memory(ASM_CUST_TOPOLOGY_CAL_TYPE, + cal_block); + if (result1 < 0) { + result = result1; pr_debug("%s: unmap cal failed! %d\n", __func__, result); + } unlock: mutex_unlock(&cal_data[ASM_CUSTOM_TOP_CAL]->lock); done: @@ -656,7 +667,7 @@ int send_asm_custom_topology(struct audio_client *ac) int q6asm_map_rtac_block(struct rtac_cal_block_data *cal_block) { - int result = 0; + int result = 0; struct asm_buffer_node *buf_node = NULL; struct list_head *ptr, *next; pr_debug("%s:\n", __func__); @@ -1866,8 +1877,7 @@ void *q6asm_is_cpu_buf_avail(int dir, struct audio_client *ac, uint32_t *size, user accesses this function,increase cpu buf(to avoid another api)*/ port->buf[idx].used = dir; - port->cpu_buf = q6asm_get_next_buf(port->cpu_buf, - port->max_buf_cnt); + port->cpu_buf = ((port->cpu_buf + 1) & (port->max_buf_cnt - 1)); mutex_unlock(&port->lock); return data; } @@ -1918,8 +1928,7 @@ void *q6asm_is_cpu_buf_avail_nolock(int dir, struct audio_client *ac, * buf(to avoid another api) */ port->buf[idx].used = dir; - port->cpu_buf = q6asm_get_next_buf(port->cpu_buf, - port->max_buf_cnt); + port->cpu_buf = ((port->cpu_buf + 1) & (port->max_buf_cnt - 1)); return data; } @@ -2085,7 +2094,8 @@ static void q6asm_add_mmaphdr(struct audio_client *ac, struct apr_hdr *hdr, return; } static int __q6asm_open_read(struct audio_client *ac, - uint32_t format, uint16_t bits_per_sample) + uint32_t format, uint16_t bits_per_sample, + bool use_v3_format, bool ts_mode) { int rc = 0x00; struct asm_stream_cmd_open_read_v3 open; @@ -2125,7 +2135,12 @@ static int __q6asm_open_read(struct audio_client *ac, switch (format) { case FORMAT_LINEAR_PCM: open.mode_flags |= 0x00; - open.enc_cfg_id = ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2; + if (ts_mode) + open.mode_flags |= ABSOLUTE_TIMESTAMP_ENABLE; + if (use_v3_format) + open.enc_cfg_id = ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3; + else + open.enc_cfg_id = ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2; break; case FORMAT_MPEG4_AAC: open.mode_flags |= BUFFER_META_ENABLE; @@ -2172,6 +2187,10 @@ static int __q6asm_open_read(struct audio_client *ac, } ac->io_mode |= TUN_READ_IO_MODE; + + rc = q6asm_send_asm_cal(ac); + pr_debug("%s: q6asm_send_asm_cal ret=%d\n", __func__, rc); + return 0; fail_cmd: return -EINVAL; @@ -2180,14 +2199,46 @@ static int __q6asm_open_read(struct audio_client *ac, int q6asm_open_read(struct audio_client *ac, uint32_t format) { - return __q6asm_open_read(ac, format, 16); + return __q6asm_open_read(ac, format, 16, + false /*use_v3_format*/, false/*ts_mode*/); } int q6asm_open_read_v2(struct audio_client *ac, uint32_t format, uint16_t bits_per_sample) { - return __q6asm_open_read(ac, format, bits_per_sample); + return __q6asm_open_read(ac, format, bits_per_sample, + false /*use_v3_format*/, false/*ts_mode*/); +} + +/* + * asm_open_read_v3 - Opens audio capture session + * + * @ac: Client session handle + * @format: encoder format + * @bits_per_sample: bit width of capture session + */ +int q6asm_open_read_v3(struct audio_client *ac, uint32_t format, + uint16_t bits_per_sample) +{ + return __q6asm_open_read(ac, format, bits_per_sample, + true /*use_v3_format*/, false/*ts_mode*/); } +EXPORT_SYMBOL(q6asm_open_read_v3); + +/* + * asm_open_read_v4 - Opens audio capture session + * + * @ac: Client session handle + * @format: encoder format + * @bits_per_sample: bit width of capture session + */ +int q6asm_open_read_v4(struct audio_client *ac, uint32_t format, + uint16_t bits_per_sample) +{ + return __q6asm_open_read(ac, format, bits_per_sample, + true /*use_v3_format*/, true/*ts_mode*/); +} +EXPORT_SYMBOL(q6asm_open_read_v4); int q6asm_open_write_compressed(struct audio_client *ac, uint32_t format, uint32_t passthrough_flag) @@ -2274,6 +2325,9 @@ int q6asm_open_write_compressed(struct audio_client *ac, uint32_t format, rc = -ETIMEDOUT; goto fail_cmd; } + rc = q6asm_send_asm_cal(ac); + pr_debug("%s: q6asm_send_asm_cal ret=%d\n", __func__, rc); + return 0; fail_cmd: return rc; @@ -2424,6 +2478,10 @@ static int __q6asm_open_write(struct audio_client *ac, uint32_t format, goto fail_cmd; } ac->io_mode |= TUN_WRITE_IO_MODE; + + rc = q6asm_send_asm_cal(ac); + pr_debug("%s: q6asm_send_asm_cal ret=%d\n", __func__, rc); + return 0; fail_cmd: return -EINVAL; @@ -2589,6 +2647,9 @@ static int __q6asm_open_read_write(struct audio_client *ac, uint32_t rd_format, __func__, atomic_read(&ac->cmd_state)); goto fail_cmd; } + rc = q6asm_send_asm_cal(ac); + pr_debug("%s: q6asm_send_asm_cal ret=%d\n", __func__, rc); + return 0; fail_cmd: return -EINVAL; @@ -2864,8 +2925,105 @@ int q6asm_set_encdec_chan_map(struct audio_client *ac, return rc; } -static int __q6asm_enc_cfg_blk_pcm(struct audio_client *ac, - uint32_t rate, uint32_t channels, uint16_t bits_per_sample) +/* + * q6asm_enc_cfg_blk_pcm_v3 - sends encoder configuration parameters + * + * @ac: Client session handle + * @rate: sample rate + * @channels: number of channels + * @bits_per_sample: bit width of encoder session + * @use_default_chmap: true if default channel map to be used + * @use_back_flavor: to configure back left and right channel + * @channel_map: input channel map + * @sample_word_size: Size in bits of the word that holds a sample of a channel + */ +int q6asm_enc_cfg_blk_pcm_v3(struct audio_client *ac, + uint32_t rate, uint32_t channels, + uint16_t bits_per_sample, bool use_default_chmap, + bool use_back_flavor, u8 *channel_map, + uint16_t sample_word_size) +{ + struct asm_multi_channel_pcm_enc_cfg_v3 enc_cfg; + struct asm_enc_cfg_blk_param_v2 enc_fg_blk; + u8 *channel_mapping; + u32 frames_per_buf = 0; + int rc; + + if (!use_default_chmap && (channel_map == NULL)) { + pr_err("%s: No valid chan map and can't use default\n", + __func__); + rc = -EINVAL; + goto fail_cmd; + } + + pr_debug("%s: session[%d]rate[%d]ch[%d]bps[%d]wordsize[%d]\n", __func__, + ac->session, rate, channels, + bits_per_sample, sample_word_size); + + memset(&enc_cfg, 0, sizeof(enc_cfg)); + q6asm_add_hdr(ac, &enc_cfg.hdr, sizeof(enc_cfg), TRUE); + atomic_set(&ac->cmd_state, -1); + enc_cfg.hdr.opcode = ASM_STREAM_CMD_SET_ENCDEC_PARAM; + enc_cfg.encdec.param_id = ASM_PARAM_ID_ENCDEC_ENC_CFG_BLK_V2; + enc_cfg.encdec.param_size = sizeof(enc_cfg) - sizeof(enc_cfg.hdr) - + sizeof(enc_cfg.encdec); + enc_cfg.encblk.frames_per_buf = frames_per_buf; + enc_cfg.encblk.enc_cfg_blk_size = enc_cfg.encdec.param_size - + sizeof(enc_fg_blk); + enc_cfg.num_channels = channels; + enc_cfg.bits_per_sample = bits_per_sample; + enc_cfg.sample_rate = rate; + enc_cfg.is_signed = 1; + enc_cfg.sample_word_size = sample_word_size; + channel_mapping = enc_cfg.channel_mapping; + + memset(channel_mapping, 0, PCM_FORMAT_MAX_NUM_CHANNEL); + + if (use_default_chmap) { + pr_debug("%s: setting default channel map for %d channels", + __func__, channels); + if (q6asm_map_channels(channel_mapping, channels)) { + pr_err("%s: map channels failed %d\n", + __func__, channels); + rc = -EINVAL; + goto fail_cmd; + } + } else { + pr_debug("%s: Using pre-defined channel map", __func__); + memcpy(channel_mapping, channel_map, + PCM_FORMAT_MAX_NUM_CHANNEL); + } + + rc = apr_send_pkt(ac->apr, (uint32_t *) &enc_cfg); + if (rc < 0) { + pr_err("%s: Comamnd open failed %d\n", __func__, rc); + goto fail_cmd; + } + rc = wait_event_timeout(ac->cmd_wait, + (atomic_read(&ac->cmd_state) >= 0), 5*HZ); + if (!rc) { + pr_err("%s: timeout opcode[0x%x]\n", + __func__, enc_cfg.hdr.opcode); + rc = -ETIMEDOUT; + goto fail_cmd; + } + if (atomic_read(&ac->cmd_state) > 0) { + pr_err("%s: DSP returned error[%s]\n", + __func__, adsp_err_get_err_str( + atomic_read(&ac->cmd_state))); + rc = adsp_err_get_lnx_err_code( + atomic_read(&ac->cmd_state)); + goto fail_cmd; + } + return 0; +fail_cmd: + return rc; +} +EXPORT_SYMBOL(q6asm_enc_cfg_blk_pcm_v3); + +int q6asm_enc_cfg_blk_pcm_v2(struct audio_client *ac, + uint32_t rate, uint32_t channels, uint16_t bits_per_sample, + bool use_default_chmap, bool use_back_flavor, u8 *channel_map) { struct asm_multi_channel_pcm_enc_cfg_v2 enc_cfg; u8 *channel_mapping; @@ -2873,6 +3031,12 @@ static int __q6asm_enc_cfg_blk_pcm(struct audio_client *ac, int rc = 0; + if (!use_default_chmap && (channel_map == NULL)) { + pr_err("%s: No valid chan map and can't use default\n", + __func__); + return -EINVAL; + } + pr_debug("%s: Session %d, rate = %d, channels = %d\n", __func__, ac->session, rate, channels); @@ -2894,9 +3058,18 @@ static int __q6asm_enc_cfg_blk_pcm(struct audio_client *ac, memset(channel_mapping, 0, PCM_FORMAT_MAX_NUM_CHANNEL); - if (q6asm_map_channels(channel_mapping, channels)) { - pr_err("%s: map channels failed %d", __func__, channels); - return -EINVAL; + if (use_default_chmap) { + pr_debug("%s: setting default channel map for %d channels", + __func__, channels); + if (q6asm_map_channels(channel_mapping, channels)) { + pr_err("%s: map channels failed %d\n", + __func__, channels); + return -EINVAL; + } + } else { + pr_debug("%s: Using pre-defined channel map", __func__); + memcpy(channel_mapping, channel_map, + PCM_FORMAT_MAX_NUM_CHANNEL); } rc = apr_send_pkt(ac->apr, (uint32_t *) &enc_cfg); @@ -2922,6 +3095,23 @@ static int __q6asm_enc_cfg_blk_pcm(struct audio_client *ac, return -EINVAL; } +static int __q6asm_enc_cfg_blk_pcm_v3(struct audio_client *ac, + uint32_t rate, uint32_t channels, + uint16_t bits_per_sample, + uint16_t sample_word_size) +{ + return q6asm_enc_cfg_blk_pcm_v3(ac, rate, channels, + bits_per_sample, true, false, NULL, + sample_word_size); +} + +static int __q6asm_enc_cfg_blk_pcm(struct audio_client *ac, + uint32_t rate, uint32_t channels, uint16_t bits_per_sample) +{ + return q6asm_enc_cfg_blk_pcm_v2(ac, rate, channels, + bits_per_sample, true, false, NULL); +} + int q6asm_enc_cfg_blk_pcm(struct audio_client *ac, uint32_t rate, uint32_t channels) { @@ -2934,6 +3124,26 @@ int q6asm_enc_cfg_blk_pcm_format_support(struct audio_client *ac, return __q6asm_enc_cfg_blk_pcm(ac, rate, channels, bits_per_sample); } +/* + * q6asm_enc_cfg_blk_pcm_format_support_v3 - sends encoder configuration + * parameters + * + * @ac: Client session handle + * @rate: sample rate + * @channels: number of channels + * @bits_per_sample: bit width of encoder session + * @sample_word_size: Size in bits of the word that holds a sample of a channel + */ +int q6asm_enc_cfg_blk_pcm_format_support_v3(struct audio_client *ac, + uint32_t rate, uint32_t channels, + uint16_t bits_per_sample, + uint16_t sample_word_size) +{ + return __q6asm_enc_cfg_blk_pcm_v3(ac, rate, channels, + bits_per_sample, sample_word_size); +} +EXPORT_SYMBOL(q6asm_enc_cfg_blk_pcm_format_support_v3); + int q6asm_enc_cfg_blk_pcm_native(struct audio_client *ac, uint32_t rate, uint32_t channels) { @@ -3433,6 +3643,87 @@ static int __q6asm_media_format_block_pcm(struct audio_client *ac, return -EINVAL; } +static int __q6asm_media_format_block_pcm_v3(struct audio_client *ac, + uint32_t rate, uint32_t channels, + uint16_t bits_per_sample, + int stream_id, + bool use_default_chmap, + char *channel_map, + uint16_t sample_word_size) +{ + struct asm_multi_channel_pcm_fmt_blk_param_v3 fmt; + u8 *channel_mapping; + int rc; + + pr_debug("%s: session[%d]rate[%d]ch[%d]bps[%d]wordsize[%d]\n", __func__, + ac->session, rate, channels, + bits_per_sample, sample_word_size); + + memset(&fmt, 0, sizeof(fmt)); + q6asm_stream_add_hdr(ac, &fmt.hdr, sizeof(fmt), TRUE, stream_id); + atomic_set(&ac->cmd_state, -1); + /* + * Updated the token field with stream/session for compressed playback + * Platform driver must know the the stream with which the command is + * associated + */ + if (ac->io_mode & COMPRESSED_STREAM_IO) + fmt.hdr.token = ((ac->session << 8) & 0xFFFF00) | + (stream_id & 0xFF); + + pr_debug("%s: token = 0x%x, stream_id %d, session 0x%x\n", + __func__, fmt.hdr.token, stream_id, ac->session); + + fmt.hdr.opcode = ASM_DATA_CMD_MEDIA_FMT_UPDATE_V2; + fmt.fmt_blk.fmt_blk_size = sizeof(fmt) - sizeof(fmt.hdr) - + sizeof(fmt.fmt_blk); + fmt.param.num_channels = channels; + fmt.param.bits_per_sample = bits_per_sample; + fmt.param.sample_rate = rate; + fmt.param.is_signed = 1; + fmt.param.sample_word_size = sample_word_size; + channel_mapping = fmt.param.channel_mapping; + + memset(channel_mapping, 0, PCM_FORMAT_MAX_NUM_CHANNEL); + + if (use_default_chmap) { + if (q6asm_map_channels(channel_mapping, channels)) { + pr_err("%s: map channels failed %d\n", + __func__, channels); + rc = -EINVAL; + goto fail_cmd; + } + } else { + memcpy(channel_mapping, channel_map, + PCM_FORMAT_MAX_NUM_CHANNEL); + } + + rc = apr_send_pkt(ac->apr, (uint32_t *) &fmt); + if (rc < 0) { + pr_err("%s: Comamnd open failed %d\n", __func__, rc); + rc = -EINVAL; + goto fail_cmd; + } + rc = wait_event_timeout(ac->cmd_wait, + (atomic_read(&ac->cmd_state) >= 0), 5*HZ); + if (!rc) { + pr_err("%s: timeout. waited for format update\n", __func__); + rc = -ETIMEDOUT; + goto fail_cmd; + } + if (atomic_read(&ac->cmd_state) > 0) { + pr_err("%s: DSP returned error[%s]\n", + __func__, adsp_err_get_err_str( + atomic_read(&ac->cmd_state))); + rc = adsp_err_get_lnx_err_code( + atomic_read(&ac->cmd_state)); + goto fail_cmd; + } + return 0; +fail_cmd: + return rc; +} + int q6asm_media_format_block_pcm(struct audio_client *ac, uint32_t rate, uint32_t channels) { @@ -3465,6 +3756,41 @@ int q6asm_media_format_block_pcm_format_support_v2(struct audio_client *ac, use_default_chmap, channel_map); } +/* + * q6asm_media_format_block_pcm_format_support_v3- sends pcm decoder + * configuration parameters + * + * @ac: Client session handle + * @rate: sample rate + * @channels: number of channels + * @bits_per_sample: bit width of encoder session + * @stream_id: stream id of stream to be associated with this session + * @use_default_chmap: true if default channel map to be used + * @channel_map: input channel map + * @sample_word_size: Size in bits of the word that holds a sample of a channel + */ +int q6asm_media_format_block_pcm_format_support_v3(struct audio_client *ac, + uint32_t rate, + uint32_t channels, + uint16_t bits_per_sample, + int stream_id, + bool use_default_chmap, + char *channel_map, + uint16_t sample_word_size) +{ + if (!use_default_chmap && (channel_map == NULL)) { + pr_err("%s: No valid chan map and can't use default\n", + __func__); + return -EINVAL; + } + return __q6asm_media_format_block_pcm_v3(ac, rate, + channels, bits_per_sample, stream_id, + use_default_chmap, channel_map, + sample_word_size); + +} +EXPORT_SYMBOL(q6asm_media_format_block_pcm_format_support_v3); + static int __q6asm_media_format_block_multi_ch_pcm(struct audio_client *ac, uint32_t rate, uint32_t channels, bool use_default_chmap, char *channel_map, @@ -5025,8 +5351,7 @@ static int __q6asm_read(struct audio_client *ac, bool is_custom_len_reqd, read.buf_size = is_custom_len_reqd ? len : ab->size; read.seq_id = port->dsp_buf; read.hdr.token = port->dsp_buf; - port->dsp_buf = q6asm_get_next_buf(port->dsp_buf, - port->max_buf_cnt); + port->dsp_buf = (port->dsp_buf + 1) & (port->max_buf_cnt - 1); mutex_unlock(&port->lock); dev_vdbg(ac->dev, "%s: buf add[%pK] token[%d] uid[%d]\n", __func__, &ab->phys, read.hdr.token, @@ -5104,8 +5429,7 @@ int q6asm_read_nolock(struct audio_client *ac) } } - port->dsp_buf = q6asm_get_next_buf(port->dsp_buf, - port->max_buf_cnt); + port->dsp_buf = (port->dsp_buf + 1) & (port->max_buf_cnt - 1); dev_vdbg(ac->dev, "%s: buf add[%pK] token[%d] uid[%d]\n", __func__, &ab->phys, read.hdr.token, read.seq_id); @@ -5242,7 +5566,11 @@ int q6asm_async_read(struct audio_client *ac, lbuf_phys_addr = (param->paddr - 64); dir = OUT; } else { - lbuf_phys_addr = param->paddr; + if (param->flags & COMPRESSED_TIMESTAMP_FLAG) + lbuf_phys_addr = param->paddr - + sizeof(struct snd_codec_metadata); + else + lbuf_phys_addr = param->paddr; dir = OUT; } @@ -5310,8 +5638,7 @@ int q6asm_write(struct audio_client *ac, uint32_t len, uint32_t msw_ts, write.flags = (0x00000000 | (flags & 0x800000FF)); else write.flags = (0x80000000 | flags); - port->dsp_buf = q6asm_get_next_buf(port->dsp_buf, - port->max_buf_cnt); + port->dsp_buf = (port->dsp_buf + 1) & (port->max_buf_cnt - 1); buf_node = list_first_entry(&ac->port[IN].mem_map_handle, struct asm_buffer_node, list); @@ -5388,8 +5715,7 @@ int q6asm_write_nolock(struct audio_client *ac, uint32_t len, uint32_t msw_ts, write.flags = (0x00000000 | (flags & 0x800000FF)); else write.flags = (0x80000000 | flags); - port->dsp_buf = q6asm_get_next_buf(port->dsp_buf, - port->max_buf_cnt); + port->dsp_buf = (port->dsp_buf + 1) & (port->max_buf_cnt - 1); dev_vdbg(ac->dev, "%s: ab->phys[%pK]bufadd[0x%x]token[0x%x] buf_id[0x%x]buf_size[0x%x]mmaphdl[0x%x]" , __func__, @@ -6050,6 +6376,98 @@ int q6asm_get_asm_topology(void) return topology; } +static int q6asm_send_asm_cal(struct audio_client *ac) +{ + struct cal_block_data *cal_block = NULL; + struct apr_hdr hdr; + char *asm_params = NULL; + struct asm_stream_cmd_set_pp_params_v2 payload_params; + int sz, rc = -EINVAL; + + pr_debug("%s:\n", __func__); + + if (!ac) { + pr_err("%s: APR handle NULL\n", __func__); + return -EINVAL; + } + if (ac->apr == NULL) { + pr_err("%s: AC APR handle NULL\n", __func__); + return -EINVAL; + } + + if (cal_data[ASM_AUDSTRM_CAL] == NULL) + goto done; + + if (ac->perf_mode == ULTRA_LOW_LATENCY_PCM_MODE) + goto done; + + sz = sizeof(struct apr_hdr) + + sizeof(struct asm_stream_cmd_set_pp_params_v2); + asm_params = kzalloc(sz, GFP_KERNEL); + if (!asm_params) { + pr_err("%s, asm params memory alloc failed", __func__); + return -ENOMEM; + } + mutex_lock(&cal_data[ASM_AUDSTRM_CAL]->lock); + cal_block = cal_utils_get_only_cal_block(cal_data[ASM_AUDSTRM_CAL]); + if (cal_block == NULL) + goto unlock; + + rc = remap_cal_data(ASM_AUDSTRM_CAL_TYPE, cal_block); + if (rc) { + pr_err("%s: Remap_cal_data failed for cal %d!\n", + __func__, ASM_AUDSTRM_CAL); + goto unlock; + } + q6asm_add_hdr_async(ac, &hdr, (sizeof(struct apr_hdr) + + sizeof(struct asm_stream_cmd_set_pp_params_v2)), TRUE); + + atomic_set(&ac->cmd_state, 1); + hdr.opcode = ASM_STREAM_CMD_SET_PP_PARAMS_V2; + payload_params.data_payload_addr_lsw = + lower_32_bits(cal_block->cal_data.paddr); + payload_params.data_payload_addr_msw = + upper_32_bits(cal_block->cal_data.paddr); + payload_params.mem_map_handle = cal_block->map_data.q6map_handle; + payload_params.data_payload_size = cal_block->cal_data.size; + memcpy(((u8 *)asm_params), &hdr, sizeof(struct apr_hdr)); + memcpy(((u8 *)asm_params + sizeof(struct apr_hdr)), &payload_params, + sizeof(struct asm_stream_cmd_set_pp_params_v2)); + + pr_debug("%s: phyaddr lsw = %x msw = %x, maphdl = %x calsize = %d\n", + __func__, payload_params.data_payload_addr_lsw, + payload_params.data_payload_addr_msw, + payload_params.mem_map_handle, + payload_params.data_payload_size); + + rc = apr_send_pkt(ac->apr, (uint32_t *) asm_params); + if (rc < 0) { + pr_err("%s: audio audstrm cal send failed\n", __func__); + rc = -EINVAL; + goto unlock; + } + rc = wait_event_timeout(ac->cmd_wait, + (atomic_read(&ac->cmd_state) <= 0), 5 * HZ); + if (!rc) { + pr_err("%s: timeout, audio audstrm cal send\n", __func__); + rc = -ETIMEDOUT; + goto unlock; + } + if (atomic_read(&ac->cmd_state) < 0) { + pr_err("%s: DSP returned error[%d] audio audstrm cal send\n", + __func__, atomic_read(&ac->cmd_state)); + rc = -EINVAL; + goto unlock; + } + + rc = 0; + +unlock: + mutex_unlock(&cal_data[ASM_AUDSTRM_CAL]->lock); + kfree(asm_params); +done: + return rc; +} static int get_cal_type_index(int32_t cal_type) { @@ -6181,12 +6599,12 @@ static int q6asm_init_cal_data(void) {{ASM_CUST_TOPOLOGY_CAL_TYPE, {q6asm_alloc_cal, q6asm_dealloc_cal, NULL, q6asm_set_cal, NULL, NULL} }, - {NULL, NULL, cal_utils_match_buf_num} }, + {NULL, q6asm_unmap_cal_memory, cal_utils_match_buf_num} }, {{ASM_AUDSTRM_CAL_TYPE, {q6asm_alloc_cal, q6asm_dealloc_cal, NULL, q6asm_set_cal, NULL, NULL} }, - {NULL, NULL, cal_utils_match_buf_num} }, + {NULL, q6asm_unmap_cal_memory, cal_utils_match_buf_num} }, {{ASM_RTAC_APR_CAL_TYPE, {NULL, NULL, NULL, NULL, NULL, NULL} }, diff --git a/sound/soc/msm/qdsp6v2/q6voice.c b/sound/soc/msm/qdsp6v2/q6voice.c index 6d7512936c3..2d18067da63 100644 --- a/sound/soc/msm/qdsp6v2/q6voice.c +++ b/sound/soc/msm/qdsp6v2/q6voice.c @@ -3089,6 +3089,13 @@ static int remap_cal_data(struct cal_block_data *cal_block, int ret = 0; pr_debug("%s\n", __func__); + if (cal_block->map_data.ion_client == NULL) { + pr_err("%s: No ION allocation for session_id %d!\n", + __func__, session_id); + ret = -EINVAL; + goto done; + } + if ((cal_block->map_data.map_size > 0) && (cal_block->map_data.q6map_handle == 0)) { diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 3b3081808fb..550cba0a586 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -79,7 +79,8 @@ static int soc_compr_open(struct snd_compr_stream *cstream) static int soc_compr_open_fe(struct snd_compr_stream *cstream) { struct snd_soc_pcm_runtime *fe = cstream->private_data; - struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; + struct snd_pcm_substream *fe_substream = + fe->pcm->streams[cstream->direction].substream; struct snd_soc_platform *platform = fe->platform; struct snd_soc_dpcm *dpcm; struct snd_soc_dapm_widget_list *list; @@ -503,7 +504,8 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream, struct snd_compr_params *params) { struct snd_soc_pcm_runtime *fe = cstream->private_data; - struct snd_pcm_substream *fe_substream = fe->pcm->streams[0].substream; + struct snd_pcm_substream *fe_substream = + fe->pcm->streams[cstream->direction].substream; struct snd_soc_platform *platform = fe->platform; struct snd_soc_pcm_runtime *be_list[DPCM_MAX_BE_USERS]; struct snd_soc_dpcm *dpcm; @@ -796,17 +798,34 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) struct snd_pcm *be_pcm; char new_name[64]; int ret = 0, direction = 0; + int playback = 0, capture = 0; /* check client and interface hw capabilities */ snprintf(new_name, sizeof(new_name), "%s %s-%d", rtd->dai_link->stream_name, codec_dai->name, num); if (codec_dai->driver->playback.channels_min) + playback = 1; + if (codec_dai->driver->capture.channels_min) + capture = 1; + + capture = capture && cpu_dai->driver->capture.channels_min; + playback = playback && cpu_dai->driver->playback.channels_min; + + /* + * Compress devices are unidirectional so only one of the directions + * should be set, check for that (xor) + */ + if (playback + capture != 1) { + dev_err(rtd->card->dev, "Invalid direction for compress P %d, C %d\n", + playback, capture); + return -EINVAL; + } + + if (playback) direction = SND_COMPRESS_PLAYBACK; - else if (codec_dai->driver->capture.channels_min) - direction = SND_COMPRESS_CAPTURE; else - return -EINVAL; + direction = SND_COMPRESS_CAPTURE; compr = kzalloc(sizeof(*compr), GFP_KERNEL); if (compr == NULL) { @@ -826,8 +845,12 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); - ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, - 1, 0, &be_pcm); + if (direction == SND_COMPRESS_PLAYBACK) + ret = snd_pcm_new_internal(rtd->card->snd_card, + new_name, num, 1, 0, &be_pcm); + else if (direction == SND_COMPRESS_CAPTURE) + ret = snd_pcm_new_internal(rtd->card->snd_card, + new_name, num, 0, 1, &be_pcm); if (ret < 0) { dev_err(rtd->card->dev, "ASoC: can't create compressed for %s\n", rtd->dai_link->name); @@ -836,10 +859,12 @@ int soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->pcm = be_pcm; rtd->fe_compr = 1; - be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK]. + if (direction == SND_COMPRESS_PLAYBACK) + be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK]. + substream->private_data = rtd; + if (direction == SND_COMPRESS_CAPTURE) + be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE]. substream->private_data = rtd; - /*be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE]. - substream->private_data = rtd;*/ memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); } else