diff options
8 files changed, 752 insertions, 1 deletions
@@ -621,3 +621,11 @@ staging/staging-udlfb-remove-printk-and-small-cleanup.patch staging/staging-rtl8187se-needs-semaphore.h.patch +# merge fun :( +#staging.dup/staging-comedi-poc-fix-coding-style-issues.patch +#staging.dup/staging-comedi-pcmad-checkpatch-cleanups.patch +#staging.dup/staging-comedi-fix-bracing-coding-style-issue-in-ni_65xx.c.patch +#staging.dup/staging-comedi-fix-bracing-coding-style-and-80-character-issues-in-ni_660x.c.patch +#staging.dup/staging-dream-camera-msm_camera-fix-coding-style-issues.patch +#staging.dup/staging-wlan-ng-fix-most-of-the-style-issues-in-hfa384x.h.patch + diff --git a/staging.dup/staging-comedi-fix-bracing-coding-style-and-80-character-issues-in-ni_660x.c.patch b/staging.dup/staging-comedi-fix-bracing-coding-style-and-80-character-issues-in-ni_660x.c.patch new file mode 100644 index 00000000000000..999717e62a04d3 --- /dev/null +++ b/staging.dup/staging-comedi-fix-bracing-coding-style-and-80-character-issues-in-ni_660x.c.patch @@ -0,0 +1,147 @@ +From gman.1352@googlemail.com Tue Feb 23 16:32:18 2010 +From: Graham M Howe <gman.1352@googlemail.com> +Date: Wed, 10 Feb 2010 18:11:47 +0000 +Subject: Staging: comedi: fix bracing coding style and 80 character issues in ni_660x.c +To: gregkh@suse.de, wfp5p@virginia.edu +Message-ID: <1265825507-4123-1-git-send-email-gman.1352@googlemail.com> + +This is a patch to the ni_660x.c file that fixes up the brace and 80 +character issues found by the checkpatch tool + +Signed-off-by: Graham M Howe <gmhowe@btopenworld.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/comedi/drivers/ni_660x.c | 48 +++++++++++++++---------------- + 1 file changed, 24 insertions(+), 24 deletions(-) + +--- a/drivers/staging/comedi/drivers/ni_660x.c ++++ b/drivers/staging/comedi/drivers/ni_660x.c +@@ -52,7 +52,8 @@ enum ni_660x_constants { + }; + + #define NUM_PFI_CHANNELS 40 +-/* really there are only up to 3 dma channels, but the register layout allows for 4 */ ++/* really there are only up to 3 dma channels, but the register layout allows ++for 4 */ + #define MAX_DMA_CHANNEL 4 + + /* See Register-Level Programmer Manual page 3.1 */ +@@ -198,7 +199,7 @@ struct NI_660xRegisterData { + const char *name; /* Register Name */ + int offset; /* Offset from base address from GPCT chip */ + enum ni_660x_register_direction direction; +- enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */ ++ enum ni_660x_register_width size; /*1 byte, 2 bytes, or 4 bytes*/ + }; + + static const struct NI_660xRegisterData registerData[NumRegisters] = { +@@ -382,8 +383,8 @@ enum global_interrupt_config_register_bi + }; + + /* Offset of the GPCT chips from the base-adress of the card */ +-static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; /* First chip is at base-address + +- 0x00, etc. */ ++/* First chip is at base-address + 0x00, etc. */ ++static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; + + /* Board description*/ + struct ni_660x_board { +@@ -993,9 +994,9 @@ static int ni_660x_allocate_private(stru + spin_lock_init(&private(dev)->mite_channel_lock); + spin_lock_init(&private(dev)->interrupt_lock); + spin_lock_init(&private(dev)->soft_reg_copy_lock); +- for (i = 0; i < NUM_PFI_CHANNELS; ++i) { ++ for (i = 0; i < NUM_PFI_CHANNELS; ++i) + private(dev)->pfi_output_selects[i] = pfi_output_select_counter; +- } ++ + return 0; + } + +@@ -1008,9 +1009,8 @@ static int ni_660x_alloc_mite_rings(stru + for (j = 0; j < counters_per_chip; ++j) { + private(dev)->mite_rings[i][j] = + mite_alloc_ring(private(dev)->mite); +- if (private(dev)->mite_rings[i][j] == NULL) { ++ if (private(dev)->mite_rings[i][j] == NULL) + return -ENOMEM; +- } + } + } + return 0; +@@ -1022,9 +1022,8 @@ static void ni_660x_free_mite_rings(stru + unsigned j; + + for (i = 0; i < board(dev)->n_chips; ++i) { +- for (j = 0; j < counters_per_chip; ++j) { ++ for (j = 0; j < counters_per_chip; ++j) + mite_free_ring(private(dev)->mite_rings[i][j]); +- } + } + } + +@@ -1078,15 +1077,16 @@ static int ni_660x_attach(struct comedi_ + s->insn_bits = ni_660x_dio_insn_bits; + s->insn_config = ni_660x_dio_insn_config; + s->io_bits = 0; /* all bits default to input */ +- /* we use the ioconfig registers to control dio direction, so zero output enables in stc dio control reg */ ++ /* we use the ioconfig registers to control dio direction, so zero ++ output enables in stc dio control reg */ + ni_660x_write_register(dev, 0, 0, STCDIOControl); + + private(dev)->counter_dev = ni_gpct_device_construct(dev, +- &ni_gpct_write_register, +- &ni_gpct_read_register, +- ni_gpct_variant_660x, +- ni_660x_num_counters +- (dev)); ++ &ni_gpct_write_register, ++ &ni_gpct_read_register, ++ ni_gpct_variant_660x, ++ ni_660x_num_counters ++ (dev)); + if (private(dev)->counter_dev == NULL) + return -ENOMEM; + for (i = 0; i < NI_660X_MAX_NUM_COUNTERS; ++i) { +@@ -1118,12 +1118,12 @@ static int ni_660x_attach(struct comedi_ + s->type = COMEDI_SUBD_UNUSED; + } + } +- for (i = 0; i < board(dev)->n_chips; ++i) { ++ for (i = 0; i < board(dev)->n_chips; ++i) + init_tio_chip(dev, i); +- } +- for (i = 0; i < ni_660x_num_counters(dev); ++i) { ++ ++ for (i = 0; i < ni_660x_num_counters(dev); ++i) + ni_tio_init_counter(&private(dev)->counter_dev->counters[i]); +- } ++ + for (i = 0; i < NUM_PFI_CHANNELS; ++i) { + if (i < min_counter_pfi_chan) + ni_660x_set_pfi_routing(dev, i, pfi_output_select_do); +@@ -1134,9 +1134,9 @@ static int ni_660x_attach(struct comedi_ + } + /* to be safe, set counterswap bits on tio chips after all the counter + outputs have been set to high impedance mode */ +- for (i = 0; i < board(dev)->n_chips; ++i) { ++ for (i = 0; i < board(dev)->n_chips; ++i) + set_tio_counterswap(dev, i); +- } ++ + ret = request_irq(mite_irq(private(dev)->mite), ni_660x_interrupt, + IRQF_SHARED, "ni_660x", dev); + if (ret < 0) { +@@ -1193,9 +1193,9 @@ static void init_tio_chip(struct comedi_ + private(dev)-> + dma_configuration_soft_copies[chipset], + DMAConfigRegister); +- for (i = 0; i < NUM_PFI_CHANNELS; ++i) { ++ for (i = 0; i < NUM_PFI_CHANNELS; ++i) + ni_660x_write_register(dev, chipset, 0, IOConfigReg(i)); +- } ++ + } + + static int diff --git a/staging.dup/staging-comedi-fix-bracing-coding-style-issue-in-ni_65xx.c.patch b/staging.dup/staging-comedi-fix-bracing-coding-style-issue-in-ni_65xx.c.patch new file mode 100644 index 00000000000000..caed31e60890cc --- /dev/null +++ b/staging.dup/staging-comedi-fix-bracing-coding-style-issue-in-ni_65xx.c.patch @@ -0,0 +1,98 @@ +From gman.1352@googlemail.com Tue Feb 23 16:31:02 2010 +From: Graham M Howe <gman.1352@googlemail.com> +Date: Tue, 9 Feb 2010 23:42:25 +0000 +Subject: Staging: comedi: fix bracing coding style issue in ni_65xx.c +To: gregkh@suse.de, wfp5p@virginia.edu, fmhess@users.sourceforge.net +Message-ID: <1265758945-6592-1-git-send-email-gman.1352@googlemail.com> + + +This is a patch to the ni_65xx.c file that fixes up a brace +warning found by the checkpatch.pl tool + +Signed-off-by: Graham M Howe <gmhowe@btopenworld.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/comedi/drivers/ni_65xx.c | 31 +++++++++++++++++-------------- + 1 file changed, 17 insertions(+), 14 deletions(-) + +--- a/drivers/staging/comedi/drivers/ni_65xx.c ++++ b/drivers/staging/comedi/drivers/ni_65xx.c +@@ -26,12 +26,13 @@ + /* + Driver: ni_65xx + Description: National Instruments 65xx static dio boards +-Author: Jon Grierson <jd@renko.co.uk>, Frank Mori Hess <fmhess@users.sourceforge.net> ++Author: Jon Grierson <jd@renko.co.uk>, ++ Frank Mori Hess <fmhess@users.sourceforge.net> + Status: testing +-Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, PCI-6511, +- PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, PXI-6514, PCI-6515, +- PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, PCI-6520, PCI-6521, PXI-6521, +- PCI-6528, PXI-6528 ++Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, ++ PCI-6511, PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, ++ PXI-6514, PCI-6515, PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, ++ PCI-6520, PCI-6521, PXI-6521, PCI-6528, PXI-6528 + Updated: Wed Oct 18 08:59:11 EDT 2006 + + Based on the PCI-6527 driver by ds. +@@ -418,7 +419,8 @@ static int ni_65xx_dio_insn_bits(struct + return -EINVAL; + base_bitfield_channel = CR_CHAN(insn->chanspec); + for (j = 0; j < max_ports_per_bitfield; ++j) { +- const unsigned port_offset = ni_65xx_port_by_channel(base_bitfield_channel) + j; ++ const unsigned port_offset = ++ ni_65xx_port_by_channel(base_bitfield_channel) + j; + const unsigned port = + sprivate(s)->base_port + port_offset; + unsigned base_port_channel; +@@ -463,11 +465,11 @@ static int ni_65xx_dio_insn_bits(struct + * subdevice.) */ + port_read_bits ^= 0xFF; + } +- if (bitshift > 0) { ++ if (bitshift > 0) + port_read_bits <<= bitshift; +- } else { ++ else + port_read_bits >>= -bitshift; +- } ++ + read_bits |= port_read_bits; + } + data[1] = read_bits; +@@ -532,7 +534,8 @@ static int ni_65xx_intr_cmdtest(struct c + if (err) + return 1; + +- /* step 2: make sure trigger sources are unique and mutually compatible */ ++ /* step 2: make sure trigger sources are unique and mutually ++ compatible */ + + if (err) + return 2; +@@ -790,9 +793,9 @@ static int ni_65xx_detach(struct comedi_ + Master_Interrupt_Control); + } + +- if (dev->irq) { ++ if (dev->irq) + free_irq(dev->irq, dev); +- } ++ + + if (private(dev)) { + unsigned i; +@@ -802,9 +805,9 @@ static int ni_65xx_detach(struct comedi_ + dev->subdevices[i].private = NULL; + } + } +- if (private(dev)->mite) { ++ if (private(dev)->mite) + mite_unsetup(private(dev)->mite); +- } ++ + } + return 0; + } diff --git a/staging.dup/staging-comedi-pcmad-checkpatch-cleanups.patch b/staging.dup/staging-comedi-pcmad-checkpatch-cleanups.patch new file mode 100644 index 00000000000000..9a8e1a7a8a9fb9 --- /dev/null +++ b/staging.dup/staging-comedi-pcmad-checkpatch-cleanups.patch @@ -0,0 +1,71 @@ +From b.adolphi@googlemail.com Tue Feb 23 16:30:36 2010 +From: Benjamin Adolphi <b.adolphi@googlemail.com> +Date: Sat, 6 Feb 2010 20:06:50 +0100 +Subject: Staging: comedi: pcmad: Checkpatch cleanups +To: Greg Kroah-Hartman <gregkh@suse.de> +Cc: Benjamin Adolphi <b.adolphi@gmail.com> +Message-ID: <1265483210-25581-1-git-send-email-b.adolphi@gmail.com> + + +This fixes all checkpatch issues in the pcmad comedi driver. + +Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/comedi/drivers/pcmad.c | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +--- a/drivers/staging/comedi/drivers/pcmad.c ++++ b/drivers/staging/comedi/drivers/pcmad.c +@@ -34,11 +34,11 @@ Configuration options: + [0] - I/O port base + [1] - unused + [2] - Analog input reference +- 0 = single ended +- 1 = differential ++ 0 = single ended ++ 1 = differential + [3] - Analog input encoding (must match jumpers) +- 0 = straight binary +- 1 = two's complement ++ 0 = straight binary ++ 1 = two's complement + */ + + #include <linux/interrupt.h> +@@ -113,9 +113,8 @@ static int pcmad_ai_insn_read(struct com + data[n] = inb(dev->iobase + PCMAD_LSB); + data[n] |= (inb(dev->iobase + PCMAD_MSB) << 8); + +- if (devpriv->twos_comp) { ++ if (devpriv->twos_comp) + data[n] ^= (1 << (this_board->n_ai_bits - 1)); +- } + } + + return n; +@@ -135,7 +134,7 @@ static int pcmad_attach(struct comedi_de + unsigned long iobase; + + iobase = it->options[0]; +- printk("comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); ++ printk(KERN_INFO "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); + if (!request_region(iobase, PCMAD_SIZE, "pcmad")) { + printk("I/O port conflict\n"); + return -EIO; +@@ -166,11 +165,11 @@ static int pcmad_attach(struct comedi_de + + static int pcmad_detach(struct comedi_device *dev) + { +- printk("comedi%d: pcmad: remove\n", dev->minor); ++ printk(KERN_INFO "comedi%d: pcmad: remove\n", dev->minor); + +- if (dev->irq) { ++ if (dev->irq) + free_irq(dev->irq, dev); +- } ++ + if (dev->iobase) + release_region(dev->iobase, PCMAD_SIZE); + diff --git a/staging.dup/staging-comedi-poc-fix-coding-style-issues.patch b/staging.dup/staging-comedi-poc-fix-coding-style-issues.patch new file mode 100644 index 00000000000000..3b174add304522 --- /dev/null +++ b/staging.dup/staging-comedi-poc-fix-coding-style-issues.patch @@ -0,0 +1,44 @@ +From chihau@gmail.com Tue Feb 23 16:30:16 2010 +From: Chihau Chau <chihau@gmail.com> +Date: Thu, 4 Feb 2010 22:27:05 -0300 +Subject: Staging: comedi: poc: fix coding style issues +To: gregkh@suse.de, wfp5p@virginia.edu, sgayda2@uiuc.edu, mithlesh@linsyssoft.com +Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Chihau Chau <chihau@gmail.com> +Message-ID: <1265333225-6726-1-git-send-email-chihau@gmail.com> + + +From: Chihau Chau <chihau@gmail.com> + +This fixes a line over 80 characters and a brace warnings. + +Signed-off-by: Chihau Chau <chihau@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/comedi/drivers/poc.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +--- a/drivers/staging/comedi/drivers/poc.c ++++ b/drivers/staging/comedi/drivers/poc.c +@@ -136,8 +136,8 @@ static int poc_attach(struct comedi_devi + /* check if io addresses are available */ + if (!request_region(iobase, iosize, "dac02")) { + printk +- ("I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n", +- iobase, iobase + iosize - 1); ++ ("I/O port conflict: failed to allocate ports 0x%lx to " ++ "0x%lx\n", iobase, iobase + iosize - 1); + return -EIO; + } + dev->iobase = iobase; +@@ -156,9 +156,8 @@ static int poc_attach(struct comedi_devi + s->insn_write = this_board->winsn; + s->insn_read = this_board->rinsn; + s->insn_bits = this_board->insnbits; +- if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) { ++ if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) + s->subdev_flags = SDF_WRITABLE; +- } + + return 0; + } diff --git a/staging.dup/staging-dream-camera-msm_camera-fix-coding-style-issues.patch b/staging.dup/staging-dream-camera-msm_camera-fix-coding-style-issues.patch new file mode 100644 index 00000000000000..95eb0758b0105f --- /dev/null +++ b/staging.dup/staging-dream-camera-msm_camera-fix-coding-style-issues.patch @@ -0,0 +1,50 @@ +From chihau@gmail.com Tue Feb 23 16:33:16 2010 +From: Chihau Chau <chihau@gmail.com> +Date: Thu, 11 Feb 2010 15:47:47 -0300 +Subject: Staging: dream: camera: msm_camera: fix coding style issues +To: gregkh@suse.de, pavel@ucw.cz +Message-ID: <1265914067-11150-1-git-send-email-chihau@gmail.com> + + +From: Chihau Chau <chihau@gmail.com> + +This fixes some coding style issues like to use __func__ instead +__FUNCTION__, "foo *bar" instead "foo* bar" and a initial comment with +"/* */" instead "//" + +Signed-off-by: Chihau Chau <chihau@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/dream/camera/msm_camera.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/staging/dream/camera/msm_camera.c ++++ b/drivers/staging/dream/camera/msm_camera.c +@@ -2,7 +2,7 @@ + * Copyright (C) 2008-2009 QUALCOMM Incorporated. + */ + +-//FIXME: most allocations need not be GFP_ATOMIC ++/* FIXME: most allocations need not be GFP_ATOMIC */ + /* FIXME: management of mutexes */ + /* FIXME: msm_pmem_region_lookup return values */ + /* FIXME: way too many copy to/from user */ +@@ -361,7 +361,7 @@ static int __msm_get_frame(struct msm_sy + if (!frame->buffer) { + pr_err("%s: cannot get frame, invalid lookup address " + "y=%x cbcr=%x offset=%d\n", +- __FUNCTION__, ++ __func__, + pphy->y_phy, + pphy->cbcr_phy, + frame->y_off); +@@ -455,7 +455,7 @@ static int msm_disable_vfe(struct msm_sy + return rc; + } + +-static struct msm_queue_cmd* __msm_control(struct msm_sync *sync, ++static struct msm_queue_cmd *__msm_control(struct msm_sync *sync, + struct msm_control_device_queue *queue, + struct msm_queue_cmd *qcmd, + int timeout) diff --git a/staging.dup/staging-wlan-ng-fix-most-of-the-style-issues-in-hfa384x.h.patch b/staging.dup/staging-wlan-ng-fix-most-of-the-style-issues-in-hfa384x.h.patch new file mode 100644 index 00000000000000..c22a5113c0d731 --- /dev/null +++ b/staging.dup/staging-wlan-ng-fix-most-of-the-style-issues-in-hfa384x.h.patch @@ -0,0 +1,333 @@ +From al3xbio@gmail.com Tue Feb 23 16:35:59 2010 +From: Alessandro Ghedini <al3xbio@gmail.com> +Date: Mon, 15 Feb 2010 12:25:22 +0100 +Subject: Staging: wlan-ng: fix most of the style issues in hfa384x.h +To: gregkh@suse.de, jmm@debian.org, mithlesh@linsyssoft.com, karllinuxtest.relton@ntlworld.com +Cc: Alessandro Ghedini <al3xbio@gmail.com> +Message-ID: <1266233122-3043-1-git-send-email-al3xbio@gmail.com> + + +This patch fixes all the errors and the majority of the warnings found with +checkpatch.pl script in hfa384x.h, following Gábor Stefanik hints + +Signed-off-by: Alessandro Ghedini <al3xbio@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/staging/wlan-ng/hfa384x.h | 182 ++++++++++++++++++++++---------------- + 1 file changed, 107 insertions(+), 75 deletions(-) + +--- a/drivers/staging/wlan-ng/hfa384x.h ++++ b/drivers/staging/wlan-ng/hfa384x.h +@@ -61,17 +61,17 @@ + #include <linux/if_ether.h> + + /*--- Mins & Maxs -----------------------------------*/ +-#define HFA384x_PORTID_MAX ((u16)7) +-#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) +-#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ +-#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ +-#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK */ +-#define HFA384x_SCANRESULT_MAX ((u16)31) +-#define HFA384x_HSCANRESULT_MAX ((u16)31) +-#define HFA384x_CHINFORESULT_MAX ((u16)16) +-#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ +-#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN +-#define HFA384x_USB_RWMEM_MAXLEN 2048 ++#define HFA384x_PORTID_MAX ((u16)7) ++#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) ++#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ ++#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ ++#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/ ++#define HFA384x_SCANRESULT_MAX ((u16)31) ++#define HFA384x_HSCANRESULT_MAX ((u16)31) ++#define HFA384x_CHINFORESULT_MAX ((u16)16) ++#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ ++#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN ++#define HFA384x_USB_RWMEM_MAXLEN 2048 + + /*--- Support Constants -----------------------------*/ + #define HFA384x_PORTTYPE_IBSS ((u16)0) +@@ -114,9 +114,9 @@ + #define HFA384x_ADDR_AUX_OFF_MASK (0x007f) + + /* Make a 32-bit flat address from AUX format 16-bit page and offset */ +-#define HFA384x_ADDR_AUX_MKFLAT(p, o) \ +- (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ +- ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)) ++#define HFA384x_ADDR_AUX_MKFLAT(p, o) \ ++ ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ ++ ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))) + + /* Make CMD format offset and page from a 32-bit flat address */ + #define HFA384x_ADDR_CMD_MKPAGE(f) \ +@@ -135,12 +135,21 @@ + #define HFA384x_DLSTATE_FLASHENABLED 2 + + /*--- Register Field Masks --------------------------*/ +-#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) +-#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) ++#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) \ ++ | BIT(12) | BIT(11) \ ++ | BIT(10) | BIT(9) \ ++ | BIT(8))) ++#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | \ ++ BIT(8))) + #define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8))) +-#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0))) +- +-#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) ++#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | \ ++ BIT(3) | BIT(2) | \ ++ BIT(1) | BIT(0))) ++ ++#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) \ ++ | BIT(12) | BIT(11) \ ++ | BIT(10) | BIT(9) \ ++ | BIT(8))) + + /*--- Command Code Constants --------------------------*/ + /*--- Controller Commands --------------------------*/ +@@ -244,8 +253,10 @@ Information RID Lengths: MAC Informatio + This is the length of JUST the DATA part of the RID (does not + include the len or code fields) + --------------------------------------------------------------------*/ +-#define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t)) +-#define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t)) ++#define HFA384x_RID_DBMCOMMSQUALITY_LEN \ ++ ((u16) sizeof(hfa384x_dbmcommsquality_t)) ++#define HFA384x_RID_JOINREQUEST_LEN \ ++ ((u16)sizeof(hfa384x_JoinRequest_data_t)) + + /*-------------------------------------------------------------------- + Information RIDs: Modem Information +@@ -322,9 +333,11 @@ PD Record codes + + /*--- Register Test/Get/Set Field macros ------------------------*/ + +-#define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8)) +-#define HFA384x_CMD_MACPORT_SET(value) ((u16)HFA384x_CMD_AINFO_SET(value)) +-#define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)value)) ++#define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8)) ++#define HFA384x_CMD_MACPORT_SET(value) \ ++ ((u16)HFA384x_CMD_AINFO_SET(value)) ++#define HFA384x_CMD_PROGMODE_SET(value) \ ++ ((u16)HFA384x_CMD_AINFO_SET((u16)value)) + #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value)) + + #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8) +@@ -402,7 +415,7 @@ typedef struct hfa384x_authenticateStati + /*-- Configuration Record: WPAData (data portion only) --*/ + typedef struct hfa384x_WPAData { + u16 datalen; +- u8 data[0]; // max 80 ++ u8 data[0]; /* max 80 */ + } __attribute__ ((packed)) hfa384x_WPAData_t; + + /*-------------------------------------------------------------------- +@@ -479,7 +492,8 @@ Communication Frames: Field Masks for Tr + #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1)) + #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0)) + /*-- Transmit Control Field --*/ +-#define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) ++#define HFA384x_TX_MACPORT ((u16)(BIT(10) | \ ++ BIT(9) | BIT(8))) + #define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3))) + #define HFA384x_TX_TXEX ((u16)BIT(2)) + #define HFA384x_TX_TXOK ((u16)BIT(1)) +@@ -496,7 +510,8 @@ Communication Frames: Test/Get/Set Field + #define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m))) + + #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8) +-#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, HFA384x_TX_STRUCTYPE, 3) ++#define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \ ++ HFA384x_TX_STRUCTYPE, 3) + #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2) + #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1) + /*-------------------------------------------------------------------- +@@ -534,13 +549,17 @@ Communication Frames: Field Masks for Re + --------------------------------------------------------------------*/ + + /*-- Status Fields --*/ +-#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) ++#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | \ ++ BIT(9) | \ ++ BIT(8))) + #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0)) + /*-------------------------------------------------------------------- + Communication Frames: Test/Get/Set Field Values for Receive Frames + --------------------------------------------------------------------*/ +-#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MACPORT) >> 8)) +-#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR)) ++#define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \ ++ & HFA384x_RXSTATUS_MACPORT) >> 8)) ++#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \ ++ & HFA384x_RXSTATUS_FCSERR)) + /*-------------------------------------------------------------------- + FRAME STRUCTURES: Information Types and Information Frame Structures + ---------------------------------------------------------------------- +@@ -1133,7 +1152,7 @@ struct hfa384x; + + typedef void (*ctlx_cmdcb_t) (struct hfa384x *, const struct hfa384x_usbctlx *); + +-typedef void (*ctlx_usercb_t) (struct hfa384x * hw, ++typedef void (*ctlx_usercb_t) (struct hfa384x *hw, + void *ctlxresult, void *usercb_data); + + typedef struct hfa384x_usbctlx { +@@ -1174,14 +1193,14 @@ typedef struct hfa484x_metacmd { + } hfa384x_metacmd_t; + + #define MAX_GRP_ADDR 32 +-#define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ ++#define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ + +-#define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */ +-#define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */ +-#define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */ +-#define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */ +-#define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */ +-#define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */ ++#define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */ ++#define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */ ++#define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */ ++#define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */ ++#define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */ ++#define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */ + + /* XXX These are going away ASAP */ + typedef struct prism2sta_authlist { +@@ -1294,10 +1313,23 @@ typedef struct hfa384x { + hfa384x_caplevel_t cap_sup_ap; + + /* Actor compatibility ranges */ +- hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */ +- hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */ ++ hfa384x_caplevel_t cap_act_pri_cfi; /* ++ * pri f/w to controller ++ * interface ++ */ ++ ++ hfa384x_caplevel_t cap_act_sta_cfi; /* ++ * sta f/w to controller ++ * interface ++ */ ++ + hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */ +- hfa384x_caplevel_t cap_act_ap_cfi; /* ap f/w to controller interface */ ++ ++ hfa384x_caplevel_t cap_act_ap_cfi; /* ++ * ap f/w to controller ++ * interface ++ */ ++ + hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */ + + u32 psusercount; /* Power save user count. */ +@@ -1320,25 +1352,25 @@ typedef struct hfa384x { + + } hfa384x_t; + +-void hfa384x_create(hfa384x_t * hw, struct usb_device *usb); +-void hfa384x_destroy(hfa384x_t * hw); ++void hfa384x_create(hfa384x_t *hw, struct usb_device *usb); ++void hfa384x_destroy(hfa384x_t *hw); + + int +-hfa384x_corereset(hfa384x_t * hw, int holdtime, int settletime, int genesis); +-int hfa384x_drvr_commtallies(hfa384x_t * hw); +-int hfa384x_drvr_disable(hfa384x_t * hw, u16 macport); +-int hfa384x_drvr_enable(hfa384x_t * hw, u16 macport); +-int hfa384x_drvr_flashdl_enable(hfa384x_t * hw); +-int hfa384x_drvr_flashdl_disable(hfa384x_t * hw); +-int hfa384x_drvr_flashdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); +-int hfa384x_drvr_getconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); +-int hfa384x_drvr_ramdl_enable(hfa384x_t * hw, u32 exeaddr); +-int hfa384x_drvr_ramdl_disable(hfa384x_t * hw); +-int hfa384x_drvr_ramdl_write(hfa384x_t * hw, u32 daddr, void *buf, u32 len); +-int hfa384x_drvr_readpda(hfa384x_t * hw, void *buf, unsigned int len); +-int hfa384x_drvr_setconfig(hfa384x_t * hw, u16 rid, void *buf, u16 len); ++hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis); ++int hfa384x_drvr_commtallies(hfa384x_t *hw); ++int hfa384x_drvr_disable(hfa384x_t *hw, u16 macport); ++int hfa384x_drvr_enable(hfa384x_t *hw, u16 macport); ++int hfa384x_drvr_flashdl_enable(hfa384x_t *hw); ++int hfa384x_drvr_flashdl_disable(hfa384x_t *hw); ++int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len); ++int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len); ++int hfa384x_drvr_ramdl_enable(hfa384x_t *hw, u32 exeaddr); ++int hfa384x_drvr_ramdl_disable(hfa384x_t *hw); ++int hfa384x_drvr_ramdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len); ++int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len); ++int hfa384x_drvr_setconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len); + +-static inline int hfa384x_drvr_getconfig16(hfa384x_t * hw, u16 rid, void *val) ++static inline int hfa384x_drvr_getconfig16(hfa384x_t *hw, u16 rid, void *val) + { + int result = 0; + result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16)); +@@ -1347,46 +1379,46 @@ static inline int hfa384x_drvr_getconfig + return result; + } + +-static inline int hfa384x_drvr_setconfig16(hfa384x_t * hw, u16 rid, u16 val) ++static inline int hfa384x_drvr_setconfig16(hfa384x_t *hw, u16 rid, u16 val) + { + u16 value = cpu_to_le16(val); + return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value)); + } + + int +-hfa384x_drvr_getconfig_async(hfa384x_t * hw, ++hfa384x_drvr_getconfig_async(hfa384x_t *hw, + u16 rid, ctlx_usercb_t usercb, void *usercb_data); + + int +-hfa384x_drvr_setconfig_async(hfa384x_t * hw, ++hfa384x_drvr_setconfig_async(hfa384x_t *hw, + u16 rid, + void *buf, + u16 len, ctlx_usercb_t usercb, void *usercb_data); + + static inline int +-hfa384x_drvr_setconfig16_async(hfa384x_t * hw, u16 rid, u16 val) ++hfa384x_drvr_setconfig16_async(hfa384x_t *hw, u16 rid, u16 val) + { + u16 value = cpu_to_le16(val); + return hfa384x_drvr_setconfig_async(hw, rid, &value, sizeof(value), + NULL, NULL); + } + +-int hfa384x_drvr_start(hfa384x_t * hw); +-int hfa384x_drvr_stop(hfa384x_t * hw); ++int hfa384x_drvr_start(hfa384x_t *hw); ++int hfa384x_drvr_stop(hfa384x_t *hw); + int +-hfa384x_drvr_txframe(hfa384x_t * hw, struct sk_buff *skb, +- p80211_hdr_t * p80211_hdr, p80211_metawep_t * p80211_wep); +-void hfa384x_tx_timeout(wlandevice_t * wlandev); +- +-int hfa384x_cmd_initialize(hfa384x_t * hw); +-int hfa384x_cmd_enable(hfa384x_t * hw, u16 macport); +-int hfa384x_cmd_disable(hfa384x_t * hw, u16 macport); +-int hfa384x_cmd_allocate(hfa384x_t * hw, u16 len); +-int hfa384x_cmd_monitor(hfa384x_t * hw, u16 enable); ++hfa384x_drvr_txframe(hfa384x_t *hw, struct sk_buff *skb, ++ p80211_hdr_t *p80211_hdr, p80211_metawep_t *p80211_wep); ++void hfa384x_tx_timeout(wlandevice_t *wlandev); ++ ++int hfa384x_cmd_initialize(hfa384x_t *hw); ++int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport); ++int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport); ++int hfa384x_cmd_allocate(hfa384x_t *hw, u16 len); ++int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable); + int +-hfa384x_cmd_download(hfa384x_t * hw, ++hfa384x_cmd_download(hfa384x_t *hw, + u16 mode, u16 lowaddr, u16 highaddr, u16 codelen); + +-#endif /* __KERNEL__ */ ++#endif /*__KERNEL__ */ + +-#endif /* _HFA384x_H */ ++#endif /*_HFA384x_H */ @@ -1 +1 @@ -2.6.33-rc8 +2.6.33 |
