From 03e1f4d1d322640fea2abd94639c0c441433a444 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Sun, 7 Feb 2016 12:16:25 +0000 Subject: Make sure the maximum iwm(4) firmware command payload size fits into the 12 bits available for it in struct iwm_tfd_tb.hi_n_len. Patch by Imre Vadasz via tech@ --- sys/dev/pci/if_iwmreg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/if_iwmreg.h') diff --git a/sys/dev/pci/if_iwmreg.h b/sys/dev/pci/if_iwmreg.h index fb6b93aaf2a..adfda2b53f2 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.9 2015/12/14 08:34:56 stsp Exp $ */ +/* $OpenBSD: if_iwmreg.h,v 1.10 2016/02/07 12:16:24 stsp Exp $ */ /****************************************************************************** * @@ -5231,7 +5231,7 @@ enum iwm_power_scheme { }; #define IWM_DEF_CMD_PAYLOAD_SIZE 320 -#define IWM_MAX_CMD_PAYLOAD_SIZE (4096 - sizeof(struct iwm_cmd_header)) +#define IWM_MAX_CMD_PAYLOAD_SIZE ((4096 - 4) - sizeof(struct iwm_cmd_header)) #define IWM_CMD_FAILED_MSK 0x40 struct iwm_device_cmd { -- cgit v1.2.3