-/* $OpenBSD: if_iwn.c,v 1.251 2021/11/11 13:36:58 stsp Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.252 2021/11/12 11:40:35 stsp Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
memset(sc->enh_maxpwr, 0, sizeof sc->enh_maxpwr);
for (i = 0; i < nitems(enhinfo); i++) {
- if (enhinfo[i].chan == 0 || enhinfo[i].reserved != 0)
+ if ((enhinfo[i].flags & IWN_TXP_VALID) == 0)
continue; /* Skip invalid entries. */
maxpwr = 0;
-/* $OpenBSD: if_iwnreg.h,v 1.57 2021/11/11 13:36:58 stsp Exp $ */
+/* $OpenBSD: if_iwnreg.h,v 1.58 2021/11/12 11:40:36 stsp Exp $ */
/*-
* Copyright (c) 2007, 2008
} __packed;
struct iwn_eeprom_enhinfo {
- uint16_t chan;
+ uint8_t flags;
+#define IWN_TXP_VALID (1 << 0)
+#define IWN_TXP_BAND_52G (1 << 1)
+#define IWN_TXP_OFDM (1 << 2)
+#define IWN_TXP_40MHZ (1 << 3)
+#define IWN_TXP_HT_AP (1 << 4)
+#define IWN_TXP_RES1 (1 << 5)
+#define IWN_TXP_RES2 (1 << 6)
+#define IWN_TXP_COMMON_TYPE (1 << 7)
+ uint8_t chan;
int8_t chain[3]; /* max power in half-dBm */
- uint8_t reserved;
+ uint8_t delta_20_in_40;
int8_t mimo2; /* max power in half-dBm */
int8_t mimo3; /* max power in half-dBm */
} __packed;