svn commit: r301202 - head/sys/dev/usb/wlan

Andriy Voskoboinyk avos at FreeBSD.org
Thu Jun 2 12:01:59 UTC 2016


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));
 	}
 


More information about the svn-src-head mailing list