Commit 631c8dec authored by Edgardo Hames's avatar Edgardo Hames Committed by Greg Kroah-Hartman

Staging: wlan-ng: fix coding style in hfa834x_usb.c

This is a patch in hfa834x_usb.c to fix typedef declarations and long lines.
Signed-off-by: default avatarEdgardo Hames <ehames@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 76ce24f3
...@@ -144,7 +144,6 @@ enum cmd_mode { ...@@ -144,7 +144,6 @@ enum cmd_mode {
DOWAIT = 0, DOWAIT = 0,
DOASYNC DOASYNC
}; };
typedef enum cmd_mode CMD_MODE;
#define THROTTLE_JIFFIES (HZ/8) #define THROTTLE_JIFFIES (HZ/8)
#define URB_ASYNC_UNLINK 0 #define URB_ASYNC_UNLINK 0
...@@ -206,12 +205,11 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); ...@@ -206,12 +205,11 @@ static void unlocked_usbctlx_complete(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
struct usbctlx_completor { struct usbctlx_completor {
int (*complete) (struct usbctlx_completor *); int (*complete) (struct usbctlx_completor *);
}; };
typedef struct usbctlx_completor usbctlx_completor_t;
static int static int
hfa384x_usbctlx_complete_sync(hfa384x_t *hw, hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
hfa384x_usbctlx_t *ctlx, hfa384x_usbctlx_t *ctlx,
usbctlx_completor_t *completor); struct usbctlx_completor *completor);
static int static int
unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx); unlocked_usbctlx_cancel_async(hfa384x_t *hw, hfa384x_usbctlx_t *ctlx);
...@@ -232,13 +230,13 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, ...@@ -232,13 +230,13 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp,
/* Low level req/resp CTLX formatters and submitters */ /* Low level req/resp CTLX formatters and submitters */
static int static int
hfa384x_docmd(hfa384x_t *hw, hfa384x_docmd(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
hfa384x_metacmd_t *cmd, hfa384x_metacmd_t *cmd,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data); ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data);
static int static int
hfa384x_dorrid(hfa384x_t *hw, hfa384x_dorrid(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
unsigned int riddatalen, unsigned int riddatalen,
...@@ -246,7 +244,7 @@ hfa384x_dorrid(hfa384x_t *hw, ...@@ -246,7 +244,7 @@ hfa384x_dorrid(hfa384x_t *hw,
static int static int
hfa384x_dowrid(hfa384x_t *hw, hfa384x_dowrid(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
unsigned int riddatalen, unsigned int riddatalen,
...@@ -254,7 +252,7 @@ hfa384x_dowrid(hfa384x_t *hw, ...@@ -254,7 +252,7 @@ hfa384x_dowrid(hfa384x_t *hw,
static int static int
hfa384x_dormem(hfa384x_t *hw, hfa384x_dormem(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 page, u16 page,
u16 offset, u16 offset,
void *data, void *data,
...@@ -263,7 +261,7 @@ hfa384x_dormem(hfa384x_t *hw, ...@@ -263,7 +261,7 @@ hfa384x_dormem(hfa384x_t *hw,
static int static int
hfa384x_dowmem(hfa384x_t *hw, hfa384x_dowmem(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 page, u16 page,
u16 offset, u16 offset,
void *data, void *data,
...@@ -351,7 +349,8 @@ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags) ...@@ -351,7 +349,8 @@ static int submit_rx_urb(hfa384x_t *hw, gfp_t memflags)
hw->rx_urb_skb = skb; hw->rx_urb_skb = skb;
result = -ENOLINK; result = -ENOLINK;
if (!hw->wlandev->hwremoved && !test_bit(WORK_RX_HALT, &hw->usb_flags)) { if (!hw->wlandev->hwremoved &&
!test_bit(WORK_RX_HALT, &hw->usb_flags)) {
result = SUBMIT_URB(&hw->rx_urb, memflags); result = SUBMIT_URB(&hw->rx_urb, memflags);
/* Check whether we need to reset the RX pipe */ /* Check whether we need to reset the RX pipe */
...@@ -668,26 +667,26 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp, ...@@ -668,26 +667,26 @@ usbctlx_get_rridresult(const hfa384x_usb_rridresp_t *rridresp,
* when processing a CTLX that returns a hfa384x_cmdresult_t structure. * when processing a CTLX that returns a hfa384x_cmdresult_t structure.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
struct usbctlx_cmd_completor { struct usbctlx_cmd_completor {
usbctlx_completor_t head; struct usbctlx_completor head;
const hfa384x_usb_cmdresp_t *cmdresp; const hfa384x_usb_cmdresp_t *cmdresp;
hfa384x_cmdresult_t *result; hfa384x_cmdresult_t *result;
}; };
typedef struct usbctlx_cmd_completor usbctlx_cmd_completor_t;
static int usbctlx_cmd_completor_fn(usbctlx_completor_t *head) static inline int usbctlx_cmd_completor_fn(struct usbctlx_completor *head)
{ {
usbctlx_cmd_completor_t *complete = (usbctlx_cmd_completor_t *) head; struct usbctlx_cmd_completor *complete;
complete = (struct usbctlx_cmd_completor *) head;
return usbctlx_get_status(complete->cmdresp, complete->result); return usbctlx_get_status(complete->cmdresp, complete->result);
} }
static inline usbctlx_completor_t *init_cmd_completor(usbctlx_cmd_completor_t * static inline struct usbctlx_completor *init_cmd_completor(
completor, struct usbctlx_cmd_completor
const *completor,
hfa384x_usb_cmdresp_t * const hfa384x_usb_cmdresp_t
cmdresp, *cmdresp,
hfa384x_cmdresult_t * hfa384x_cmdresult_t *result)
result)
{ {
completor->head.complete = usbctlx_cmd_completor_fn; completor->head.complete = usbctlx_cmd_completor_fn;
completor->cmdresp = cmdresp; completor->cmdresp = cmdresp;
...@@ -701,19 +700,19 @@ static inline usbctlx_completor_t *init_cmd_completor(usbctlx_cmd_completor_t * ...@@ -701,19 +700,19 @@ static inline usbctlx_completor_t *init_cmd_completor(usbctlx_cmd_completor_t *
* when processing a CTLX that reads a RID. * when processing a CTLX that reads a RID.
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
struct usbctlx_rrid_completor { struct usbctlx_rrid_completor {
usbctlx_completor_t head; struct usbctlx_completor head;
const hfa384x_usb_rridresp_t *rridresp; const hfa384x_usb_rridresp_t *rridresp;
void *riddata; void *riddata;
unsigned int riddatalen; unsigned int riddatalen;
}; };
typedef struct usbctlx_rrid_completor usbctlx_rrid_completor_t;
static int usbctlx_rrid_completor_fn(usbctlx_completor_t *head) static int usbctlx_rrid_completor_fn(struct usbctlx_completor *head)
{ {
usbctlx_rrid_completor_t *complete = (usbctlx_rrid_completor_t *) head; struct usbctlx_rrid_completor *complete;
hfa384x_rridresult_t rridresult; hfa384x_rridresult_t rridresult;
complete = (struct usbctlx_rrid_completor *) head;
usbctlx_get_rridresult(complete->rridresp, &rridresult); usbctlx_get_rridresult(complete->rridresp, &rridresult);
/* Validate the length, note body len calculation in bytes */ /* Validate the length, note body len calculation in bytes */
...@@ -729,11 +728,12 @@ static int usbctlx_rrid_completor_fn(usbctlx_completor_t *head) ...@@ -729,11 +728,12 @@ static int usbctlx_rrid_completor_fn(usbctlx_completor_t *head)
return 0; return 0;
} }
static inline usbctlx_completor_t *init_rrid_completor(usbctlx_rrid_completor_t static inline struct usbctlx_completor *init_rrid_completor(
struct usbctlx_rrid_completor
*completor, *completor,
const const hfa384x_usb_rridresp_t
hfa384x_usb_rridresp_t * *rridresp,
rridresp, void *riddata, void *riddata,
unsigned int riddatalen) unsigned int riddatalen)
{ {
completor->head.complete = usbctlx_rrid_completor_fn; completor->head.complete = usbctlx_rrid_completor_fn;
...@@ -747,14 +747,14 @@ static inline usbctlx_completor_t *init_rrid_completor(usbctlx_rrid_completor_t ...@@ -747,14 +747,14 @@ static inline usbctlx_completor_t *init_rrid_completor(usbctlx_rrid_completor_t
* Completor object: * Completor object:
* Interprets the results of a synchronous RID-write * Interprets the results of a synchronous RID-write
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
typedef usbctlx_cmd_completor_t usbctlx_wrid_completor_t; typedef struct usbctlx_cmd_completor usbctlx_wrid_completor_t;
#define init_wrid_completor init_cmd_completor #define init_wrid_completor init_cmd_completor
/*---------------------------------------------------------------- /*----------------------------------------------------------------
* Completor object: * Completor object:
* Interprets the results of a synchronous memory-write * Interprets the results of a synchronous memory-write
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
typedef usbctlx_cmd_completor_t usbctlx_wmem_completor_t; typedef struct usbctlx_cmd_completor usbctlx_wmem_completor_t;
#define init_wmem_completor init_cmd_completor #define init_wmem_completor init_cmd_completor
/*---------------------------------------------------------------- /*----------------------------------------------------------------
...@@ -762,7 +762,7 @@ typedef usbctlx_cmd_completor_t usbctlx_wmem_completor_t; ...@@ -762,7 +762,7 @@ typedef usbctlx_cmd_completor_t usbctlx_wmem_completor_t;
* Interprets the results of a synchronous memory-read * Interprets the results of a synchronous memory-read
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
struct usbctlx_rmem_completor { struct usbctlx_rmem_completor {
usbctlx_completor_t head; struct usbctlx_completor head;
const hfa384x_usb_rmemresp_t *rmemresp; const hfa384x_usb_rmemresp_t *rmemresp;
void *data; void *data;
...@@ -770,7 +770,7 @@ struct usbctlx_rmem_completor { ...@@ -770,7 +770,7 @@ struct usbctlx_rmem_completor {
}; };
typedef struct usbctlx_rmem_completor usbctlx_rmem_completor_t; typedef struct usbctlx_rmem_completor usbctlx_rmem_completor_t;
static int usbctlx_rmem_completor_fn(usbctlx_completor_t *head) static int usbctlx_rmem_completor_fn(struct usbctlx_completor *head)
{ {
usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t *) head; usbctlx_rmem_completor_t *complete = (usbctlx_rmem_completor_t *) head;
...@@ -779,10 +779,12 @@ static int usbctlx_rmem_completor_fn(usbctlx_completor_t *head) ...@@ -779,10 +779,12 @@ static int usbctlx_rmem_completor_fn(usbctlx_completor_t *head)
return 0; return 0;
} }
static inline usbctlx_completor_t *init_rmem_completor(usbctlx_rmem_completor_t static inline struct usbctlx_completor *init_rmem_completor(
usbctlx_rmem_completor_t
*completor, *completor,
hfa384x_usb_rmemresp_t hfa384x_usb_rmemresp_t
*rmemresp, void *data, *rmemresp,
void *data,
unsigned int len) unsigned int len)
{ {
completor->head.complete = usbctlx_rmem_completor_fn; completor->head.complete = usbctlx_rmem_completor_fn;
...@@ -1244,7 +1246,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis) ...@@ -1244,7 +1246,7 @@ int hfa384x_corereset(hfa384x_t *hw, int holdtime, int settletime, int genesis)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw, static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
hfa384x_usbctlx_t *ctlx, hfa384x_usbctlx_t *ctlx,
usbctlx_completor_t *completor) struct usbctlx_completor *completor)
{ {
unsigned long flags; unsigned long flags;
int result; int result;
...@@ -1359,7 +1361,7 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw, ...@@ -1359,7 +1361,7 @@ static int hfa384x_usbctlx_complete_sync(hfa384x_t *hw,
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_docmd(hfa384x_t *hw, hfa384x_docmd(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
hfa384x_metacmd_t *cmd, hfa384x_metacmd_t *cmd,
ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data) ctlx_cmdcb_t cmdcb, ctlx_usercb_t usercb, void *usercb_data)
{ {
...@@ -1394,7 +1396,7 @@ hfa384x_docmd(hfa384x_t *hw, ...@@ -1394,7 +1396,7 @@ hfa384x_docmd(hfa384x_t *hw,
if (result != 0) { if (result != 0) {
kfree(ctlx); kfree(ctlx);
} else if (mode == DOWAIT) { } else if (mode == DOWAIT) {
usbctlx_cmd_completor_t completor; struct usbctlx_cmd_completor completor;
result = result =
hfa384x_usbctlx_complete_sync(hw, ctlx, hfa384x_usbctlx_complete_sync(hw, ctlx,
...@@ -1448,7 +1450,7 @@ hfa384x_docmd(hfa384x_t *hw, ...@@ -1448,7 +1450,7 @@ hfa384x_docmd(hfa384x_t *hw,
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dorrid(hfa384x_t *hw, hfa384x_dorrid(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
unsigned int riddatalen, unsigned int riddatalen,
...@@ -1481,7 +1483,7 @@ hfa384x_dorrid(hfa384x_t *hw, ...@@ -1481,7 +1483,7 @@ hfa384x_dorrid(hfa384x_t *hw,
if (result != 0) { if (result != 0) {
kfree(ctlx); kfree(ctlx);
} else if (mode == DOWAIT) { } else if (mode == DOWAIT) {
usbctlx_rrid_completor_t completor; struct usbctlx_rrid_completor completor;
result = result =
hfa384x_usbctlx_complete_sync(hw, ctlx, hfa384x_usbctlx_complete_sync(hw, ctlx,
...@@ -1506,7 +1508,7 @@ hfa384x_dorrid(hfa384x_t *hw, ...@@ -1506,7 +1508,7 @@ hfa384x_dorrid(hfa384x_t *hw,
* *
* Arguments: * Arguments:
* hw device structure * hw device structure
* CMD_MODE DOWAIT or DOASYNC * enum cmd_mode DOWAIT or DOASYNC
* rid RID code * rid RID code
* riddata Data portion of RID formatted for MAC * riddata Data portion of RID formatted for MAC
* riddatalen Length of the data portion in bytes * riddatalen Length of the data portion in bytes
...@@ -1529,7 +1531,7 @@ hfa384x_dorrid(hfa384x_t *hw, ...@@ -1529,7 +1531,7 @@ hfa384x_dorrid(hfa384x_t *hw,
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dowrid(hfa384x_t *hw, hfa384x_dowrid(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 rid, u16 rid,
void *riddata, void *riddata,
unsigned int riddatalen, unsigned int riddatalen,
...@@ -1616,7 +1618,7 @@ hfa384x_dowrid(hfa384x_t *hw, ...@@ -1616,7 +1618,7 @@ hfa384x_dowrid(hfa384x_t *hw,
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dormem(hfa384x_t *hw, hfa384x_dormem(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 page, u16 page,
u16 offset, u16 offset,
void *data, void *data,
...@@ -1707,7 +1709,7 @@ hfa384x_dormem(hfa384x_t *hw, ...@@ -1707,7 +1709,7 @@ hfa384x_dormem(hfa384x_t *hw,
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
static int static int
hfa384x_dowmem(hfa384x_t *hw, hfa384x_dowmem(hfa384x_t *hw,
CMD_MODE mode, enum cmd_mode mode,
u16 page, u16 page,
u16 offset, u16 offset,
void *data, void *data,
...@@ -2075,12 +2077,9 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len) ...@@ -2075,12 +2077,9 @@ int hfa384x_drvr_flashdl_write(hfa384x_t *hw, u32 daddr, void *buf, u32 len)
(j * HFA384x_USB_RWMEM_MAXLEN); (j * HFA384x_USB_RWMEM_MAXLEN);
writepage = HFA384x_ADDR_CMD_MKPAGE(dlbufaddr + writepage = HFA384x_ADDR_CMD_MKPAGE(dlbufaddr +
(j * (j * HFA384x_USB_RWMEM_MAXLEN));
HFA384x_USB_RWMEM_MAXLEN)); writeoffset = HFA384x_ADDR_CMD_MKOFF(dlbufaddr +
writeoffset = (j * HFA384x_USB_RWMEM_MAXLEN));
HFA384x_ADDR_CMD_MKOFF(dlbufaddr +
(j *
HFA384x_USB_RWMEM_MAXLEN));
writelen = burnlen - (j * HFA384x_USB_RWMEM_MAXLEN); writelen = burnlen - (j * HFA384x_USB_RWMEM_MAXLEN);
writelen = writelen > HFA384x_USB_RWMEM_MAXLEN ? writelen = writelen > HFA384x_USB_RWMEM_MAXLEN ?
...@@ -2451,7 +2450,9 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len) ...@@ -2451,7 +2450,9 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, unsigned int len)
currpage = HFA384x_ADDR_CMD_MKPAGE(pdaloc[i].cardaddr); currpage = HFA384x_ADDR_CMD_MKPAGE(pdaloc[i].cardaddr);
curroffset = HFA384x_ADDR_CMD_MKOFF(pdaloc[i].cardaddr); curroffset = HFA384x_ADDR_CMD_MKOFF(pdaloc[i].cardaddr);
result = hfa384x_dormem_wait(hw, currpage, curroffset, buf, len); /* units of bytes */ /* units of bytes */
result = hfa384x_dormem_wait(hw, currpage, curroffset, buf,
len);
if (result) { if (result) {
printk(KERN_WARNING printk(KERN_WARNING
...@@ -2611,20 +2612,19 @@ int hfa384x_drvr_start(hfa384x_t *hw) ...@@ -2611,20 +2612,19 @@ int hfa384x_drvr_start(hfa384x_t *hw)
if (result1 != 0) { if (result1 != 0) {
if (result2 != 0) { if (result2 != 0) {
printk(KERN_ERR printk(KERN_ERR
"cmd_initialize() failed on two attempts, results %d and %d\n", "cmd_initialize() failed on two attempts,"
result1, result2); " results %d and %d\n", result1, result2);
usb_kill_urb(&hw->rx_urb); usb_kill_urb(&hw->rx_urb);
goto done; goto done;
} else { } else {
pr_debug("First cmd_initialize() failed (result %d),\n", pr_debug("First cmd_initialize() failed (result %d),\n",
result1); result1);
pr_debug pr_debug("but second attempt succeeded."
("but second attempt succeeded. All should be ok\n"); " All should be ok\n");
} }
} else if (result2 != 0) { } else if (result2 != 0) {
printk(KERN_WARNING printk(KERN_WARNING "First cmd_initialize() succeeded,"
"First cmd_initialize() succeeded, but second attempt failed (result=%d)\n", " but second attempt failed (result=%d)\n", result2);
result2);
printk(KERN_WARNING printk(KERN_WARNING
"Most likely the card will be functional\n"); "Most likely the card will be functional\n");
goto done; goto done;
...@@ -3382,8 +3382,9 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin, ...@@ -3382,8 +3382,9 @@ static void hfa384x_usbin_ctlx(hfa384x_t *hw, hfa384x_usbin_t *usbin,
* our request has been acknowledged. Odd, * our request has been acknowledged. Odd,
* but our OUT URB is still alive... * but our OUT URB is still alive...
*/ */
pr_debug pr_debug("Causality violation: "
("Causality violation: please reboot Universe, or email linux-wlan-devel@lists.linux-wlan.com\n"); "please reboot Universe, or email "
"linux-wlan-devel@lists.linux-wlan.com\n");
ctlx->state = CTLX_RESP_COMPLETE; ctlx->state = CTLX_RESP_COMPLETE;
break; break;
...@@ -3583,7 +3584,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, ...@@ -3583,7 +3584,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
struct sk_buff *skb; struct sk_buff *skb;
hfa384x_t *hw = wlandev->priv; hfa384x_t *hw = wlandev->priv;
/* Don't forget the status, time, and data_len fields are in host order */ /* Remember the status, time, and data_len fields are in host order */
/* Figure out how big the frame is */ /* Figure out how big the frame is */
fc = le16_to_cpu(rxdesc->frame_control); fc = le16_to_cpu(rxdesc->frame_control);
hdrlen = p80211_headerlen(fc); hdrlen = p80211_headerlen(fc);
...@@ -3632,7 +3633,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, ...@@ -3632,7 +3633,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
caphdr->encoding = htonl(1); /* cck */ caphdr->encoding = htonl(1); /* cck */
} }
/* Copy the 802.11 header to the skb (ctl frames may be less than a full header) */ /* Copy the 802.11 header to the skb
(ctl frames may be less than a full header) */
datap = skb_put(skb, hdrlen); datap = skb_put(skb, hdrlen);
memcpy(datap, &(rxdesc->frame_control), hdrlen); memcpy(datap, &(rxdesc->frame_control), hdrlen);
...@@ -3644,7 +3646,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev, ...@@ -3644,7 +3646,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
/* check for unencrypted stuff if WEP bit set. */ /* check for unencrypted stuff if WEP bit set. */
if (*(datap - hdrlen + 1) & 0x40) /* wep set */ if (*(datap - hdrlen + 1) & 0x40) /* wep set */
if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa)) if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa))
*(datap - hdrlen + 1) &= 0xbf; /* clear wep; it's the 802.2 header! */ /* clear wep; it's the 802.2 header! */
*(datap - hdrlen + 1) &= 0xbf;
} }
if (hw->sniff_fcs) { if (hw->sniff_fcs) {
...@@ -3845,8 +3848,8 @@ static void hfa384x_ctlxout_callback(struct urb *urb) ...@@ -3845,8 +3848,8 @@ static void hfa384x_ctlxout_callback(struct urb *urb)
default: default:
/* This is NOT a valid CTLX "success" state! */ /* This is NOT a valid CTLX "success" state! */
printk(KERN_ERR printk(KERN_ERR "Illegal CTLX[%d]"
"Illegal CTLX[%d] success state(%s, %d) in OUT URB\n", " success state(%s, %d) in OUT URB\n",
le16_to_cpu(ctlx->outbuf.type), le16_to_cpu(ctlx->outbuf.type),
ctlxstr(ctlx->state), urb->status); ctlxstr(ctlx->state), urb->status);
break; break;
......
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