fwdesc.h (6288cf1e768ae73db5ddaaae54d85245cc1c2b56) fwdesc.h (85ee5122abbc1b5c5f3622e46942291a2f6f1261)
1/*
2 * Shared CARL9170 Header
3 *
4 * Firmware descriptor format
5 *
1/*
2 * Shared CARL9170 Header
3 *
4 * Firmware descriptor format
5 *
6 * Copyright 2009, 2010, Christian Lamparter <chunkeey@googlemail.com>
6 * Copyright 2009-2011 Christian Lamparter <chunkeey@googlemail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

--- 52 unchanged lines hidden (view full) ---

67 CARL9170FW_PSM,
68
69 /* Firmware RX filter | CARL9170_CMD_RX_FILTER */
70 CARL9170FW_RX_FILTER,
71
72 /* Wake up on WLAN */
73 CARL9170FW_WOL,
74
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

--- 52 unchanged lines hidden (view full) ---

67 CARL9170FW_PSM,
68
69 /* Firmware RX filter | CARL9170_CMD_RX_FILTER */
70 CARL9170FW_RX_FILTER,
71
72 /* Wake up on WLAN */
73 CARL9170FW_WOL,
74
75 /* Firmware supports PSM in the 5GHZ Band */
76 CARL9170FW_FIXED_5GHZ_PSM,
77
75 /* KEEP LAST */
76 __CARL9170FW_FEATURE_NUM
77};
78
79#define OTUS_MAGIC "OTAR"
80#define MOTD_MAGIC "MOTD"
81#define FIX_MAGIC "FIX\0"
82#define DBG_MAGIC "DBG\0"
83#define CHK_MAGIC "CHK\0"
84#define TXSQ_MAGIC "TXSQ"
78 /* KEEP LAST */
79 __CARL9170FW_FEATURE_NUM
80};
81
82#define OTUS_MAGIC "OTAR"
83#define MOTD_MAGIC "MOTD"
84#define FIX_MAGIC "FIX\0"
85#define DBG_MAGIC "DBG\0"
86#define CHK_MAGIC "CHK\0"
87#define TXSQ_MAGIC "TXSQ"
88#define WOL_MAGIC "WOL\0"
85#define LAST_MAGIC "LAST"
86
87#define CARL9170FW_SET_DAY(d) (((d) - 1) % 31)
88#define CARL9170FW_SET_MONTH(m) ((((m) - 1) % 12) * 31)
89#define CARL9170FW_SET_YEAR(y) (((y) - 10) * 372)
90
91#define CARL9170FW_GET_DAY(d) (((d) % 31) + 1)
92#define CARL9170FW_GET_MONTH(m) ((((m) / 31) % 12) + 1)

--- 6 unchanged lines hidden (view full) ---

99 __le16 length;
100 u8 min_ver;
101 u8 cur_ver;
102} __packed;
103#define CARL9170FW_DESC_HEAD_SIZE \
104 (sizeof(struct carl9170fw_desc_head))
105
106#define CARL9170FW_OTUS_DESC_MIN_VER 6
89#define LAST_MAGIC "LAST"
90
91#define CARL9170FW_SET_DAY(d) (((d) - 1) % 31)
92#define CARL9170FW_SET_MONTH(m) ((((m) - 1) % 12) * 31)
93#define CARL9170FW_SET_YEAR(y) (((y) - 10) * 372)
94
95#define CARL9170FW_GET_DAY(d) (((d) % 31) + 1)
96#define CARL9170FW_GET_MONTH(m) ((((m) / 31) % 12) + 1)

--- 6 unchanged lines hidden (view full) ---

103 __le16 length;
104 u8 min_ver;
105 u8 cur_ver;
106} __packed;
107#define CARL9170FW_DESC_HEAD_SIZE \
108 (sizeof(struct carl9170fw_desc_head))
109
110#define CARL9170FW_OTUS_DESC_MIN_VER 6
107#define CARL9170FW_OTUS_DESC_CUR_VER 6
111#define CARL9170FW_OTUS_DESC_CUR_VER 7
108struct carl9170fw_otus_desc {
109 struct carl9170fw_desc_head head;
110 __le32 feature_set;
111 __le32 fw_address;
112 __le32 bcn_addr;
113 __le16 bcn_len;
114 __le16 miniboot_size;
115 __le16 tx_frag_len;

--- 65 unchanged lines hidden (view full) ---

181struct carl9170fw_txsq_desc {
182 struct carl9170fw_desc_head head;
183
184 __le32 seq_table_addr;
185} __packed;
186#define CARL9170FW_TXSQ_DESC_SIZE \
187 (sizeof(struct carl9170fw_txsq_desc))
188
112struct carl9170fw_otus_desc {
113 struct carl9170fw_desc_head head;
114 __le32 feature_set;
115 __le32 fw_address;
116 __le32 bcn_addr;
117 __le16 bcn_len;
118 __le16 miniboot_size;
119 __le16 tx_frag_len;

--- 65 unchanged lines hidden (view full) ---

185struct carl9170fw_txsq_desc {
186 struct carl9170fw_desc_head head;
187
188 __le32 seq_table_addr;
189} __packed;
190#define CARL9170FW_TXSQ_DESC_SIZE \
191 (sizeof(struct carl9170fw_txsq_desc))
192
193#define CARL9170FW_WOL_DESC_MIN_VER 1
194#define CARL9170FW_WOL_DESC_CUR_VER 1
195struct carl9170fw_wol_desc {
196 struct carl9170fw_desc_head head;
197
198 __le32 supported_triggers; /* CARL9170_WOL_ */
199} __packed;
200#define CARL9170FW_WOL_DESC_SIZE \
201 (sizeof(struct carl9170fw_wol_desc))
202
189#define CARL9170FW_LAST_DESC_MIN_VER 1
190#define CARL9170FW_LAST_DESC_CUR_VER 2
191struct carl9170fw_last_desc {
192 struct carl9170fw_desc_head head;
193} __packed;
194#define CARL9170FW_LAST_DESC_SIZE \
195 (sizeof(struct carl9170fw_fix_desc))
196

--- 61 unchanged lines hidden ---
203#define CARL9170FW_LAST_DESC_MIN_VER 1
204#define CARL9170FW_LAST_DESC_CUR_VER 2
205struct carl9170fw_last_desc {
206 struct carl9170fw_desc_head head;
207} __packed;
208#define CARL9170FW_LAST_DESC_SIZE \
209 (sizeof(struct carl9170fw_fix_desc))
210

--- 61 unchanged lines hidden ---