if_bwn.c (204923) | if_bwn.c (204983) |
---|---|
1/*- 2 * Copyright (c) 2009-2010 Weongyo Jeong <weongyo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009-2010 Weongyo Jeong <weongyo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/bwn/if_bwn.c 204923 2010-03-09 20:07:41Z weongyo $"); | 31__FBSDID("$FreeBSD: head/sys/dev/bwn/if_bwn.c 204983 2010-03-10 21:45:40Z yongari $"); |
32 33/* 34 * The Broadcom Wireless LAN controller driver. 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/module.h> --- 10336 unchanged lines hidden (view full) --- 10376 sc->sc_rx_th.wr_rate = rate; 10377 sc->sc_rx_th.wr_antsignal = rssi; 10378 sc->sc_rx_th.wr_antnoise = noise; 10379} 10380 10381static void 10382bwn_tsf_read(struct bwn_mac *mac, uint64_t *tsf) 10383{ | 32 33/* 34 * The Broadcom Wireless LAN controller driver. 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/module.h> --- 10336 unchanged lines hidden (view full) --- 10376 sc->sc_rx_th.wr_rate = rate; 10377 sc->sc_rx_th.wr_antsignal = rssi; 10378 sc->sc_rx_th.wr_antnoise = noise; 10379} 10380 10381static void 10382bwn_tsf_read(struct bwn_mac *mac, uint64_t *tsf) 10383{ |
10384 struct bwn_softc *sc = mac->mac_sc; | |
10385 uint32_t low, high; 10386 | 10384 uint32_t low, high; 10385 |
10387 KASSERT(siba_get_revid(sc->sc_dev) >= 3, | 10386 KASSERT(siba_get_revid(mac->mac_sc->sc_dev) >= 3, |
10388 ("%s:%d: fail", __func__, __LINE__)); 10389 10390 low = BWN_READ_4(mac, BWN_REV3PLUS_TSF_LOW); 10391 high = BWN_READ_4(mac, BWN_REV3PLUS_TSF_HIGH); 10392 *tsf = high; 10393 *tsf <<= 32; 10394 *tsf |= low; 10395} --- 3890 unchanged lines hidden --- | 10387 ("%s:%d: fail", __func__, __LINE__)); 10388 10389 low = BWN_READ_4(mac, BWN_REV3PLUS_TSF_LOW); 10390 high = BWN_READ_4(mac, BWN_REV3PLUS_TSF_HIGH); 10391 *tsf = high; 10392 *tsf <<= 32; 10393 *tsf |= low; 10394} --- 3890 unchanged lines hidden --- |