diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-06-22 08:21:52 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-06-22 08:21:52 +0000 |
commit | 862a8a2927775cc48b6e4b771990ee775653c502 (patch) | |
tree | e871a7454496aec6bbd7fbf27bacb98e9e81ed92 /sys/dev/pci/if_iwxreg.h | |
parent | 332ed1496d24ab2c8e112bd4125efeb1918d717d (diff) |
Fix two iwx(4) TX_CMD_OFFLD macros.
The IP_HDR and MH_SIZE fields represent byte offsets into the frame, rather
than flags. Make these macros require a parameter to prevent them from being
misunderstood as flag bits.
In iwlwifi these are defined via an enum, with most values being used as
parameters to BIT(). Yet these IP and MH ones are actually used to shift
length values to particular positions within the offloading parameters
of the Tx command.
Fortunately, these macros aren't used yet in our version of the driver.
Diffstat (limited to 'sys/dev/pci/if_iwxreg.h')
-rw-r--r-- | sys/dev/pci/if_iwxreg.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_iwxreg.h b/sys/dev/pci/if_iwxreg.h index bd0f6f3c6e9..1457a0c2a5e 100644 --- a/sys/dev/pci/if_iwxreg.h +++ b/sys/dev/pci/if_iwxreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwxreg.h,v 1.13 2020/06/22 08:05:52 stsp Exp $ */ +/* $OpenBSD: if_iwxreg.h,v 1.14 2020/06/22 08:21:51 stsp Exp $ */ /*- * Based on BSD-licensed source modules in the Linux iwlwifi driver, @@ -4863,10 +4863,10 @@ struct iwx_tlc_update_notif { * alignment * @TX_CMD_OFFLD_AMSDU: mark TX command is A-MSDU */ -#define IWX_TX_CMD_OFFLD_IP_HDR (1 << 0) +#define IWX_TX_CMD_OFFLD_IP_HDR(x) ((x) << 0) #define IWX_TX_CMD_OFFLD_L4_EN (1 << 6) #define IWX_TX_CMD_OFFLD_L3_EN (1 << 7) -#define IWX_TX_CMD_OFFLD_MH_SIZE (1 << 8) +#define IWX_TX_CMD_OFFLD_MH_SIZE(x) ((x) << 8) #define IWX_TX_CMD_OFFLD_PAD (1 << 13) #define IWX_TX_CMD_OFFLD_AMSDU (1 << 14) #define IWX_TX_CMD_OFFLD_MH_MASK 0x1f |