]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/zd1211rw/zd_usb.h
[PATCH] iwl3945: cancel scan on rxon command
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / zd1211rw / zd_usb.h
index e81a2d3cfffd2ad4dd166f0084031565aac9f524..961a7a12ad68189d4b7877ed692d9f1c08374547 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/usb.h>
 
 #include "zd_def.h"
-#include "zd_types.h"
 
 enum devicetype {
        DEVICE_ZD1211  = 0,
@@ -74,17 +73,17 @@ enum control_requests {
 struct usb_req_read_regs {
        __le16 id;
        __le16 addr[0];
-};
+} __attribute__((packed));
 
 struct reg_data {
        __le16 addr;
        __le16 value;
-};
+} __attribute__((packed));
 
 struct usb_req_write_regs {
        __le16 id;
        struct reg_data reg_writes[0];
-};
+} __attribute__((packed));
 
 enum {
        RF_IF_LE = 0x02,
@@ -101,7 +100,7 @@ struct usb_req_rfwrite {
        /* RF2595: 24 */
        __le16 bit_values[0];
        /* (CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */
-};
+} __attribute__((packed));
 
 /* USB interrupt */
 
@@ -118,12 +117,12 @@ enum usb_int_flags {
 struct usb_int_header {
        u8 type;        /* must always be 1 */
        u8 id;
-};
+} __attribute__((packed));
 
 struct usb_int_regs {
        struct usb_int_header hdr;
        struct reg_data regs[0];
-};
+} __attribute__((packed));
 
 struct usb_int_retry_fail {
        struct usb_int_header hdr;
@@ -131,7 +130,7 @@ struct usb_int_retry_fail {
        u8 _dummy;
        u8 addr[ETH_ALEN];
        u8 ibss_wakeup_dest;
-};
+} __attribute__((packed));
 
 struct read_regs_int {
        struct completion completion;
@@ -181,15 +180,15 @@ struct zd_usb_tx {
        spinlock_t lock;
 };
 
-/* Contains the usb parts. The structure doesn't require a lock, because intf
- * and fw_base_offset, will not be changed after initialization.
+/* Contains the usb parts. The structure doesn't require a lock because intf
+ * will not be changed after initialization.
  */
 struct zd_usb {
        struct zd_usb_interrupt intr;
        struct zd_usb_rx rx;
        struct zd_usb_tx tx;
        struct usb_interface *intf;
-       u16 fw_base_offset;
+       u8 is_zd1211b:1, initialized:1;
 };
 
 #define zd_usb_dev(usb) (&usb->intf->dev)
@@ -238,6 +237,8 @@ int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
 
 int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits);
 
+int zd_usb_read_fw(struct zd_usb *usb, zd_addr_t addr, u8 *data, u16 len);
+
 extern struct workqueue_struct *zd_workqueue;
 
 #endif /* _ZD_USB_H */