diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-10-28 18:06:05 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-10-28 18:06:05 +0000 |
commit | 58e408be8daf26c9378e1608613aaa61b7bad08b (patch) | |
tree | 2d6126546a1d940740d15adcf460a831acab63e6 /sys | |
parent | edb424858984ea5073e321ac54f19998e11dbc2f (diff) |
Recognize IWM_DTS_MEASUREMENT_NOTIF_WIDE PHY_OP notification which will
be generated by version 17 firmware. While at it, declare all known
firmware command groups and all PHY_OPS subcomand ids.
Patch by Imre Vadasz, with tweaks by me
ok patrick@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/if_iwmreg.h | 23 |
2 files changed, 26 insertions, 13 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 9f9907e4541..d83be95e4fc 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.263 2019/10/28 18:02:58 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.264 2019/10/28 18:06:04 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -5007,7 +5007,7 @@ iwm_config_umac_scan(struct iwm_softc *sc) size_t cmd_size; struct ieee80211_channel *c; struct iwm_host_cmd hcmd = { - .id = iwm_cmd_id(IWM_SCAN_CFG_CMD, IWM_ALWAYS_LONG_GROUP, 0), + .id = iwm_cmd_id(IWM_SCAN_CFG_CMD, IWM_LONG_GROUP, 0), .flags = 0, }; static const uint32_t rates = (IWM_SCAN_CONFIG_RATE_1M | @@ -5078,7 +5078,7 @@ iwm_umac_scan(struct iwm_softc *sc, int bgscan) { struct ieee80211com *ic = &sc->sc_ic; struct iwm_host_cmd hcmd = { - .id = iwm_cmd_id(IWM_SCAN_REQ_UMAC, IWM_ALWAYS_LONG_GROUP, 0), + .id = iwm_cmd_id(IWM_SCAN_REQ_UMAC, IWM_LONG_GROUP, 0), .len = { 0, }, .data = { NULL, }, .flags =0, @@ -5572,7 +5572,7 @@ iwm_umac_scan_abort(struct iwm_softc *sc) struct iwm_umac_scan_abort cmd = { 0 }; return iwm_send_cmd_pdu(sc, - IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC), + IWM_WIDE_ID(IWM_LONG_GROUP, IWM_SCAN_ABORT_UMAC), 0, sizeof(cmd), &cmd); } @@ -7127,6 +7127,8 @@ iwm_notif_intr(struct iwm_softc *sc) } case IWM_DTS_MEASUREMENT_NOTIFICATION: + case IWM_WIDE_ID(IWM_PHY_OPS_GROUP, + IWM_DTS_MEASUREMENT_NOTIF_WIDE): break; case IWM_PHY_CONFIGURATION_CMD: @@ -7137,9 +7139,9 @@ iwm_notif_intr(struct iwm_softc *sc) case IWM_POWER_TABLE_CMD: case IWM_PHY_CONTEXT_CMD: case IWM_BINDING_CONTEXT_CMD: - case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_CFG_CMD): - case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_REQ_UMAC): - case IWM_WIDE_ID(IWM_ALWAYS_LONG_GROUP, IWM_SCAN_ABORT_UMAC): + case IWM_WIDE_ID(IWM_LONG_GROUP, IWM_SCAN_CFG_CMD): + case IWM_WIDE_ID(IWM_LONG_GROUP, IWM_SCAN_REQ_UMAC): + case IWM_WIDE_ID(IWM_LONG_GROUP, IWM_SCAN_ABORT_UMAC): case IWM_SCAN_OFFLOAD_REQUEST_CMD: case IWM_SCAN_OFFLOAD_ABORT_CMD: case IWM_REPLY_BEACON_FILTERING_CMD: diff --git a/sys/dev/pci/if_iwmreg.h b/sys/dev/pci/if_iwmreg.h index db46a73253c..7b8b38ef54f 100644 --- a/sys/dev/pci/if_iwmreg.h +++ b/sys/dev/pci/if_iwmreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwmreg.h,v 1.35 2019/10/28 18:02:58 stsp Exp $ */ +/* $OpenBSD: if_iwmreg.h,v 1.36 2019/10/28 18:06:04 stsp Exp $ */ /****************************************************************************** * @@ -1835,6 +1835,22 @@ struct iwm_agn_scd_bc_tbl { #define IWM_REPLY_MAX 0xff +/* PHY_OPS subcommand IDs */ +#define IWM_CMD_DTS_MEASUREMENT_TRIGGER_WIDE 0x0 +#define IWM_CTDP_CONFIG_CMD 0x03 +#define IWM_TEMP_REPORTING_THRESHOLDS_CMD 0x04 +#define IWM_CT_KILL_NOTIFICATION 0xFE +#define IWM_DTS_MEASUREMENT_NOTIF_WIDE 0xFF + +/* command groups */ +#define IWM_LEGACY_GROUP 0x0 +#define IWM_LONG_GROUP 0x1 +#define IWM_SYSTEM_GROUP 0x2 +#define IWM_MAC_CONF_GROUP 0x3 +#define IWM_PHY_OPS_GROUP 0x4 +#define IWM_DATA_PATH_GROUP 0x5 +#define IWM_PROT_OFFLOAD_GROUP 0xb + /* DATA_PATH group subcommand IDs */ #define IWM_DQA_ENABLE_CMD 0x00 @@ -5801,11 +5817,6 @@ iwm_cmd_id(uint8_t opcode, uint8_t groupid, uint8_t version) /* make uint16_t wide id out of uint8_t group and opcode */ #define IWM_WIDE_ID(grp, opcode) ((grp << 8) | opcode) -/* due to the conversion, this group is special */ -#define IWM_ALWAYS_LONG_GROUP 1 -#define IWM_SYSTEM_GROUP 4 -#define IWM_DATA_PATH_GROUP 5 - struct iwm_cmd_header { uint8_t code; uint8_t flags; |