From owner-svn-src-head@freebsd.org Thu Jan 24 03:41:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DCA414BFE81; Thu, 24 Jan 2019 03:41:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5CD7757CE; Thu, 24 Jan 2019 03:41:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D854622BD9; Thu, 24 Jan 2019 03:41:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0O3fi0X022177; Thu, 24 Jan 2019 03:41:44 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0O3fiVl022176; Thu, 24 Jan 2019 03:41:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901240341.x0O3fiVl022176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 24 Jan 2019 03:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343374 - head/sys/dev/iwm X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/dev/iwm X-SVN-Commit-Revision: 343374 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E5CD7757CE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.957,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jan 2019 03:41:45 -0000 Author: kevans Date: Thu Jan 24 03:41:44 2019 New Revision: 343374 URL: https://svnweb.freebsd.org/changeset/base/343374 Log: if_iwm - The iwm_prepare_card_hw() in iwm_attach() is only needed on 8K hw. * Doing the iwm_prepare_card_hw() call in iwm_attach() only on Family 8000 hardware matches the code in Linux iwlwifi. * While there remove DEFAULT_MAX_TX_POWER definition which is unused, and has a value different from IWL_DEFAULT_MAX_TX_POWER in iwlwifi. Submitted by: Augustin Cavalier (Haiku) Obtained from: DragonFlyBSD (e8560f8dc58df12a7c79a6bb4e6ccb156e001085) Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Thu Jan 24 03:41:09 2019 (r343373) +++ head/sys/dev/iwm/if_iwm.c Thu Jan 24 03:41:44 2019 (r343374) @@ -1912,8 +1912,6 @@ enum nvm_sku_bits { #define IWM_NVM_RF_CFG_TX_ANT_MSK_8000(x) ((x >> 24) & 0xF) #define IWM_NVM_RF_CFG_RX_ANT_MSK_8000(x) ((x >> 28) & 0xF) -#define DEFAULT_MAX_TX_POWER 16 - /** * enum iwm_nvm_channel_flags - channel flags in NVM * @IWM_NVM_CHANNEL_VALID: channel is usable for this SKU/geo @@ -5863,18 +5861,17 @@ iwm_attach(device_t dev) * "dash" value). To keep hw_rev backwards compatible - we'll store it * in the old format. */ - if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) - sc->sc_hw_rev = (sc->sc_hw_rev & 0xfff0) | - (IWM_CSR_HW_REV_STEP(sc->sc_hw_rev << 2) << 2); - - if (iwm_prepare_card_hw(sc) != 0) { - device_printf(dev, "could not initialize hardware\n"); - goto fail; - } - if (sc->cfg->device_family == IWM_DEVICE_FAMILY_8000) { int ret; uint32_t hw_step; + + sc->sc_hw_rev = (sc->sc_hw_rev & 0xfff0) | + (IWM_CSR_HW_REV_STEP(sc->sc_hw_rev << 2) << 2); + + if (iwm_prepare_card_hw(sc) != 0) { + device_printf(dev, "could not initialize hardware\n"); + goto fail; + } /* * In order to recognize C step the driver should read the