if_bwn.c (300292) | if_bwn.c (300549) |
---|---|
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 300292 2016-05-20 08:58:06Z avos $"); | 31__FBSDID("$FreeBSD: head/sys/dev/bwn/if_bwn.c 300549 2016-05-24 01:20:30Z adrian $"); |
32 33/* 34 * The Broadcom Wireless LAN controller driver. 35 */ 36 37#include "opt_bwn.h" 38#include "opt_wlan.h" 39 --- 4667 unchanged lines hidden (view full) --- 4707 bwn_mac_suspend(mac); 4708 mac->mac_phy.rf_onoff(mac, 0); 4709 mac->mac_phy.rf_on = 0; 4710 bwn_mac_enable(mac); 4711} 4712 4713/* 4714 * SSB PHY reset. | 32 33/* 34 * The Broadcom Wireless LAN controller driver. 35 */ 36 37#include "opt_bwn.h" 38#include "opt_wlan.h" 39 --- 4667 unchanged lines hidden (view full) --- 4707 bwn_mac_suspend(mac); 4708 mac->mac_phy.rf_onoff(mac, 0); 4709 mac->mac_phy.rf_on = 0; 4710 bwn_mac_enable(mac); 4711} 4712 4713/* 4714 * SSB PHY reset. |
4715 * 4716 * XXX TODO: BCMA PHY reset. | |
4717 */ 4718static void | 4715 */ 4716static void |
4719bwn_phy_reset(struct bwn_mac *mac) | 4717bwn_phy_reset_siba(struct bwn_mac *mac) |
4720{ 4721 struct bwn_softc *sc = mac->mac_sc; 4722 4723 siba_write_4(sc->sc_dev, SIBA_TGSLOW, 4724 ((siba_read_4(sc->sc_dev, SIBA_TGSLOW) & ~BWN_TGSLOW_SUPPORT_G) | 4725 BWN_TGSLOW_PHYRESET) | SIBA_TGSLOW_FGC); 4726 DELAY(1000); 4727 siba_write_4(sc->sc_dev, SIBA_TGSLOW, 4728 (siba_read_4(sc->sc_dev, SIBA_TGSLOW) & ~SIBA_TGSLOW_FGC)); 4729 DELAY(1000); 4730} 4731 | 4718{ 4719 struct bwn_softc *sc = mac->mac_sc; 4720 4721 siba_write_4(sc->sc_dev, SIBA_TGSLOW, 4722 ((siba_read_4(sc->sc_dev, SIBA_TGSLOW) & ~BWN_TGSLOW_SUPPORT_G) | 4723 BWN_TGSLOW_PHYRESET) | SIBA_TGSLOW_FGC); 4724 DELAY(1000); 4725 siba_write_4(sc->sc_dev, SIBA_TGSLOW, 4726 (siba_read_4(sc->sc_dev, SIBA_TGSLOW) & ~SIBA_TGSLOW_FGC)); 4727 DELAY(1000); 4728} 4729 |
4730static void 4731bwn_phy_reset(struct bwn_mac *mac) 4732{ 4733 4734 if (bwn_is_bus_siba(mac)) { 4735 bwn_phy_reset_siba(mac); 4736 } else { 4737 BWN_ERRPRINTF(mac->mac_sc, "%s: unknown bus!\n", __func__); 4738 } 4739} 4740 |
|
4732static int 4733bwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) 4734{ 4735 struct bwn_vap *bvp = BWN_VAP(vap); 4736 struct ieee80211com *ic= vap->iv_ic; 4737 enum ieee80211_state ostate = vap->iv_state; 4738 struct bwn_softc *sc = ic->ic_softc; 4739 struct bwn_mac *mac = sc->sc_curmac; --- 2735 unchanged lines hidden --- | 4741static int 4742bwn_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) 4743{ 4744 struct bwn_vap *bvp = BWN_VAP(vap); 4745 struct ieee80211com *ic= vap->iv_ic; 4746 enum ieee80211_state ostate = vap->iv_state; 4747 struct bwn_softc *sc = ic->ic_softc; 4748 struct bwn_mac *mac = sc->sc_curmac; --- 2735 unchanged lines hidden --- |