Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2017 02:49:57 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314069 - head/sys/dev/iwm
Message-ID:  <201702220249.v1M2nvIn014489@repo.freebsd.org>

Next in thread | Raw E-Mail | Index | Archive | Help
Author: adrian
Date: Wed Feb 22 02:49:57 2017
New Revision: 314069
URL: https://svnweb.freebsd.org/changeset/base/314069

Log:
  [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

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwmvar.h

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Wed Feb 22 02:35:59 2017	(r314068)
+++ head/sys/dev/iwm/if_iwm.c	Wed Feb 22 02:49:57 2017	(r314069)
@@ -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");

Modified: head/sys/dev/iwm/if_iwmvar.h
==============================================================================
--- head/sys/dev/iwm/if_iwmvar.h	Wed Feb 22 02:35:59 2017	(r314068)
+++ head/sys/dev/iwm/if_iwmvar.h	Wed Feb 22 02:49:57 2017	(r314069)
@@ -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];
 



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?201702220249.v1M2nvIn014489>