2 * Copyright (c) 2017 Kevin Lo <kevlo@FreeBSD.org>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef R92E_ROM_IMAGE_H
20 #define R92E_ROM_IMAGE_H
22 #include <dev/rtwn/rtl8192e/r92e_rom_defs.h>
24 #define R92E_DEF_TX_PWR_2G 0x2d
25 #define R92E_DEF_TX_PWR_HT20_DIFF 0x02
26 #define R92E_DEF_TX_PWR_DIFF 0xfe
28 struct r92e_tx_pwr_2g {
29 uint8_t cck[R92E_GROUP_2G];
30 uint8_t ht40[R92E_GROUP_2G - 1];
33 struct r92e_tx_pwr_diff_2g {
38 } __packed diff123[R92E_MAX_TX_COUNT - 1];
42 struct r92e_tx_pwr_2g pwr_2g;
43 struct r92e_tx_pwr_diff_2g pwr_diff_2g;
48 * RTL8192EU ROM image.
51 uint8_t reserved1[16];
52 struct r92e_tx_pwr tx_pwr[R92E_MAX_RF_PATH];
55 #define R92E_ROM_CRYSTALCAP_DEF 0x20
57 uint8_t thermal_meter;
65 uint8_t rf_feature_opt;
69 uint8_t tx_bbswing_2g;
70 uint8_t tx_bbswing_5g;
71 uint8_t tx_pwr_calib_rate;
78 uint8_t macaddr[IEEE80211_ADDR_LEN];
80 uint8_t string[7]; /* "Realtek" */
81 uint8_t reserved7[282];
84 _Static_assert(sizeof(struct r92e_rom) == R92E_EFUSE_MAP_LEN,
85 "R92E_EFUSE_MAP_LEN must be equal to sizeof(struct r92e_rom)!");
87 #endif /* R92E_ROM_IMAGE_H */