Commit b02957d5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: Merge two branches of coding style fixes together

Turns out that multiple people sent pretty much the same patch
for the same staging drivers.  Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parents 3a8954e8 b94c765a
...@@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644); ...@@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644);
int comedi_autoconfig = 1; int comedi_autoconfig = 1;
module_param(comedi_autoconfig, bool, 0444); module_param(comedi_autoconfig, bool, 0444);
int comedi_num_legacy_minors = 0; int comedi_num_legacy_minors;
module_param(comedi_num_legacy_minors, int, 0444); module_param(comedi_num_legacy_minors, int, 0444);
static DEFINE_SPINLOCK(comedi_file_info_table_lock); static DEFINE_SPINLOCK(comedi_file_info_table_lock);
...@@ -1510,7 +1510,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) ...@@ -1510,7 +1510,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait)
} }
static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes, static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes,
loff_t * offset) loff_t *offset)
{ {
struct comedi_subdevice *s; struct comedi_subdevice *s;
struct comedi_async *async; struct comedi_async *async;
...@@ -1612,7 +1612,7 @@ static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes, ...@@ -1612,7 +1612,7 @@ static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes,
} }
static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes, static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes,
loff_t * offset) loff_t *offset)
{ {
struct comedi_subdevice *s; struct comedi_subdevice *s;
struct comedi_async *async; struct comedi_async *async;
......
...@@ -54,7 +54,6 @@ enum ni_660x_constants { ...@@ -54,7 +54,6 @@ enum ni_660x_constants {
#define NUM_PFI_CHANNELS 40 #define NUM_PFI_CHANNELS 40
/* really there are only up to 3 dma channels, but the register layout allows /* really there are only up to 3 dma channels, but the register layout allows
for 4 */ for 4 */
#define MAX_DMA_CHANNEL 4 #define MAX_DMA_CHANNEL 4
/* See Register-Level Programmer Manual page 3.1 */ /* See Register-Level Programmer Manual page 3.1 */
...@@ -1082,8 +1081,7 @@ static int ni_660x_attach(struct comedi_device *dev, ...@@ -1082,8 +1081,7 @@ static int ni_660x_attach(struct comedi_device *dev,
output enables in stc dio control reg */ output enables in stc dio control reg */
ni_660x_write_register(dev, 0, 0, STCDIOControl); ni_660x_write_register(dev, 0, 0, STCDIOControl);
private(dev)->counter_dev private(dev)->counter_dev = ni_gpct_device_construct(dev,
= ni_gpct_device_construct(dev,
&ni_gpct_write_register, &ni_gpct_write_register,
&ni_gpct_read_register, &ni_gpct_read_register,
ni_gpct_variant_660x, ni_gpct_variant_660x,
......
...@@ -628,9 +628,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, ...@@ -628,9 +628,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
/* analog output */ /* analog output */
s = dev->subdevices + 1; s = dev->subdevices + 1;
if (thisboard->has_ao) { if (thisboard->has_ao) {
/* Could provide command support, except it only has a /*
* Could provide command support, except it only has a
* one sample hardware buffer for analog output and no * one sample hardware buffer for analog output and no
* underrun flag. */ * underrun flag.
*/
s->type = COMEDI_SUBD_AO; s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND; s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
s->n_chan = NUM_AO_CHAN; s->n_chan = NUM_AO_CHAN;
...@@ -1149,6 +1151,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1149,6 +1151,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
/* initialize software conversion count */ /* initialize software conversion count */
if (cmd->stop_src == TRIG_COUNT) if (cmd->stop_src == TRIG_COUNT)
devpriv->count = cmd->stop_arg * cmd->chanlist_len; devpriv->count = cmd->stop_arg * cmd->chanlist_len;
/* setup hardware conversion counter */ /* setup hardware conversion counter */
if (cmd->stop_src == TRIG_EXT) { if (cmd->stop_src == TRIG_EXT) {
/* load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */ /* load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */
...@@ -1403,7 +1406,10 @@ static irqreturn_t labpc_interrupt(int irq, void *d) ...@@ -1403,7 +1406,10 @@ static irqreturn_t labpc_interrupt(int irq, void *d)
} }
if (devpriv->current_transfer == isa_dma_transfer) { if (devpriv->current_transfer == isa_dma_transfer) {
/* if a dma terminal count of external stop trigger has occurred */ /*
* if a dma terminal count of external stop trigger
* has occurred
*/
if (devpriv->status1_bits & DMATC_BIT || if (devpriv->status1_bits & DMATC_BIT ||
(thisboard->register_layout == labpc_1200_layout (thisboard->register_layout == labpc_1200_layout
&& devpriv->status2_bits & A1_TC_BIT)) { && devpriv->status2_bits & A1_TC_BIT)) {
...@@ -1523,6 +1529,7 @@ static void labpc_drain_dma(struct comedi_device *dev) ...@@ -1523,6 +1529,7 @@ static void labpc_drain_dma(struct comedi_device *dev)
/* write data to comedi buffer */ /* write data to comedi buffer */
for (i = 0; i < num_points; i++) for (i = 0; i < num_points; i++)
cfc_write_to_buffer(s, devpriv->dma_buffer[i]); cfc_write_to_buffer(s, devpriv->dma_buffer[i]);
if (async->cmd.stop_src == TRIG_COUNT) if (async->cmd.stop_src == TRIG_COUNT)
devpriv->count -= num_points; devpriv->count -= num_points;
......
...@@ -134,7 +134,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -134,7 +134,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase; unsigned long iobase;
iobase = it->options[0]; iobase = it->options[0];
printk(KERN_NOTICE "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")) { if (!request_region(iobase, PCMAD_SIZE, "pcmad")) {
printk(KERN_CONT "I/O port conflict\n"); printk(KERN_CONT "I/O port conflict\n");
return -EIO; return -EIO;
...@@ -166,10 +166,11 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -166,10 +166,11 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
static int pcmad_detach(struct comedi_device *dev) static int pcmad_detach(struct comedi_device *dev)
{ {
printk(KERN_NOTICE "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); free_irq(dev->irq, dev);
if (dev->iobase) if (dev->iobase)
release_region(dev->iobase, PCMAD_SIZE); release_region(dev->iobase, PCMAD_SIZE);
......
...@@ -128,15 +128,15 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -128,15 +128,15 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dev->board_name = this_board->name; dev->board_name = this_board->name;
if (iobase == 0) { if (iobase == 0) {
printk(KERN_WARNING "io base address required\n"); printk(KERN_ERR "io base address required\n");
return -EINVAL; return -EINVAL;
} }
iosize = this_board->iosize; iosize = this_board->iosize;
/* check if io addresses are available */ /* check if io addresses are available */
if (!request_region(iobase, iosize, "dac02")) { if (!request_region(iobase, iosize, "dac02")) {
printk(KERN_WARNING "I/O port conflict: failed to allocate " printk(KERN_ERR "I/O port conflict: failed to allocate ports "
"ports 0x%lx to 0x%lx\n", iobase, iobase + iosize - 1); "0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
return -EIO; return -EIO;
} }
dev->iobase = iobase; dev->iobase = iobase;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Copyright (C) 2008-2009 QUALCOMM Incorporated. * 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: management of mutexes */
/* FIXME: msm_pmem_region_lookup return values */ /* FIXME: msm_pmem_region_lookup return values */
/* FIXME: way too many copy to/from user */ /* FIXME: way too many copy to/from user */
...@@ -1619,7 +1619,8 @@ static int msm_release_control(struct inode *node, struct file *filep) ...@@ -1619,7 +1619,8 @@ static int msm_release_control(struct inode *node, struct file *filep)
int rc; int rc;
struct msm_control_device *ctrl_pmsm = filep->private_data; struct msm_control_device *ctrl_pmsm = filep->private_data;
struct msm_device *pmsm = ctrl_pmsm->pmsm; struct msm_device *pmsm = ctrl_pmsm->pmsm;
printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); printk(KERN_INFO "msm_camera: RELEASE %s\n",
filep->f_path.dentry->d_name.name);
rc = __msm_release(pmsm->sync); rc = __msm_release(pmsm->sync);
if (!rc) { if (!rc) {
MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q); MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q);
...@@ -1633,7 +1634,8 @@ static int msm_release_frame(struct inode *node, struct file *filep) ...@@ -1633,7 +1634,8 @@ static int msm_release_frame(struct inode *node, struct file *filep)
{ {
int rc; int rc;
struct msm_device *pmsm = filep->private_data; struct msm_device *pmsm = filep->private_data;
printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); printk(KERN_INFO "msm_camera: RELEASE %s\n",
filep->f_path.dentry->d_name.name);
rc = __msm_release(pmsm->sync); rc = __msm_release(pmsm->sync);
if (!rc) { if (!rc) {
MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q); MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q);
......
...@@ -743,13 +743,11 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data) ...@@ -743,13 +743,11 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data)
} }
/* initialize AF */ /* initialize AF */
rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3146, 0x3A);
0x3146, 0x3A)
if (rc < 0) if (rc < 0)
goto init_fail1; goto init_fail1;
rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3130, 0x03);
0x3130, 0x03)
if (rc < 0) if (rc < 0)
goto init_fail1; goto init_fail1;
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) #define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1))
#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ #define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */
#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ #define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */
#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK */ #define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/
#define HFA384x_SCANRESULT_MAX ((u16)31) #define HFA384x_SCANRESULT_MAX ((u16)31)
#define HFA384x_HSCANRESULT_MAX ((u16)31) #define HFA384x_HSCANRESULT_MAX ((u16)31)
#define HFA384x_CHINFORESULT_MAX ((u16)16) #define HFA384x_CHINFORESULT_MAX ((u16)16)
...@@ -135,12 +135,21 @@ ...@@ -135,12 +135,21 @@
#define HFA384x_DLSTATE_FLASHENABLED 2 #define HFA384x_DLSTATE_FLASHENABLED 2
/*--- Register Field Masks --------------------------*/ /*--- 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_AINFO ((u16)(BIT(14) | BIT(13) \
#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) | 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_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_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_STATUS_RESULT ((u16)(BIT(14) | BIT(13) \
| BIT(12) | BIT(11) \
| BIT(10) | BIT(9) \
| BIT(8)))
/*--- Command Code Constants --------------------------*/ /*--- Command Code Constants --------------------------*/
/*--- Controller Commands --------------------------*/ /*--- Controller Commands --------------------------*/
...@@ -244,8 +253,10 @@ Information RID Lengths: MAC Information ...@@ -244,8 +253,10 @@ Information RID Lengths: MAC Information
This is the length of JUST the DATA part of the RID (does not This is the length of JUST the DATA part of the RID (does not
include the len or code fields) include the len or code fields)
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
#define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t)) #define HFA384x_RID_DBMCOMMSQUALITY_LEN \
#define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t)) ((u16) sizeof(hfa384x_dbmcommsquality_t))
#define HFA384x_RID_JOINREQUEST_LEN \
((u16)sizeof(hfa384x_JoinRequest_data_t))
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Information RIDs: Modem Information Information RIDs: Modem Information
...@@ -323,8 +334,10 @@ PD Record codes ...@@ -323,8 +334,10 @@ PD Record codes
/*--- Register Test/Get/Set Field macros ------------------------*/ /*--- Register Test/Get/Set Field macros ------------------------*/
#define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8)) #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_MACPORT_SET(value) \
#define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)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_CMD_CMDCODE_SET(value) ((u16)(value))
#define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8) #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8)
...@@ -479,7 +492,8 @@ Communication Frames: Field Masks for Transmit Frames ...@@ -479,7 +492,8 @@ Communication Frames: Field Masks for Transmit Frames
#define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1)) #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1))
#define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0)) #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0))
/*-- Transmit Control Field --*/ /*-- 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_STRUCTYPE ((u16)(BIT(4) | BIT(3)))
#define HFA384x_TX_TXEX ((u16)BIT(2)) #define HFA384x_TX_TXEX ((u16)BIT(2))
#define HFA384x_TX_TXOK ((u16)BIT(1)) #define HFA384x_TX_TXOK ((u16)BIT(1))
...@@ -496,7 +510,8 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames ...@@ -496,7 +510,8 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames
#define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m))) #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_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_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) #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1)
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
...@@ -534,13 +549,17 @@ Communication Frames: Field Masks for Receive Frames ...@@ -534,13 +549,17 @@ Communication Frames: Field Masks for Receive Frames
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
/*-- Status Fields --*/ /*-- 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)) #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0))
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Communication Frames: Test/Get/Set Field Values for Receive Frames 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_MACPORT_GET(value) ((u16)((((u16)(value)) \
#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR)) & HFA384x_RXSTATUS_MACPORT) >> 8))
#define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \
& HFA384x_RXSTATUS_FCSERR))
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
FRAME STRUCTURES: Information Types and Information Frame Structures FRAME STRUCTURES: Information Types and Information Frame Structures
---------------------------------------------------------------------- ----------------------------------------------------------------------
...@@ -1294,10 +1313,23 @@ typedef struct hfa384x { ...@@ -1294,10 +1313,23 @@ typedef struct hfa384x {
hfa384x_caplevel_t cap_sup_ap; hfa384x_caplevel_t cap_sup_ap;
/* Actor compatibility ranges */ /* Actor compatibility ranges */
hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */ hfa384x_caplevel_t cap_act_pri_cfi; /*
hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */ * 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_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 */ hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */
u32 psusercount; /* Power save user count. */ u32 psusercount; /* Power save user count. */
...@@ -1387,6 +1419,6 @@ int ...@@ -1387,6 +1419,6 @@ int
hfa384x_cmd_download(hfa384x_t *hw, hfa384x_cmd_download(hfa384x_t *hw,
u16 mode, u16 lowaddr, u16 highaddr, u16 codelen); u16 mode, u16 lowaddr, u16 highaddr, u16 codelen);
#endif /* __KERNEL__ */ #endif /*__KERNEL__ */
#endif /* _HFA384x_H */ #endif /*_HFA384x_H */
...@@ -118,10 +118,10 @@ ...@@ -118,10 +118,10 @@
#include <linux/wireless.h> #include <linux/wireless.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <asm/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/bitops.h> #include <linux/bitops.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/byteorder/generic.h> #include <linux/byteorder/generic.h>
...@@ -1909,22 +1909,19 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) ...@@ -1909,22 +1909,19 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
return -EINVAL; return -EINVAL;
/* Retrieve the buffer loc&size and timeout */ /* Retrieve the buffer loc&size and timeout */
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER, result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
&(hw->bufinfo), sizeof(hw->bufinfo)); &(hw->bufinfo), sizeof(hw->bufinfo));
if (result) { if (result)
return result; return result;
}
hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page); hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset); hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len); hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME, result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
&(hw->dltimeout)); &(hw->dltimeout));
if (result)
if (result) {
return result; return result;
}
hw->dltimeout = le16_to_cpu(hw->dltimeout); hw->dltimeout = le16_to_cpu(hw->dltimeout);
pr_debug("flashdl_enable\n"); pr_debug("flashdl_enable\n");
...@@ -3075,9 +3072,7 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) ...@@ -3075,9 +3072,7 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw)
hfa384x_ctlxout_callback, hw); hfa384x_ctlxout_callback, hw);
hw->ctlx_urb.transfer_flags |= USB_QUEUE_BULK; hw->ctlx_urb.transfer_flags |= USB_QUEUE_BULK;
/* Now submit the URB and update the CTLX's state /* Now submit the URB and update the CTLX's state */
*/
result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC); result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC);
if (result == 0) { if (result == 0) {
/* This CTLX is now running on the active queue */ /* This CTLX is now running on the active queue */
...@@ -3878,10 +3873,9 @@ static void hfa384x_ctlxout_callback(struct urb *urb) ...@@ -3878,10 +3873,9 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
delresp: delresp:
if (delete_resptimer) { if (delete_resptimer) {
timer_ok = del_timer(&hw->resptimer); timer_ok = del_timer(&hw->resptimer);
if (timer_ok != 0) { if (timer_ok != 0)
hw->resp_timer_done = 1; hw->resp_timer_done = 1;
} }
}
spin_unlock_irqrestore(&hw->ctlxq.lock, flags); spin_unlock_irqrestore(&hw->ctlxq.lock, flags);
......
...@@ -208,8 +208,7 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, ...@@ -208,8 +208,7 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv,
p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC); p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC);
foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
skb->len, skb->len,
(wlandev->hostwep & (wlandev->hostwep &HOSTWEP_DEFAULTKEY_MASK),
HOSTWEP_DEFAULTKEY_MASK),
p80211_wep->iv, p80211_wep->icv); p80211_wep->iv, p80211_wep->icv);
if (foo) { if (foo) {
printk(KERN_WARNING printk(KERN_WARNING
......
...@@ -190,9 +190,9 @@ ...@@ -190,9 +190,9 @@
(P80211DID_MKSECTION(2) | \ (P80211DID_MKSECTION(2) | \
P80211DID_MKGROUP(1)) P80211DID_MKGROUP(1))
#define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \ #define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \
((P80211DID_MKSECTION(2) | \ (P80211DID_MKSECTION(2) | \
P80211DID_MKGROUP(1) | \ P80211DID_MKGROUP(1) | \
P80211DID_MKITEM(1) | 0x18000000)) P80211DID_MKITEM(1) | 0x18000000)
#define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \ #define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \
(P80211DID_MKSECTION(2) | \ (P80211DID_MKSECTION(2) | \
P80211DID_MKGROUP(1) | \ P80211DID_MKGROUP(1) | \
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
#include <linux/wireless.h> #include <linux/wireless.h>
#include <net/iw_handler.h> #include <net/iw_handler.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <asm/bitops.h> #include <linux/bitops.h>
#include <asm/uaccess.h> #include <linux/uaccess.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <linux/bitops.h> #include <linux/bitops.h>
...@@ -555,13 +555,12 @@ static int p80211wext_siwencode(netdevice_t *dev, ...@@ -555,13 +555,12 @@ static int p80211wext_siwencode(netdevice_t *dev,
/* Check the Key index first. */ /* Check the Key index first. */
i = (erq->flags & IW_ENCODE_INDEX); i = (erq->flags & IW_ENCODE_INDEX);
if (i) { if (i) {
if ((i < 1) || (i > NUM_WEPKEYS)) { if ((i < 1) || (i > NUM_WEPKEYS)) {
err = -EINVAL; err = -EINVAL;
goto exit; goto exit;
} else } else {
i--; i--;
}
/* Set current key number only if no keys are given */ /* Set current key number only if no keys are given */
if (erq->flags & IW_ENCODE_NOKEY) { if (erq->flags & IW_ENCODE_NOKEY) {
result = result =
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#include <linux/wireless.h> #include <linux/wireless.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/io.h> #include <linux/io.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/usb.h> #include <linux/usb.h>
...@@ -1157,9 +1157,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) ...@@ -1157,9 +1157,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
/* Save macport 0 state */ /* Save macport 0 state */
result = hfa384x_drvr_getconfig16(hw, result = hfa384x_drvr_getconfig16(hw,
HFA384x_RID_CNFPORTTYPE, HFA384x_RID_CNFPORTTYPE,
& &(hw->presniff_port_type));
(hw->
presniff_port_type));
if (result) { if (result) {
pr_debug pr_debug
("failed to read porttype, result=%d\n", ("failed to read porttype, result=%d\n",
...@@ -1169,9 +1167,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) ...@@ -1169,9 +1167,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
/* Save the wepflags state */ /* Save the wepflags state */
result = hfa384x_drvr_getconfig16(hw, result = hfa384x_drvr_getconfig16(hw,
HFA384x_RID_CNFWEPFLAGS, HFA384x_RID_CNFWEPFLAGS,
& &(hw->presniff_wepflags));
(hw->
presniff_wepflags));
if (result) { if (result) {
pr_debug pr_debug
("failed to read wepflags, result=%d\n", ("failed to read wepflags, result=%d\n",
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#include <linux/byteorder/generic.h> #include <linux/byteorder/generic.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <asm/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/if_arp.h> #include <linux/if_arp.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment