broadcom43xx: Upgrade to FreeBSD 12.

This commit is contained in:
Augustin Cavalier 2019-01-10 17:27:42 -05:00
parent 4cba08df51
commit 3aaffc2769
11 changed files with 61 additions and 37 deletions

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2004, 2005 David Young. All rights reserved.
*
* Programmed for NetBSD by David Young.
@ -29,7 +31,7 @@
* OF SUCH DAMAGE.
*
* $DragonFly: src/sys/dev/netif/bwi/bitops.h,v 1.1 2007/09/08 06:15:54 sephe Exp $
* $FreeBSD: releng/11.1/sys/dev/bwi/bitops.h 191762 2009-05-03 04:01:43Z imp $
* $FreeBSD: releng/12.0/sys/dev/bwi/bitops.h 326255 2017-11-27 14:52:40Z pfg $
*/
#ifndef _BITOPS_H

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@ -35,7 +37,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/bwi/bwimac.c 288087 2015-09-22 02:44:59Z adrian $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/bwi/bwimac.c 326022 2017-11-20 19:36:21Z pfg $");
#include "opt_inet.h"
#include "opt_bwi.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@ -32,7 +34,7 @@
* SUCH DAMAGE.
*
* $DragonFly: src/sys/dev/netif/bwi/bwimac.h,v 1.2 2008/02/15 11:15:38 sephe Exp $
* $FreeBSD: releng/11.1/sys/dev/bwi/bwimac.h 283639 2015-05-27 22:30:21Z glebius $
* $FreeBSD: releng/12.0/sys/dev/bwi/bwimac.h 326022 2017-11-20 19:36:21Z pfg $
*/
#ifndef _BWI_MAC_H

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@ -35,7 +37,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/bwi/bwiphy.c 288087 2015-09-22 02:44:59Z adrian $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/bwi/bwiphy.c 326022 2017-11-20 19:36:21Z pfg $");
#include "opt_inet.h"
#include "opt_wlan.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@ -32,7 +34,7 @@
* SUCH DAMAGE.
*
* $DragonFly: src/sys/dev/netif/bwi/bwiphy.h,v 1.1 2007/09/08 06:15:54 sephe Exp $
* $FreeBSD: releng/11.1/sys/dev/bwi/bwiphy.h 191762 2009-05-03 04:01:43Z imp $
* $FreeBSD: releng/12.0/sys/dev/bwi/bwiphy.h 326022 2017-11-20 19:36:21Z pfg $
*/
#ifndef _BWI_PHY_H

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@ -35,7 +37,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/bwi/bwirf.c 298307 2016-04-19 23:37:24Z pfg $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/bwi/bwirf.c 326022 2017-11-20 19:36:21Z pfg $");
#include "opt_inet.h"
#include "opt_bwi.h"

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@ -32,7 +34,7 @@
* SUCH DAMAGE.
*
* $DragonFly: src/sys/dev/netif/bwi/bwirf.h,v 1.3 2007/10/03 04:53:19 sephe Exp $
* $FreeBSD: releng/11.1/sys/dev/bwi/bwirf.h 191762 2009-05-03 04:01:43Z imp $
* $FreeBSD: releng/12.0/sys/dev/bwi/bwirf.h 326022 2017-11-20 19:36:21Z pfg $
*/
#ifndef _BWI_RF_H

View File

@ -1,13 +1,15 @@
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
* by Sepherosa Ziehau <sepherosa@gmail.com>
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@ -17,7 +19,7 @@
* 3. Neither the name of The DragonFly Project nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific, prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@ -30,12 +32,12 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*
* $DragonFly: src/sys/dev/netif/bwi/if_bwi.c,v 1.19 2008/02/15 11:15:38 sephe Exp $
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/bwi/if_bwi.c 300755 2016-05-26 16:48:20Z avos $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/bwi/if_bwi.c 337570 2018-08-10 13:06:14Z kevans $");
#include "opt_inet.h"
#include "opt_bwi.h"
@ -53,7 +55,7 @@ __FBSDID("$FreeBSD: releng/11.1/sys/dev/bwi/if_bwi.c 300755 2016-05-26 16:48:20Z
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <sys/taskqueue.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_dl.h>
@ -72,7 +74,7 @@ __FBSDID("$FreeBSD: releng/11.1/sys/dev/bwi/if_bwi.c 300755 2016-05-26 16:48:20Z
#include <net/bpf.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#endif
@ -381,6 +383,7 @@ bwi_attach(struct bwi_softc *sc)
*/
sc->sc_fw_version = BWI_FW_VERSION3;
sc->sc_led_idle = (2350 * hz) / 1000;
sc->sc_led_ticks = ticks - sc->sc_led_idle;
sc->sc_led_blink = 1;
sc->sc_txpwr_calib = 1;
#ifdef BWI_DEBUG
@ -1791,7 +1794,7 @@ bwi_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
* the same AP, this will reinialize things
* correctly...
*/
if (ic->ic_opmode == IEEE80211_M_STA &&
if (ic->ic_opmode == IEEE80211_M_STA &&
!(sc->sc_flags & BWI_F_STOP))
bwi_set_bssid(sc, bwi_zero_addr);
}
@ -2651,7 +2654,7 @@ bwi_rxeof(struct bwi_softc *sc, int end_idx)
goto next;
}
bcopy((uint8_t *)(hdr + 1) + hdr_extra, &plcp, sizeof(plcp));
bcopy((uint8_t *)(hdr + 1) + hdr_extra, &plcp, sizeof(plcp));
rssi = bwi_calc_rssi(sc, hdr);
noise = bwi_calc_noise(sc);
@ -2938,7 +2941,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
struct bwi_mac *mac;
struct bwi_txbuf_hdr *hdr;
struct ieee80211_frame *wh;
const struct ieee80211_txparam *tp;
const struct ieee80211_txparam *tp = ni->ni_txparms;
uint8_t rate, rate_fb;
uint32_t mac_ctrl;
uint16_t phy_ctrl;
@ -2963,7 +2966,6 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
/*
* Find TX rate
*/
tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
if (type != IEEE80211_FC0_TYPE_DATA || (m->m_flags & M_EAPOL)) {
rate = rate_fb = tp->mgmtrate;
} else if (ismcast) {

View File

@ -1,4 +1,6 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2002-2007 Sam Leffler, Errno Consulting
* All rights reserved.
*
@ -28,7 +30,7 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/11.1/sys/dev/bwi/if_bwi_pci.c 283637 2015-05-27 22:27:15Z glebius $");
__FBSDID("$FreeBSD: releng/12.0/sys/dev/bwi/if_bwi_pci.c 338948 2018-09-26 17:12:14Z imp $");
/*
* PCI/Cardbus front-end for the Broadcom Wireless LAN controller driver.
@ -254,6 +256,8 @@ static driver_t bwi_driver = {
};
static devclass_t bwi_devclass;
DRIVER_MODULE(bwi, pci, bwi_driver, bwi_devclass, 0, 0);
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, bwi, bwi_devices,
nitems(bwi_devices) - 1);
MODULE_DEPEND(bwi, wlan, 1, 1, 1); /* 802.11 media layer */
MODULE_DEPEND(bwi, firmware, 1, 1, 1); /* firmware support */
MODULE_DEPEND(bwi, wlan_amrr, 1, 1, 1);

View File

@ -1,4 +1,6 @@
/*
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
@ -32,7 +34,7 @@
* SUCH DAMAGE.
*
* $DragonFly: src/sys/dev/netif/bwi/if_bwireg.h,v 1.4 2007/10/19 14:27:04 sephe Exp $
* $FreeBSD: releng/11.1/sys/dev/bwi/if_bwireg.h 192279 2009-05-18 01:07:38Z imp $
* $FreeBSD: releng/12.0/sys/dev/bwi/if_bwireg.h 326022 2017-11-20 19:36:21Z pfg $
*/
#ifndef _IF_BWIREG_H

View File

@ -1,13 +1,15 @@
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
* This code is derived from software contributed to The DragonFly Project
* by Sepherosa Ziehau <sepherosa@gmail.com>
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@ -17,7 +19,7 @@
* 3. Neither the name of The DragonFly Project nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific, prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@ -30,9 +32,9 @@
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*
* $DragonFly: src/sys/dev/netif/bwi/if_bwivar.h,v 1.14 2008/02/15 11:15:38 sephe Exp $
* $FreeBSD: releng/11.1/sys/dev/bwi/if_bwivar.h 287197 2015-08-27 08:56:39Z glebius $
* $FreeBSD: releng/12.0/sys/dev/bwi/if_bwivar.h 326022 2017-11-20 19:36:21Z pfg $
*/
#ifndef _IF_BWIVAR_H