From owner-svn-src-all@FreeBSD.ORG Sun May 8 10:21:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75E25106566C; Sun, 8 May 2011 10:21:42 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 686948FC13; Sun, 8 May 2011 10:21:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p48ALgfE040239; Sun, 8 May 2011 10:21:42 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p48ALgnD040236; Sun, 8 May 2011 10:21:42 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201105081021.p48ALgnD040236@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 8 May 2011 10:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221635 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2011 10:21:42 -0000 Author: bschmidt Date: Sun May 8 10:21:42 2011 New Revision: 221635 URL: http://svn.freebsd.org/changeset/base/221635 Log: The 6000 series adapters have a slightly different offset for band 6, 2GHz HT40 channels. Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun May 8 10:19:29 2011 (r221634) +++ head/sys/dev/iwn/if_iwn.c Sun May 8 10:21:42 2011 (r221635) @@ -1784,7 +1784,10 @@ iwn5000_read_eeprom(struct iwn_softc *sc /* Read the list of authorized channels (20MHz ones only). */ for (i = 0; i < 5; i++) { - addr = base + iwn5000_regulatory_bands[i]; + if (sc->hw_type >= IWN_HW_REV_TYPE_6000) + addr = base + iwn6000_regulatory_bands[i]; + else + addr = base + iwn5000_regulatory_bands[i]; iwn_read_eeprom_channels(sc, i, addr); } Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Sun May 8 10:19:29 2011 (r221634) +++ head/sys/dev/iwn/if_iwnreg.h Sun May 8 10:21:42 2011 (r221635) @@ -1403,6 +1403,7 @@ struct iwn_fw_tlv { #define IWN5000_EEPROM_BAND4 0x02e #define IWN5000_EEPROM_BAND5 0x03a #define IWN5000_EEPROM_BAND6 0x041 +#define IWN6000_EEPROM_BAND6 0x040 #define IWN5000_EEPROM_BAND7 0x049 #define IWN6000_EEPROM_ENHINFO 0x054 #define IWN5000_EEPROM_CRYSTAL 0x128 @@ -1486,6 +1487,16 @@ static const uint32_t iwn5000_regulatory IWN5000_EEPROM_BAND7 }; +static const uint32_t iwn6000_regulatory_bands[IWN_NBANDS] = { + IWN5000_EEPROM_BAND1, + IWN5000_EEPROM_BAND2, + IWN5000_EEPROM_BAND3, + IWN5000_EEPROM_BAND4, + IWN5000_EEPROM_BAND5, + IWN6000_EEPROM_BAND6, + IWN5000_EEPROM_BAND7 +}; + #define IWN_CHAN_BANDS_COUNT 7 #define IWN_MAX_CHAN_PER_BAND 14 static const struct iwn_chan_band {