From owner-svn-src-all@freebsd.org Thu Jun 2 12:01:59 2016 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 B3102B66C5B; Thu, 2 Jun 2016 12:01:59 +0000 (UTC) (envelope-from avos@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 8475B1ADF; Thu, 2 Jun 2016 12:01:59 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u52C1wpd065252; Thu, 2 Jun 2016 12:01:58 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u52C1wYC065251; Thu, 2 Jun 2016 12:01:58 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201606021201.u52C1wYC065251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 2 Jun 2016 12:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301202 - head/sys/dev/usb/wlan 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.22 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, 02 Jun 2016 12:01:59 -0000 Author: avos Date: Thu Jun 2 12:01:58 2016 New Revision: 301202 URL: https://svnweb.freebsd.org/changeset/base/301202 Log: urtw: fix unused variable assignments. Append CWmax and retry limitation to tp->maxretry instead of rewriting it (will restore pre-r198194 behavior). Noticed by: pfg, hps Reported by: Coverity CID: 1304937, 1304920 Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Thu Jun 2 11:21:00 2016 (r301201) +++ head/sys/dev/usb/wlan/if_urtw.c Thu Jun 2 12:01:58 2016 (r301202) @@ -1789,8 +1789,8 @@ urtw_tx_start(struct urtw_softc *sc, str flags |= (urtw_rate2rtl(11) & 0xf) << URTW_TX_FLAG_RTSRATE_SHIFT; tx->flag = htole32(flags); tx->retry = 3; /* CW minimum */ - tx->retry = 7 << 4; /* CW maximum */ - tx->retry = URTW_TX_MAXRETRY << 8; /* retry limitation */ + tx->retry |= 7 << 4; /* CW maximum */ + tx->retry |= URTW_TX_MAXRETRY << 8; /* retry limitation */ m_copydata(m0, 0, m0->m_pkthdr.len, (uint8_t *)(tx + 1)); }