initial commit with v3.6.7
[linux-3.6.7-moxart.git] / drivers / net / wireless / ti / wl18xx / wl18xx.h
blob6452396fa1d411d4e37b9c82e37046589dc26044
1 /*
2 * This file is part of wl18xx
4 * Copyright (C) 2011 Texas Instruments Inc.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 * 02110-1301 USA
22 #ifndef __WL18XX_PRIV_H__
23 #define __WL18XX_PRIV_H__
25 #include "conf.h"
27 /* minimum FW required for driver */
28 #define WL18XX_CHIP_VER 8
29 #define WL18XX_IFTYPE_VER 2
30 #define WL18XX_MAJOR_VER 0
31 #define WL18XX_SUBTYPE_VER 0
32 #define WL18XX_MINOR_VER 100
34 #define WL18XX_CMD_MAX_SIZE 740
36 struct wl18xx_priv {
37 /* buffer for sending commands to FW */
38 u8 cmd_buf[WL18XX_CMD_MAX_SIZE];
40 struct wl18xx_priv_conf conf;
42 /* Index of last released Tx desc in FW */
43 u8 last_fw_rls_idx;
45 /* number of VIFs requiring extra spare mem-blocks */
46 int extra_spare_vif_count;
49 #define WL18XX_FW_MAX_TX_STATUS_DESC 33
51 struct wl18xx_fw_status_priv {
53 * Index in released_tx_desc for first byte that holds
54 * released tx host desc
56 u8 fw_release_idx;
59 * Array of host Tx descriptors, where fw_release_idx
60 * indicated the first released idx.
62 u8 released_tx_desc[WL18XX_FW_MAX_TX_STATUS_DESC];
64 u8 padding[2];
67 #define WL18XX_PHY_VERSION_MAX_LEN 20
69 struct wl18xx_static_data_priv {
70 char phy_version[WL18XX_PHY_VERSION_MAX_LEN];
73 struct wl18xx_clk_cfg {
74 u32 n;
75 u32 m;
76 u32 p;
77 u32 q;
78 bool swallow;
81 enum {
82 CLOCK_CONFIG_16_2_M = 1,
83 CLOCK_CONFIG_16_368_M,
84 CLOCK_CONFIG_16_8_M,
85 CLOCK_CONFIG_19_2_M,
86 CLOCK_CONFIG_26_M,
87 CLOCK_CONFIG_32_736_M,
88 CLOCK_CONFIG_33_6_M,
89 CLOCK_CONFIG_38_468_M,
90 CLOCK_CONFIG_52_M,
92 NUM_CLOCK_CONFIGS,
95 #endif /* __WL18XX_PRIV_H__ */