diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-10-28 17:13:45 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-10-28 17:13:45 +0000 |
commit | feaa89a07d3ea75e997893b4e84832d1873b9e64 (patch) | |
tree | 941b47019d111c7e152f2b4c9cd38beee47c5342 /sys | |
parent | 592ed4d94e0f9eafdb4107fad99b9ea023a1b3df (diff) |
iwm: enlarge maximum NVM section size; required for newer firmware
ok patrick@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/if_iwmvar.h | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 42fe7b1f3e5..74731f6332f 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.254 2019/10/18 07:07:53 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.255 2019/10/28 17:13:44 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh <info@genua.de> @@ -2357,7 +2357,6 @@ const int iwm_nvm_to_read[] = { }; #define IWM_NVM_DEFAULT_CHUNK_SIZE (2*1024) -#define IWM_MAX_NVM_SECTION_SIZE 8192 #define IWM_NVM_WRITE_OPCODE 1 #define IWM_NVM_READ_OPCODE 0 @@ -2889,7 +2888,7 @@ iwm_nvm_init(struct iwm_softc *sc) int i, section, err; uint16_t len; uint8_t *buf; - const size_t bufsz = IWM_MAX_NVM_SECTION_SIZE; + const size_t bufsz = sc->sc_nvm_max_section_size; memset(nvm_sections, 0, sizeof(nvm_sections)); @@ -7675,6 +7674,7 @@ iwm_attach(struct device *parent, struct device *self, void *aux) sc->host_interrupt_operation_mode = 1; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; + sc->sc_nvm_max_section_size = 16384; break; case PCI_PRODUCT_INTEL_WL_3165_1: case PCI_PRODUCT_INTEL_WL_3165_2: @@ -7682,12 +7682,14 @@ iwm_attach(struct device *parent, struct device *self, void *aux) sc->host_interrupt_operation_mode = 0; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; + sc->sc_nvm_max_section_size = 16384; break; case PCI_PRODUCT_INTEL_WL_3168_1: sc->sc_fwname = "iwm-3168-22"; sc->host_interrupt_operation_mode = 0; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; + sc->sc_nvm_max_section_size = 16384; break; case PCI_PRODUCT_INTEL_WL_7260_1: case PCI_PRODUCT_INTEL_WL_7260_2: @@ -7695,6 +7697,7 @@ iwm_attach(struct device *parent, struct device *self, void *aux) sc->host_interrupt_operation_mode = 1; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; + sc->sc_nvm_max_section_size = 16384; break; case PCI_PRODUCT_INTEL_WL_7265_1: case PCI_PRODUCT_INTEL_WL_7265_2: @@ -7702,6 +7705,7 @@ iwm_attach(struct device *parent, struct device *self, void *aux) sc->host_interrupt_operation_mode = 0; sc->sc_device_family = IWM_DEVICE_FAMILY_7000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ; + sc->sc_nvm_max_section_size = 16384; break; case PCI_PRODUCT_INTEL_WL_8260_1: case PCI_PRODUCT_INTEL_WL_8260_2: @@ -7709,12 +7713,14 @@ iwm_attach(struct device *parent, struct device *self, void *aux) sc->host_interrupt_operation_mode = 0; sc->sc_device_family = IWM_DEVICE_FAMILY_8000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000; + sc->sc_nvm_max_section_size = 32768; break; case PCI_PRODUCT_INTEL_WL_8265_1: sc->sc_fwname = "iwm-8265-22"; sc->host_interrupt_operation_mode = 0; sc->sc_device_family = IWM_DEVICE_FAMILY_8000; sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000; + sc->sc_nvm_max_section_size = 32768; break; default: printf("%s: unknown adapter type\n", DEVNAME(sc)); diff --git a/sys/dev/pci/if_iwmvar.h b/sys/dev/pci/if_iwmvar.h index 473bb1dd06f..151e9395591 100644 --- a/sys/dev/pci/if_iwmvar.h +++ b/sys/dev/pci/if_iwmvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwmvar.h,v 1.39 2019/10/18 07:07:53 stsp Exp $ */ +/* $OpenBSD: if_iwmvar.h,v 1.40 2019/10/28 17:13:44 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh <info@genua.de> @@ -445,6 +445,7 @@ struct iwm_softc { const char *sc_fwname; bus_size_t sc_fwdmasegsz; + size_t sc_nvm_max_section_size; struct iwm_fw_info sc_fw; int sc_fw_phy_config; struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX]; |