[PATCH] drivers/net/wireless/ipw2200: possible cleanups
[powerpc.git] / drivers / net / wireless / ipw2200.h
index 9bf03ac..e2afa76 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright(c) 2003 - 2004 Intel Corporation. All rights reserved.
+  Copyright(c) 2003 - 2005 Intel Corporation. All rights reserved.
 
   This program is free software; you can redistribute it and/or modify it
   under the terms of version 2 of the GNU General Public License as
@@ -34,7 +34,6 @@
 #include <linux/config.h>
 #include <linux/init.h>
 
-#include <linux/version.h>
 #include <linux/pci.h>
 #include <linux/netdevice.h>
 #include <linux/ethtool.h>
@@ -50,6 +49,7 @@
 #include <asm/io.h>
 
 #include <net/ieee80211.h>
+#include <net/ieee80211_radiotap.h>
 
 #define DRV_NAME       "ipw2200"
 
@@ -589,6 +589,9 @@ struct notif_channel_result {
        u8 uReserved;
 } __attribute__ ((packed));
 
+#define SCAN_COMPLETED_STATUS_COMPLETE  1
+#define SCAN_COMPLETED_STATUS_ABORTED   2
+
 struct notif_scan_complete {
        u8 scan_type;
        u8 num_channels;
@@ -849,7 +852,7 @@ struct ipw_scan_request_ext {
        u16 dwell_time[IPW_SCAN_TYPES];
 } __attribute__ ((packed));
 
-extern inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
+static inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
 {
        if (index % 2)
                return scan->scan_type[index / 2] & 0x0F;
@@ -857,7 +860,7 @@ extern inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
                return (scan->scan_type[index / 2] & 0xF0) >> 4;
 }
 
-extern inline void ipw_set_scan_type(struct ipw_scan_request_ext *scan,
+static inline void ipw_set_scan_type(struct ipw_scan_request_ext *scan,
                                     u8 index, u8 scan_type)
 {
        if (index % 2)
@@ -1102,6 +1105,7 @@ struct ipw_event {
 } __attribute__ ((packed));
 
 struct ipw_fw_error {
+       unsigned long jiffies;
        u32 status;
        u32 config;
        u32 elem_len;
@@ -1226,6 +1230,8 @@ struct ipw_priv {
 
        struct iw_statistics wstats;
 
+       struct iw_public_data wireless_data;
+
        struct workqueue_struct *workqueue;
 
        struct work_struct adhoc_check;
@@ -1261,6 +1267,10 @@ struct ipw_priv {
        struct work_struct led_act_off;
        struct work_struct merge_networks;
 
+       struct ipw_cmd_log *cmdlog;
+       int cmdlog_len;
+       int cmdlog_pos;
+
 #define IPW_2200BG  1
 #define IPW_2915ABG 2
        u8 adapter;
@@ -1291,14 +1301,14 @@ struct ipw_priv {
 
 /* debug macros */
 
-#ifdef CONFIG_IPW_DEBUG
+#ifdef CONFIG_IPW2200_DEBUG
 #define IPW_DEBUG(level, fmt, args...) \
 do { if (ipw_debug_level & (level)) \
   printk(KERN_DEBUG DRV_NAME": %c %s " fmt, \
          in_interrupt() ? 'I' : 'U', __FUNCTION__ , ## args); } while (0)
 #else
 #define IPW_DEBUG(level, fmt, args...) do {} while (0)
-#endif                         /* CONFIG_IPW_DEBUG */
+#endif                         /* CONFIG_IPW2200_DEBUG */
 
 /*
  * To use the debug system;
@@ -1322,7 +1332,7 @@ do { if (ipw_debug_level & (level)) \
  * you simply need to add your entry to the ipw_debug_levels array.
  *
  * If you do not see debug_level in /proc/net/ipw then you do not have
- * CONFIG_IPW_DEBUG defined in your kernel configuration
+ * CONFIG_IPW2200_DEBUG defined in your kernel configuration
  *
  */
 
@@ -1853,6 +1863,12 @@ struct host_cmd {
        u32 param[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH];
 } __attribute__ ((packed));
 
+struct ipw_cmd_log {
+       unsigned long jiffies;
+       int retcode;
+       struct host_cmd cmd;
+};
+
 #define CFG_BT_COEXISTENCE_MIN                  0x00
 #define CFG_BT_COEXISTENCE_DEFER                0x02
 #define CFG_BT_COEXISTENCE_KILL                 0x04