⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipw2200.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 4 页
字号:
#define MAX_B_CHANNELS  14struct ipw_tx_power {	u8 num_channels;	u8 ieee_mode;	struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS];} __attribute__ ((packed));struct ipw_rsn_capabilities {	u8 id;	u8 length;	u16 version;} __attribute__ ((packed));struct ipw_sensitivity_calib {	u16 beacon_rssi_raw;	u16 reserved;} __attribute__ ((packed));/** * Host command structure. * * On input, the following fields should be filled: * - cmd * - len * - status_len * - param (if needed) * * On output, * - \a status contains status; * - \a param filled with status parameters. */struct ipw_cmd {	u32 cmd;   /**< Host command */	u32 status;/**< Status */	u32 status_len;		   /**< How many 32 bit parameters in the status */	u32 len;   /**< incoming parameters length, bytes */  /**   * command parameters.   * There should be enough space for incoming and   * outcoming parameters.   * Incoming parameters listed 1-st, followed by outcoming params.   * nParams=(len+3)/4+status_len   */	u32 param[0];} __attribute__ ((packed));#define STATUS_HCMD_ACTIVE      (1<<0)	/**< host command in progress */#define STATUS_INT_ENABLED      (1<<1)#define STATUS_RF_KILL_HW       (1<<2)#define STATUS_RF_KILL_SW       (1<<3)#define STATUS_RF_KILL_MASK     (STATUS_RF_KILL_HW | STATUS_RF_KILL_SW)#define STATUS_INIT             (1<<5)#define STATUS_AUTH             (1<<6)#define STATUS_ASSOCIATED       (1<<7)#define STATUS_STATE_MASK       (STATUS_INIT | STATUS_AUTH | STATUS_ASSOCIATED)#define STATUS_ASSOCIATING      (1<<8)#define STATUS_DISASSOCIATING   (1<<9)#define STATUS_ROAMING          (1<<10)#define STATUS_EXIT_PENDING     (1<<11)#define STATUS_DISASSOC_PENDING (1<<12)#define STATUS_STATE_PENDING    (1<<13)#define STATUS_SCAN_PENDING     (1<<20)#define STATUS_SCANNING         (1<<21)#define STATUS_SCAN_ABORTING    (1<<22)#define STATUS_SCAN_FORCED      (1<<23)#define STATUS_LED_LINK_ON      (1<<24)#define STATUS_LED_ACT_ON       (1<<25)#define STATUS_INDIRECT_BYTE    (1<<28)	/* sysfs entry configured for access */#define STATUS_INDIRECT_DWORD   (1<<29)	/* sysfs entry configured for access */#define STATUS_DIRECT_DWORD     (1<<30)	/* sysfs entry configured for access */#define STATUS_SECURITY_UPDATED (1<<31)	/* Security sync needed */#define CFG_STATIC_CHANNEL      (1<<0)	/* Restrict assoc. to single channel */#define CFG_STATIC_ESSID        (1<<1)	/* Restrict assoc. to single SSID */#define CFG_STATIC_BSSID        (1<<2)	/* Restrict assoc. to single BSSID */#define CFG_CUSTOM_MAC          (1<<3)#define CFG_PREAMBLE_LONG       (1<<4)#define CFG_ADHOC_PERSIST       (1<<5)#define CFG_ASSOCIATE           (1<<6)#define CFG_FIXED_RATE          (1<<7)#define CFG_ADHOC_CREATE        (1<<8)#define CFG_NO_LED              (1<<9)#define CFG_BACKGROUND_SCAN     (1<<10)#define CFG_SPEED_SCAN          (1<<11)#define CFG_NET_STATS           (1<<12)#define CAP_SHARED_KEY          (1<<0)	/* Off = OPEN */#define CAP_PRIVACY_ON          (1<<1)	/* Off = No privacy */#define MAX_STATIONS            32#define IPW_INVALID_STATION     (0xff)struct ipw_station_entry {	u8 mac_addr[ETH_ALEN];	u8 reserved;	u8 support_mode;};#define AVG_ENTRIES 8struct average {	s16 entries[AVG_ENTRIES];	u8 pos;	u8 init;	s32 sum;};#define MAX_SPEED_SCAN 100#define IPW_IBSS_MAC_HASH_SIZE 31struct ipw_ibss_seq {	u8 mac[ETH_ALEN];	u16 seq_num;	u16 frag_num;	unsigned long packet_time;	struct list_head list;};struct ipw_error_elem {	u32 desc;	u32 time;	u32 blink1;	u32 blink2;	u32 link1;	u32 link2;	u32 data;};struct ipw_event {	u32 event;	u32 time;	u32 data;} __attribute__ ((packed));struct ipw_fw_error {	unsigned long jiffies;	u32 status;	u32 config;	u32 elem_len;	u32 log_len;	struct ipw_error_elem *elem;	struct ipw_event *log;	u8 payload[0];} __attribute__ ((packed));struct ipw_priv {	/* ieee device used by generic ieee processing code */	struct ieee80211_device *ieee;	spinlock_t lock;	struct semaphore sem;	/* basic pci-network driver stuff */	struct pci_dev *pci_dev;	struct net_device *net_dev;	/* pci hardware address support */	void __iomem *hw_base;	unsigned long hw_len;	struct fw_image_desc sram_desc;	/* result of ucode download */	struct alive_command_responce dino_alive;	wait_queue_head_t wait_command_queue;	wait_queue_head_t wait_state;	/* Rx and Tx DMA processing queues */	struct ipw_rx_queue *rxq;	struct clx2_tx_queue txq_cmd;	struct clx2_tx_queue txq[4];	u32 status;	u32 config;	u32 capability;	u8 last_rx_rssi;	u8 last_noise;	struct average average_missed_beacons;	struct average average_rssi;	struct average average_noise;	u32 port_type;	int rx_bufs_min;	  /**< minimum number of bufs in Rx queue */	int rx_pend_max;	  /**< maximum pending buffers for one IRQ */	u32 hcmd_seq;		  /**< sequence number for hcmd */	u32 disassociate_threshold;	u32 roaming_threshold;	struct ipw_associate assoc_request;	struct ieee80211_network *assoc_network;	unsigned long ts_scan_abort;	struct ipw_supported_rates rates;	struct ipw_rates phy[3];	   /**< PHY restrictions, per band */	struct ipw_rates supp;		   /**< software defined */	struct ipw_rates extended;	   /**< use for corresp. IE, AP only */	struct notif_link_deterioration last_link_deterioration; /** for statistics */	struct ipw_cmd *hcmd; /**< host command currently executed */	wait_queue_head_t hcmd_wq;     /**< host command waits for execution */	u32 tsf_bcn[2];		     /**< TSF from latest beacon */	struct notif_calibration calib;	/**< last calibration */	/* ordinal interface with firmware */	u32 table0_addr;	u32 table0_len;	u32 table1_addr;	u32 table1_len;	u32 table2_addr;	u32 table2_len;	/* context information */	u8 essid[IW_ESSID_MAX_SIZE];	u8 essid_len;	u8 nick[IW_ESSID_MAX_SIZE];	u16 rates_mask;	u8 channel;	struct ipw_sys_config sys_config;	u32 power_mode;	u8 bssid[ETH_ALEN];	u16 rts_threshold;	u8 mac_addr[ETH_ALEN];	u8 num_stations;	u8 stations[MAX_STATIONS][ETH_ALEN];	u8 short_retry_limit;	u8 long_retry_limit;	u32 notif_missed_beacons;	/* Statistics and counters normalized with each association */	u32 last_missed_beacons;	u32 last_tx_packets;	u32 last_rx_packets;	u32 last_tx_failures;	u32 last_rx_err;	u32 last_rate;	u32 missed_adhoc_beacons;	u32 missed_beacons;	u32 rx_packets;	u32 tx_packets;	u32 quality;	u8 speed_scan[MAX_SPEED_SCAN];	u8 speed_scan_pos;	u16 last_seq_num;	u16 last_frag_num;	unsigned long last_packet_time;	struct list_head ibss_mac_hash[IPW_IBSS_MAC_HASH_SIZE];	/* eeprom */	u8 eeprom[0x100];	/* 256 bytes of eeprom */	u8 country[4];	int eeprom_delay;	struct iw_statistics wstats;	struct iw_public_data wireless_data;	struct workqueue_struct *workqueue;	struct work_struct adhoc_check;	struct work_struct associate;	struct work_struct disassociate;	struct work_struct system_config;	struct work_struct rx_replenish;	struct work_struct request_scan;	struct work_struct adapter_restart;	struct work_struct rf_kill;	struct work_struct up;	struct work_struct down;	struct work_struct gather_stats;	struct work_struct abort_scan;	struct work_struct roam;	struct work_struct scan_check;	struct work_struct link_up;	struct work_struct link_down;	struct tasklet_struct irq_tasklet;	/* LED related variables and work_struct */	u8 nic_type;	u32 led_activity_on;	u32 led_activity_off;	u32 led_association_on;	u32 led_association_off;	u32 led_ofdm_on;	u32 led_ofdm_off;	struct work_struct led_link_on;	struct work_struct led_link_off;	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;	s8 tx_power;#ifdef CONFIG_PM	u32 pm_state[16];#endif	struct ipw_fw_error *error;	/* network state */	/* Used to pass the current INTA value from ISR to Tasklet */	u32 isr_inta;	/* QoS */	struct ipw_qos_info qos_data;	struct work_struct qos_activate;	/*********************************/	/* debugging info */	u32 indirect_dword;	u32 direct_dword;	u32 indirect_byte;};				/*ipw_priv *//* debug macros */#ifdef CONFIG_IPW_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 *//* * To use the debug system; * * If you are defining a new debug classification, simply add it to the #define * list here in the form of: * * #define IPW_DL_xxxx VALUE * * shifting value to the left one bit from the previous entry.  xxxx should be * the name of the classification (for example, WEP) * * You then need to either add a IPW_xxxx_DEBUG() macro definition for your * classification, or use IPW_DEBUG(IPW_DL_xxxx, ...) whenever you want * to send output to that classification. * * To add your debug level to the list of levels seen when you perform * * % cat /proc/net/ipw/debug_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 * */#define IPW_DL_ERROR         (1<<0)#define IPW_DL_WARNING       (1<<1)#define IPW_DL_INFO          (1<<2)#define IPW_DL_WX            (1<<3)#define IPW_DL_HOST_COMMAND  (1<<5)#define IPW_DL_STATE         (1<<6)#define IPW_DL_NOTIF         (1<<10)#define IPW_DL_SCAN          (1<<11)#define IPW_DL_ASSOC         (1<<12)#define IPW_DL_DROP          (1<<13)#define IPW_DL_IOCTL         (1<<14)#define IPW_DL_MANAGE        (1<<15)#define IPW_DL_FW            (1<<16)#define IPW_DL_RF_KILL       (1<<17)#define IPW_DL_FW_ERRORS     (1<<18)#define IPW_DL_LED           (1<<19)#define IPW_DL_ORD           (1<<20)#define IPW_DL_FRAG          (1<<21)#define IPW_DL_WEP           (1<<22)#define IPW_DL_TX            (1<<23)#define IPW_DL_RX            (1<<24)#define IPW_DL_ISR           (1<<25)#define IPW_DL_FW_INFO       (1<<26)#define IPW_DL_IO            (1<<27)#define IPW_DL_TRACE         (1<<28)#define IPW_DL_STATS         (1<<29)#define IPW_DL_MERGE         (1<<30)#define IPW_DL_QOS           (1<<31)#define IPW_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a)#define IPW_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a)#define IPW_DEBUG_INFO(f, a...)    IPW_DEBUG(IPW_DL_INFO, f, ## a)#define IPW_DEBUG_WX(f, a...)     IPW_DEBUG(IPW_DL_WX, f, ## a)#define IPW_DEBUG_SCAN(f, a...)   IPW_DEBUG(IPW_DL_SCAN, f, ## a)#define IPW_DEBUG_STATUS(f, a...) IPW_DEBUG(IPW_DL_STATUS, f, ## a)#define IPW_DEBUG_TRACE(f, a...)  IPW_DEBUG(IPW_DL_TRACE, f, ## a)#define IPW_DEBUG_RX(f, a...)     IPW_DEBUG(IPW_DL_RX, f, ## a)#define IPW_DEBUG_TX(f, a...)     IPW_DEBUG(IPW_DL_TX, f, ## a)#define IPW_DEBUG_ISR(f, a...)    IPW_DEBUG(IPW_DL_ISR, f, ## a)#define IPW_DEBUG_MANAGEMENT(f, a...) IPW_DEBUG(IPW_DL_MANAGE, f, ## a)#define IPW_DEBUG_LED(f, a...) IPW_DEBUG(IPW_DL_LED, f, ## a)#define IPW_DEBUG_WEP(f, a...)    IPW_DEBUG(IPW_DL_WEP, f, ## a)#define IPW_DEBUG_HC(f, a...) IPW_DEBUG(IPW_DL_HOST_COMMAND, f, ## a)#define IPW_DEBUG_FRAG(f, a...) IPW_DEBUG(IPW_DL_FRAG, f, ## a)#define IPW_DEBUG_FW(f, a...) IPW_DEBUG(IPW_DL_FW, f, ## a)#define IPW_DEBUG_RF_KILL(f, a...) IPW_DEBUG(IPW_DL_RF_KILL, f, ## a)#define IPW_DEBUG_DROP(f, a...) IPW_DEBUG(IPW_DL_DROP, f, ## a)#define IPW_DEBUG_IO(f, a...) IPW_DEBUG(IPW_DL_IO, f, ## a)#define IPW_DEBUG_ORD(f, a...) IPW_DEBUG(IPW_DL_ORD, f, ## a)#define IPW_DEBUG_FW_INFO(f, a...) IPW_DEBUG(IPW_DL_FW_INFO, f, ## a)#define IPW_DEBUG_NOTIF(f, a...) IPW_DEBUG(IPW_DL_NOTIF, f, ## a)#define IPW_DEBUG_STATE(f, a...) IPW_DEBUG(IPW_DL_STATE | IPW_DL_ASSOC | IPW_DL_INFO, f, ## a)#define IPW_DEBUG_ASSOC(f, a...) IPW_DEBUG(IPW_DL_ASSOC | IPW_DL_INFO, f, ## a)#define IPW_DEBUG_STATS(f, a...) IPW_DEBUG(IPW_DL_STATS, f, ## a)#define IPW_DEBUG_MERGE(f, a...) IPW_DEBUG(IPW_DL_MERGE, f, ## a)#define IPW_DEBUG_QOS(f, a...)   IPW_DEBUG(IPW_DL_QOS, f, ## a)#include <linux/ctype.h>/** Register bit definitions*//* Dino control registers bits */#define DINO_ENABLE_SYSTEM 0x80#define DINO_ENABLE_CS     0x40#define DINO_RXFIFO_DATA   0x01#define DINO_CONTROL_REG   0x00200000#define IPW_INTA_RW       0x00000008#define IPW_INTA_MASK_R   0x0000000C#define IPW_INDIRECT_ADDR 0x00000010#define IPW_INDIRECT_DATA 0x00000014#define IPW_AUTOINC_ADDR  0x00000018#define IPW_AUTOINC_DATA  0x0000001C#define IPW_RESET_REG     0x00000020#define IPW_GP_CNTRL_RW   0x00000024#define IPW_READ_INT_REGISTER 0xFF4#define IPW_GP_CNTRL_BIT_INIT_DONE	0x00000004#define IPW_REGISTER_DOMAIN1_END        0x00001000#define IPW_SRAM_READ_INT_REGISTER 	0x00000ff4#define IPW_SHARED_LOWER_BOUND          0x00000200#define IPW_INTERRUPT_AREA_LOWER_BOUND  0x00000f80#define IPW_NIC_SRAM_LOWER_BOUND        0x00000000#define IPW_NIC_SRAM_UPPER_BOUND        0x00030000#define IPW_BIT_INT_HOST_SRAM_READ_INT_REGISTER (1 << 29)#define IPW_GP_CNTRL_BIT_CLOCK_READY    0x00000001#define IPW_GP_CNTRL_BIT_HOST_ALLOWS_STANDBY 0x00000002/* * RESET Register Bit Indexes */#define CBD_RESET_REG_PRINCETON_RESET (1<<0)#define IPW_START_STANDBY             (1<<2)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -