-/* $OpenBSD: if_iwx.c,v 1.154 2023/03/06 10:16:16 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.155 2023/03/06 10:24:15 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
case IWX_ALIVE: {
struct iwx_alive_resp_v4 *resp4;
struct iwx_alive_resp_v5 *resp5;
+ struct iwx_alive_resp_v6 *resp6;
DPRINTF(("%s: firmware alive\n", __func__));
sc->sc_uc.uc_ok = 0;
* versions we need to check the size.
*/
if (iwx_lookup_notif_ver(sc, IWX_LEGACY_GROUP,
+ IWX_ALIVE) == 6) {
+ SYNC_RESP_STRUCT(resp6, pkt);
+ if (iwx_rx_packet_payload_len(pkt) !=
+ sizeof(*resp6)) {
+ sc->sc_uc.uc_intr = 1;
+ wakeup(&sc->sc_uc);
+ break;
+ }
+ sc->sc_uc.uc_lmac_error_event_table[0] = le32toh(
+ resp6->lmac_data[0].dbg_ptrs.error_event_table_ptr);
+ sc->sc_uc.uc_lmac_error_event_table[1] = le32toh(
+ resp6->lmac_data[1].dbg_ptrs.error_event_table_ptr);
+ sc->sc_uc.uc_log_event_table = le32toh(
+ resp6->lmac_data[0].dbg_ptrs.log_event_table_ptr);
+ sc->sc_uc.uc_umac_error_event_table = le32toh(
+ resp6->umac_data.dbg_ptrs.error_info_addr);
+ sc->sc_sku_id[0] =
+ le32toh(resp6->sku_id.data[0]);
+ sc->sc_sku_id[1] =
+ le32toh(resp6->sku_id.data[1]);
+ sc->sc_sku_id[2] =
+ le32toh(resp6->sku_id.data[2]);
+ if (resp6->status == IWX_ALIVE_STATUS_OK)
+ sc->sc_uc.uc_ok = 1;
+ } else if (iwx_lookup_notif_ver(sc, IWX_LEGACY_GROUP,
IWX_ALIVE) == 5) {
SYNC_RESP_STRUCT(resp5, pkt);
if (iwx_rx_packet_payload_len(pkt) !=
-/* $OpenBSD: if_iwxreg.h,v 1.42 2023/03/06 10:16:16 stsp Exp $ */
+/* $OpenBSD: if_iwxreg.h,v 1.43 2023/03/06 10:24:15 stsp Exp $ */
/*-
* Based on BSD-licensed source modules in the Linux iwlwifi driver,
struct iwx_sku_id sku_id;
} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_5 */
+struct iwx_imr_alive_info {
+ uint64_t base_addr;
+ uint32_t size;
+ uint32_t enabled;
+} __packed; /* IMR_ALIVE_INFO_API_S_VER_1 */
+
+struct iwx_alive_resp_v6 {
+ uint16_t status;
+ uint16_t flags;
+ struct iwx_lmac_alive lmac_data[2];
+ struct iwx_umac_alive umac_data;
+ struct iwx_sku_id sku_id;
+ struct iwx_imr_alive_info imr;
+} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_6 */
+
#define IWX_SOC_CONFIG_CMD_FLAGS_DISCRETE (1 << 0)
#define IWX_SOC_CONFIG_CMD_FLAGS_LOW_LATENCY (1 << 1)