]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/dev/rtwn/rtl8192c/r92c_rom_image.h
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and update
[FreeBSD/FreeBSD.git] / sys / dev / rtwn / rtl8192c / r92c_rom_image.h
1 /*-
2  * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
3  * Copyright (c) 2016 Andriy Voskoboinyk <avos@FreeBSD.org>
4  *
5  * Permission to use, copy, modify, and distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  *
17  * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $
18  * $FreeBSD$
19  */
20
21 #ifndef R92C_ROM_IMAGE_H
22 #define R92C_ROM_IMAGE_H
23
24 #include <dev/rtwn/rtl8192c/r92c_rom_defs.h>
25
26 /*
27  * RTL8192CU ROM image.
28  */
29 struct r92c_rom {
30         uint16_t        id;             /* 0x8192 */
31         uint8_t         reserved1[5];
32         uint8_t         dbg_sel;
33         uint16_t        reserved2;
34         uint16_t        vid;
35         uint16_t        pid;
36         uint8_t         usb_opt;
37         uint8_t         ep_setting;
38         uint16_t        reserved3;
39         uint8_t         usb_phy;
40         uint8_t         reserved4[3];
41         uint8_t         macaddr[IEEE80211_ADDR_LEN];
42         uint8_t         string[61];     /* "Realtek" */
43         uint8_t         subcustomer_id;
44         uint8_t         cck_tx_pwr[R92C_MAX_CHAINS][R92C_GROUP_2G];
45         uint8_t         ht40_1s_tx_pwr[R92C_MAX_CHAINS][R92C_GROUP_2G];
46         uint8_t         ht40_2s_tx_pwr_diff[R92C_GROUP_2G];
47         uint8_t         ht20_tx_pwr_diff[R92C_GROUP_2G];
48         uint8_t         ofdm_tx_pwr_diff[R92C_GROUP_2G];
49         uint8_t         ht40_max_pwr[R92C_GROUP_2G];
50         uint8_t         ht20_max_pwr[R92C_GROUP_2G];
51         uint8_t         xtal_calib;
52         uint8_t         tssi[R92C_MAX_CHAINS];
53         uint8_t         thermal_meter;
54 #define R92C_ROM_THERMAL_METER_M        0x1f
55 #define R92C_ROM_THERMAL_METER_S        0
56
57         uint8_t         rf_opt1;
58         uint8_t         rf_opt2;
59         uint8_t         rf_opt3;
60         uint8_t         rf_opt4;
61         uint8_t         channel_plan;
62 #define R92C_CHANNEL_PLAN_BY_HW         0x80
63
64         uint8_t         version;
65         uint8_t         customer_id;
66 } __packed;
67
68 _Static_assert(sizeof(struct r92c_rom) == R92C_EFUSE_MAP_LEN,
69     "R92C_EFUSE_MAP_LEN must be equal to sizeof(struct r92c_rom)!");
70
71 #endif  /* R92C_ROM_IMAGE_H */