Source-Changes-HG archive

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

[src/trunk]: src Add support for Centrino Wireless-N 1030 and Centrino Advanc...



details:   https://anonhg.NetBSD.org/src/rev/6758ee473701
branches:  trunk
changeset: 788911:6758ee473701
user:      prlw1 <prlw1%NetBSD.org@localhost>
date:      Sun Jul 28 11:46:24 2013 +0000

description:
Add support for Centrino Wireless-N 1030 and Centrino Advanced-N 6230
http://mail-index.netbsd.org/tech-net/2013/01/04/msg003802.html

diffstat:

 doc/CHANGES                                                         |    4 +-
 external/intel-fw-public/Makefile                                   |    4 +-
 external/intel-fw-public/Makefile.inc                               |    2 +-
 external/intel-fw-public/iwl6030/Makefile                           |   10 +
 external/intel-fw-public/iwl6030/dist/LICENSE.iwlwifi-6000g2b-ucode |   39 ++
 external/intel-fw-public/iwl6030/dist/README.iwlwifi-6000g2b-ucode  |  113 ++++++
 external/intel-fw-public/iwl6030/dist/iwlwifi-6000g2b-6.ucode       |  Bin 
 sys/dev/pci/if_iwn.c                                                |  168 ++++++++-
 sys/dev/pci/if_iwnreg.h                                             |   67 +++-
 sys/dev/pci/if_iwnvar.h                                             |    3 +-
 10 files changed, 381 insertions(+), 29 deletions(-)

diffs (truncated from 594 to 300 lines):

diff -r 666900929e51 -r 6758ee473701 doc/CHANGES
--- a/doc/CHANGES       Sun Jul 28 10:24:59 2013 +0000
+++ b/doc/CHANGES       Sun Jul 28 11:46:24 2013 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.1836 $>
+# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.1837 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -262,3 +262,5 @@
                addressing modes). [matt 20130719]
        bind: update to 9.9.3-P2 to fix CVE-2013-4854 remote query can cause
                named to terminate
+       iwn(4): Add support for Centrino Wireless-N 1030 and Centrino
+               Advanced-N 6230 [prlw1 20130728]
diff -r 666900929e51 -r 6758ee473701 external/intel-fw-public/Makefile
--- a/external/intel-fw-public/Makefile Sun Jul 28 10:24:59 2013 +0000
+++ b/external/intel-fw-public/Makefile Sun Jul 28 11:46:24 2013 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2011/05/20 01:59:14 msaitoh Exp $
+# $NetBSD: Makefile,v 1.7 2013/07/28 11:46:24 prlw1 Exp $
 
 SUBDIR+=       ipw3945 iwl1000 iwl4965 iwl5000 iwl5150 iwl6000 iwl6005 \
-               iwl6050
+               iwl6030 iwl6050
 
 .include <bsd.subdir.mk>
diff -r 666900929e51 -r 6758ee473701 external/intel-fw-public/Makefile.inc
--- a/external/intel-fw-public/Makefile.inc     Sun Jul 28 10:24:59 2013 +0000
+++ b/external/intel-fw-public/Makefile.inc     Sun Jul 28 11:46:24 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD
+# $NetBSD: Makefile.inc,v 1.2 2013/07/28 11:46:24 prlw1 Exp $
 
 FILESOWN=      ${FIRMWAREOWN}
 FILESGRP=      ${FIRMWAREGRP}
diff -r 666900929e51 -r 6758ee473701 external/intel-fw-public/iwl6030/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/intel-fw-public/iwl6030/Makefile Sun Jul 28 11:46:24 2013 +0000
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2013/07/28 11:46:24 prlw1 Exp $
+
+NOMAN= # define
+
+FILES= dist/LICENSE.iwlwifi-6000g2b-ucode dist/README.iwlwifi-6000g2b-ucode \
+       dist/iwlwifi-6000g2b-6.ucode
+
+FILESDIR=      /libdata/firmware/if_iwn
+
+.include <bsd.files.mk>
diff -r 666900929e51 -r 6758ee473701 external/intel-fw-public/iwl6030/dist/LICENSE.iwlwifi-6000g2b-ucode
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/intel-fw-public/iwl6030/dist/LICENSE.iwlwifi-6000g2b-ucode       Sun Jul 28 11:46:24 2013 +0000
@@ -0,0 +1,39 @@
+Copyright (c) 2006-2012, Intel Corporation.
+All rights reserved.
+
+Redistribution.  Redistribution and use in binary form, without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions must reproduce the above copyright notice and the
+  following disclaimer in the documentation and/or other materials
+  provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its suppliers
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+* No reverse engineering, decompilation, or disassembly of this software
+  is permitted.
+
+Limited patent license.  Intel Corporation grants a world-wide,
+royalty-free, non-exclusive license under patents it now or hereafter
+owns or controls to make, have made, use, import, offer to sell and
+sell ("Utilize") this software, but solely to the extent that any
+such patent is necessary to Utilize the software alone, or in
+combination with an operating system licensed under an approved Open
+Source license as listed by the Open Source Initiative at
+http://opensource.org/licenses.  The patent license shall not apply to
+any other combinations which include this software.  No hardware per
+se is licensed hereunder.
+
+DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
diff -r 666900929e51 -r 6758ee473701 external/intel-fw-public/iwl6030/dist/README.iwlwifi-6000g2b-ucode
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/intel-fw-public/iwl6030/dist/README.iwlwifi-6000g2b-ucode        Sun Jul 28 11:46:24 2013 +0000
@@ -0,0 +1,113 @@
+Intel Wireless WiFi Link 6005 AGN Adapter
+Copyright (C) 2006-2012 Intel Corporation.  All rights reserved.
+
+Microcode Package README.iwlwifi-6000g2b-ucode
+
+INDEX
+
+1. OVERVIEW
+2. INSTALLATION
+3. LICENSE
+
+
+1. OVERVIEW
+
+The file iwlwifi-6000g2b-6.ucode provided in this package must be
+present on your system in order for the Intel Wireless WiFi Link
+AGN driver for Linux (iwlagn) to operate on your system.
+
+The "-6" in the filename reflects an interface/architecture version number.
+It will change only when changes in new uCode releases make the new uCode
+incompatible with earlier drivers.
+
+On adapter initialization, and at varying times during the uptime of
+the adapter, the microcode is loaded into the memory on the network
+adapter.  The microcode provides the low level MAC features including
+radio control and high precision timing events (backoff, transmit,
+etc.) while also providing varying levels of packet filtering which can
+be used to keep the host from having to handle packets that are not of
+interest given the current operating mode of the device.
+
+2. INSTALLATION
+
+The iwlagn driver will look for the file iwlwifi-6000g2b-6.ucode using the
+kernel's firmware_class infrastructure. More information can be found under
+Documentation/firmware_class in kernel source. In order to function
+correctly, you need to have this support enabled in your kernel.  When
+you configure the kernel, you can find this option in the following
+location:
+
+        Device Drivers ->
+                Generic Driver Options ->
+                        Userspace firmware loading support
+
+
+You can determine if your kernel currently has firmware loader support
+by looking for the CONFIG_FW_LOADER definition on your kernel's
+.config.
+
+In addition to having the firmware_class support in your kernel, you
+must also have a working udev and uevent infrastructure configured.
+The steps for installing and configuring udev are very
+distribution specific.
+
+Once you have the firmware loader in place (or if you aren't sure and
+you just want to try things to see if it works), you need to install
+the microcode file into the appropriate location.
+
+Where that appropriate location is depends (again) on your system
+distribution.  You can typically find this location by looking in the
+udev scripts of your distro, the default is /lib/firmware.
+
+Installation of the firmware is simply:
+
+        % cp iwlwifi-6000g2b-6.ucode /lib/firmware
+
+You can now load the driver (see the INSTALL and README.iwlwifi provided with
+the iwlwifi package for information on building and using that driver.)
+
+3. LICENSE
+
+The microcode in this package (iwlwifi-6000g2b-6.ucode) is provided under the
+terms of the following license (available in the file
+LICENSE.iwlwifi-6000g2b-ucode):
+
+Copyright (c) 2006-2012, Intel Corporation.
+All rights reserved.
+
+Redistribution.  Redistribution and use in binary form, without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions must reproduce the above copyright notice and the
+  following disclaimer in the documentation and/or other materials
+  provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its suppliers
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+* No reverse engineering, decompilation, or disassembly of this software
+  is permitted.
+
+Limited patent license.  Intel Corporation grants a world-wide,
+royalty-free, non-exclusive license under patents it now or hereafter
+owns or controls to make, have made, use, import, offer to sell and
+sell ("Utilize") this software, but solely to the extent that any
+such patent is necessary to Utilize the software alone, or in
+combination with an operating system licensed under an approved Open
+Source license as listed by the Open Source Initiative at
+http://opensource.org/licenses.  The patent license shall not apply to
+any other combinations which include this software.  No hardware per
+se is licensed hereunder.
+
+DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
diff -r 666900929e51 -r 6758ee473701 external/intel-fw-public/iwl6030/dist/iwlwifi-6000g2b-6.ucode
Binary file external/intel-fw-public/iwl6030/dist/iwlwifi-6000g2b-6.ucode has changed
diff -r 666900929e51 -r 6758ee473701 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Sun Jul 28 10:24:59 2013 +0000
+++ b/sys/dev/pci/if_iwn.c      Sun Jul 28 11:46:24 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwn.c,v 1.66 2013/06/15 13:05:35 christos Exp $     */
+/*     $NetBSD: if_iwn.c,v 1.67 2013/07/28 11:46:24 prlw1 Exp $        */
 /*     $OpenBSD: if_iwn.c,v 1.119 2013/05/29 23:16:52 yuo Exp $        */
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.66 2013/06/15 13:05:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.67 2013/07/28 11:46:24 prlw1 Exp $");
 
 #define IWN_USE_RBUF   /* Use local storage for RX */
 #undef IWN_HWCRYPTO    /* XXX does not even compile yet */
@@ -35,6 +35,9 @@
 #include <sys/socket.h>
 #include <sys/systm.h>
 #include <sys/malloc.h>
+#ifdef notyetMODULE
+#include <sys/module.h>
+#endif
 #include <sys/mutex.h>
 #include <sys/conf.h>
 #include <sys/kauth.h>
@@ -227,6 +230,11 @@
 static int     iwn_send_sensitivity(struct iwn_softc *);
 static int     iwn_set_pslevel(struct iwn_softc *, int, int, int);
 static int     iwn5000_runtime_calib(struct iwn_softc *);
+
+static int     iwn_config_bt_coex_bluetooth(struct iwn_softc *);
+static int     iwn_config_bt_coex_prio_table(struct iwn_softc *);
+static int     iwn_config_bt_coex_adv1(struct iwn_softc *);
+
 static int     iwn_config(struct iwn_softc *);
 static int     iwn_scan(struct iwn_softc *, uint16_t);
 static int     iwn_auth(struct iwn_softc *);
@@ -618,6 +626,7 @@
        ops->read_eeprom = iwn4965_read_eeprom;
        ops->post_alive = iwn4965_post_alive;
        ops->nic_config = iwn4965_nic_config;
+       ops->config_bt_coex = iwn_config_bt_coex_bluetooth;
        ops->update_sched = iwn4965_update_sched;
        ops->get_temperature = iwn4965_get_temperature;
        ops->get_rssi = iwn4965_get_rssi;
@@ -657,6 +666,7 @@
        ops->read_eeprom = iwn5000_read_eeprom;
        ops->post_alive = iwn5000_post_alive;
        ops->nic_config = iwn5000_nic_config;
+       ops->config_bt_coex = iwn_config_bt_coex_bluetooth;
        ops->update_sched = iwn5000_update_sched;
        ops->get_temperature = iwn5000_get_temperature;
        ops->get_rssi = iwn5000_get_rssi;
@@ -717,7 +727,16 @@
                break;
        case IWN_HW_REV_TYPE_6005:
                sc->limits = &iwn6000_sensitivity_limits;
-               sc->fwname = "iwlwifi-6000g2a-5.ucode";
+               /* Type 6030 cards return IWN_HW_REV_TYPE_6005 */
+               if (pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_1 ||
+                   pid == PCI_PRODUCT_INTEL_WIFI_LINK_1030_2 ||
+                   pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_1 ||
+                   pid == PCI_PRODUCT_INTEL_WIFI_LINK_6230_2) {
+                       sc->fwname = "iwlwifi-6000g2b-6.ucode";
+                       ops->config_bt_coex = iwn_config_bt_coex_adv1;
+               }
+               else
+                       sc->fwname = "iwlwifi-6000g2a-5.ucode";
                break;
        default:
                aprint_normal(": adapter type %d not supported\n", sc->hw_type);
@@ -4107,16 +4126,108 @@
 }
 
 static int
+iwn_config_bt_coex_bluetooth(struct iwn_softc *sc)
+{
+       struct iwn_bluetooth bluetooth;
+
+       memset(&bluetooth, 0, sizeof bluetooth);
+       bluetooth.flags = IWN_BT_COEX_ENABLE;
+       bluetooth.lead_time = IWN_BT_LEAD_TIME_DEF;
+       bluetooth.max_kill = IWN_BT_MAX_KILL_DEF;
+
+       DPRINTF(("configuring bluetooth coexistence\n"));



Home | Main Index | Thread Index | Old Index