if_bwn.c (214894) | if_bwn.c (216227) |
---|---|
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 214894 2010-11-06 18:17:20Z bschmidt $"); | 31__FBSDID("$FreeBSD: head/sys/dev/bwn/if_bwn.c 216227 2010-12-06 10:24:06Z kevlo $"); |
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> --- 2837 unchanged lines hidden (view full) --- 2877 struct bwn_mac *mac = sc->sc_curmac; 2878 struct bwn_phy *phy = &mac->mac_phy; 2879 int chan, error; 2880 2881 BWN_LOCK(sc); 2882 2883 error = bwn_switch_band(sc, ic->ic_curchan); 2884 if (error) | 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> --- 2837 unchanged lines hidden (view full) --- 2877 struct bwn_mac *mac = sc->sc_curmac; 2878 struct bwn_phy *phy = &mac->mac_phy; 2879 int chan, error; 2880 2881 BWN_LOCK(sc); 2882 2883 error = bwn_switch_band(sc, ic->ic_curchan); 2884 if (error) |
2885 goto fail;; | 2885 goto fail; |
2886 bwn_mac_suspend(mac); 2887 bwn_set_txretry(mac, BWN_RETRY_SHORT, BWN_RETRY_LONG); 2888 chan = ieee80211_chan2ieee(ic, ic->ic_curchan); 2889 if (chan != phy->chan) 2890 bwn_switch_channel(mac, chan); 2891 2892 /* TX power level */ 2893 if (ic->ic_curchan->ic_maxpower != 0 && --- 5361 unchanged lines hidden (view full) --- 8255 return (ENODEV); 8256 } 8257 if (up_dev == sc->sc_curmac && sc->sc_curmac->mac_phy.gmode == gmode) 8258 return (0); 8259 8260 device_printf(sc->sc_dev, "switching to %s-GHz band\n", 8261 IEEE80211_IS_CHAN_2GHZ(chan) ? "2" : "5"); 8262 | 2886 bwn_mac_suspend(mac); 2887 bwn_set_txretry(mac, BWN_RETRY_SHORT, BWN_RETRY_LONG); 2888 chan = ieee80211_chan2ieee(ic, ic->ic_curchan); 2889 if (chan != phy->chan) 2890 bwn_switch_channel(mac, chan); 2891 2892 /* TX power level */ 2893 if (ic->ic_curchan->ic_maxpower != 0 && --- 5361 unchanged lines hidden (view full) --- 8255 return (ENODEV); 8256 } 8257 if (up_dev == sc->sc_curmac && sc->sc_curmac->mac_phy.gmode == gmode) 8258 return (0); 8259 8260 device_printf(sc->sc_dev, "switching to %s-GHz band\n", 8261 IEEE80211_IS_CHAN_2GHZ(chan) ? "2" : "5"); 8262 |
8263 down_dev = sc->sc_curmac;; | 8263 down_dev = sc->sc_curmac; |
8264 status = down_dev->mac_status; 8265 if (status >= BWN_MAC_STATUS_STARTED) 8266 bwn_core_stop(down_dev); 8267 if (status >= BWN_MAC_STATUS_INITED) 8268 bwn_core_exit(down_dev); 8269 8270 if (down_dev != up_dev) 8271 bwn_phy_reset(down_dev); --- 5979 unchanged lines hidden --- | 8264 status = down_dev->mac_status; 8265 if (status >= BWN_MAC_STATUS_STARTED) 8266 bwn_core_stop(down_dev); 8267 if (status >= BWN_MAC_STATUS_INITED) 8268 bwn_core_exit(down_dev); 8269 8270 if (down_dev != up_dev) 8271 bwn_phy_reset(down_dev); --- 5979 unchanged lines hidden --- |