Wed Apr 17 16:26:10 2024 UTC (23d)
Pull up following revision(s) (requested by riastradh in ticket #1953):

	sys/dev/pci/if_iwn.c: revision 1.100

if_iwn.c: pick up proper firmware for Centrino Wireless-N 130

Both variants should use iwlwifi-6000g2b-6 not iwlwifi-6000g2a-6. (It
seems only two specific product variants use iwlwifi-6000g2a-6. We
could simplify by reversing the sense of the test, as OpenBSD does, but
it doesn't seem to matter much, as what we now match seems to be the
full gamut possible, so the simpler diff was chosen here.)

Addresses PR kern/58105 from wandrien.dev%gmail.com@localhost, with the
PCI_PRODUCT_INTEL_WIFI_LINK_130_1 match tested by the reporter. Code
inspection of the FreeBSD driver indicates we should safely be able to
match PCI_PRODUCT_INTEL_WIFI_LINK_130_2 also.


(martin)
diff -r1.84.6.2 -r1.84.6.3 src/sys/dev/pci/if_iwn.c

cvs diff -r1.84.6.2 -r1.84.6.3 src/sys/dev/pci/if_iwn.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_iwn.c 2017/12/10 10:10:24 1.84.6.2
+++ src/sys/dev/pci/if_iwn.c 2024/04/17 16:26:10 1.84.6.3
@@ -1,38 +1,38 @@ @@ -1,38 +1,38 @@
1/* $NetBSD: if_iwn.c,v 1.84.6.2 2017/12/10 10:10:24 snj Exp $ */ 1/* $NetBSD: if_iwn.c,v 1.84.6.3 2024/04/17 16:26:10 martin Exp $ */
2/* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */ 2/* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */
3 3
4/*- 4/*-
5 * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> 5 * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
6 * 6 *
7 * Permission to use, copy, modify, and distribute this software for any 7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above 8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies. 9 * copyright notice and this permission notice appear in all copies.
10 * 10 *
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */ 18 */
19 19
20/* 20/*
21 * Driver for Intel WiFi Link 4965 and 1000/5000/6000 Series 802.11 network 21 * Driver for Intel WiFi Link 4965 and 1000/5000/6000 Series 802.11 network
22 * adapters. 22 * adapters.
23 */ 23 */
24#include <sys/cdefs.h> 24#include <sys/cdefs.h>
25__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.84.6.2 2017/12/10 10:10:24 snj Exp $"); 25__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.84.6.3 2024/04/17 16:26:10 martin Exp $");
26 26
27#define IWN_USE_RBUF /* Use local storage for RX */ 27#define IWN_USE_RBUF /* Use local storage for RX */
28#undef IWN_HWCRYPTO /* XXX does not even compile yet */ 28#undef IWN_HWCRYPTO /* XXX does not even compile yet */
29 29
30#include <sys/param.h> 30#include <sys/param.h>
31#include <sys/sockio.h> 31#include <sys/sockio.h>
32#include <sys/proc.h> 32#include <sys/proc.h>
33#include <sys/mbuf.h> 33#include <sys/mbuf.h>
34#include <sys/kernel.h> 34#include <sys/kernel.h>
35#include <sys/socket.h> 35#include <sys/socket.h>
36#include <sys/systm.h> 36#include <sys/systm.h>
37#include <sys/malloc.h> 37#include <sys/malloc.h>
38#ifdef notyetMODULE 38#ifdef notyetMODULE
@@ -775,26 +775,28 @@ iwn5000_attach(struct iwn_softc *sc, pci @@ -775,26 +775,28 @@ iwn5000_attach(struct iwn_softc *sc, pci
775 sc->txchainmask = IWN_ANT_BC; 775 sc->txchainmask = IWN_ANT_BC;
776 sc->rxchainmask = IWN_ANT_BC; 776 sc->rxchainmask = IWN_ANT_BC;
777 } 777 }
778 break; 778 break;
779 case IWN_HW_REV_TYPE_6050: 779 case IWN_HW_REV_TYPE_6050:
780 sc->limits = &iwn6000_sensitivity_limits; 780 sc->limits = &iwn6000_sensitivity_limits;
781 sc->fwname = "iwlwifi-6050-5.ucode"; 781 sc->fwname = "iwlwifi-6050-5.ucode";
782 break; 782 break;
783 case IWN_HW_REV_TYPE_6005: 783 case IWN_HW_REV_TYPE_6005:
784 sc->limits = &iwn6000_sensitivity_limits; 784 sc->limits = &iwn6000_sensitivity_limits;
785 /* Type 6030 cards return IWN_HW_REV_TYPE_6005 */ 785 /* Type 6030 cards return IWN_HW_REV_TYPE_6005 */
786 if (pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_1 || 786 if (pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_1 ||
787 pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_2 || 787 pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_2 ||
 788 pid == PCI_PRODUCT_INTEL_WIFI_LINK_130_1 ||
 789 pid == PCI_PRODUCT_INTEL_WIFI_LINK_130_2 ||
788 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_1 || 790 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_1 ||
789 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_2 || 791 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_2 ||
790 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6235 || 792 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6235 ||
791 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6235_2) { 793 pid == PCI_PRODUCT_INTEL_WIFI_LINK_6235_2) {
792 sc->fwname = "iwlwifi-6000g2b-6.ucode"; 794 sc->fwname = "iwlwifi-6000g2b-6.ucode";
793 ops->config_bt_coex = iwn_config_bt_coex_adv1; 795 ops->config_bt_coex = iwn_config_bt_coex_adv1;
794 } 796 }
795 else 797 else
796 sc->fwname = "iwlwifi-6000g2a-5.ucode"; 798 sc->fwname = "iwlwifi-6000g2a-5.ucode";
797 break; 799 break;
798 case IWN_HW_REV_TYPE_2030: 800 case IWN_HW_REV_TYPE_2030:
799 sc->limits = &iwn2030_sensitivity_limits; 801 sc->limits = &iwn2030_sensitivity_limits;
800 sc->fwname = "iwlwifi-2030-6.ucode"; 802 sc->fwname = "iwlwifi-2030-6.ucode";