2 * This file contains definitions and data structures specific
3 * to Marvell 802.11 NIC. It contains the Device Information
4 * structure struct lbs_private..
13 #include <linux/kfifo.h>
19 uint16_t sp_stabletime;
20 uint8_t sp_calcontrol;
21 uint8_t sp_extsleepclk;
26 /** Private structure for the MV device */
29 /* Basic networking */
30 struct net_device *dev;
32 struct work_struct mcast_work;
33 u32 nr_of_multicastmacaddr;
34 u8 multicastlist[MRVDRV_MAX_MULTICAST_LIST_SIZE][ETH_ALEN];
37 struct wireless_dev *wdev;
38 bool wiphy_registered;
39 struct cfg80211_scan_request *scan_req;
40 u8 assoc_bss[ETH_ALEN];
44 struct net_device *mesh_dev; /* Virtual device */
45 #ifdef CONFIG_LIBERTAS_MESH
46 u32 mesh_connect_status;
47 struct lbs_mesh_stats mstats;
50 u8 mesh_ssid[IEEE80211_MAX_SSID_LEN + 1];
55 struct dentry *debugfs_dir;
56 struct dentry *debugfs_debug;
57 struct dentry *debugfs_files[6];
58 struct dentry *events_dir;
59 struct dentry *debugfs_events_files[6];
60 struct dentry *regs_dir;
61 struct dentry *debugfs_regs_files[6];
63 /* Hardware debugging */
67 struct lbs_offset_value offsetvalue;
69 /* Power management */
76 int deep_sleep_required;
77 int is_auto_deep_sleep_enabled;
78 int wakeup_dev_required;
79 int is_activity_detected;
80 int auto_deep_sleep_timeout; /* in ms */
81 wait_queue_head_t ds_awake_q;
82 struct timer_list auto_deepsleep_timer;
85 int is_host_sleep_configured;
86 int is_host_sleep_activated;
87 wait_queue_head_t host_sleep_q;
93 int (*hw_host_to_card) (struct lbs_private *priv, u8 type, u8 *payload, u16 nb);
94 void (*reset_card) (struct lbs_private *priv);
95 int (*enter_deep_sleep) (struct lbs_private *priv);
96 int (*exit_deep_sleep) (struct lbs_private *priv);
97 int (*reset_deep_sleep_wakeup) (struct lbs_private *priv);
99 /* Adapter info (from EEPROM) */
103 u8 current_addr[ETH_ALEN];
105 /* Command download */
107 /* bit0 1/0=data_sent/data_tx_done,
108 bit1 1/0=cmd_sent/cmd_tx_done,
109 all other bits reserved 0 */
111 struct cmd_ctrl_node *cmd_array;
112 struct cmd_ctrl_node *cur_cmd;
113 struct list_head cmdfreeq; /* free command buffers */
114 struct list_head cmdpendingq; /* pending command buffers */
115 wait_queue_head_t cmd_pending;
116 struct timer_list command_timer;
119 /* Command responses sent from the hardware to the driver */
122 u8 resp_buf[2][LBS_UPLD_SIZE];
125 /* Events sent from hardware to driver */
126 struct kfifo event_fifo;
128 /** thread to service interrupts */
129 struct task_struct *main_thread;
130 wait_queue_head_t waitq;
131 struct workqueue_struct *work_thread;
133 /** Encryption stuff */
136 u8 wep_key[4][WLAN_KEY_LEN_WEP104];
140 uint32_t wol_criteria;
145 int tx_pending_len; /* -1 while building packet */
146 u8 tx_pending_buf[LBS_UPLD_SIZE];
147 /* protected by hard_start_xmit serialization */
149 struct sk_buff *currenttxskb;
153 spinlock_t driver_lock;
155 /* NIC/link operation characteristics */
165 struct delayed_work scan_work;
169 extern struct cmd_confirm_sleep confirm_sleep;