blob: 222d03540200498a9400c9dc867159780bdf9311 [file] [log] [blame]
Luciano Coelho166b2132011-12-05 16:51:10 +02001/*
2 * This file is part of wl12xx
3 *
4 * Copyright (C) 2011 Texas Instruments Inc.
5 *
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.
9 *
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.
14 *
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
19 *
20 */
21
22#ifndef __WL12XX_PRIV_H__
23#define __WL12XX_PRIV_H__
24
25#include "conf.h"
26
Luciano Coelho986f3aa2012-11-27 15:51:56 +020027/* WiLink 6/7 chip IDs */
28#define CHIP_ID_127X_PG10 (0x04030101)
29#define CHIP_ID_127X_PG20 (0x04030111)
30#define CHIP_ID_128X_PG10 (0x05030101)
31#define CHIP_ID_128X_PG20 (0x05030111)
32
Luciano Coelho8675f9a2012-11-27 15:52:00 +020033/* FW chip version for wl127x */
Arik Nemtsov4a1ccce2012-06-25 17:46:40 +030034#define WL127X_CHIP_VER 6
Luciano Coelho8675f9a2012-11-27 15:52:00 +020035/* minimum single-role FW version for wl127x */
36#define WL127X_IFTYPE_SR_VER 3
37#define WL127X_MAJOR_SR_VER 10
38#define WL127X_SUBTYPE_SR_VER WLCORE_FW_VER_IGNORE
39#define WL127X_MINOR_SR_VER 115
40/* minimum multi-role FW version for wl127x */
41#define WL127X_IFTYPE_MR_VER 5
42#define WL127X_MAJOR_MR_VER 7
43#define WL127X_SUBTYPE_MR_VER WLCORE_FW_VER_IGNORE
44#define WL127X_MINOR_MR_VER 115
Arik Nemtsov4a1ccce2012-06-25 17:46:40 +030045
Luciano Coelho8675f9a2012-11-27 15:52:00 +020046/* FW chip version for wl128x */
Arik Nemtsov4a1ccce2012-06-25 17:46:40 +030047#define WL128X_CHIP_VER 7
Luciano Coelho8675f9a2012-11-27 15:52:00 +020048/* minimum single-role FW version for wl128x */
49#define WL128X_IFTYPE_SR_VER 3
50#define WL128X_MAJOR_SR_VER 10
51#define WL128X_SUBTYPE_SR_VER WLCORE_FW_VER_IGNORE
52#define WL128X_MINOR_SR_VER 115
53/* minimum multi-role FW version for wl128x */
54#define WL128X_IFTYPE_MR_VER 5
55#define WL128X_MAJOR_MR_VER 7
56#define WL128X_SUBTYPE_MR_VER WLCORE_FW_VER_IGNORE
57#define WL128X_MINOR_MR_VER 42
Arik Nemtsov4a1ccce2012-06-25 17:46:40 +030058
Igal Chernobelsky26a309c2012-07-29 18:21:12 +030059#define WL12XX_AGGR_BUFFER_SIZE (4 * PAGE_SIZE)
60
Igal Chernobelskyf1c434d2012-07-31 14:48:46 +030061#define WL12XX_NUM_TX_DESCRIPTORS 16
62#define WL12XX_NUM_RX_DESCRIPTORS 8
63
Arik Nemtsovf4afbed2012-08-02 20:37:21 +030064#define WL12XX_NUM_MAC_ADDRESSES 2
65
Igal Chernobelskyd21553f2013-03-12 17:19:35 +020066#define WL12XX_RX_BA_MAX_SESSIONS 3
67
Luciano Coelho4b4887e2012-05-10 12:13:45 +030068struct wl127x_rx_mem_pool_addr {
69 u32 addr;
70 u32 addr_extra;
71};
72
Luciano Coelho166b2132011-12-05 16:51:10 +020073struct wl12xx_priv {
74 struct wl12xx_priv_conf conf;
Luciano Coelhoa5d751b2012-05-10 12:13:43 +030075
76 int ref_clock;
77 int tcxo_clock;
Ido Yariv2e07d022012-11-28 11:42:49 +020078
79 struct wl127x_rx_mem_pool_addr *rx_mem_addr;
Luciano Coelho166b2132011-12-05 16:51:10 +020080};
81
82#endif /* __WL12XX_PRIV_H__ */