if_urtwn.c (343976) | if_urtwn.c (345254) |
---|---|
1/* $OpenBSD: if_urtwn.c,v 1.16 2011/02/10 17:26:40 jakemsr Exp $ */ 2 3/*- 4 * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> 5 * Copyright (c) 2014 Kevin Lo <kevlo@FreeBSD.org> 6 * Copyright (c) 2015 Andriy Voskoboinyk <avos@FreeBSD.org> 7 * 8 * Permission to use, copy, modify, and distribute this software for any --- 5 unchanged lines hidden (view full) --- 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21#include <sys/cdefs.h> | 1/* $OpenBSD: if_urtwn.c,v 1.16 2011/02/10 17:26:40 jakemsr Exp $ */ 2 3/*- 4 * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr> 5 * Copyright (c) 2014 Kevin Lo <kevlo@FreeBSD.org> 6 * Copyright (c) 2015 Andriy Voskoboinyk <avos@FreeBSD.org> 7 * 8 * Permission to use, copy, modify, and distribute this software for any --- 5 unchanged lines hidden (view full) --- 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21#include <sys/cdefs.h> |
22__FBSDID("$FreeBSD: stable/11/sys/dev/urtwn/if_urtwn.c 343976 2019-02-10 21:00:02Z avos $"); | 22__FBSDID("$FreeBSD: stable/11/sys/dev/urtwn/if_urtwn.c 345254 2019-03-18 02:58:34Z avos $"); |
23 24/* 25 * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188EU/RTL8188RU/RTL8192CU. 26 */ 27 28#include "opt_wlan.h" 29#include "opt_urtwn.h" 30 --- 3000 unchanged lines hidden (view full) --- 3031 /* XXX TODO: noack frames? */ 3032 if ((rate & 0x80) && 3033 (ic->ic_htprotmode == IEEE80211_PROT_RTSCTS)) { 3034 txd->txdw4 |= htole32( 3035 R92C_TXDW4_RTSEN | 3036 R92C_TXDW4_HWRTSEN); 3037 } 3038 | 23 24/* 25 * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188EU/RTL8188RU/RTL8192CU. 26 */ 27 28#include "opt_wlan.h" 29#include "opt_urtwn.h" 30 --- 3000 unchanged lines hidden (view full) --- 3031 /* XXX TODO: noack frames? */ 3032 if ((rate & 0x80) && 3033 (ic->ic_htprotmode == IEEE80211_PROT_RTSCTS)) { 3034 txd->txdw4 |= htole32( 3035 R92C_TXDW4_RTSEN | 3036 R92C_TXDW4_HWRTSEN); 3037 } 3038 |
3039 /* XXX TODO: rtsrate is configurable? 24mbit may 3040 * be a bit high for RTS rate? */ 3041 txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, 3042 URTWN_RIDX_OFDM24)); | 3039 if (!(sc->chip & URTWN_CHIP_88E)) { 3040 /* XXX other rates will not work without 3041 * urtwn_ra_init() */ 3042 txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, 3043 URTWN_RIDX_CCK1)); 3044 } else { 3045 /* XXX TODO: rtsrate is configurable? 24mbit 3046 * may be a bit high for RTS rate? */ 3047 txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, 3048 URTWN_RIDX_OFDM24)); 3049 } |
3043 3044 txd->txdw5 |= htole32(0x0001ff00); 3045 } else /* IEEE80211_FC0_TYPE_MGT */ 3046 qsel = R92C_TXDW1_QSEL_MGNT; 3047 } else { 3048 macid = URTWN_MACID_BC; 3049 qsel = R92C_TXDW1_QSEL_MGNT; 3050 } --- 2443 unchanged lines hidden (view full) --- 5494 urtwn_write_1(sc, R92C_HWSEQ_CTRL, R92C_TX_QUEUE_ALL); 5495 5496 /* Enable per-packet TX report. */ 5497 if (sc->chip & URTWN_CHIP_88E) { 5498 urtwn_write_1(sc, R88E_TX_RPT_CTRL, 5499 urtwn_read_1(sc, R88E_TX_RPT_CTRL) | R88E_TX_RPT1_ENA); 5500 } 5501 | 3050 3051 txd->txdw5 |= htole32(0x0001ff00); 3052 } else /* IEEE80211_FC0_TYPE_MGT */ 3053 qsel = R92C_TXDW1_QSEL_MGNT; 3054 } else { 3055 macid = URTWN_MACID_BC; 3056 qsel = R92C_TXDW1_QSEL_MGNT; 3057 } --- 2443 unchanged lines hidden (view full) --- 5501 urtwn_write_1(sc, R92C_HWSEQ_CTRL, R92C_TX_QUEUE_ALL); 5502 5503 /* Enable per-packet TX report. */ 5504 if (sc->chip & URTWN_CHIP_88E) { 5505 urtwn_write_1(sc, R88E_TX_RPT_CTRL, 5506 urtwn_read_1(sc, R88E_TX_RPT_CTRL) | R88E_TX_RPT1_ENA); 5507 } 5508 |
5509 if (!(sc->chip & URTWN_CHIP_88E)) 5510 urtwn_write_4(sc, R92C_POWER_STATUS, 0x5); 5511 |
|
5502 /* Perform LO and IQ calibrations. */ 5503 urtwn_iq_calib(sc); 5504 /* Perform LC calibration. */ 5505 urtwn_lc_calib(sc); 5506 5507 /* Fix USB interference issue. */ 5508 if (!(sc->chip & URTWN_CHIP_88E)) { 5509 urtwn_write_1(sc, 0xfe40, 0xe0); --- 157 unchanged lines hidden --- | 5512 /* Perform LO and IQ calibrations. */ 5513 urtwn_iq_calib(sc); 5514 /* Perform LC calibration. */ 5515 urtwn_lc_calib(sc); 5516 5517 /* Fix USB interference issue. */ 5518 if (!(sc->chip & URTWN_CHIP_88E)) { 5519 urtwn_write_1(sc, 0xfe40, 0xe0); --- 157 unchanged lines hidden --- |