121308Sache/*- 221308Sache * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> 321308Sache * Copyright (c) 2016 Andriy Voskoboinyk <avos@FreeBSD.org> 421308Sache * 521308Sache * Permission to use, copy, modify, and distribute this software for any 621308Sache * purpose with or without fee is hereby granted, provided that the above 721308Sache * copyright notice and this permission notice appear in all copies. 821308Sache * 921308Sache * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1021308Sache * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1121308Sache * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1221308Sache * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1321308Sache * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1421308Sache * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1521308Sache * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1621308Sache * 1721308Sache * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $ 1821308Sache */ 1921308Sache 2021308Sache#ifndef R92C_ROM_IMAGE_H 2121308Sache#define R92C_ROM_IMAGE_H 2221308Sache 2321308Sache#include <dev/rtwn/rtl8192c/r92c_rom_defs.h> 2421308Sache 2521308Sache/* 2621308Sache * RTL8192CU ROM image. 2721308Sache */ 2821308Sachestruct r92c_rom { 2921308Sache uint16_t id; /* 0x8192 */ 3021308Sache uint8_t reserved1[5]; 3121308Sache uint8_t dbg_sel; 3221308Sache uint16_t reserved2; 3321308Sache uint16_t vid; 3421308Sache uint16_t pid; 3521308Sache uint8_t usb_opt; 3621308Sache uint8_t ep_setting; 3721308Sache uint16_t reserved3; 3821308Sache uint8_t usb_phy; 3921308Sache uint8_t reserved4[3]; 4021308Sache uint8_t macaddr[IEEE80211_ADDR_LEN]; 4121308Sache uint8_t string[61]; /* "Realtek" */ 4221308Sache uint8_t subcustomer_id; 4321308Sache uint8_t cck_tx_pwr[R92C_MAX_CHAINS][R92C_GROUP_2G]; 4421308Sache uint8_t ht40_1s_tx_pwr[R92C_MAX_CHAINS][R92C_GROUP_2G]; 4521308Sache uint8_t ht40_2s_tx_pwr_diff[R92C_GROUP_2G]; 4621308Sache uint8_t ht20_tx_pwr_diff[R92C_GROUP_2G]; 4721308Sache uint8_t ofdm_tx_pwr_diff[R92C_GROUP_2G]; 4821308Sache uint8_t ht40_max_pwr[R92C_GROUP_2G]; 4921308Sache uint8_t ht20_max_pwr[R92C_GROUP_2G]; 5021308Sache uint8_t channel_plan; 5121308Sache uint8_t tssi[R92C_MAX_CHAINS]; 5221308Sache uint8_t thermal_meter; 5321308Sache#define R92C_ROM_THERMAL_METER_M 0x1f 5421308Sache#define R92C_ROM_THERMAL_METER_S 0 5521308Sache 5621308Sache uint8_t rf_opt1; 5721308Sache uint8_t rf_opt2; 5821308Sache uint8_t rf_opt3; 5921308Sache uint8_t rf_opt4; 6021308Sache uint8_t reserved5; 6121308Sache uint8_t version; 6221308Sache uint8_t customer_id; 6321308Sache} __packed; 6421308Sache 6521308Sache_Static_assert(sizeof(struct r92c_rom) == R92C_EFUSE_MAP_LEN, 6621308Sache "R92C_EFUSE_MAP_LEN must be equal to sizeof(struct r92c_rom)!"); 6721308Sache 6821308Sache#endif /* R92C_ROM_IMAGE_H */ 6921308Sache