diff options
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 6 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_660x.c | 16 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc.c | 13 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/pcmad.c | 13 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/poc.c | 6 | ||||
-rw-r--r-- | drivers/staging/dream/camera/msm_camera.c | 8 | ||||
-rw-r--r-- | drivers/staging/dream/camera/s5k3e2fx.c | 6 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x.h | 106 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x_usb.c | 26 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211conv.c | 15 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211metadef.h | 4 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211wext.c | 11 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2fw.c | 8 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2mgmt.c | 26 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2mib.c | 6 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 2 |
16 files changed, 149 insertions, 123 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 79653e868c12..aca96747e5e2 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c | |||
@@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644); | |||
63 | int comedi_autoconfig = 1; | 63 | int comedi_autoconfig = 1; |
64 | module_param(comedi_autoconfig, bool, 0444); | 64 | module_param(comedi_autoconfig, bool, 0444); |
65 | 65 | ||
66 | int comedi_num_legacy_minors = 0; | 66 | int comedi_num_legacy_minors; |
67 | module_param(comedi_num_legacy_minors, int, 0444); | 67 | module_param(comedi_num_legacy_minors, int, 0444); |
68 | 68 | ||
69 | static DEFINE_SPINLOCK(comedi_file_info_table_lock); | 69 | static DEFINE_SPINLOCK(comedi_file_info_table_lock); |
@@ -1510,7 +1510,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) | |||
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes, | 1512 | static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes, |
1513 | loff_t * offset) | 1513 | loff_t *offset) |
1514 | { | 1514 | { |
1515 | struct comedi_subdevice *s; | 1515 | struct comedi_subdevice *s; |
1516 | struct comedi_async *async; | 1516 | struct comedi_async *async; |
@@ -1612,7 +1612,7 @@ done: | |||
1612 | } | 1612 | } |
1613 | 1613 | ||
1614 | static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes, | 1614 | static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes, |
1615 | loff_t * offset) | 1615 | loff_t *offset) |
1616 | { | 1616 | { |
1617 | struct comedi_subdevice *s; | 1617 | struct comedi_subdevice *s; |
1618 | struct comedi_async *async; | 1618 | struct comedi_async *async; |
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index f74fc5e6ba20..017630fb2424 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c | |||
@@ -54,7 +54,6 @@ enum ni_660x_constants { | |||
54 | #define NUM_PFI_CHANNELS 40 | 54 | #define NUM_PFI_CHANNELS 40 |
55 | /* really there are only up to 3 dma channels, but the register layout allows | 55 | /* really there are only up to 3 dma channels, but the register layout allows |
56 | for 4 */ | 56 | for 4 */ |
57 | |||
58 | #define MAX_DMA_CHANNEL 4 | 57 | #define MAX_DMA_CHANNEL 4 |
59 | 58 | ||
60 | /* See Register-Level Programmer Manual page 3.1 */ | 59 | /* See Register-Level Programmer Manual page 3.1 */ |
@@ -200,7 +199,7 @@ struct NI_660xRegisterData { | |||
200 | const char *name; /* Register Name */ | 199 | const char *name; /* Register Name */ |
201 | int offset; /* Offset from base address from GPCT chip */ | 200 | int offset; /* Offset from base address from GPCT chip */ |
202 | enum ni_660x_register_direction direction; | 201 | enum ni_660x_register_direction direction; |
203 | enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */ | 202 | enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */ |
204 | }; | 203 | }; |
205 | 204 | ||
206 | static const struct NI_660xRegisterData registerData[NumRegisters] = { | 205 | static const struct NI_660xRegisterData registerData[NumRegisters] = { |
@@ -1082,13 +1081,12 @@ static int ni_660x_attach(struct comedi_device *dev, | |||
1082 | output enables in stc dio control reg */ | 1081 | output enables in stc dio control reg */ |
1083 | ni_660x_write_register(dev, 0, 0, STCDIOControl); | 1082 | ni_660x_write_register(dev, 0, 0, STCDIOControl); |
1084 | 1083 | ||
1085 | private(dev)->counter_dev | 1084 | private(dev)->counter_dev = ni_gpct_device_construct(dev, |
1086 | = ni_gpct_device_construct(dev, | 1085 | &ni_gpct_write_register, |
1087 | &ni_gpct_write_register, | 1086 | &ni_gpct_read_register, |
1088 | &ni_gpct_read_register, | 1087 | ni_gpct_variant_660x, |
1089 | ni_gpct_variant_660x, | 1088 | ni_660x_num_counters |
1090 | ni_660x_num_counters | 1089 | (dev)); |
1091 | (dev)); | ||
1092 | if (private(dev)->counter_dev == NULL) | 1090 | if (private(dev)->counter_dev == NULL) |
1093 | return -ENOMEM; | 1091 | return -ENOMEM; |
1094 | for (i = 0; i < NI_660X_MAX_NUM_COUNTERS; ++i) { | 1092 | for (i = 0; i < NI_660X_MAX_NUM_COUNTERS; ++i) { |
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index bc5662e2a9bf..3c88caaa9dab 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c | |||
@@ -628,9 +628,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase, | |||
628 | /* analog output */ | 628 | /* analog output */ |
629 | s = dev->subdevices + 1; | 629 | s = dev->subdevices + 1; |
630 | if (thisboard->has_ao) { | 630 | if (thisboard->has_ao) { |
631 | /* Could provide command support, except it only has a | 631 | /* |
632 | * Could provide command support, except it only has a | ||
632 | * one sample hardware buffer for analog output and no | 633 | * one sample hardware buffer for analog output and no |
633 | * underrun flag. */ | 634 | * underrun flag. |
635 | */ | ||
634 | s->type = COMEDI_SUBD_AO; | 636 | s->type = COMEDI_SUBD_AO; |
635 | s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND; | 637 | s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND; |
636 | s->n_chan = NUM_AO_CHAN; | 638 | s->n_chan = NUM_AO_CHAN; |
@@ -1149,6 +1151,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) | |||
1149 | /* initialize software conversion count */ | 1151 | /* initialize software conversion count */ |
1150 | if (cmd->stop_src == TRIG_COUNT) | 1152 | if (cmd->stop_src == TRIG_COUNT) |
1151 | devpriv->count = cmd->stop_arg * cmd->chanlist_len; | 1153 | devpriv->count = cmd->stop_arg * cmd->chanlist_len; |
1154 | |||
1152 | /* setup hardware conversion counter */ | 1155 | /* setup hardware conversion counter */ |
1153 | if (cmd->stop_src == TRIG_EXT) { | 1156 | if (cmd->stop_src == TRIG_EXT) { |
1154 | /* load counter a1 with count of 3 (pc+ manual says this is minimum allowed) using mode 0 */ | 1157 | /* 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 | } | 1406 | } |
1404 | 1407 | ||
1405 | if (devpriv->current_transfer == isa_dma_transfer) { | 1408 | if (devpriv->current_transfer == isa_dma_transfer) { |
1406 | /* if a dma terminal count of external stop trigger has occurred */ | 1409 | /* |
1410 | * if a dma terminal count of external stop trigger | ||
1411 | * has occurred | ||
1412 | */ | ||
1407 | if (devpriv->status1_bits & DMATC_BIT || | 1413 | if (devpriv->status1_bits & DMATC_BIT || |
1408 | (thisboard->register_layout == labpc_1200_layout | 1414 | (thisboard->register_layout == labpc_1200_layout |
1409 | && devpriv->status2_bits & A1_TC_BIT)) { | 1415 | && devpriv->status2_bits & A1_TC_BIT)) { |
@@ -1523,6 +1529,7 @@ static void labpc_drain_dma(struct comedi_device *dev) | |||
1523 | /* write data to comedi buffer */ | 1529 | /* write data to comedi buffer */ |
1524 | for (i = 0; i < num_points; i++) | 1530 | for (i = 0; i < num_points; i++) |
1525 | cfc_write_to_buffer(s, devpriv->dma_buffer[i]); | 1531 | cfc_write_to_buffer(s, devpriv->dma_buffer[i]); |
1532 | |||
1526 | if (async->cmd.stop_src == TRIG_COUNT) | 1533 | if (async->cmd.stop_src == TRIG_COUNT) |
1527 | devpriv->count -= num_points; | 1534 | devpriv->count -= num_points; |
1528 | 1535 | ||
diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index 44ed777599c4..fab8092bd7aa 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c | |||
@@ -34,11 +34,11 @@ Configuration options: | |||
34 | [0] - I/O port base | 34 | [0] - I/O port base |
35 | [1] - unused | 35 | [1] - unused |
36 | [2] - Analog input reference | 36 | [2] - Analog input reference |
37 | 0 = single ended | 37 | 0 = single ended |
38 | 1 = differential | 38 | 1 = differential |
39 | [3] - Analog input encoding (must match jumpers) | 39 | [3] - Analog input encoding (must match jumpers) |
40 | 0 = straight binary | 40 | 0 = straight binary |
41 | 1 = two's complement | 41 | 1 = two's complement |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
@@ -134,7 +134,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
134 | unsigned long iobase; | 134 | unsigned long iobase; |
135 | 135 | ||
136 | iobase = it->options[0]; | 136 | iobase = it->options[0]; |
137 | printk(KERN_NOTICE "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); | 137 | printk(KERN_INFO "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase); |
138 | if (!request_region(iobase, PCMAD_SIZE, "pcmad")) { | 138 | if (!request_region(iobase, PCMAD_SIZE, "pcmad")) { |
139 | printk(KERN_CONT "I/O port conflict\n"); | 139 | printk(KERN_CONT "I/O port conflict\n"); |
140 | return -EIO; | 140 | return -EIO; |
@@ -166,10 +166,11 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
166 | 166 | ||
167 | static int pcmad_detach(struct comedi_device *dev) | 167 | static int pcmad_detach(struct comedi_device *dev) |
168 | { | 168 | { |
169 | printk(KERN_NOTICE "comedi%d: pcmad: remove\n", dev->minor); | 169 | printk(KERN_INFO "comedi%d: pcmad: remove\n", dev->minor); |
170 | 170 | ||
171 | if (dev->irq) | 171 | if (dev->irq) |
172 | free_irq(dev->irq, dev); | 172 | free_irq(dev->irq, dev); |
173 | |||
173 | if (dev->iobase) | 174 | if (dev->iobase) |
174 | release_region(dev->iobase, PCMAD_SIZE); | 175 | release_region(dev->iobase, PCMAD_SIZE); |
175 | 176 | ||
diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c index 8990bf2fc186..1ebc356ce40e 100644 --- a/drivers/staging/comedi/drivers/poc.c +++ b/drivers/staging/comedi/drivers/poc.c | |||
@@ -128,15 +128,15 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
128 | dev->board_name = this_board->name; | 128 | dev->board_name = this_board->name; |
129 | 129 | ||
130 | if (iobase == 0) { | 130 | if (iobase == 0) { |
131 | printk(KERN_WARNING "io base address required\n"); | 131 | printk(KERN_ERR "io base address required\n"); |
132 | return -EINVAL; | 132 | return -EINVAL; |
133 | } | 133 | } |
134 | 134 | ||
135 | iosize = this_board->iosize; | 135 | iosize = this_board->iosize; |
136 | /* check if io addresses are available */ | 136 | /* check if io addresses are available */ |
137 | if (!request_region(iobase, iosize, "dac02")) { | 137 | if (!request_region(iobase, iosize, "dac02")) { |
138 | printk(KERN_WARNING "I/O port conflict: failed to allocate " | 138 | printk(KERN_ERR "I/O port conflict: failed to allocate ports " |
139 | "ports 0x%lx to 0x%lx\n", iobase, iobase + iosize - 1); | 139 | "0x%lx to 0x%lx\n", iobase, iobase + iosize - 1); |
140 | return -EIO; | 140 | return -EIO; |
141 | } | 141 | } |
142 | dev->iobase = iobase; | 142 | dev->iobase = iobase; |
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 06dba60dda0b..dc7c603625c7 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Copyright (C) 2008-2009 QUALCOMM Incorporated. | 2 | * Copyright (C) 2008-2009 QUALCOMM Incorporated. |
3 | */ | 3 | */ |
4 | 4 | ||
5 | /* FIXME: most allocations need not be GFP_ATOMIC | 5 | /* FIXME: most allocations need not be GFP_ATOMIC */ |
6 | /* FIXME: management of mutexes */ | 6 | /* FIXME: management of mutexes */ |
7 | /* FIXME: msm_pmem_region_lookup return values */ | 7 | /* FIXME: msm_pmem_region_lookup return values */ |
8 | /* FIXME: way too many copy to/from user */ | 8 | /* FIXME: way too many copy to/from user */ |
@@ -1619,7 +1619,8 @@ static int msm_release_control(struct inode *node, struct file *filep) | |||
1619 | int rc; | 1619 | int rc; |
1620 | struct msm_control_device *ctrl_pmsm = filep->private_data; | 1620 | struct msm_control_device *ctrl_pmsm = filep->private_data; |
1621 | struct msm_device *pmsm = ctrl_pmsm->pmsm; | 1621 | struct msm_device *pmsm = ctrl_pmsm->pmsm; |
1622 | printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); | 1622 | printk(KERN_INFO "msm_camera: RELEASE %s\n", |
1623 | filep->f_path.dentry->d_name.name); | ||
1623 | rc = __msm_release(pmsm->sync); | 1624 | rc = __msm_release(pmsm->sync); |
1624 | if (!rc) { | 1625 | if (!rc) { |
1625 | MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q); | 1626 | 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 | { | 1634 | { |
1634 | int rc; | 1635 | int rc; |
1635 | struct msm_device *pmsm = filep->private_data; | 1636 | struct msm_device *pmsm = filep->private_data; |
1636 | printk(KERN_INFO "msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name); | 1637 | printk(KERN_INFO "msm_camera: RELEASE %s\n", |
1638 | filep->f_path.dentry->d_name.name); | ||
1637 | rc = __msm_release(pmsm->sync); | 1639 | rc = __msm_release(pmsm->sync); |
1638 | if (!rc) { | 1640 | if (!rc) { |
1639 | MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q); | 1641 | MSM_DRAIN_QUEUE(pmsm->sync, prev_frame_q); |
diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index cbd432da88ee..841792e2624b 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c | |||
@@ -743,13 +743,11 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data) | |||
743 | } | 743 | } |
744 | 744 | ||
745 | /* initialize AF */ | 745 | /* initialize AF */ |
746 | rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, | 746 | rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3146, 0x3A); |
747 | 0x3146, 0x3A) | ||
748 | if (rc < 0) | 747 | if (rc < 0) |
749 | goto init_fail1; | 748 | goto init_fail1; |
750 | 749 | ||
751 | rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, | 750 | rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3130, 0x03); |
752 | 0x3130, 0x03) | ||
753 | if (rc < 0) | 751 | if (rc < 0) |
754 | goto init_fail1; | 752 | goto init_fail1; |
755 | 753 | ||
diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index d93e6e90720b..1fa42e01e8cb 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h | |||
@@ -61,17 +61,17 @@ | |||
61 | #include <linux/if_ether.h> | 61 | #include <linux/if_ether.h> |
62 | 62 | ||
63 | /*--- Mins & Maxs -----------------------------------*/ | 63 | /*--- Mins & Maxs -----------------------------------*/ |
64 | #define HFA384x_PORTID_MAX ((u16)7) | 64 | #define HFA384x_PORTID_MAX ((u16)7) |
65 | #define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) | 65 | #define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) |
66 | #define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ | 66 | #define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ |
67 | #define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ | 67 | #define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ |
68 | #define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK */ | 68 | #define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/ |
69 | #define HFA384x_SCANRESULT_MAX ((u16)31) | 69 | #define HFA384x_SCANRESULT_MAX ((u16)31) |
70 | #define HFA384x_HSCANRESULT_MAX ((u16)31) | 70 | #define HFA384x_HSCANRESULT_MAX ((u16)31) |
71 | #define HFA384x_CHINFORESULT_MAX ((u16)16) | 71 | #define HFA384x_CHINFORESULT_MAX ((u16)16) |
72 | #define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ | 72 | #define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ |
73 | #define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN | 73 | #define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN |
74 | #define HFA384x_USB_RWMEM_MAXLEN 2048 | 74 | #define HFA384x_USB_RWMEM_MAXLEN 2048 |
75 | 75 | ||
76 | /*--- Support Constants -----------------------------*/ | 76 | /*--- Support Constants -----------------------------*/ |
77 | #define HFA384x_PORTTYPE_IBSS ((u16)0) | 77 | #define HFA384x_PORTTYPE_IBSS ((u16)0) |
@@ -135,12 +135,21 @@ | |||
135 | #define HFA384x_DLSTATE_FLASHENABLED 2 | 135 | #define HFA384x_DLSTATE_FLASHENABLED 2 |
136 | 136 | ||
137 | /*--- Register Field Masks --------------------------*/ | 137 | /*--- Register Field Masks --------------------------*/ |
138 | #define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) | 138 | #define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) \ |
139 | #define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) | 139 | | BIT(12) | BIT(11) \ |
140 | | BIT(10) | BIT(9) \ | ||
141 | | BIT(8))) | ||
142 | #define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | \ | ||
143 | BIT(8))) | ||
140 | #define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8))) | 144 | #define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8))) |
141 | #define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0))) | 145 | #define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | \ |
146 | BIT(3) | BIT(2) | \ | ||
147 | BIT(1) | BIT(0))) | ||
142 | 148 | ||
143 | #define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) | 149 | #define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) \ |
150 | | BIT(12) | BIT(11) \ | ||
151 | | BIT(10) | BIT(9) \ | ||
152 | | BIT(8))) | ||
144 | 153 | ||
145 | /*--- Command Code Constants --------------------------*/ | 154 | /*--- Command Code Constants --------------------------*/ |
146 | /*--- Controller Commands --------------------------*/ | 155 | /*--- Controller Commands --------------------------*/ |
@@ -244,8 +253,10 @@ Information RID Lengths: MAC Information | |||
244 | This is the length of JUST the DATA part of the RID (does not | 253 | This is the length of JUST the DATA part of the RID (does not |
245 | include the len or code fields) | 254 | include the len or code fields) |
246 | --------------------------------------------------------------------*/ | 255 | --------------------------------------------------------------------*/ |
247 | #define HFA384x_RID_DBMCOMMSQUALITY_LEN ((u16)sizeof(hfa384x_dbmcommsquality_t)) | 256 | #define HFA384x_RID_DBMCOMMSQUALITY_LEN \ |
248 | #define HFA384x_RID_JOINREQUEST_LEN ((u16)sizeof(hfa384x_JoinRequest_data_t)) | 257 | ((u16) sizeof(hfa384x_dbmcommsquality_t)) |
258 | #define HFA384x_RID_JOINREQUEST_LEN \ | ||
259 | ((u16)sizeof(hfa384x_JoinRequest_data_t)) | ||
249 | 260 | ||
250 | /*-------------------------------------------------------------------- | 261 | /*-------------------------------------------------------------------- |
251 | Information RIDs: Modem Information | 262 | Information RIDs: Modem Information |
@@ -322,9 +333,11 @@ PD Record codes | |||
322 | 333 | ||
323 | /*--- Register Test/Get/Set Field macros ------------------------*/ | 334 | /*--- Register Test/Get/Set Field macros ------------------------*/ |
324 | 335 | ||
325 | #define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8)) | 336 | #define HFA384x_CMD_AINFO_SET(value) ((u16)((u16)(value) << 8)) |
326 | #define HFA384x_CMD_MACPORT_SET(value) ((u16)HFA384x_CMD_AINFO_SET(value)) | 337 | #define HFA384x_CMD_MACPORT_SET(value) \ |
327 | #define HFA384x_CMD_PROGMODE_SET(value) ((u16)HFA384x_CMD_AINFO_SET((u16)value)) | 338 | ((u16)HFA384x_CMD_AINFO_SET(value)) |
339 | #define HFA384x_CMD_PROGMODE_SET(value) \ | ||
340 | ((u16)HFA384x_CMD_AINFO_SET((u16)value)) | ||
328 | #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value)) | 341 | #define HFA384x_CMD_CMDCODE_SET(value) ((u16)(value)) |
329 | 342 | ||
330 | #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8) | 343 | #define HFA384x_STATUS_RESULT_SET(value) (((u16)(value)) << 8) |
@@ -479,7 +492,8 @@ Communication Frames: Field Masks for Transmit Frames | |||
479 | #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1)) | 492 | #define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1)) |
480 | #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0)) | 493 | #define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0)) |
481 | /*-- Transmit Control Field --*/ | 494 | /*-- Transmit Control Field --*/ |
482 | #define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) | 495 | #define HFA384x_TX_MACPORT ((u16)(BIT(10) | \ |
496 | BIT(9) | BIT(8))) | ||
483 | #define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3))) | 497 | #define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3))) |
484 | #define HFA384x_TX_TXEX ((u16)BIT(2)) | 498 | #define HFA384x_TX_TXEX ((u16)BIT(2)) |
485 | #define HFA384x_TX_TXOK ((u16)BIT(1)) | 499 | #define HFA384x_TX_TXOK ((u16)BIT(1)) |
@@ -496,7 +510,8 @@ Communication Frames: Test/Get/Set Field Values for Transmit Frames | |||
496 | #define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m))) | 510 | #define HFA384x_TX_SET(v, m, s) ((((u16)(v))<<((u16)(s)))&((u16)(m))) |
497 | 511 | ||
498 | #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8) | 512 | #define HFA384x_TX_MACPORT_SET(v) HFA384x_TX_SET(v, HFA384x_TX_MACPORT, 8) |
499 | #define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, HFA384x_TX_STRUCTYPE, 3) | 513 | #define HFA384x_TX_STRUCTYPE_SET(v) HFA384x_TX_SET(v, \ |
514 | HFA384x_TX_STRUCTYPE, 3) | ||
500 | #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2) | 515 | #define HFA384x_TX_TXEX_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXEX, 2) |
501 | #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1) | 516 | #define HFA384x_TX_TXOK_SET(v) HFA384x_TX_SET(v, HFA384x_TX_TXOK, 1) |
502 | /*-------------------------------------------------------------------- | 517 | /*-------------------------------------------------------------------- |
@@ -534,13 +549,17 @@ Communication Frames: Field Masks for Receive Frames | |||
534 | --------------------------------------------------------------------*/ | 549 | --------------------------------------------------------------------*/ |
535 | 550 | ||
536 | /*-- Status Fields --*/ | 551 | /*-- Status Fields --*/ |
537 | #define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) | 552 | #define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | \ |
553 | BIT(9) | \ | ||
554 | BIT(8))) | ||
538 | #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0)) | 555 | #define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0)) |
539 | /*-------------------------------------------------------------------- | 556 | /*-------------------------------------------------------------------- |
540 | Communication Frames: Test/Get/Set Field Values for Receive Frames | 557 | Communication Frames: Test/Get/Set Field Values for Receive Frames |
541 | --------------------------------------------------------------------*/ | 558 | --------------------------------------------------------------------*/ |
542 | #define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) & HFA384x_RXSTATUS_MACPORT) >> 8)) | 559 | #define HFA384x_RXSTATUS_MACPORT_GET(value) ((u16)((((u16)(value)) \ |
543 | #define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) & HFA384x_RXSTATUS_FCSERR)) | 560 | & HFA384x_RXSTATUS_MACPORT) >> 8)) |
561 | #define HFA384x_RXSTATUS_ISFCSERR(value) ((u16)(((u16)(value)) \ | ||
562 | & HFA384x_RXSTATUS_FCSERR)) | ||
544 | /*-------------------------------------------------------------------- | 563 | /*-------------------------------------------------------------------- |
545 | FRAME STRUCTURES: Information Types and Information Frame Structures | 564 | FRAME STRUCTURES: Information Types and Information Frame Structures |
546 | ---------------------------------------------------------------------- | 565 | ---------------------------------------------------------------------- |
@@ -1174,14 +1193,14 @@ typedef struct hfa484x_metacmd { | |||
1174 | } hfa384x_metacmd_t; | 1193 | } hfa384x_metacmd_t; |
1175 | 1194 | ||
1176 | #define MAX_GRP_ADDR 32 | 1195 | #define MAX_GRP_ADDR 32 |
1177 | #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ | 1196 | #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ |
1178 | 1197 | ||
1179 | #define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */ | 1198 | #define WLAN_AUTH_MAX 60 /* Max. # of authenticated stations. */ |
1180 | #define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */ | 1199 | #define WLAN_ACCESS_MAX 60 /* Max. # of stations in an access list. */ |
1181 | #define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */ | 1200 | #define WLAN_ACCESS_NONE 0 /* No stations may be authenticated. */ |
1182 | #define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */ | 1201 | #define WLAN_ACCESS_ALL 1 /* All stations may be authenticated. */ |
1183 | #define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */ | 1202 | #define WLAN_ACCESS_ALLOW 2 /* Authenticate only "allowed" stations. */ |
1184 | #define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */ | 1203 | #define WLAN_ACCESS_DENY 3 /* Do not authenticate "denied" stations. */ |
1185 | 1204 | ||
1186 | /* XXX These are going away ASAP */ | 1205 | /* XXX These are going away ASAP */ |
1187 | typedef struct prism2sta_authlist { | 1206 | typedef struct prism2sta_authlist { |
@@ -1294,10 +1313,23 @@ typedef struct hfa384x { | |||
1294 | hfa384x_caplevel_t cap_sup_ap; | 1313 | hfa384x_caplevel_t cap_sup_ap; |
1295 | 1314 | ||
1296 | /* Actor compatibility ranges */ | 1315 | /* Actor compatibility ranges */ |
1297 | hfa384x_caplevel_t cap_act_pri_cfi; /* pri f/w to controller interface */ | 1316 | hfa384x_caplevel_t cap_act_pri_cfi; /* |
1298 | hfa384x_caplevel_t cap_act_sta_cfi; /* sta f/w to controller interface */ | 1317 | * pri f/w to controller |
1318 | * interface | ||
1319 | */ | ||
1320 | |||
1321 | hfa384x_caplevel_t cap_act_sta_cfi; /* | ||
1322 | * sta f/w to controller | ||
1323 | * interface | ||
1324 | */ | ||
1325 | |||
1299 | hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */ | 1326 | hfa384x_caplevel_t cap_act_sta_mfi; /* sta f/w to modem interface */ |
1300 | hfa384x_caplevel_t cap_act_ap_cfi; /* ap f/w to controller interface */ | 1327 | |
1328 | hfa384x_caplevel_t cap_act_ap_cfi; /* | ||
1329 | * ap f/w to controller | ||
1330 | * interface | ||
1331 | */ | ||
1332 | |||
1301 | hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */ | 1333 | hfa384x_caplevel_t cap_act_ap_mfi; /* ap f/w to modem interface */ |
1302 | 1334 | ||
1303 | u32 psusercount; /* Power save user count. */ | 1335 | u32 psusercount; /* Power save user count. */ |
@@ -1387,6 +1419,6 @@ int | |||
1387 | hfa384x_cmd_download(hfa384x_t *hw, | 1419 | hfa384x_cmd_download(hfa384x_t *hw, |
1388 | u16 mode, u16 lowaddr, u16 highaddr, u16 codelen); | 1420 | u16 mode, u16 lowaddr, u16 highaddr, u16 codelen); |
1389 | 1421 | ||
1390 | #endif /* __KERNEL__ */ | 1422 | #endif /*__KERNEL__ */ |
1391 | 1423 | ||
1392 | #endif /* _HFA384x_H */ | 1424 | #endif /*_HFA384x_H */ |
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 612995b3d576..5df56f0238d6 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c | |||
@@ -118,10 +118,10 @@ | |||
118 | #include <linux/wireless.h> | 118 | #include <linux/wireless.h> |
119 | #include <linux/netdevice.h> | 119 | #include <linux/netdevice.h> |
120 | #include <linux/timer.h> | 120 | #include <linux/timer.h> |
121 | #include <asm/io.h> | 121 | #include <linux/io.h> |
122 | #include <linux/delay.h> | 122 | #include <linux/delay.h> |
123 | #include <asm/byteorder.h> | 123 | #include <asm/byteorder.h> |
124 | #include <asm/bitops.h> | 124 | #include <linux/bitops.h> |
125 | #include <linux/list.h> | 125 | #include <linux/list.h> |
126 | #include <linux/usb.h> | 126 | #include <linux/usb.h> |
127 | #include <linux/byteorder/generic.h> | 127 | #include <linux/byteorder/generic.h> |
@@ -1909,22 +1909,19 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw) | |||
1909 | return -EINVAL; | 1909 | return -EINVAL; |
1910 | 1910 | ||
1911 | /* Retrieve the buffer loc&size and timeout */ | 1911 | /* Retrieve the buffer loc&size and timeout */ |
1912 | |||
1913 | result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER, | 1912 | result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER, |
1914 | &(hw->bufinfo), sizeof(hw->bufinfo)); | 1913 | &(hw->bufinfo), sizeof(hw->bufinfo)); |
1915 | if (result) { | 1914 | if (result) |
1916 | return result; | 1915 | return result; |
1917 | } | 1916 | |
1918 | hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page); | 1917 | hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page); |
1919 | hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset); | 1918 | hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset); |
1920 | hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len); | 1919 | hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len); |
1921 | |||
1922 | result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME, | 1920 | result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME, |
1923 | &(hw->dltimeout)); | 1921 | &(hw->dltimeout)); |
1924 | 1922 | if (result) | |
1925 | if (result) { | ||
1926 | return result; | 1923 | return result; |
1927 | } | 1924 | |
1928 | hw->dltimeout = le16_to_cpu(hw->dltimeout); | 1925 | hw->dltimeout = le16_to_cpu(hw->dltimeout); |
1929 | 1926 | ||
1930 | pr_debug("flashdl_enable\n"); | 1927 | pr_debug("flashdl_enable\n"); |
@@ -3075,9 +3072,7 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw) | |||
3075 | hfa384x_ctlxout_callback, hw); | 3072 | hfa384x_ctlxout_callback, hw); |
3076 | hw->ctlx_urb.transfer_flags |= USB_QUEUE_BULK; | 3073 | hw->ctlx_urb.transfer_flags |= USB_QUEUE_BULK; |
3077 | 3074 | ||
3078 | /* Now submit the URB and update the CTLX's state | 3075 | /* Now submit the URB and update the CTLX's state */ |
3079 | */ | ||
3080 | |||
3081 | result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC); | 3076 | result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC); |
3082 | if (result == 0) { | 3077 | if (result == 0) { |
3083 | /* This CTLX is now running on the active queue */ | 3078 | /* This CTLX is now running on the active queue */ |
@@ -3878,9 +3873,8 @@ retry: | |||
3878 | delresp: | 3873 | delresp: |
3879 | if (delete_resptimer) { | 3874 | if (delete_resptimer) { |
3880 | timer_ok = del_timer(&hw->resptimer); | 3875 | timer_ok = del_timer(&hw->resptimer); |
3881 | if (timer_ok != 0) { | 3876 | if (timer_ok != 0) |
3882 | hw->resp_timer_done = 1; | 3877 | hw->resp_timer_done = 1; |
3883 | } | ||
3884 | } | 3878 | } |
3885 | 3879 | ||
3886 | spin_unlock_irqrestore(&hw->ctlxq.lock, flags); | 3880 | spin_unlock_irqrestore(&hw->ctlxq.lock, flags); |
diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 99c5ec45b00d..a1605fbc8092 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c | |||
@@ -207,10 +207,9 @@ int skb_ether_to_p80211(wlandevice_t *wlandev, u32 ethconv, | |||
207 | 207 | ||
208 | p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC); | 208 | p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC); |
209 | foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, | 209 | foo = wep_encrypt(wlandev, skb->data, p80211_wep->data, |
210 | skb->len, | 210 | skb->len, |
211 | (wlandev->hostwep & | 211 | (wlandev->hostwep &HOSTWEP_DEFAULTKEY_MASK), |
212 | HOSTWEP_DEFAULTKEY_MASK), | 212 | p80211_wep->iv, p80211_wep->icv); |
213 | p80211_wep->iv, p80211_wep->icv); | ||
214 | if (foo) { | 213 | if (foo) { |
215 | printk(KERN_WARNING | 214 | printk(KERN_WARNING |
216 | "Host en-WEP failed, dropping frame (%d).\n", | 215 | "Host en-WEP failed, dropping frame (%d).\n", |
@@ -324,10 +323,10 @@ int skb_p80211_to_ether(wlandevice_t *wlandev, u32 ethconv, | |||
324 | return 1; | 323 | return 1; |
325 | } | 324 | } |
326 | foo = wep_decrypt(wlandev, skb->data + payload_offset + 4, | 325 | foo = wep_decrypt(wlandev, skb->data + payload_offset + 4, |
327 | payload_length - 8, -1, | 326 | payload_length - 8, -1, |
328 | skb->data + payload_offset, | 327 | skb->data + payload_offset, |
329 | skb->data + payload_offset + | 328 | skb->data + payload_offset + |
330 | payload_length - 4); | 329 | payload_length - 4); |
331 | if (foo) { | 330 | if (foo) { |
332 | /* de-wep failed, drop skb. */ | 331 | /* de-wep failed, drop skb. */ |
333 | pr_debug("Host de-WEP failed, dropping frame (%d).\n", | 332 | pr_debug("Host de-WEP failed, dropping frame (%d).\n", |
diff --git a/drivers/staging/wlan-ng/p80211metadef.h b/drivers/staging/wlan-ng/p80211metadef.h index 10605285cf6e..0ccfba1294de 100644 --- a/drivers/staging/wlan-ng/p80211metadef.h +++ b/drivers/staging/wlan-ng/p80211metadef.h | |||
@@ -190,9 +190,9 @@ | |||
190 | (P80211DID_MKSECTION(2) | \ | 190 | (P80211DID_MKSECTION(2) | \ |
191 | P80211DID_MKGROUP(1)) | 191 | P80211DID_MKGROUP(1)) |
192 | #define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \ | 192 | #define DIDmib_dot11mac_dot11OperationTable_dot11MACAddress \ |
193 | ((P80211DID_MKSECTION(2) | \ | 193 | (P80211DID_MKSECTION(2) | \ |
194 | P80211DID_MKGROUP(1) | \ | 194 | P80211DID_MKGROUP(1) | \ |
195 | P80211DID_MKITEM(1) | 0x18000000)) | 195 | P80211DID_MKITEM(1) | 0x18000000) |
196 | #define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \ | 196 | #define DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold \ |
197 | (P80211DID_MKSECTION(2) | \ | 197 | (P80211DID_MKSECTION(2) | \ |
198 | P80211DID_MKGROUP(1) | \ | 198 | P80211DID_MKGROUP(1) | \ |
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 9fb9532c72a7..2fa1dfa23783 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c | |||
@@ -46,8 +46,8 @@ | |||
46 | #include <linux/wireless.h> | 46 | #include <linux/wireless.h> |
47 | #include <net/iw_handler.h> | 47 | #include <net/iw_handler.h> |
48 | #include <linux/if_arp.h> | 48 | #include <linux/if_arp.h> |
49 | #include <asm/bitops.h> | 49 | #include <linux/bitops.h> |
50 | #include <asm/uaccess.h> | 50 | #include <linux/uaccess.h> |
51 | #include <asm/byteorder.h> | 51 | #include <asm/byteorder.h> |
52 | #include <linux/if_ether.h> | 52 | #include <linux/if_ether.h> |
53 | #include <linux/bitops.h> | 53 | #include <linux/bitops.h> |
@@ -553,15 +553,14 @@ static int p80211wext_siwencode(netdevice_t *dev, | |||
553 | } | 553 | } |
554 | 554 | ||
555 | /* Check the Key index first. */ | 555 | /* Check the Key index first. */ |
556 | i = (erq->flags & IW_ENCODE_INDEX); | 556 | i = (erq->flags & IW_ENCODE_INDEX); |
557 | if (i) { | 557 | if (i) { |
558 | |||
559 | if ((i < 1) || (i > NUM_WEPKEYS)) { | 558 | if ((i < 1) || (i > NUM_WEPKEYS)) { |
560 | err = -EINVAL; | 559 | err = -EINVAL; |
561 | goto exit; | 560 | goto exit; |
562 | } else | 561 | } else { |
563 | i--; | 562 | i--; |
564 | 563 | } | |
565 | /* Set current key number only if no keys are given */ | 564 | /* Set current key number only if no keys are given */ |
566 | if (erq->flags & IW_ENCODE_NOKEY) { | 565 | if (erq->flags & IW_ENCODE_NOKEY) { |
567 | result = | 566 | result = |
diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index b57601250dc7..4be54cea6ad7 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c | |||
@@ -109,9 +109,9 @@ typedef struct pda { | |||
109 | } pda_t; | 109 | } pda_t; |
110 | 110 | ||
111 | typedef struct imgchunk { | 111 | typedef struct imgchunk { |
112 | u32 addr; /* start address */ | 112 | u32 addr; /* start address */ |
113 | u32 len; /* in bytes */ | 113 | u32 len; /* in bytes */ |
114 | u16 crc; /* CRC value (if it falls at a chunk boundary) */ | 114 | u16 crc; /* CRC value (if it falls at a chunk boundary) */ |
115 | u8 *data; | 115 | u8 *data; |
116 | } imgchunk_t; | 116 | } imgchunk_t; |
117 | 117 | ||
@@ -1159,7 +1159,7 @@ int validate_identity(void) | |||
1159 | /* SEC compat range */ | 1159 | /* SEC compat range */ |
1160 | if ((s3info[i].info.compat.role == 1) && | 1160 | if ((s3info[i].info.compat.role == 1) && |
1161 | (s3info[i].info.compat.id == 4)) { | 1161 | (s3info[i].info.compat.id == 4)) { |
1162 | /* FIXME: isn't something missing here? */ | 1162 | /* FIXME: isn't something missing here? */ |
1163 | } | 1163 | } |
1164 | 1164 | ||
1165 | break; | 1165 | break; |
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index eb7469eaf4b1..ad163da72ae4 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c | |||
@@ -67,7 +67,7 @@ | |||
67 | #include <linux/wireless.h> | 67 | #include <linux/wireless.h> |
68 | #include <linux/netdevice.h> | 68 | #include <linux/netdevice.h> |
69 | #include <linux/delay.h> | 69 | #include <linux/delay.h> |
70 | #include <asm/io.h> | 70 | #include <linux/io.h> |
71 | #include <asm/byteorder.h> | 71 | #include <asm/byteorder.h> |
72 | #include <linux/random.h> | 72 | #include <linux/random.h> |
73 | #include <linux/usb.h> | 73 | #include <linux/usb.h> |
@@ -1123,8 +1123,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) | |||
1123 | if (hw->presniff_port_type != 0) { | 1123 | if (hw->presniff_port_type != 0) { |
1124 | word = hw->presniff_port_type; | 1124 | word = hw->presniff_port_type; |
1125 | result = hfa384x_drvr_setconfig16(hw, | 1125 | result = hfa384x_drvr_setconfig16(hw, |
1126 | HFA384x_RID_CNFPORTTYPE, | 1126 | HFA384x_RID_CNFPORTTYPE, |
1127 | word); | 1127 | word); |
1128 | if (result) { | 1128 | if (result) { |
1129 | pr_debug | 1129 | pr_debug |
1130 | ("failed to restore porttype, result=%d\n", | 1130 | ("failed to restore porttype, result=%d\n", |
@@ -1156,10 +1156,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) | |||
1156 | if (wlandev->netdev->type == ARPHRD_ETHER) { | 1156 | if (wlandev->netdev->type == ARPHRD_ETHER) { |
1157 | /* Save macport 0 state */ | 1157 | /* Save macport 0 state */ |
1158 | result = hfa384x_drvr_getconfig16(hw, | 1158 | result = hfa384x_drvr_getconfig16(hw, |
1159 | HFA384x_RID_CNFPORTTYPE, | 1159 | HFA384x_RID_CNFPORTTYPE, |
1160 | & | 1160 | &(hw->presniff_port_type)); |
1161 | (hw-> | ||
1162 | presniff_port_type)); | ||
1163 | if (result) { | 1161 | if (result) { |
1164 | pr_debug | 1162 | pr_debug |
1165 | ("failed to read porttype, result=%d\n", | 1163 | ("failed to read porttype, result=%d\n", |
@@ -1168,10 +1166,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) | |||
1168 | } | 1166 | } |
1169 | /* Save the wepflags state */ | 1167 | /* Save the wepflags state */ |
1170 | result = hfa384x_drvr_getconfig16(hw, | 1168 | result = hfa384x_drvr_getconfig16(hw, |
1171 | HFA384x_RID_CNFWEPFLAGS, | 1169 | HFA384x_RID_CNFWEPFLAGS, |
1172 | & | 1170 | &(hw->presniff_wepflags)); |
1173 | (hw-> | ||
1174 | presniff_wepflags)); | ||
1175 | if (result) { | 1171 | if (result) { |
1176 | pr_debug | 1172 | pr_debug |
1177 | ("failed to read wepflags, result=%d\n", | 1173 | ("failed to read wepflags, result=%d\n", |
@@ -1218,8 +1214,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) | |||
1218 | /* Set the port type to pIbss */ | 1214 | /* Set the port type to pIbss */ |
1219 | word = HFA384x_PORTTYPE_PSUEDOIBSS; | 1215 | word = HFA384x_PORTTYPE_PSUEDOIBSS; |
1220 | result = hfa384x_drvr_setconfig16(hw, | 1216 | result = hfa384x_drvr_setconfig16(hw, |
1221 | HFA384x_RID_CNFPORTTYPE, | 1217 | HFA384x_RID_CNFPORTTYPE, |
1222 | word); | 1218 | word); |
1223 | if (result) { | 1219 | if (result) { |
1224 | pr_debug | 1220 | pr_debug |
1225 | ("failed to set porttype %d, result=%d\n", | 1221 | ("failed to set porttype %d, result=%d\n", |
@@ -1235,8 +1231,8 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp) | |||
1235 | HFA384x_WEPFLAGS_DISABLE_RXCRYPT; | 1231 | HFA384x_WEPFLAGS_DISABLE_RXCRYPT; |
1236 | result = | 1232 | result = |
1237 | hfa384x_drvr_setconfig16(hw, | 1233 | hfa384x_drvr_setconfig16(hw, |
1238 | HFA384x_RID_CNFWEPFLAGS, | 1234 | HFA384x_RID_CNFWEPFLAGS, |
1239 | word); | 1235 | word); |
1240 | } | 1236 | } |
1241 | 1237 | ||
1242 | if (result) { | 1238 | if (result) { |
diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 10b671e973a5..98a5d58c3f55 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c | |||
@@ -736,9 +736,9 @@ static int prism2mib_priv(mibrec_t *mib, | |||
736 | 736 | ||
737 | result = | 737 | result = |
738 | hfa384x_drvr_setconfig(hw, | 738 | hfa384x_drvr_setconfig(hw, |
739 | HFA384x_RID_CNFWPADATA, | 739 | HFA384x_RID_CNFWPADATA, |
740 | (u8 *) &wpa, | 740 | (u8 *) &wpa, |
741 | sizeof(wpa)); | 741 | sizeof(wpa)); |
742 | } | 742 | } |
743 | break; | 743 | break; |
744 | } | 744 | } |
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 2da405490c65..31ac8da39c81 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c | |||
@@ -64,7 +64,7 @@ | |||
64 | #include <linux/byteorder/generic.h> | 64 | #include <linux/byteorder/generic.h> |
65 | #include <linux/ctype.h> | 65 | #include <linux/ctype.h> |
66 | 66 | ||
67 | #include <asm/io.h> | 67 | #include <linux/io.h> |
68 | #include <linux/delay.h> | 68 | #include <linux/delay.h> |
69 | #include <asm/byteorder.h> | 69 | #include <asm/byteorder.h> |
70 | #include <linux/if_arp.h> | 70 | #include <linux/if_arp.h> |