Re: [PATCH V2 2/5] KVM: Add tlb remote flush callback in kvm_x86_ops.
On 09/07/2018 11:02, Tianyu Lan wrote: > + > + /* > + * Call kvm_arch_hv_tlb_remote first and go back old way when > + * return failure. > + */ Please call it "kvm_arch_flush_remote_tlbs", since Hyper-V should not be mentioned in the generic code. Paolo ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 3/5] KVM/VMX: Add identical ept table pointer check
On 09/07/2018 11:02, Tianyu Lan wrote: > +static void check_ept_pointer(struct kvm_vcpu *vcpu, u64 eptp) > +{ > + struct kvm *kvm = vcpu->kvm; > + u64 tmp_eptp = INVALID_PAGE; > + int i; > + > + if (!kvm_x86_ops->tlb_remote_flush) > + return; > + > + spin_lock(&to_kvm_vmx(kvm)->ept_pointer_lock); > + to_vmx(vcpu)->ept_pointer = eptp; > + > + kvm_for_each_vcpu(i, vcpu, kvm) { > + if (!VALID_PAGE(tmp_eptp)) { > + tmp_eptp = to_vmx(vcpu)->ept_pointer; > + } else if (tmp_eptp != to_vmx(vcpu)->ept_pointer) { > + to_kvm_vmx(kvm)->ept_pointers_match = false; > + spin_unlock(&to_kvm_vmx(kvm)->ept_pointer_lock); > + return; > + } > + } > + > + to_kvm_vmx(kvm)->ept_pointers_match = true; > + spin_unlock(&to_kvm_vmx(kvm)->ept_pointer_lock); > +} > + Is there any reason to do the check here, rather than the first time the TLB flush is invoked? You could: - have a tristate (true, false, check) value for ept_pointers_match - reset it to "check" in vmx_set_cr3 - set it to either true or false in tlb_remote_flush if it is check, and do the hypercall if it is true. Paolo ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 2/5] KVM: Add tlb remote flush callback in kvm_x86_ops.
On 09/07/2018 11:02, Tianyu Lan wrote: > + /* > + * Call kvm_arch_hv_tlb_remote first and go back old way when > + * return failure. > + */ > + if (!kvm_arch_hv_flush_remote_tlb(kvm)) > + return; > + > /* >* Read tlbs_dirty before setting KVM_REQ_TLB_FLUSH in >* kvm_make_all_cpus_request. >*/ > - long dirty_count = smp_load_acquire(&kvm->tlbs_dirty); > + dirty_count = smp_load_acquire(&kvm->tlbs_dirty); Also, the call to kvm_arch_flush_remote_tlbs should not replace the whole function. It should be something like: long dirty_count = smp_load_acquire(&kvm->tlbs_dirty); /* * We want to publish modifications to the page tables before reading * mode. Pairs with a memory barrier in arch-specific code. * - x86: smp_mb__after_srcu_read_unlock in vcpu_enter_guest * and smp_mb in walk_shadow_page_lockless_begin/end. * - powerpc: smp_mb in kvmppc_prepare_to_enter. * * There is already an smp_mb__after_atomic() before * kvm_make_all_cpus_request() reads vcpu->mode. We reuse that * barrier here. */ if (!kvm_arch_hv_flush_remote_tlb(kvm) || kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) ++kvm->stat.remote_tlb_flush; cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); Otherwise, kvm_mmu_notifier_invalidate_range_start will incorrectly skip a TLB flush. Thanks, Paolo ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 3/5] KVM/VMX: Add identical ept table pointer check
On 7/18/2018 7:59 PM, Paolo Bonzini wrote: > On 09/07/2018 11:02, Tianyu Lan wrote: >> +static void check_ept_pointer(struct kvm_vcpu *vcpu, u64 eptp) >> +{ >> +struct kvm *kvm = vcpu->kvm; >> +u64 tmp_eptp = INVALID_PAGE; >> +int i; >> + >> +if (!kvm_x86_ops->tlb_remote_flush) >> +return; >> + >> +spin_lock(&to_kvm_vmx(kvm)->ept_pointer_lock); >> +to_vmx(vcpu)->ept_pointer = eptp; >> + >> +kvm_for_each_vcpu(i, vcpu, kvm) { >> +if (!VALID_PAGE(tmp_eptp)) { >> +tmp_eptp = to_vmx(vcpu)->ept_pointer; >> +} else if (tmp_eptp != to_vmx(vcpu)->ept_pointer) { >> +to_kvm_vmx(kvm)->ept_pointers_match = false; >> +spin_unlock(&to_kvm_vmx(kvm)->ept_pointer_lock); >> +return; >> +} >> +} >> + >> +to_kvm_vmx(kvm)->ept_pointers_match = true; >> +spin_unlock(&to_kvm_vmx(kvm)->ept_pointer_lock); >> +} >> + > > Is there any reason to do the check here, rather than the first time the > TLB flush is invoked? You could: > > - have a tristate (true, false, check) value for ept_pointers_match > > - reset it to "check" in vmx_set_cr3 > > - set it to either true or false in tlb_remote_flush if it is check, and > do the hypercall if it is true. > Thanks for your suggestion. Will update. > Paolo > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 2/5] KVM: Add tlb remote flush callback in kvm_x86_ops.
Hi Paolo: Thanks for review. On 7/18/2018 8:01 PM, Paolo Bonzini wrote: > On 09/07/2018 11:02, Tianyu Lan wrote: >> +/* >> + * Call kvm_arch_hv_tlb_remote first and go back old way when >> + * return failure. >> + */ >> +if (!kvm_arch_hv_flush_remote_tlb(kvm)) >> +return; >> + >> /* >> * Read tlbs_dirty before setting KVM_REQ_TLB_FLUSH in >> * kvm_make_all_cpus_request. >> */ >> -long dirty_count = smp_load_acquire(&kvm->tlbs_dirty); >> +dirty_count = smp_load_acquire(&kvm->tlbs_dirty); > > Also, the call to kvm_arch_flush_remote_tlbs should not replace the > whole function. It should be something like: > > long dirty_count = smp_load_acquire(&kvm->tlbs_dirty); > > /* > * We want to publish modifications to the page tables before reading > * mode. Pairs with a memory barrier in arch-specific code. > * - x86: smp_mb__after_srcu_read_unlock in vcpu_enter_guest > * and smp_mb in walk_shadow_page_lockless_begin/end. > * - powerpc: smp_mb in kvmppc_prepare_to_enter. > * > * There is already an smp_mb__after_atomic() before > * kvm_make_all_cpus_request() reads vcpu->mode. We reuse that > * barrier here. > */ > if (!kvm_arch_hv_flush_remote_tlb(kvm) || > kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH)) > ++kvm->stat.remote_tlb_flush; > cmpxchg(&kvm->tlbs_dirty, dirty_count, 0); > > Otherwise, kvm_mmu_notifier_invalidate_range_start will incorrectly skip > a TLB flush. Nice catch. Will update in the next version. > > Thanks, > > Paolo > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
On Wed, Jul 18, 2018 at 5:49 AM, Baoquan He wrote: > reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c > and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c > so that it's shared. Some minor stuff. > +/** > + * reparent_resources - reparent resource children of parent that res covers > + * @parent: parent resource descriptor > + * @res: resource descriptor desired by caller > + * > + * Returns 0 on success, -ENOTSUPP if child resource is not completely > + * contained by 'res', -ECANCELED if no any conflicting entry found. 'res' -> @res > + * > + * Reparent resource children of 'parent' that conflict with 'res' Ditto + 'parent' -> @parent > + * under 'res', and make 'res' replace those children. Ditto. > + */ > +int reparent_resources(struct resource *parent, struct resource *res) > +{ > + struct resource *p, **pp; > + struct resource **firstpp = NULL; > + > + for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) { > + if (p->end < res->start) > + continue; > + if (res->end < p->start) > + break; > + if (p->start < res->start || p->end > res->end) > + return -ENOTSUPP; /* not completely contained */ > + if (firstpp == NULL) > + firstpp = pp; > + } > + if (firstpp == NULL) > + return -ECANCELED; /* didn't find any conflicting entries? */ > + res->parent = parent; > + res->child = *firstpp; > + res->sibling = *pp; > + *firstpp = res; > + *pp = NULL; > + for (p = res->child; p != NULL; p = p->sibling) { > + p->parent = res; > + pr_debug("PCI: Reparented %s %pR under %s\n", > +p->name, p, res->name); Now, PCI is a bit confusing here. > + } > + return 0; > +} > +EXPORT_SYMBOL(reparent_resources); > + > static void __init __reserve_region_with_split(struct resource *root, > resource_size_t start, resource_size_t end, > const char *name) > -- > 2.13.6 > -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
On Wed, Jul 18, 2018 at 7:36 PM, Andy Shevchenko wrote: > On Wed, Jul 18, 2018 at 5:49 AM, Baoquan He wrote: >> reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c >> and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c >> so that it's shared. >> + * Returns 0 on success, -ENOTSUPP if child resource is not completely >> + * contained by 'res', -ECANCELED if no any conflicting entry found. You also can refer to constants by prefixing them with %, e.g. %-ENOTSUPP. But this is up to you completely. -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH net,v2] hv_netvsc: Fix napi reschedule while receive completion is busy
From: Haiyang Zhang Date: Tue, 17 Jul 2018 17:11:13 + > From: Haiyang Zhang > > If out ring is full temporarily and receive completion cannot go out, > we may still need to reschedule napi if certain conditions are met. > Otherwise the napi poll might be stopped forever, and cause network > disconnect. > > Fixes: 7426b1a51803 ("netvsc: optimize receive completions") > Signed-off-by: Stephen Hemminger > Signed-off-by: Haiyang Zhang Applied and queued up for -stable. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required
On Wed, 18 Jul 2018 10:49:44 +0800 Baoquan He wrote: > For kexec_file loading, if kexec_buf.top_down is 'true', the memory which > is used to load kernel/initrd/purgatory is supposed to be allocated from > top to down. This is what we have been doing all along in the old kexec > loading interface and the kexec loading is still default setting in some > distributions. However, the current kexec_file loading interface doesn't > do like this. The function arch_kexec_walk_mem() it calls ignores checking > kexec_buf.top_down, but calls walk_system_ram_res() directly to go through > all resources of System RAM from bottom to up, to try to find memory region > which can contain the specific kexec buffer, then call > locate_mem_hole_callback() > to allocate memory in that found memory region from top to down. This brings > confusion especially when KASLR is widely supported , users have to make clear > why kexec/kdump kernel loading position is different between these two > interfaces in order to exclude unnecessary noises. Hence these two interfaces > need be unified on behaviour. As far as I can tell, the above is the whole reason for the patchset, yes? To avoid confusing users. Is that sufficient? Can we instead simplify their lives by providing better documentation or informative printks or better Kconfig text, etc? And who *are* the people who are performing this configuration? Random system administrators? Linux distro engineers? If the latter then they presumably aren't easily confused! In other words, I'm trying to understand how much benefit this patchset will provide to our users as a whole. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 1/2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl
> -Original Message- > From: Roy Pledge > Sent: Monday, July 9, 2018 10:24 AM > To: Laurentiu Tudor ; > de...@driverdev.osuosl.org; linux-arm-ker...@lists.infradead.org; > gre...@linuxfoundation.org; Leo Li > Cc: Ioana Ciocoi Radulescu ; Horia Geanta > ; linux-ker...@vger.kernel.org; a...@arndb.de; > catalin.mari...@arm.com; robin.mur...@arm.com > Subject: Re: [PATCH 1/2] staging:fsl-mc: Move DPIO from staging to > drivers/soc/fsl > > On 7/9/2018 6:37 AM, Laurentiu Tudor wrote: > > Hi Roy, > > > > Couple of comments inline. > > > > On 05.07.2018 22:41, Roy Pledge wrote: > >> Move the NXP DPIO (Datapath I/O Driver) out of the drivers/staging > >> directory and into the drivers/soc/fsl directory. > >> > >> The DPIO driver enables access to Queue and Buffer Manager (QBMAN) > >> hardware on NXP DPAA2 devices. This is a prerequisite to moving the > >> DPAA2 Ethernet driver out of staging. > >> > >> Signed-off-by: Roy Pledge > >> --- > >> MAINTAINERS| 2 +- > >> drivers/crypto/caam/sg_sw_qm2.h| 2 +- > >> drivers/crypto/caam/sg_sw_sec4.h | 2 +- > >> drivers/soc/fsl/Kconfig| 10 > >> ++ > >> drivers/soc/fsl/Makefile | 1 + > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile | 0 > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h| 0 > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c | 2 +- > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt | 0 > > Maybe this should be converted to .rst and go in the already existing > > Documentation/networking/dpaa2/? > > I can look into converting this to RST but I'm not sure it belongs in the > networking documentation folder since it will be used by other non > networking drivers in the near future - compress/decompress for example. > > > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c| 2 +- > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c| 0 > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h| 0 > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c| 2 +- > >> drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h| 2 +- > >> drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 4 ++-- > >> drivers/staging/fsl-mc/bus/Kconfig | 9 > >> - > >> drivers/staging/fsl-mc/bus/Makefile| 2 -- > >> {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h | 0 > >> .../staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h | 0 > >> {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h | 0 > >> 20 files changed, 20 insertions(+), 20 deletions(-) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt > (100%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c > (99%) > >> rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h > (99%) > >> rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h > (100%) > >> rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2- > global.h (100%) > >> rename {drivers/staging/fsl-mc/include => > >> include/soc/fsl}/dpaa2-io.h (100%) > > I received feedback in the past on mc-bus that a driver should limit > > to only one public header and one private one. Would it make sense to > > do the same for dpio too? > Looking at this the dpaa-2global.h file should probably be integrated into the > dpaa2-io.h file. > The dpaaa2-fd.h can be used by devices that don't need to used DPIO - the > definition of a frame descriptor isn't DPIO specific so I would argue it > should > be kept in a seperate file. Hi Roy, Will there be a re-spin of the patch soon so that we can probably catch the next merge window? Regards, Leo ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH resend] staging: gasket: remove X86 Kconfig restriction
Hi Todd, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on next-20180718] [cannot apply to v4.18-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Todd-Poynor/staging-gasket-remove-X86-Kconfig-restriction/20180716-031056 config: xtensa-allmodconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 8.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=8.1.0 make.cross ARCH=xtensa All errors (new ones prefixed by >>): In file included from drivers/staging/gasket/gasket_page_table.h:19, from drivers/staging/gasket/gasket_page_table.c:34: drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >> function 'readq'; did you mean 'readl'? >> [-Werror=implicit-function-declaration] return readq(&gasket_dev->bar_data[bar].virt_base[location]); ^ readl drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >> function 'writeq'; did you mean 'writel'? >> [-Werror=implicit-function-declaration] writeq(value, &dev->bar_data[bar].virt_base[location]); ^~ writel drivers/staging/gasket/gasket_page_table.c: In function 'gasket_is_extended_dev_addr_bad': drivers/staging/gasket/gasket_page_table.c:1373:11: warning: right shift count >= width of type [-Wshift-count-overflow] if (addr >> (GASKET_EXTENDED_LVL0_WIDTH + GASKET_EXTENDED_LVL0_SHIFT)) { ^~ drivers/staging/gasket/gasket_page_table.c: In function 'gasket_alloc_coherent_memory': drivers/staging/gasket/gasket_page_table.c:1679:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u64)mem + j * PAGE_SIZE; ^ cc1: some warnings being treated as errors -- In file included from drivers/staging/gasket/gasket_sysfs.h:21, from drivers/staging/gasket/gasket_sysfs.c:3: drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >> function 'readq'; did you mean 'readl'? >> [-Werror=implicit-function-declaration] return readq(&gasket_dev->bar_data[bar].virt_base[location]); ^ readl drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >> function 'writeq'; did you mean 'writel'? >> [-Werror=implicit-function-declaration] writeq(value, &dev->bar_data[bar].virt_base[location]); ^~ writel cc1: some warnings being treated as errors -- In file included from drivers/staging/gasket/gasket_ioctl.h:6, from drivers/staging/gasket/gasket_ioctl.c:4: drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >> function 'readq'; did you mean 'readl'? >> [-Werror=implicit-function-declaration] return readq(&gasket_dev->bar_data[bar].virt_base[location]); ^ readl drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >> function 'writeq'; did you mean 'writel'? >> [-Werror=implicit-function-declaration] writeq(value, &dev->bar_data[bar].virt_base[location]); ^~ writel drivers/staging/gasket/gasket_ioctl.c: In function 'gasket_config_coherent_allocator': >> drivers/staging/gasket/gasket_ioctl.c:434:27: error: passing argument 3 of >> 'gasket_alloc_coherent_memory' from incompatible pointer type >> [-Werror=incompatible-pointer-types] gasket_dev, ibuf.size, &ibuf.dma_address, ^ In file included from drivers/staging/gasket/gasket_ioctl.c:9: drivers/staging/gasket/gasket_page_table.h:227:18: note: expected 'dma_addr_t *' {aka 'unsigned int *'} but argument is of type 'u64 *' {aka 'long long unsigned int *'} dma_addr_t *dma_add
[RFC PATCH v3] Xilinx AXI-Stream FIFO v4.1 IP core driver
I hope I did the Makefile/Kconfig corretly :) Thanks for all the feedback. Cheers, Jacob This IP core has read and write AXI-Stream FIFOs, the contents of which can be accessed from the AXI4 memory-mapped interface. This is useful for transferring data from a processor into the FPGA fabric. The driver creates a character device that can be read/written to with standard open/read/write/close. See Xilinx PG080 document for IP details. https://www.xilinx.com/support/documentation/ip_documentation/axi_fifo_mm_s/v4_1/pg080-axi-fifo-mm-s.pdf The driver currently supports only store-forward mode with a 32-bit AXI4 Lite interface. DOES NOT support: - cut-through mode - AXI4 (non-lite) Signed-off-by: Jacob Feder --- drivers/staging/axisfifo/Kconfig |9 + drivers/staging/axisfifo/Makefile |1 + drivers/staging/axisfifo/axis-fifo.c | 1125 + drivers/staging/axisfifo/axisfifo.txt | 89 +++ 4 files changed, 1224 insertions(+) create mode 100644 drivers/staging/axisfifo/Kconfig create mode 100644 drivers/staging/axisfifo/Makefile create mode 100644 drivers/staging/axisfifo/axis-fifo.c create mode 100644 drivers/staging/axisfifo/axisfifo.txt diff --git a/drivers/staging/axisfifo/Kconfig b/drivers/staging/axisfifo/Kconfig new file mode 100644 index 000..5ad68bf --- /dev/null +++ b/drivers/staging/axisfifo/Kconfig @@ -0,0 +1,9 @@ +# +# "Xilinx AXI-Stream FIFO IP core driver" +# +config XIL_AXISFIFO + tristate "Xilinx AXI-Stream FIFO IP core driver" + default n + help + This adds support for the Xilinx AXI-Stream + FIFO IP core driver. \ No newline at end of file diff --git a/drivers/staging/axisfifo/Makefile b/drivers/staging/axisfifo/Makefile new file mode 100644 index 000..bab1770 --- /dev/null +++ b/drivers/staging/axisfifo/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_XIL_AXISFIFO) := axis-fifo.o diff --git a/drivers/staging/axisfifo/axis-fifo.c b/drivers/staging/axisfifo/axis-fifo.c new file mode 100644 index 000..9cd203f --- /dev/null +++ b/drivers/staging/axisfifo/axis-fifo.c @@ -0,0 +1,1125 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Xilinx AXIS FIFO: interface to the Xilinx AXI-Stream FIFO IP core + * + * Copyright (C) 2018 Jacob Feder + * + * Authors: Jacob Feder + * + * See Xilinx PG080 document for IP details + */ + +/* + * includes + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/* + * driver parameters + * + */ + +#define DRIVER_NAME "axis_fifo" + +#define READ_BUF_SIZE 128 /* read buffer length in words */ +#define WRITE_BUF_SIZE 128 /* write buffer length in words */ + +/* + * IP register offsets + * + */ + +#define XLLF_ISR_OFFSET 0x /* Interrupt Status */ +#define XLLF_IER_OFFSET 0x0004 /* Interrupt Enable */ + +#define XLLF_TDFR_OFFSET 0x0008 /* Transmit Reset */ +#define XLLF_TDFV_OFFSET 0x000c /* Transmit Vacancy */ +#define XLLF_TDFD_OFFSET 0x0010 /* Transmit Data */ +#define XLLF_TLR_OFFSET 0x0014 /* Transmit Length */ + +#define XLLF_RDFR_OFFSET 0x0018 /* Receive Reset */ +#define XLLF_RDFO_OFFSET 0x001c /* Receive Occupancy */ +#define XLLF_RDFD_OFFSET 0x0020 /* Receive Data */ +#define XLLF_RLR_OFFSET 0x0024 /* Receive Length */ +#define XLLF_SRR_OFFSET 0x0028 /* Local Link Reset */ +#define XLLF_TDR_OFFSET 0x002C /* Transmit Destination */ +#define XLLF_RDR_OFFSET 0x0030 /* Receive Destination */ + +/* + * reset register masks + * + */ + +#define XLLF_RDFR_RESET_MASK0x00a5 /* receive reset value */ +#define XLLF_TDFR_RESET_MASK0x00a5 /* Transmit reset value */ +#define XLLF_SRR_RESET_MASK 0x00a5 /* Local Link reset value */ + +/* + * interrupt masks + * + */ + +#define XLLF_INT_RPURE_MASK 0x8000 /* Receive under-read */ +#define XLLF_INT_RPORE_MASK 0x4000 /* Receive over-read */ +#define XLLF_INT_RPUE_MASK0x2000 /* Receive underrun (empty) */ +#define XLLF_INT_TPOE_MASK0x1000 /* Transmit overrun */ +#define XLLF_INT_TC_MASK 0x0800 /* Transmit complete */ +#define XLLF_INT_RC_MASK 0x0400 /* Receive complete */ +#define XLLF_INT_TSE_MASK 0x0200 /* Transmit length mismatch */ +#define XLLF_INT_TRC_MASK 0x0100 /* Transmit reset complete */ +#define XLLF_INT_RRC_MASK 0x0080 /* Receive reset complete */ +#define XLLF_INT_TFPF_MASK0x0040 /*
Re: [PATCH resend] staging: gasket: remove X86 Kconfig restriction
On Wed, Jul 18, 2018 at 6:18 PM, kbuild test robot wrote: > Hi Todd, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on staging/staging-testing] > [also build test ERROR on next-20180718] > [cannot apply to v4.18-rc5] > [if your patch is applied to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Todd-Poynor/staging-gasket-remove-X86-Kconfig-restriction/20180716-031056 > config: xtensa-allmodconfig (attached as .config) > compiler: xtensa-linux-gcc (GCC) 8.1.0 > reproduce: > wget > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O > ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=8.1.0 make.cross ARCH=xtensa > > All errors (new ones prefixed by >>): > >In file included from drivers/staging/gasket/gasket_page_table.h:19, > from drivers/staging/gasket/gasket_page_table.c:34: >drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >>> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >>> function 'readq'; did you mean 'readl'? >>> [-Werror=implicit-function-declaration] Will respin this patch to explicitly list X86_64 and ARM64 as the only architectures to build for now, and fixup some of these other issues soon. > return readq(&gasket_dev->bar_data[bar].virt_base[location]); > ^ > readl >drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >>> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >>> function 'writeq'; did you mean 'writel'? >>> [-Werror=implicit-function-declaration] > writeq(value, &dev->bar_data[bar].virt_base[location]); > ^~ > writel >drivers/staging/gasket/gasket_page_table.c: In function > 'gasket_is_extended_dev_addr_bad': >drivers/staging/gasket/gasket_page_table.c:1373:11: warning: right shift > count >= width of type [-Wshift-count-overflow] > if (addr >> (GASKET_EXTENDED_LVL0_WIDTH + GASKET_EXTENDED_LVL0_SHIFT)) { > ^~ >drivers/staging/gasket/gasket_page_table.c: In function > 'gasket_alloc_coherent_memory': >drivers/staging/gasket/gasket_page_table.c:1679:4: warning: cast from > pointer to integer of different size [-Wpointer-to-int-cast] >(u64)mem + j * PAGE_SIZE; >^ >cc1: some warnings being treated as errors > -- >In file included from drivers/staging/gasket/gasket_sysfs.h:21, > from drivers/staging/gasket/gasket_sysfs.c:3: >drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >>> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >>> function 'readq'; did you mean 'readl'? >>> [-Werror=implicit-function-declaration] > return readq(&gasket_dev->bar_data[bar].virt_base[location]); > ^ > readl >drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >>> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >>> function 'writeq'; did you mean 'writel'? >>> [-Werror=implicit-function-declaration] > writeq(value, &dev->bar_data[bar].virt_base[location]); > ^~ > writel >cc1: some warnings being treated as errors > -- >In file included from drivers/staging/gasket/gasket_ioctl.h:6, > from drivers/staging/gasket/gasket_ioctl.c:4: >drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >>> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >>> function 'readq'; did you mean 'readl'? >>> [-Werror=implicit-function-declaration] > return readq(&gasket_dev->bar_data[bar].virt_base[location]); > ^ > readl >drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >>> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >>> function 'writeq'; did you mean 'writel'? >>> [-Werror=implicit-function-declaration] > writeq(value, &dev->bar_data[bar].virt_base[location]); > ^~ > writel >drivers/staging/gasket/gasket_ioctl.c: In function > 'gasket_config_coherent_alloc
Re: [PATCH 01/32] staging: gasket: remove X86 Kconfig restriction
Hi Todd, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on next-20180718] [cannot apply to v4.18-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Todd-Poynor/staging-gasket-sundry-fixes-and-fixups/20180717-101844 config: arm-allyesconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=arm All errors (new ones prefixed by >>): In file included from drivers/staging/gasket/gasket_core.c:9:0: drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >> function 'readq'; did you mean 'readb'? >> [-Werror=implicit-function-declaration] return readq(&gasket_dev->bar_data[bar].virt_base[location]); ^ readb drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >> function 'writeq'; did you mean 'writeb'? >> [-Werror=implicit-function-declaration] writeq(value, &dev->bar_data[bar].virt_base[location]); ^~ writeb cc1: some warnings being treated as errors -- In file included from drivers/staging/gasket/gasket_ioctl.h:6:0, from drivers/staging/gasket/gasket_ioctl.c:4: drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >> function 'readq'; did you mean 'readb'? >> [-Werror=implicit-function-declaration] return readq(&gasket_dev->bar_data[bar].virt_base[location]); ^ readb drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >> function 'writeq'; did you mean 'writeb'? >> [-Werror=implicit-function-declaration] writeq(value, &dev->bar_data[bar].virt_base[location]); ^~ writeb drivers/staging/gasket/gasket_ioctl.c: In function 'gasket_config_coherent_allocator': drivers/staging/gasket/gasket_ioctl.c:434:27: error: passing argument 3 of 'gasket_alloc_coherent_memory' from incompatible pointer type [-Werror=incompatible-pointer-types] gasket_dev, ibuf.size, &ibuf.dma_address, ^ In file included from drivers/staging/gasket/gasket_ioctl.c:9:0: drivers/staging/gasket/gasket_page_table.h:226:5: note: expected 'dma_addr_t * {aka unsigned int *}' but argument is of type 'u64 * {aka long long unsigned int *}' int gasket_alloc_coherent_memory(struct gasket_dev *gasket_dev, uint64_t size, ^~~~ cc1: some warnings being treated as errors -- In file included from drivers/staging/gasket/gasket_page_table.h:19:0, from drivers/staging/gasket/gasket_page_table.c:34: drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_read_64': >> drivers/staging/gasket/gasket_core.h:651:9: error: implicit declaration of >> function 'readq'; did you mean 'readb'? >> [-Werror=implicit-function-declaration] return readq(&gasket_dev->bar_data[bar].virt_base[location]); ^ readb drivers/staging/gasket/gasket_core.h: In function 'gasket_dev_write_64': >> drivers/staging/gasket/gasket_core.h:657:2: error: implicit declaration of >> function 'writeq'; did you mean 'writeb'? >> [-Werror=implicit-function-declaration] writeq(value, &dev->bar_data[bar].virt_base[location]); ^~ writeb drivers/staging/gasket/gasket_page_table.c: In function 'gasket_is_extended_dev_addr_bad': drivers/staging/gasket/gasket_page_table.c:1373:11: warning: right shift count >= width of type [-Wshift-count-overflow] if (addr >> (GASKET_EXTENDED_LVL0_WIDTH + GASKET_EXTENDED_LVL0_SHIFT)) { ^~ drivers/staging/gasket/gasket_page_table.c: In function 'gasket_alloc_coherent_memory': drivers/staging/gasket/gasket_page_table.c:1679:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] (u64)mem + j * PAGE_SIZE; ^ cc1: some warnings being t
[PATCH 02/23] staging: wilc1000: remove enum connect_status instead use ieee80211_statuscode
Cleanup patch to remove the use of enum 'connect_status' and instead use predefined 'ieee80211_statuscode' for error code values. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 4 +++- drivers/staging/wilc1000/coreconfigurator.h | 20 drivers/staging/wilc1000/host_interface.c | 6 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 0063895..a987953 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -1,4 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 +#include + #include "coreconfigurator.h" #define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \ @@ -316,7 +318,7 @@ s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len, u16 ies_len = 0; ret_conn_info->status = get_asoc_status(buffer); - if (ret_conn_info->status == SUCCESSFUL_STATUSCODE) { + if (ret_conn_info->status == WLAN_STATUS_SUCCESS) { ies = &buffer[CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN]; ies_len = buffer_len - (CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN); diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h index 55b5531..90d3d65 100644 --- a/drivers/staging/wilc1000/coreconfigurator.h +++ b/drivers/staging/wilc1000/coreconfigurator.h @@ -24,26 +24,6 @@ #define MAKE_WORD16(lsb, msb) u16)(msb) << 8) & 0xFF00) | (lsb)) #define MAKE_WORD32(lsw, msw) u32)(msw) << 16) & 0x) | (lsw)) -enum connect_status { - SUCCESSFUL_STATUSCODE= 0, - UNSPEC_FAIL = 1, - UNSUP_CAP= 10, - REASOC_NO_ASOC = 11, - FAIL_OTHER = 12, - UNSUPT_ALG = 13, - AUTH_SEQ_FAIL= 14, - CHLNG_FAIL = 15, - AUTH_TIMEOUT = 16, - AP_FULL = 17, - UNSUP_RATE = 18, - SHORT_PREAMBLE_UNSUP = 19, - PBCC_UNSUP = 20, - CHANNEL_AGIL_UNSUP = 21, - SHORT_SLOT_UNSUP = 25, - OFDM_DSSS_UNSUP = 26, - CONNECT_STS_FORCE_16_BIT = 0x -}; - struct rssi_history_buffer { bool full; u8 index; diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 918d06e..9b5bf3c 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1336,7 +1336,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif, } if (mac_status == MAC_STATUS_CONNECTED && - conn_info.status != SUCCESSFUL_STATUSCODE) { + conn_info.status != WLAN_STATUS_SUCCESS) { netdev_err(vif->ndev, "Received MAC status is MAC_STATUS_CONNECTED while the received status code in Asoc Resp is not SUCCESSFUL_STATUSCODE\n"); eth_zero_addr(wilc_connected_ssid); @@ -1349,7 +1349,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif, memcpy(conn_info.bssid, hif_drv->usr_conn_req.bssid, 6); if (mac_status == MAC_STATUS_CONNECTED && - conn_info.status == SUCCESSFUL_STATUSCODE) { + conn_info.status == WLAN_STATUS_SUCCESS) { memcpy(hif_drv->assoc_bssid, hif_drv->usr_conn_req.bssid, ETH_ALEN); } @@ -1369,7 +1369,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif, hif_drv->usr_conn_req.arg); if (mac_status == MAC_STATUS_CONNECTED && - conn_info.status == SUCCESSFUL_STATUSCODE) { + conn_info.status == WLAN_STATUS_SUCCESS) { wilc_set_power_mgmt(vif, 0, 0); hif_drv->hif_state = HOST_IF_CONNECTED; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e96163f..f90b9b6 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -489,7 +489,7 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt, connect_status = conn_info->status; if (mac_status == MAC_STATUS_DISCONNECTED && - conn_info->status == SUCCESSFUL_STATUSCODE) { + conn_info->status == WLAN_STATUS_SUCCESS) { connect_status = WLAN_STATUS_UNSPECIFIED_FAILURE; wilc_wlan_set_bssid(priv->dev, null_bssid, STATION_MODE); -- 2.7.4
[PATCH 01/23] staging: wilc1000: remove unused enum declaration
Cleanup patch to remove unused enums. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 8 drivers/staging/wilc1000/host_interface.h | 6 -- drivers/staging/wilc1000/wilc_wlan_if.h | 26 -- 3 files changed, 40 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 4481602..0063895 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -4,14 +4,6 @@ #define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \ BEACON_INTERVAL_LEN + CAP_INFO_LEN) -enum basic_frame_type { - FRAME_TYPE_CONTROL = 0x04, - FRAME_TYPE_DATA= 0x08, - FRAME_TYPE_MANAGEMENT = 0x00, - FRAME_TYPE_RESERVED= 0x0C, - FRAME_TYPE_FORCE_32BIT = 0x -}; - enum sub_frame_type { ASSOC_REQ = 0x00, ASSOC_RSP = 0x10, diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 0ea22ab..3cd97dd 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -252,12 +252,6 @@ struct reg_frame { u8 reg_id; }; -enum p2p_listen_state { - P2P_IDLE, - P2P_LISTEN, - P2P_GRP_FORMATION -}; - struct wilc; struct host_if_drv { struct user_scan_req usr_scan_req; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index e4a7bf5..85ac878 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -176,12 +176,6 @@ enum { }; enum { - DONT_RESET = 0, - DO_RESET= 1, - NO_REQUEST = 2, -}; - -enum { REKEY_DISABLE = 1, REKEY_TIME_BASE, REKEY_PKT_BASE, @@ -195,17 +189,6 @@ enum { }; enum { - PRI_HIGH_RSSI = 0x00, - PRI_LOW_RSSI= 0x04, - PRI_DETECT = 0x08 -}; - -enum { - CH_FILTER_OFF = 0x00, - CH_FILTER_ON= 0x10 -}; - -enum { AUTO_PROT = 0,/* Auto */ NO_PROT,/* Do not use any protection */ ERP_PROT, /* Protect all ERP frame exchanges */ @@ -244,15 +227,6 @@ enum { MIMO_MODE = 3,/* power save disable */ }; -enum { - DISABLE_SELF_CTS, - ENABLE_SELF_CTS, - DISABLE_TX_ABORT, - ENABLE_TX_ABORT, - HW_TRIGGER_ABORT, - SW_TRIGGER_ABORT, -}; - enum wid_type { WID_CHAR= 0, WID_SHORT = 1, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/23] staging: wilc1000: remove extra enum defined for data rates
Cleanup patch to remove extra enum defined to handle data rates. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 16 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 0019bb8..032afc2 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -378,7 +378,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, if (!wilc_wlan_cfg_set(vif, 0, WID_BSS_TYPE, c_val, 1, 0, 0)) goto fail; - c_val[0] = RATE_AUTO; + c_val[0] = AUTORATE; if (!wilc_wlan_cfg_set(vif, 0, WID_CURRENT_TX_RATE, c_val, 1, 0, 0)) goto fail; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 85ac878..b23f86c 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -88,22 +88,6 @@ enum bss_types { }; enum { - RATE_AUTO = 0, - RATE_1MB= 1, - RATE_2MB= 2, - RATE_5MB= 5, - RATE_6MB= 6, - RATE_9MB= 9, - RATE_11MB = 11, - RATE_12MB = 12, - RATE_18MB = 18, - RATE_24MB = 24, - RATE_26MB = 36, - RATE_48MB = 48, - RATE_54MB = 54 -}; - -enum { B_ONLY_MODE = 0,/* 1, 2 M, otherwise 5, 11 M */ G_ONLY_MODE,/* 6,12,24 otherwise 9,18,36,48,54 */ G_MIXED_11B_1_MODE, /* 1,2,5.5,11 otherwise all on */ -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/23] staging: wilc1000: remove extra enums defined for ieee80211_eid
Cleanup patch to make use of existing enum 'ieee80211_eid' instead of adding new enum in WILC for element ID's. The below mapping is same to remove extra enum in WILC. SUPP_RATES_IE -> WLAN_EID_SUPP_RATES EXT_SUPP_RATES_IE -> WLAN_EID_EXT_SUPP_RATES HT_CAPABILITY_IE-> WLAN_EID_HT_CAPABILITY RSN_IE -> WLAN_EID_RSN WPA_IE -> WLAN_EID_VENDOR_SPECIFIC WMM_IE -> WLAN_EID_VENDOR_SPECIFIC P2P_IE -> WLAN_EID_VENDOR_SPECIFIC Also remove enum 'info_element_id' as its same as 'ieee80211_eid', below the mapping of elements of enums which are used. ITIM -> WLAN_EID_TIM IDSPARMS -> WLAN_EID_DS_PARAMS Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 47 ++--- drivers/staging/wilc1000/host_interface.c | 19 ++-- drivers/staging/wilc1000/wilc_wlan_if.h | 10 -- 3 files changed, 12 insertions(+), 64 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index a987953..5933e4d 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -45,49 +45,6 @@ enum sub_frame_type { FRAME_SUBTYPE_FORCE_32BIT = 0x }; -enum info_element_id { - ISSID = 0, /* Service Set Identifier */ - ISUPRATES = 1, /* Supported Rates*/ - IFHPARMS= 2, /* FH parameter set */ - IDSPARMS= 3, /* DS parameter set */ - ICFPARMS= 4, /* CF parameter set */ - ITIM= 5, /* Traffic Information Map*/ - IIBPARMS= 6, /* IBSS parameter set */ - ICOUNTRY= 7, /* Country element*/ - IEDCAPARAMS = 12, /* EDCA parameter set */ - ITSPEC = 13, /* Traffic Specification */ - ITCLAS = 14, /* Traffic Classification */ - ISCHED = 15, /* Schedule */ - ICTEXT = 16, /* Challenge Text */ - IPOWERCONSTRAINT= 32, /* Power Constraint */ - IPOWERCAPABILITY= 33, /* Power Capability */ - ITPCREQUEST = 34, /* TPC Request*/ - ITPCREPORT = 35, /* TPC Report */ - ISUPCHANNEL = 36, /* Supported channel list */ - ICHSWANNOUNC= 37, /* Channel Switch Announcement*/ - IMEASUREMENTREQUEST = 38, /* Measurement request*/ - IMEASUREMENTREPORT = 39, /* Measurement report */ - IQUIET = 40, /* Quiet element Info */ - IIBSSDFS= 41, /* IBSS DFS */ - IERPINFO= 42, /* ERP Information*/ - ITSDELAY= 43, /* TS Delay */ - ITCLASPROCESS = 44, /* TCLAS Processing */ - IHTCAP = 45, /* HT Capabilities*/ - IQOSCAP = 46, /* QoS Capability */ - IRSNELEMENT = 48, /* RSN Information Element*/ - IEXSUPRATES = 50, /* Extended Supported Rates */ - IEXCHSWANNOUNC = 60, /* Extended Ch Switch Announcement*/ - IHTOPERATION= 61, /* HT Information */ - ISECCHOFF = 62, /* Secondary Channel Offeset */ - I2040COEX = 72, /* 20/40 Coexistence IE */ - I2040INTOLCHREPORT = 73, /* 20/40 Intolerant channel report*/ - IOBSSSCAN = 74, /* OBSS Scan parameters */ - IEXTCAP = 127, /* Extended capability*/ - IWMM= 221, /* WMM parameters */ - IWPAELEMENT = 221, /* WPA Information Element*/ - INFOELEM_ID_FORCE_32BIT = 0x -}; - static inline u16 get_beacon_period(u8 *data) { u16 bcn_per; @@ -216,7 +173,7 @@ static u8 *get_tim_elm(u8 *msa, u16 rx_len, u16 tag_param_offset) index = tag_param_offset; while (index < (rx_len - FCS_LEN)) { - if (msa[index] == ITIM) + if (msa[index] == WLAN_EID_TIM) return &msa[index]; index += (IE_HDR_LEN + msa[index + 1]); } @@ -230,7 +187,7 @@ static u8 get_current_channel_802_11n(u8 *msa, u16 rx_len) index = TAG_PARAM_OFFSET; while (index < (rx_len - FCS_LEN)) { - if (msa[index] == IDSPARMS) + if (msa[index] == WLAN_EID_DS_PARAMS) return msa[index + 2]; index += msa[index + 1] + IE_HDR_LEN; } diff
[PATCH 07/23] staging: wilc1000: rename enum SITESURVEY to use lowercase
Cleanup patch to have enum in lowercase as per linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/host_interface.h | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index cc64b14..a5c0ac5 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -635,7 +635,7 @@ static void handle_cfg_param(struct work_struct *work) i++; } if (param->flag & SITE_SURVEY) { - enum SITESURVEY enabled = param->site_survey_enabled; + enum site_survey enabled = param->site_survey_enabled; if (enabled < 3) { wid_list[i].id = WID_SITE_SURVEY; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 64fc269..7f3e48c 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -113,7 +113,7 @@ struct cfg_param_attr { u8 txop_prot_disabled; u16 beacon_interval; u16 dtim_period; - enum SITESURVEY site_survey_enabled; + enum site_survey site_survey_enabled; u16 site_survey_scan_time; u8 scan_source; u16 active_scan_time; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index af414d7..b82e149 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -138,7 +138,7 @@ enum AUTHTYPE { IEEE8021= 5 }; -enum SITESURVEY { +enum site_survey { SITE_SURVEY_1CH = 0, SITE_SURVEY_ALL_CH = 1, SITE_SURVEY_OFF = 2 -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 00/23] staging: wilc1000: cleanup patch to follow linux coding style
This patch series contains modification to follow Linux coding style & cleanup change to remove unused variables and enums. Few patches also contain changes to remove unnecessary typecast. Ajay Singh (23): staging: wilc1000: remove unused enum declaration staging: wilc1000: remove enum connect_status instead use ieee80211_statuscode staging: wilc1000: remove extra enum defined for data rates staging: wilc1000: remove extra enums defined for ieee80211_eid staging: wilc1000: rename goto to avoid leading '_' in label name staging: wilc1000: rename enum CURRENT_TXRATE to use lowercase staging: wilc1000: rename enum SITESURVEY to use lowercase staging: wilc1000: rename enum AUTHTYPE to use lowercase staging: wilc1000: remove unused elements in 'wilc' struct staging: wilc1000: remove unnecessary elements from 'wilc_priv' struct staging: wilc1000: removed unused element from wilc_cfg_frame struct staging: wilc1000: remove the mutliple #define used for same macro staging: wilc1000: use lowercase for 'IFC_UP' struct element name staging: wilc1000: remove unnecessary blank line between variable declaration staging: wilc1000: use single space before opening brances '{' staging: wilc1000: remove unnecessary type used for wid id staging: wilc1000: avoid forward declaration for handle_scan_done() staging: wilc1000: avoid host_int_get_assoc_res_info() forward declaration staging: wilc1000: avoid forward declaration of host_int_parse_join_bss_param() staging: wilc1000: avoid setting default value for variable at declaration staging: wilc1000: use 'int' inplace of 's32' date type staging: wilc1000: remove unnecessary 'NULL' check from cfg80211_ops callbacks staging: wilc1000: move variable assignment along with its declaration drivers/staging/wilc1000/coreconfigurator.c | 84 +-- drivers/staging/wilc1000/coreconfigurator.h | 20 - drivers/staging/wilc1000/host_interface.c | 696 +++--- drivers/staging/wilc1000/host_interface.h | 20 +- drivers/staging/wilc1000/linux_mon.c | 2 - drivers/staging/wilc1000/linux_wlan.c | 122 ++-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 307 +++--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 16 +- drivers/staging/wilc1000/wilc_wlan.c | 65 +- drivers/staging/wilc1000/wilc_wlan.h | 3 - drivers/staging/wilc1000/wilc_wlan_if.h | 56 +- 11 files changed, 517 insertions(+), 874 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/23] staging: wilc1000: rename goto to avoid leading '_' in label name
Cleanup patch to avoid use of leading '_' in goto label name. Also used proper string for lable names. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 drivers/staging/wilc1000/wilc_wlan.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index f90b9b6..73606c3 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -2196,11 +2196,11 @@ static struct wireless_dev *wilc_wfi_cfg_alloc(void) wdev = kzalloc(sizeof(*wdev), GFP_KERNEL); if (!wdev) - goto _fail_; + goto out; wdev->wiphy = wiphy_new(&wilc_cfg80211_ops, sizeof(struct wilc_priv)); if (!wdev->wiphy) - goto _fail_mem_; + goto free_mem; wilc_band_2ghz.ht_cap.ht_supported = 1; wilc_band_2ghz.ht_cap.cap |= (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT); @@ -2212,9 +2212,9 @@ static struct wireless_dev *wilc_wfi_cfg_alloc(void) return wdev; -_fail_mem_: +free_mem: kfree(wdev); -_fail_: +out: return NULL; } diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 85af365..8e71c28 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -850,13 +850,13 @@ static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status) if (wilc->rx_buffer) buffer = &wilc->rx_buffer[offset]; else - goto _end_; + goto end; wilc->hif_func->hif_clear_int_ext(wilc, DATA_INT_CLR | ENABLE_RX_VMM); ret = wilc->hif_func->hif_block_rx_ext(wilc, 0, buffer, size); -_end_: +end: if (ret) { offset += size; wilc->rx_buffer_offset = offset; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/23] staging: wilc1000: removed unused element from wilc_cfg_frame struct
Cleanup up patch to remove the unused structure elements in 'wilc_cfg_frame' struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index dbdebf0..f29d1ea 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -255,9 +255,6 @@ struct wilc_hif_func { #define MAX_CFG_FRAME_SIZE 1468 struct wilc_cfg_frame { - u8 ether_header[14]; - u8 ip_header[20]; - u8 udp_header[8]; u8 wid_header[8]; u8 frame[MAX_CFG_FRAME_SIZE]; }; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/23] staging: wilc1000: use single space before opening brances '{'
Cleanup patch to use single space instead of multiple space before the '{'. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 6 +++--- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 8649225..2f25175 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -799,7 +799,7 @@ static void handle_scan(struct work_struct *work) scan_info->ch_list_len > 0) { int i; - for (i = 0; i < scan_info->ch_list_len; i++){ + for (i = 0; i < scan_info->ch_list_len; i++) { if (scan_info->ch_freq_list[i] > 0) scan_info->ch_freq_list[i] -= 1; } @@ -3337,7 +3337,7 @@ int wilc_deinit(struct wilc_vif *vif) int result = 0; struct host_if_drv *hif_drv = vif->hif_drv; - if (!hif_drv) { + if (!hif_drv) { netdev_err(vif->ndev, "hif_drv = NULL\n"); return -EFAULT; } @@ -3404,7 +3404,7 @@ void wilc_network_info_received(struct wilc *wilc, u8 *buffer, u32 length) return; hif_drv = vif->hif_drv; - if (!hif_drv || hif_drv == terminated_handle) { + if (!hif_drv || hif_drv == terminated_handle) { netdev_err(vif->ndev, "driver not init[%p]\n", hif_drv); return; } diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 8f77435..5667a54 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -604,7 +604,7 @@ static void wilc_wlan_deinitialize(struct net_device *dev) return; } - if (wl->initialized){ + if (wl->initialized) { netdev_info(dev, "Deinitializing wilc1000...\n"); if (!wl->dev_irq_num && diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 43003d8..96aaf14 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -524,7 +524,7 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt, conn_info->resp_ies, conn_info->resp_ies_len, connect_status, GFP_KERNEL); - } else if (conn_disconn_evt == CONN_DISCONN_EVENT_DISCONN_NOTIF){ + } else if (conn_disconn_evt == CONN_DISCONN_EVENT_DISCONN_NOTIF) { wilc_optaining_ip = false; p2p_local_random = 0x01; p2p_recv_random = 0x00; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index c77e5c8..cb8bfd2 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -436,7 +436,7 @@ void chip_wakeup(struct wilc *wilc) wilc_get_chipid(wilc, true); } while (wilc_get_chipid(wilc, true) == 0); } while (wilc_get_chipid(wilc, true) == 0); - } else if ((wilc->io_type & 0x1) == HIF_SDIO){ + } else if ((wilc->io_type & 0x1) == HIF_SDIO) { wilc->hif_func->hif_write_reg(wilc, 0xfa, 1); udelay(200); wilc->hif_func->hif_read_reg(wilc, 0xf0, ®); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/23] staging: wilc1000: remove unnecessary blank line between variable declaration
Cleanup patch to remove the unnecessary blank line between variables declaration inside the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 1 - drivers/staging/wilc1000/linux_wlan.c | 1 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 3 files changed, 6 deletions(-) diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index bd09611..14405bf 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -147,7 +147,6 @@ static netdev_tx_t wilc_wfi_mon_xmit(struct sk_buff *skb, { u32 rtap_len, ret = 0; struct wilc_wfi_mon_priv *mon_priv; - struct sk_buff *skb2; struct wilc_wfi_radiotap_cb_hdr *cb_hdr; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 84d3145..8f77435 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -780,7 +780,6 @@ static int mac_init_fn(struct net_device *ndev) static int wilc_mac_open(struct net_device *ndev) { struct wilc_vif *vif; - unsigned char mac_add[ETH_ALEN] = {0}; int ret = 0; int i = 0; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index ebe7adc2..43003d8 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1250,7 +1250,6 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev, { u32 i; s32 ret = 0; - struct wilc_priv *priv = wiphy_priv(wiphy); for (i = 0; i < priv->pmkid_list.numpmkid; i++) { @@ -1315,7 +1314,6 @@ static inline void wilc_wfi_cfg_parse_ch_attr(u8 *buf, u8 ch_list_attr_idx, static void wilc_wfi_cfg_parse_rx_action(u8 *buf, u32 len) { u32 index = 0; - u8 op_channel_attr_index = 0; u8 channel_list_attr_index = 0; @@ -1338,7 +1336,6 @@ static void wilc_wfi_cfg_parse_tx_action(u8 *buf, u32 len, bool oper_ch, u8 iftype) { u32 index = 0; - u8 op_channel_attr_index = 0; u8 channel_list_attr_index = 0; @@ -2261,7 +2258,6 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, int wilc_init_host_int(struct net_device *net) { int ret = 0; - struct wilc_priv *priv; priv = wdev_priv(net->ieee80211_ptr); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/23] staging: wilc1000: remove unnecessary elements from 'wilc_priv' struct
Remove unused elements from 'wilc_priv' structure. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 7 --- 2 files changed, 11 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 8f1c595..1a27e81 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -2276,8 +2276,6 @@ int wilc_init_host_int(struct net_device *net) } op_ifcs++; - priv->auto_rate_adjusted = false; - priv->p2p_listen_state = false; mutex_init(&priv->scan_req_lock); @@ -2297,8 +2295,6 @@ int wilc_deinit_host_int(struct net_device *net) priv = wdev_priv(net->ieee80211_ptr); vif = netdev_priv(priv->dev); - priv->auto_rate_adjusted = false; - priv->p2p_listen_state = false; op_ifcs--; diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 22f3486..87f8cdc 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -74,14 +74,10 @@ struct wilc_priv { u8 associated_bss[ETH_ALEN]; struct sta_info assoc_stainfo; - struct net_device_stats stats; - u8 monitor_flag; - int status; struct sk_buff *skb; struct net_device *dev; struct host_if_drv *hif_drv; struct host_if_pmkid_attr pmkid_list; - struct wilc_wfi_stats netstats; u8 wep_key[4][WLAN_KEY_LEN_WEP104]; u8 wep_key_len[4]; /* The real interface that the monitor is on */ @@ -91,9 +87,6 @@ struct wilc_priv { u8 wilc_groupkey; /* mutexes */ struct mutex scan_req_lock; - /* */ - bool auto_rate_adjusted; - bool p2p_listen_state; }; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/23] staging: wilc1000: avoid forward declaration for handle_scan_done()
Reorder the function position in host interface to avoid forward declaration of handle_scan_done(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 77 +++ 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 85ecba8..eabe5c7 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -199,7 +199,6 @@ static u32 clients_count; static void *host_int_parse_join_bss_param(struct network_info *info); static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx); -static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event evt); /* 'msg' should be free by the caller for syc */ static struct host_if_msg* @@ -724,6 +723,44 @@ static void handle_cfg_param(struct work_struct *work) kfree(msg); } +static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event evt) +{ + s32 result = 0; + u8 abort_running_scan; + struct wid wid; + struct host_if_drv *hif_drv = vif->hif_drv; + struct user_scan_req *scan_req; + + if (evt == SCAN_EVENT_ABORTED) { + abort_running_scan = 1; + wid.id = WID_ABORT_RUNNING_SCAN; + wid.type = WID_CHAR; + wid.val = (s8 *)&abort_running_scan; + wid.size = sizeof(char); + + result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, + wilc_get_vif_idx(vif)); + + if (result) { + netdev_err(vif->ndev, "Failed to set abort running\n"); + result = -EFAULT; + } + } + + if (!hif_drv) { + netdev_err(vif->ndev, "Driver handler is NULL\n"); + return result; + } + + scan_req = &hif_drv->usr_scan_req; + if (scan_req->scan_result) { + scan_req->scan_result(evt, NULL, scan_req->arg, NULL); + scan_req->scan_result = NULL; + } + + return result; +} + static void handle_scan(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); @@ -841,44 +878,6 @@ static void handle_scan(struct work_struct *work) kfree(msg); } -static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event evt) -{ - s32 result = 0; - u8 abort_running_scan; - struct wid wid; - struct host_if_drv *hif_drv = vif->hif_drv; - struct user_scan_req *scan_req; - - if (evt == SCAN_EVENT_ABORTED) { - abort_running_scan = 1; - wid.id = WID_ABORT_RUNNING_SCAN; - wid.type = WID_CHAR; - wid.val = (s8 *)&abort_running_scan; - wid.size = sizeof(char); - - result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, - wilc_get_vif_idx(vif)); - - if (result) { - netdev_err(vif->ndev, "Failed to set abort running\n"); - result = -EFAULT; - } - } - - if (!hif_drv) { - netdev_err(vif->ndev, "Driver handler is NULL\n"); - return result; - } - - scan_req = &hif_drv->usr_scan_req; - if (scan_req->scan_result) { - scan_req->scan_result(evt, NULL, scan_req->arg, NULL); - scan_req->scan_result = NULL; - } - - return result; -} - u8 wilc_connected_ssid[6] = {0}; static void handle_connect(struct work_struct *work) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 08/23] staging: wilc1000: rename enum AUTHTYPE to use lowercase
Cleanup patch to rename enum AUTHTYPE to lowercase. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 8 drivers/staging/wilc1000/host_interface.h | 6 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index a5c0ac5..0ffe205 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -26,7 +26,7 @@ struct host_if_wep_attr { u8 key_len; u8 index; u8 mode; - enum AUTHTYPE auth_type; + enum authtype auth_type; }; union host_if_key_attr { @@ -62,7 +62,7 @@ struct connect_attr { u8 security; wilc_connect_result result; void *arg; - enum AUTHTYPE auth_type; + enum authtype auth_type; u8 ch; void *params; }; @@ -2632,7 +2632,7 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len, } int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len, - u8 index, u8 mode, enum AUTHTYPE auth_type) + u8 index, u8 mode, enum authtype auth_type) { int result; struct host_if_msg *msg; @@ -2876,7 +2876,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr) int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *ies, size_t ies_len, wilc_connect_result connect_result, void *user_arg, - u8 security, enum AUTHTYPE auth_type, + u8 security, enum authtype auth_type, u8 channel, void *join_params) { int result = 0; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 7f3e48c..79166a5 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -207,7 +207,7 @@ struct user_conn_req { u8 *bssid; u8 *ssid; u8 security; - enum AUTHTYPE auth_type; + enum authtype auth_type; size_t ssid_len; u8 *ies; size_t ies_len; @@ -298,7 +298,7 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index); int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len, u8 index); int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len, - u8 index, u8 mode, enum AUTHTYPE auth_type); + u8 index, u8 mode, enum authtype auth_type); int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, const u8 *mac_addr, const u8 *rx_mic, const u8 *tx_mic, u8 mode, u8 cipher_mode, u8 index); @@ -314,7 +314,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr); int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *ies, size_t ies_len, wilc_connect_result connect_result, void *user_arg, - u8 security, enum AUTHTYPE auth_type, + u8 security, enum authtype auth_type, u8 channel, void *join_params); int wilc_disconnect(struct wilc_vif *vif, u16 reason_code); int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 73606c3..8f1c595 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -678,7 +678,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, u32 i; u32 sel_bssi_idx = UINT_MAX; u8 security = NO_ENCRYPT; - enum AUTHTYPE auth_type = ANY; + enum authtype auth_type = ANY; u32 cipher_group; struct wilc_priv *priv; struct host_if_drv *wfi_drv; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index b82e149..73b57fb 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -131,7 +131,7 @@ enum { WPA2_AES_TKIP = 0x71, /* Aes or Tkip */ }; -enum AUTHTYPE { +enum authtype { OPEN_SYSTEM = 1, SHARED_KEY = 2, ANY = 3, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/23] staging: wilc1000: avoid host_int_get_assoc_res_info() forward declaration
Reorder the function position in host interface to avoid forward declaration of host_int_get_assoc_res_info(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 47 ++- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index eabe5c7..f49e849 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1287,7 +1287,27 @@ static void handle_rcvd_ntwrk_info(struct work_struct *work) static s32 host_int_get_assoc_res_info(struct wilc_vif *vif, u8 *assoc_resp_info, u32 max_assoc_resp_info_len, - u32 *rcvd_assoc_resp_info_len); + u32 *rcvd_assoc_resp_info_len) +{ + s32 result; + struct wid wid; + + wid.id = WID_ASSOC_RES_INFO; + wid.type = WID_STR; + wid.val = assoc_resp_info; + wid.size = max_assoc_resp_info_len; + + result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1, + wilc_get_vif_idx(vif)); + if (result) { + *rcvd_assoc_resp_info_len = 0; + netdev_err(vif->ndev, "Failed to send association response\n"); + return -EINVAL; + } + + *rcvd_assoc_resp_info_len = wid.size; + return result; +} static inline void host_int_free_user_conn_req(struct host_if_drv *hif_drv) { @@ -2979,31 +2999,6 @@ int wilc_disconnect(struct wilc_vif *vif, u16 reason_code) return result; } -static s32 host_int_get_assoc_res_info(struct wilc_vif *vif, - u8 *assoc_resp_info, - u32 max_assoc_resp_info_len, - u32 *rcvd_assoc_resp_info_len) -{ - s32 result = 0; - struct wid wid; - - wid.id = WID_ASSOC_RES_INFO; - wid.type = WID_STR; - wid.val = assoc_resp_info; - wid.size = max_assoc_resp_info_len; - - result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1, - wilc_get_vif_idx(vif)); - if (result) { - *rcvd_assoc_resp_info_len = 0; - netdev_err(vif->ndev, "Failed to send association response\n"); - return -EINVAL; - } - - *rcvd_assoc_resp_info_len = wid.size; - return result; -} - int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel) { int result; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/23] staging: wilc1000: remove the mutliple #define used for same macro
Moved the same #define in common header file instead of having their declartion in different files. Below macros are moved to header file: TCP_ACK_FILTER_LINK_SPEED_THRESH DEFAULT_LINK_SPEED GET_PKT_OFFSET Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 3 --- drivers/staging/wilc1000/linux_mon.c | 1 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 - drivers/staging/wilc1000/wilc_wfi_netdevice.h | 5 + 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 0ffe205..8649225 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -6,9 +6,6 @@ #define FALSE_FRMWR_CHANNEL100 -#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 -#define DEFAULT_LINK_SPEED 72 - #define REAL_JOIN_REQ 0 struct host_if_wpa_attr { diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index 1c7e6e1..bd09611 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -20,7 +20,6 @@ static u8 bssid[6]; #define IEEE80211_RADIOTAP_F_TX_RTS0x0004 /* used rts/cts handshake */ #define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive*/ -#define GET_PKT_OFFSET(a) (((a) >> 22) & 0x1ff) #define TX_RADIOTAP_PRESENT ((1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_TX_FLAGS)) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 1a27e81..e561dce 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -77,11 +77,6 @@ static const struct wiphy_wowlan_support wowlan_support = { .flags = WIPHY_WOWLAN_ANY }; -#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 -#define DEFAULT_LINK_SPEED 72 - -#define GET_PKT_OFFSET(a) (((a) >> 22) & 0x1ff) - static struct network_info last_scanned_shadow[MAX_NUM_SCANNED_NETWORKS_SHADOW]; static u32 last_scanned_cnt; struct timer_list wilc_during_ip_timer; diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index 87f8cdc..765681a 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -21,6 +21,11 @@ #define NUM_REG_FRAME 2 +#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 +#define DEFAULT_LINK_SPEED 72 + +#define GET_PKT_OFFSET(a) (((a) >> 22) & 0x1ff) + struct wilc_wfi_stats { unsigned long rx_packets; unsigned long tx_packets; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/23] staging: wilc1000: remove unnecessary type used for wid id
Cleanup patch to remove unnecessary typecast used while assigning the WID ID. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 84 +++ 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 2f25175..85ecba8 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -264,7 +264,7 @@ static void handle_set_channel(struct work_struct *work) int ret = 0; struct wid wid; - wid.id = (u16)WID_CURRENT_CHANNEL; + wid.id = WID_CURRENT_CHANNEL; wid.type = WID_CHAR; wid.val = (char *)&hif_set_ch->set_ch; wid.size = sizeof(char); @@ -307,7 +307,7 @@ static void handle_set_wfi_drv_handler(struct work_struct *work) currbyte++; *currbyte = (hif_drv_handler->name | (hif_drv_handler->mode << 1)); - wid.id = (u16)WID_SET_DRV_HANDLER; + wid.id = WID_SET_DRV_HANDLER; wid.type = WID_STR; wid.val = (s8 *)buffer; wid.size = DRV_HANDLER_SIZE; @@ -332,7 +332,7 @@ static void handle_set_operation_mode(struct work_struct *work) int ret = 0; struct wid wid; - wid.id = (u16)WID_SET_OPERATION_MODE; + wid.id = WID_SET_OPERATION_MODE; wid.type = WID_INT; wid.val = (s8 *)&hif_op_mode->mode; wid.size = sizeof(u32); @@ -363,7 +363,7 @@ static void handle_set_ip_address(struct work_struct *work) memcpy(set_ip[idx], ip_addr, IP_ALEN); - wid.id = (u16)WID_IP_ADDRESS; + wid.id = WID_IP_ADDRESS; wid.type = WID_STR; wid.val = ip_addr; wid.size = IP_ALEN; @@ -386,7 +386,7 @@ static void handle_get_ip_address(struct work_struct *work) int ret = 0; struct wid wid; - wid.id = (u16)WID_IP_ADDRESS; + wid.id = WID_IP_ADDRESS; wid.type = WID_STR; wid.val = kmalloc(IP_ALEN, GFP_KERNEL); wid.size = IP_ALEN; @@ -414,7 +414,7 @@ static void handle_get_mac_address(struct work_struct *work) int ret = 0; struct wid wid; - wid.id = (u16)WID_MAC_ADDR; + wid.id = WID_MAC_ADDR; wid.type = WID_STR; wid.val = get_mac_addr->mac_addr; wid.size = ETH_ALEN; @@ -757,7 +757,7 @@ static void handle_scan(struct work_struct *work) hif_drv->usr_scan_req.rcvd_ch_cnt = 0; - wid_list[index].id = (u16)WID_SSID_PROBE_REQ; + wid_list[index].id = WID_SSID_PROBE_REQ; wid_list[index].type = WID_STR; for (i = 0; i < hidden_net->n_ssids; i++) @@ -851,7 +851,7 @@ static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event evt) if (evt == SCAN_EVENT_ABORTED) { abort_running_scan = 1; - wid.id = (u16)WID_ABORT_RUNNING_SCAN; + wid.id = WID_ABORT_RUNNING_SCAN; wid.type = WID_CHAR; wid.val = (s8 *)&abort_running_scan; wid.size = sizeof(char); @@ -976,19 +976,19 @@ static void handle_connect(struct work_struct *work) wid_list[wid_cnt].size = hif_drv->usr_conn_req.ies_len; wid_cnt++; - wid_list[wid_cnt].id = (u16)WID_11I_MODE; + wid_list[wid_cnt].id = WID_11I_MODE; wid_list[wid_cnt].type = WID_CHAR; wid_list[wid_cnt].size = sizeof(char); wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.security; wid_cnt++; - wid_list[wid_cnt].id = (u16)WID_AUTH_TYPE; + wid_list[wid_cnt].id = WID_AUTH_TYPE; wid_list[wid_cnt].type = WID_CHAR; wid_list[wid_cnt].size = sizeof(char); wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.auth_type; wid_cnt++; - wid_list[wid_cnt].id = (u16)WID_JOIN_REQ_EXTENDED; + wid_list[wid_cnt].id = WID_JOIN_REQ_EXTENDED; wid_list[wid_cnt].type = WID_STR; wid_list[wid_cnt].size = 112; wid_list[wid_cnt].val = kmalloc(wid_list[wid_cnt].size, GFP_KERNEL); @@ -1192,7 +1192,7 @@ static void handle_connect_timeout(struct work_struct *work) netdev_err(vif->ndev, "Connect callback is NULL\n"); } - wid.id = (u16)WID_DISCONNECT; + wid.id = WID_DISCONNECT; wid.type = WID_CHAR; wid.val = (s8 *)&dummy_reason_code; wid.size = sizeof(char); @@ -1496,7 +1496,7 @@ static int wilc_pmksa_key_copy(struct wilc_vif *vif, struct key_attr *hif_key) hif_key->attr.pmkid.pmkidlist[i].pmkid, PMKID_LEN); } - wid.id = (u16)WID_PMKID_INFO; + wid.id = WID_PMKID_INFO; wid.type = WID_STR; wid.val = (s8 *)key_buf; wid.size = (hif_key->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1; @@ -1524,7 +1524,7 @@ static void handle_key(struct work_struct *work) case WEP: if (hif_key->action & ADDKEY_AP) { - wid_list[0].id = (u16)WID_11I_MODE; +
[PATCH 09/23] staging: wilc1000: remove unused elements in 'wilc' struct
Cleanup patch to remove unused elements from 'wilc' struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 drivers/staging/wilc1000/wilc_wlan.c | 6 -- 2 files changed, 10 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h index fe18ae9..22f3486 100644 --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h @@ -157,12 +157,8 @@ struct wilc { struct txq_entry_t txq_head; int txq_entries; - int txq_exit; struct rxq_entry_t rxq_head; - int rxq_exit; - - unsigned char eth_src_address[NUM_CONCURRENT_IFC][6]; const struct firmware *firmware; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 8e71c28..c77e5c8 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -527,7 +527,6 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) wilc = vif->wilc; txb = wilc->tx_buffer; - wilc->txq_exit = 0; if (wilc->quit) goto out; @@ -713,7 +712,6 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) out: mutex_unlock(&wilc->txq_add_to_head_cs); - wilc->txq_exit = 1; *txq_count = wilc->txq_entries; return ret; } @@ -780,8 +778,6 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc) u8 *buffer; struct rxq_entry_t *rqe; - wilc->rxq_exit = 0; - do { if (wilc->quit) { complete(&wilc->cfg_event); @@ -797,8 +793,6 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc) kfree(rqe); } while (1); - - wilc->rxq_exit = 1; } static void wilc_unknown_isr_ext(struct wilc *wilc) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/23] staging: wilc1000: rename enum CURRENT_TXRATE to use lowercase
Cleanup patch to rename enums in lowercase to follow linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/host_interface.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 7309b7e..cc64b14 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -695,7 +695,7 @@ static void handle_cfg_param(struct work_struct *work) i++; } if (param->flag & CURRENT_TX_RATE) { - enum CURRENT_TXRATE curr_tx_rate = param->curr_tx_rate; + enum current_tx_rate curr_tx_rate = param->curr_tx_rate; if (curr_tx_rate == AUTORATE || curr_tx_rate == MBPS_1 || curr_tx_rate == MBPS_2 || curr_tx_rate == MBPS_5_5 || diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 3cd97dd..64fc269 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -81,7 +81,7 @@ struct host_if_pmkid_attr { struct host_if_pmkid pmkidlist[WILC_MAX_NUM_PMKIDS]; }; -enum CURRENT_TXRATE { +enum current_tx_rate { AUTORATE= 0, MBPS_1 = 1, MBPS_2 = 2, @@ -118,7 +118,7 @@ struct cfg_param_attr { u8 scan_source; u16 active_scan_time; u16 passive_scan_time; - enum CURRENT_TXRATE curr_tx_rate; + enum current_tx_rate curr_tx_rate; }; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/23] staging: wilc1000: avoid forward declaration of host_int_parse_join_bss_param()
Reorder the functions position in host interface to avoid forward declaration of host_int_parse_join_bss_param(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 333 +++--- 1 file changed, 166 insertions(+), 167 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index f49e849..895a126 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -197,7 +197,6 @@ static u8 set_ip[2][4]; static u8 get_ip[2][4]; static u32 clients_count; -static void *host_int_parse_join_bss_param(struct network_info *info); static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx); /* 'msg' should be free by the caller for syc */ @@ -1216,6 +1215,172 @@ static void handle_connect_timeout(struct work_struct *work) kfree(msg); } +static void host_int_fill_join_bss_param(struct join_bss_param *param, u8 *ies, +u16 *out_index, u8 *pcipher_tc, +u8 *auth_total_cnt, u32 tsf_lo, +u8 *rates_no) +{ + u8 ext_rates_no; + u16 offset; + u8 pcipher_cnt; + u8 auth_cnt; + u8 i, j; + u16 index = *out_index; + + if (ies[index] == WLAN_EID_SUPP_RATES) { + *rates_no = ies[index + 1]; + param->supp_rates[0] = *rates_no; + index += 2; + + for (i = 0; i < *rates_no; i++) + param->supp_rates[i + 1] = ies[index + i]; + + index += *rates_no; + } else if (ies[index] == WLAN_EID_EXT_SUPP_RATES) { + ext_rates_no = ies[index + 1]; + if (ext_rates_no > (MAX_RATES_SUPPORTED - *rates_no)) + param->supp_rates[0] = MAX_RATES_SUPPORTED; + else + param->supp_rates[0] += ext_rates_no; + index += 2; + for (i = 0; i < (param->supp_rates[0] - *rates_no); i++) + param->supp_rates[*rates_no + i + 1] = ies[index + i]; + + index += ext_rates_no; + } else if (ies[index] == WLAN_EID_HT_CAPABILITY) { + param->ht_capable = true; + index += ies[index + 1] + 2; + } else if ((ies[index] == WLAN_EID_VENDOR_SPECIFIC) && + (ies[index + 2] == 0x00) && (ies[index + 3] == 0x50) && + (ies[index + 4] == 0xF2) && (ies[index + 5] == 0x02) && + ((ies[index + 6] == 0x00) || (ies[index + 6] == 0x01)) && + (ies[index + 7] == 0x01)) { + param->wmm_cap = true; + + if (ies[index + 8] & BIT(7)) + param->uapsd_cap = true; + index += ies[index + 1] + 2; + } else if ((ies[index] == WLAN_EID_VENDOR_SPECIFIC) && +(ies[index + 2] == 0x50) && (ies[index + 3] == 0x6f) && +(ies[index + 4] == 0x9a) && +(ies[index + 5] == 0x09) && (ies[index + 6] == 0x0c)) { + u16 p2p_cnt; + + param->tsf = tsf_lo; + param->noa_enabled = 1; + param->idx = ies[index + 9]; + + if (ies[index + 10] & BIT(7)) { + param->opp_enabled = 1; + param->ct_window = ies[index + 10]; + } else { + param->opp_enabled = 0; + } + + param->cnt = ies[index + 11]; + p2p_cnt = index + 12; + + memcpy(param->duration, ies + p2p_cnt, 4); + p2p_cnt += 4; + + memcpy(param->interval, ies + p2p_cnt, 4); + p2p_cnt += 4; + + memcpy(param->start_time, ies + p2p_cnt, 4); + + index += ies[index + 1] + 2; + } else if ((ies[index] == WLAN_EID_RSN) || +((ies[index] == WLAN_EID_VENDOR_SPECIFIC) && + (ies[index + 2] == 0x00) && + (ies[index + 3] == 0x50) && (ies[index + 4] == 0xF2) && + (ies[index + 5] == 0x01))) { + u16 rsn_idx = index; + + if (ies[rsn_idx] == WLAN_EID_RSN) { + param->mode_802_11i = 2; + } else { + if (param->mode_802_11i == 0) + param->mode_802_11i = 1; + rsn_idx += 4; + } + + rsn_idx += 7; + param->rsn_grp_policy = ies[rsn_idx]; + rsn_idx++; + offset = ies[rsn_idx] * 4; + pcipher_cnt = (ies[rsn_idx] > 3) ? 3 : ies[rsn_idx]; + rsn_idx += 2; + + i = *pcipher_tc; + j = 0; + for (; i < (pcipher_cnt + *pcipher_tc) && i < 3; i++, j++) { + u8 *policy = ¶m->rsn_pcip_policy[i]; + +
[PATCH 13/23] staging: wilc1000: use lowercase for 'IFC_UP' struct element name
Cleanup patch to use lowercase for structure element name to follow linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.h | 2 +- drivers/staging/wilc1000/linux_wlan.c | 4 ++-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 79166a5..9a016c5 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -277,7 +277,7 @@ struct host_if_drv { struct timer_list remain_on_ch_timer; struct wilc_vif *remain_on_ch_timer_vif; - bool IFC_UP; + bool ifc_up; int driver_handler_id; }; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 032afc2..84d3145 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -45,7 +45,7 @@ static int dev_state_ev_handler(struct notifier_block *this, switch (event) { case NETDEV_UP: if (vif->iftype == STATION_MODE || vif->iftype == CLIENT_MODE) { - hif_drv->IFC_UP = 1; + hif_drv->ifc_up = 1; wilc_optaining_ip = false; del_timer(&wilc_during_ip_timer); } @@ -65,7 +65,7 @@ static int dev_state_ev_handler(struct notifier_block *this, case NETDEV_DOWN: if (vif->iftype == STATION_MODE || vif->iftype == CLIENT_MODE) { - hif_drv->IFC_UP = 0; + hif_drv->ifc_up = 0; wilc_optaining_ip = false; } diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index e561dce..ebe7adc2 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -535,9 +535,9 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt, if (!wfi_drv->p2p_connect) wlan_channel = INVALID_CHANNEL; - if (wfi_drv->IFC_UP && dev == wl->vif[1]->ndev) + if (wfi_drv->ifc_up && dev == wl->vif[1]->ndev) disconn_info->reason = 3; - else if (!wfi_drv->IFC_UP && dev == wl->vif[1]->ndev) + else if (!wfi_drv->ifc_up && dev == wl->vif[1]->ndev) disconn_info->reason = 1; cfg80211_disconnected(dev, disconn_info->reason, -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/23] staging: wilc1000: remove unnecessary 'NULL' check from cfg80211_ops callbacks
Cleanup patch to remove the unnecessary 'NULL' check used in 'cfg80211_ops' callback functions. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index ba6f9ed..2d44333 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1781,9 +1781,6 @@ static int set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, struct wilc_priv *priv; struct wilc_vif *vif; - if (!wiphy) - return -ENOENT; - priv = wiphy_priv(wiphy); vif = netdev_priv(priv->dev); if (!priv->hif_drv) @@ -1921,9 +1918,6 @@ static int stop_ap(struct wiphy *wiphy, struct net_device *dev) struct wilc_vif *vif; u8 null_bssid[ETH_ALEN] = {0}; - if (!wiphy) - return -EFAULT; - priv = wiphy_priv(wiphy); vif = netdev_priv(priv->dev); @@ -1945,9 +1939,6 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev, struct add_sta_param sta_params = { {0} }; struct wilc_vif *vif; - if (!wiphy) - return -EFAULT; - priv = wiphy_priv(wiphy); vif = netdev_priv(dev); @@ -1986,9 +1977,6 @@ static int del_station(struct wiphy *wiphy, struct net_device *dev, struct wilc_vif *vif; struct sta_info *info; - if (!wiphy) - return -EFAULT; - priv = wiphy_priv(wiphy); vif = netdev_priv(dev); @@ -2013,9 +2001,6 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev, struct add_sta_param sta_params = { {0} }; struct wilc_vif *vif; - if (!wiphy) - return -EFAULT; - vif = netdev_priv(dev); if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) { -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/23] staging: wilc1000: avoid setting default value for variable at declaration
Cleanup patch to avoid setting default value for local variables and also clubbed similar variables together. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 25 ++--- drivers/staging/wilc1000/host_interface.c | 122 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 20 ++-- 3 files changed, 79 insertions(+), 88 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 5933e4d..e09f10d 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -123,9 +123,7 @@ static inline void get_BSSID(u8 *data, u8 *bssid) static inline void get_ssid(u8 *data, u8 *ssid, u8 *p_ssid_len) { - u8 len = 0; - u8 i = 0; - u8 j = 0; + u8 i, j, len; len = data[TAG_PARAM_OFFSET + 1]; j = TAG_PARAM_OFFSET + 2; @@ -198,18 +196,11 @@ static u8 get_current_channel_802_11n(u8 *msa, u16 rx_len) s32 wilc_parse_network_info(u8 *msg_buffer, struct network_info **ret_network_info) { - struct network_info *network_info = NULL; - u8 msg_type = 0; - u16 wid_len = 0; - u8 *wid_val = NULL; - u8 *msa = NULL; - u16 rx_len = 0; - u8 *tim_elm = NULL; - u8 *ies = NULL; - u16 ies_len = 0; - u8 index = 0; - u32 tsf_lo; - u32 tsf_hi; + struct network_info *network_info; + u8 *wid_val, *msa, *tim_elm, *ies; + u32 tsf_lo, tsf_hi; + u16 wid_len, rx_len, ies_len; + u8 msg_type, index; msg_type = msg_buffer[0]; @@ -271,8 +262,8 @@ s32 wilc_parse_network_info(u8 *msg_buffer, s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len, struct connect_info *ret_conn_info) { - u8 *ies = NULL; - u16 ies_len = 0; + u8 *ies; + u16 ies_len; ret_conn_info->status = get_asoc_status(buffer); if (ret_conn_info->status == WLAN_STATUS_SUCCESS) { diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 895a126..d251a64 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -259,7 +259,7 @@ static void handle_set_channel(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct channel_attr *hif_set_ch = &msg->body.channel_info; - int ret = 0; + int ret; struct wid wid; wid.id = WID_CURRENT_CHANNEL; @@ -280,10 +280,10 @@ static void handle_set_wfi_drv_handler(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct drv_handler *hif_drv_handler = &msg->body.drv; - int ret = 0; + int ret; struct wid wid; u8 *currbyte, *buffer; - struct host_if_drv *hif_drv = NULL; + struct host_if_drv *hif_drv; if (!vif->hif_drv || !hif_drv_handler) goto free_msg; @@ -327,7 +327,7 @@ static void handle_set_operation_mode(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct op_mode *hif_op_mode = &msg->body.mode; - int ret = 0; + int ret; struct wid wid; wid.id = WID_SET_OPERATION_MODE; @@ -352,7 +352,7 @@ static void handle_set_ip_address(struct work_struct *work) struct wilc_vif *vif = msg->vif; u8 *ip_addr = msg->body.ip_info.ip_addr; u8 idx = msg->body.ip_info.idx; - int ret = 0; + int ret; struct wid wid; char firmware_ip_addr[4] = {0}; @@ -381,7 +381,7 @@ static void handle_get_ip_address(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; u8 idx = msg->body.ip_info.idx; - int ret = 0; + int ret; struct wid wid; wid.id = WID_IP_ADDRESS; @@ -409,7 +409,7 @@ static void handle_get_mac_address(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct get_mac_addr *get_mac_addr = &msg->body.get_mac_info; - int ret = 0; + int ret; struct wid wid; wid.id = WID_MAC_ADDR; @@ -431,7 +431,7 @@ static void handle_cfg_param(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct cfg_param_attr *param = &msg->body.cfg_info; - int ret = 0; + int ret; struct wid wid_list[32]; struct host_if_drv *hif_drv = vif->hif_drv; int i = 0; @@ -1148,7 +1148,7 @@ static voi
[PATCH 23/23] staging: wilc1000: move variable assignment along with its declaration
Cleanup patch to club the variable assignment along with the variable declaration especially for private data. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 7 +- drivers/staging/wilc1000/linux_wlan.c | 113 +++ drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 229 +++--- drivers/staging/wilc1000/wilc_wlan.c | 53 ++--- 4 files changed, 118 insertions(+), 284 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index fb063e5..c78b51a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3429,13 +3429,10 @@ static void get_periodic_rssi(struct timer_list *unused) int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) { struct host_if_drv *hif_drv; - struct wilc_vif *vif; - struct wilc *wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wilc = vif->wilc; int i; - vif = netdev_priv(dev); - wilc = vif->wilc; - hif_drv = kzalloc(sizeof(*hif_drv), GFP_KERNEL); if (!hif_drv) return -ENOMEM; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 5667a54..2f4bf8e 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -94,12 +94,9 @@ static int dev_state_ev_handler(struct notifier_block *this, static irqreturn_t isr_uh_routine(int irq, void *user_data) { - struct wilc_vif *vif; - struct wilc *wilc; struct net_device *dev = user_data; - - vif = netdev_priv(dev); - wilc = vif->wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wilc = vif->wilc; if (wilc->close) { netdev_err(dev, "Can't handle UH interrupt\n"); @@ -110,12 +107,9 @@ static irqreturn_t isr_uh_routine(int irq, void *user_data) static irqreturn_t isr_bh_routine(int irq, void *userdata) { - struct wilc_vif *vif; - struct wilc *wilc; struct net_device *dev = userdata; - - vif = netdev_priv(userdata); - wilc = vif->wilc; + struct wilc_vif *vif = netdev_priv(userdata); + struct wilc *wilc = vif->wilc; if (wilc->close) { netdev_err(dev, "Can't handle BH interrupt\n"); @@ -130,11 +124,8 @@ static irqreturn_t isr_bh_routine(int irq, void *userdata) static int init_irq(struct net_device *dev) { int ret = 0; - struct wilc_vif *vif; - struct wilc *wl; - - vif = netdev_priv(dev); - wl = vif->wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wl = vif->wilc; if ((gpio_request(wl->gpio, "WILC_INTR") == 0) && (gpio_direction_input(wl->gpio) == 0)) { @@ -163,11 +154,8 @@ static int init_irq(struct net_device *dev) static void deinit_irq(struct net_device *dev) { - struct wilc_vif *vif; - struct wilc *wilc; - - vif = netdev_priv(dev); - wilc = vif->wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wilc = vif->wilc; /* Deinitialize IRQ */ if (wilc->dev_irq_num) { @@ -238,12 +226,9 @@ static int linux_wlan_txq_task(void *vp) { int ret; u32 txq_count; - struct wilc_vif *vif; - struct wilc *wl; struct net_device *dev = vp; - - vif = netdev_priv(dev); - wl = vif->wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wl = vif->wilc; complete(&wl->txq_thread_started); while (1) { @@ -271,15 +256,12 @@ static int linux_wlan_txq_task(void *vp) static int wilc_wlan_get_firmware(struct net_device *dev) { - struct wilc_vif *vif; - struct wilc *wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wilc = vif->wilc; int chip_id, ret = 0; const struct firmware *wilc_firmware; char *firmware; - vif = netdev_priv(dev); - wilc = vif->wilc; - chip_id = wilc_get_chipid(wilc, false); if (chip_id < 0x1003a0) @@ -306,13 +288,10 @@ static int wilc_wlan_get_firmware(struct net_device *dev) static int linux_wlan_start_firmware(struct net_device *dev) { - struct wilc_vif *vif; - struct wilc *wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wilc = vif->wilc; int ret = 0; - vif = netdev_priv(dev); - wilc = vif->wilc; - ret = wilc_wlan_start(wilc); if (ret < 0) return ret; @@ -326,13 +305,10 @@ static int linux_wlan_start_firmware(struct net_device *dev) static int wilc1000_firmware_download(struct net_device *dev) { - struct wilc_vif *vif; - struct wilc *wilc; + struct wilc_vif *vif = netdev_priv(dev); + struct wilc *wilc = vif->wilc; int ret = 0; - vif = netdev_pr
[PATCH 21/23] staging: wilc1000: use 'int' inplace of 's32' date type
Cleanup patch to use 'int' instead of 's32' to have the same data type based on its usage. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 48 +++ drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 28 ++--- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d251a64..fb063e5 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -722,9 +722,9 @@ static void handle_cfg_param(struct work_struct *work) kfree(msg); } -static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event evt) +static int handle_scan_done(struct wilc_vif *vif, enum scan_event evt) { - s32 result = 0; + int result = 0; u8 abort_running_scan; struct wid wid; struct host_if_drv *hif_drv = vif->hif_drv; @@ -765,7 +765,7 @@ static void handle_scan(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct scan_attr *scan_info = &msg->body.scan_info; - s32 result = 0; + int result = 0; struct wid wid_list[5]; u32 index = 0; u32 i; @@ -883,7 +883,7 @@ static void handle_connect(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct connect_attr *conn_attr = &msg->body.con_info; - s32 result = 0; + int result = 0; struct wid wid_list[8]; u32 wid_cnt = 0, dummyval = 0; u8 *cur_byte = NULL; @@ -1148,7 +1148,7 @@ static void handle_connect_timeout(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; - s32 result; + int result; struct connect_info info; struct wid wid; u16 dummy_reason_code = 0; @@ -1454,7 +1454,7 @@ static s32 host_int_get_assoc_res_info(struct wilc_vif *vif, u32 max_assoc_resp_info_len, u32 *rcvd_assoc_resp_info_len) { - s32 result; + int result; struct wid wid; wid.id = WID_ASSOC_RES_INFO; @@ -1926,7 +1926,7 @@ static void handle_disconnect(struct work_struct *work) struct disconnect_info disconn_info; struct user_scan_req *scan_req; struct user_conn_req *conn_req; - s32 result; + int result; u16 dummy_reason_code = 0; wid.id = WID_DISCONNECT; @@ -2004,7 +2004,7 @@ static void handle_get_rssi(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; - s32 result; + int result; struct wid wid; wid.id = WID_RSSI; @@ -2084,7 +2084,7 @@ static void handle_get_inactive_time(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct sta_inactive_t *hif_sta_inactive = &msg->body.mac_info; - s32 result; + int result; struct wid wid; wid.id = WID_SET_STA_MAC_INACTIVE_TIME; @@ -2126,7 +2126,7 @@ static void handle_add_beacon(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct beacon_attr *param = &msg->body.beacon_info; - s32 result; + int result; struct wid wid; u8 *cur_byte; @@ -2181,7 +2181,7 @@ static void handle_del_beacon(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; - s32 result; + int result; struct wid wid; u8 del_beacon = 0; @@ -2232,7 +2232,7 @@ static void handle_add_station(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct add_sta_param *param = &msg->body.add_sta_info; - s32 result; + int result; struct wid wid; u8 *cur_byte; @@ -2263,7 +2263,7 @@ static void handle_del_all_sta(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct del_all_sta *param = &msg->body.del_all_sta_info; - s32 result; + int result; struct wid wid; u8 *curr_byte; u8 i; @@ -2307,7 +2307,7 @@ static void handle_del_station(struct work_struct *work) struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; struct del_sta *param = &msg->body.del