aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/if_usb.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-12 23:35:10 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-12 23:35:10 -0400
commita0e1d1d075cc0efe9a3ac8579bce9393d070e09f (patch)
tree92964216b94d2f9753c2ec043ab5a121f22bbd6d /drivers/net/wireless/libertas/if_usb.h
parentdd14cbc994709a1c5a64ed3621f583c49a27e521 (diff)
parentb232923966f1210e1183353bbd1d52ee53b79fbf (diff)
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (89 commits) myri10ge: update driver version myri10ge: report when the link partner is running in Myrinet mode myri10ge: limit the number of recoveries NetXen: Fix link status messages Revert "[netdrvr e100] experiment with doing RX in a similar manner to eepro100" [PATCH] libertas: convert libertas_mpp into anycast_mask [PATCH] libertas: actually send mesh frames to mesh netdev [PATCH] libertas: deauthenticate from AP in channel switch [PATCH] libertas: pull current channel from firmware on mesh autostart [PATCH] libertas: reduce SSID and BSSID mixed-case abuse [PATCH] libertas: remove WPA_SUPPLICANT structure [PATCH] libertas: remove structure WLAN_802_11_SSID and libertas_escape_essid [PATCH] libertas: tweak association debug output [PATCH] libertas: fix big-endian associate command. [PATCH] libertas: don't byte-swap firmware version number. It's a byte array. [PATCH] libertas: more endianness fixes, in tx.c this time [PATCH] libertas: More endianness fixes. [PATCH] libertas: first pass at fixing up endianness issues [PATCH] libertas: sparse fixes [PATCH] libertas: fix character set in README ...
Diffstat (limited to 'drivers/net/wireless/libertas/if_usb.h')
-rw-r--r--drivers/net/wireless/libertas/if_usb.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.h b/drivers/net/wireless/libertas/if_usb.h
index 170dfe6809f5..156bb485e1a6 100644
--- a/drivers/net/wireless/libertas/if_usb.h
+++ b/drivers/net/wireless/libertas/if_usb.h
@@ -1,3 +1,8 @@
1#ifndef _LIBERTAS_IF_USB_H
2#define _LIBERTAS_IF_USB_H
3
4#include <linux/list.h>
5
1/** 6/**
2 * This file contains definition for USB interface. 7 * This file contains definition for USB interface.
3 */ 8 */
@@ -7,11 +12,6 @@
7 12
8#define IPFIELD_ALIGN_OFFSET 2 13#define IPFIELD_ALIGN_OFFSET 2
9 14
10#define USB8388_VID_1 0x1286
11#define USB8388_PID_1 0x2001
12#define USB8388_VID_2 0x05a3
13#define USB8388_PID_2 0x8388
14
15#define BOOT_CMD_FW_BY_USB 0x01 15#define BOOT_CMD_FW_BY_USB 0x01
16#define BOOT_CMD_FW_IN_EEPROM 0x02 16#define BOOT_CMD_FW_IN_EEPROM 0x02
17#define BOOT_CMD_UPDATE_BOOT2 0x03 17#define BOOT_CMD_UPDATE_BOOT2 0x03
@@ -20,7 +20,7 @@
20 20
21struct bootcmdstr 21struct bootcmdstr
22{ 22{
23 u32 u32magicnumber; 23 __le32 u32magicnumber;
24 u8 u8cmd_tag; 24 u8 u8cmd_tag;
25 u8 au8dumy[11]; 25 u8 au8dumy[11];
26}; 26};
@@ -30,7 +30,7 @@ struct bootcmdstr
30 30
31struct bootcmdrespStr 31struct bootcmdrespStr
32{ 32{
33 u32 u32magicnumber; 33 __le32 u32magicnumber;
34 u8 u8cmd_tag; 34 u8 u8cmd_tag;
35 u8 u8result; 35 u8 u8result;
36 u8 au8dumy[2]; 36 u8 au8dumy[2];
@@ -44,6 +44,7 @@ struct read_cb_info {
44 44
45/** USB card description structure*/ 45/** USB card description structure*/
46struct usb_card_rec { 46struct usb_card_rec {
47 struct list_head list;
47 struct net_device *eth_dev; 48 struct net_device *eth_dev;
48 struct usb_device *udev; 49 struct usb_device *udev;
49 struct urb *rx_urb, *tx_urb; 50 struct urb *rx_urb, *tx_urb;
@@ -75,33 +76,34 @@ struct usb_card_rec {
75 76
76/** fwheader */ 77/** fwheader */
77struct fwheader { 78struct fwheader {
78 u32 dnldcmd; 79 __le32 dnldcmd;
79 u32 baseaddr; 80 __le32 baseaddr;
80 u32 datalength; 81 __le32 datalength;
81 u32 CRC; 82 __le32 CRC;
82}; 83};
83 84
84#define FW_MAX_DATA_BLK_SIZE 600 85#define FW_MAX_DATA_BLK_SIZE 600
85/** FWData */ 86/** FWData */
86struct FWData { 87struct FWData {
87 struct fwheader fwheader; 88 struct fwheader fwheader;
88 u32 seqnum; 89 __le32 seqnum;
89 u8 data[FW_MAX_DATA_BLK_SIZE]; 90 u8 data[FW_MAX_DATA_BLK_SIZE];
90}; 91};
91 92
92/** fwsyncheader */ 93/** fwsyncheader */
93struct fwsyncheader { 94struct fwsyncheader {
94 u32 cmd; 95 __le32 cmd;
95 u32 seqnum; 96 __le32 seqnum;
96}; 97};
97 98
98#define FW_HAS_DATA_TO_RECV 0x00000001 99#define FW_HAS_DATA_TO_RECV 0x00000001
99#define FW_HAS_LAST_BLOCK 0x00000004 100#define FW_HAS_LAST_BLOCK 0x00000004
100 101
101#define FW_DATA_XMIT_SIZE \ 102#define FW_DATA_XMIT_SIZE \
102 sizeof(struct fwheader) + fwdata->fwheader.datalength + sizeof(u32) 103 sizeof(struct fwheader) + le32_to_cpu(fwdata->fwheader.datalength) + sizeof(u32)
103 104
104int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb); 105int usb_tx_block(wlan_private *priv, u8 *payload, u16 nb);
105void if_usb_free(struct usb_card_rec *cardp); 106void if_usb_free(struct usb_card_rec *cardp);
106int if_usb_issue_boot_command(wlan_private *priv, int ivalue); 107int if_usb_issue_boot_command(wlan_private *priv, int ivalue);
107 108
109#endif