Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci iwm(4): 8260 works now. 4165 may works too.



details:   https://anonhg.NetBSD.org/src/rev/11f3f4f53e67
branches:  trunk
changeset: 820452:11f3f4f53e67
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Tue Jan 10 05:54:03 2017 +0000

description:
iwm(4): 8260 works now. 4165 may works too.

diffstat:

 sys/dev/pci/if_iwm.c    |  20 ++++++++------------
 sys/dev/pci/if_iwmvar.h |   4 +---
 2 files changed, 9 insertions(+), 15 deletions(-)

diffs (77 lines):

diff -r 0ab7c82f588d -r 11f3f4f53e67 sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Tue Jan 10 05:43:27 2017 +0000
+++ b/sys/dev/pci/if_iwm.c      Tue Jan 10 05:54:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwm.c,v 1.57 2017/01/10 04:27:04 nonaka Exp $       */
+/*     $NetBSD: if_iwm.c,v 1.58 2017/01/10 05:54:03 nonaka Exp $       */
 /*     OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp  */
 #define IEEE80211_NO_HT
 /*
@@ -107,7 +107,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.57 2017/01/10 04:27:04 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.58 2017/01/10 05:54:03 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -523,14 +523,6 @@
                goto out;
        }
 
-       /* some sanity */
-       if (fw->fw_rawsize > IWM_FWMAXSIZE) {
-               aprint_error_dev(sc->sc_dev,
-                   "firmware size is ridiculous: %zd bytes\n", fw->fw_rawsize);
-               err = EINVAL;
-               goto out;
-       }
-
        /* Read the firmware. */
        fw->fw_rawdata = kmem_alloc(fw->fw_rawsize, KM_SLEEP);
        if (fw->fw_rawdata == NULL) {
@@ -7179,12 +7171,14 @@
        PCI_PRODUCT_INTEL_WIFI_LINK_3160_2,
        PCI_PRODUCT_INTEL_WIFI_LINK_7265_1,
        PCI_PRODUCT_INTEL_WIFI_LINK_7265_2,
-#if 0
+#ifdef notyet
        PCI_PRODUCT_INTEL_WIFI_LINK_3165_1,
        PCI_PRODUCT_INTEL_WIFI_LINK_3165_2,
+#endif
        PCI_PRODUCT_INTEL_WIFI_LINK_8260_1,
        PCI_PRODUCT_INTEL_WIFI_LINK_8260_2,
-#endif
+       PCI_PRODUCT_INTEL_WIFI_LINK_4165_1,
+       PCI_PRODUCT_INTEL_WIFI_LINK_4165_2,
 };
 
 static int
@@ -7383,6 +7377,8 @@
                break;
        case PCI_PRODUCT_INTEL_WIFI_LINK_8260_1:
        case PCI_PRODUCT_INTEL_WIFI_LINK_8260_2:
+       case PCI_PRODUCT_INTEL_WIFI_LINK_4165_1:
+       case PCI_PRODUCT_INTEL_WIFI_LINK_4165_2:
                sc->sc_fwname = "iwlwifi-8000C-16.ucode";
                sc->host_interrupt_operation_mode = 0;
                sc->sc_device_family = IWM_DEVICE_FAMILY_8000;
diff -r 0ab7c82f588d -r 11f3f4f53e67 sys/dev/pci/if_iwmvar.h
--- a/sys/dev/pci/if_iwmvar.h   Tue Jan 10 05:43:27 2017 +0000
+++ b/sys/dev/pci/if_iwmvar.h   Tue Jan 10 05:54:03 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwmvar.h,v 1.11 2017/01/08 07:42:00 nonaka Exp $    */
+/*     $NetBSD: if_iwmvar.h,v 1.12 2017/01/10 05:54:03 nonaka Exp $    */
 /*     OpenBSD: if_iwmvar.h,v 1.24 2016/09/21 13:53:18 stsp Exp        */
 
 /*
@@ -140,8 +140,6 @@
 #define IWM_UCODE_SECT_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



Home | Main Index | Thread Index | Old Index