From owner-svn-src-all@freebsd.org Thu Oct 8 07:20:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06ECE9D0BE6; Thu, 8 Oct 2015 07:20:24 +0000 (UTC) (envelope-from adrian@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 mx1.freebsd.org (Postfix) with ESMTPS id CA7518DE; Thu, 8 Oct 2015 07:20:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t987KMbv048524; Thu, 8 Oct 2015 07:20:22 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t987KMFs048523; Thu, 8 Oct 2015 07:20:22 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201510080720.t987KMFs048523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 8 Oct 2015 07:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289010 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 08 Oct 2015 07:20:24 -0000 Author: adrian Date: Thu Oct 8 07:20:22 2015 New Revision: 289010 URL: https://svnweb.freebsd.org/changeset/base/289010 Log: wpi(4): fix 'maybe uninitialized' warnings Submitted by: Differential Revision: https://reviews.freebsd.org/D3760 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:19:57 2015 (r289009) +++ head/sys/dev/wpi/if_wpi.c Thu Oct 8 07:20:22 2015 (r289010) @@ -2731,6 +2731,7 @@ wpi_tx_data(struct wpi_softc *sc, struct wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1); + swcrypt = 1; /* Select EDCA Access Category and TX ring for this frame. */ if (IEEE80211_QOS_HAS_SEQ(wh)) { @@ -2844,7 +2845,7 @@ wpi_tx_data(struct wpi_softc *sc, struct tx->id = wn->id; } - if (k != NULL && !swcrypt) { + if (!swcrypt) { switch (k->wk_cipher->ic_cipher) { case IEEE80211_CIPHER_AES_CCM: tx->security = WPI_CIPHER_CCMP; @@ -2894,6 +2895,7 @@ wpi_tx_data_raw(struct wpi_softc *sc, st wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; + swcrypt = 1; ac = params->ibp_pri & 3; @@ -2952,7 +2954,7 @@ wpi_tx_data_raw(struct wpi_softc *sc, st tx->timeout = htole16(2); } - if (k != NULL && !swcrypt) { + if (!swcrypt) { switch (k->wk_cipher->ic_cipher) { case IEEE80211_CIPHER_AES_CCM: tx->security = WPI_CIPHER_CCMP;