[iwm] Get rid of unneeded IWM_FWDMASEGSZ and IWM_FWMAXSIZE constants

* We only need IWM_FH_MEM_TB_MAX_LENGTH bytes for the fw_dma memory.

Obtained from:	dragonflybsd.git f414b8da30816705e32573cc58097cacac34f161
This commit is contained in:
adrian 2017-02-22 02:49:57 +00:00
parent 077418d939
commit 7d8e0ae417
2 changed files with 1 additions and 11 deletions

View File

@ -1025,7 +1025,7 @@ iwm_alloc_fwmem(struct iwm_softc *sc)
{
/* Must be aligned on a 16-byte boundary. */
return iwm_dma_contig_alloc(sc->sc_dmat, &sc->fw_dma,
sc->sc_fwdmasegsz, 16);
IWM_FH_MEM_TB_MAX_LENGTH, 16);
}
/* tx scheduler rings. not used? */
@ -5997,27 +5997,22 @@ iwm_dev_check(device_t dev)
case PCI_PRODUCT_INTEL_WL_3160_1:
case PCI_PRODUCT_INTEL_WL_3160_2:
sc->cfg = &iwm3160_cfg;
sc->sc_fwdmasegsz = IWM_FWDMASEGSZ;
return (0);
case PCI_PRODUCT_INTEL_WL_3165_1:
case PCI_PRODUCT_INTEL_WL_3165_2:
sc->cfg = &iwm3165_cfg;
sc->sc_fwdmasegsz = IWM_FWDMASEGSZ;
return (0);
case PCI_PRODUCT_INTEL_WL_7260_1:
case PCI_PRODUCT_INTEL_WL_7260_2:
sc->cfg = &iwm7260_cfg;
sc->sc_fwdmasegsz = IWM_FWDMASEGSZ;
return (0);
case PCI_PRODUCT_INTEL_WL_7265_1:
case PCI_PRODUCT_INTEL_WL_7265_2:
sc->cfg = &iwm7265_cfg;
sc->sc_fwdmasegsz = IWM_FWDMASEGSZ;
return (0);
case PCI_PRODUCT_INTEL_WL_8260_1:
case PCI_PRODUCT_INTEL_WL_8260_2:
sc->cfg = &iwm8260_cfg;
sc->sc_fwdmasegsz = IWM_FWDMASEGSZ_8000;
return (0);
default:
device_printf(dev, "unknown adapter type\n");

View File

@ -138,10 +138,6 @@ struct iwm_tx_radiotap_header {
#define IWM_UCODE_SECTION_MAX 16
#define IWM_FWDMASEGSZ (192*1024)
#define IWM_FWDMASEGSZ_8000 (320*1024)
/* sanity check value */
#define IWM_FWMAXSIZE (2*1024*1024)
/*
* fw_status is used to determine if we've already parsed the firmware file
@ -476,7 +472,6 @@ struct iwm_softc {
*/
int sc_generation;
bus_size_t sc_fwdmasegsz;
struct iwm_fw_info sc_fw;
struct iwm_tlv_calib_ctrl sc_default_calib[IWM_UCODE_TYPE_MAX];