PERFORCE change 143121 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sun Jun 8 15:04:13 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=143121

Change 143121 by hselasky at hselasky_laptop001 on 2008/06/08 15:03:46

	
	IFC @ 143119
	
	Catch up with Sam's latest changes.

Affected files ...

.. //depot/projects/usb/src/sys/compat/linux/linux_file.c#9 integrate
.. //depot/projects/usb/src/sys/conf/NOTES#13 integrate
.. //depot/projects/usb/src/sys/conf/files.powerpc#9 integrate
.. //depot/projects/usb/src/sys/dev/age/if_age.c#2 integrate
.. //depot/projects/usb/src/sys/dev/ath/if_ath.c#9 integrate
.. //depot/projects/usb/src/sys/dev/bm/if_bm.c#1 branch
.. //depot/projects/usb/src/sys/dev/bm/if_bmreg.h#1 branch
.. //depot/projects/usb/src/sys/dev/bm/if_bmvar.h#1 branch
.. //depot/projects/usb/src/sys/dev/dc/if_dc.c#7 integrate
.. //depot/projects/usb/src/sys/dev/iwi/if_iwi.c#9 integrate
.. //depot/projects/usb/src/sys/dev/iwn/if_iwn.c#2 integrate
.. //depot/projects/usb/src/sys/dev/mii/lxtphy.c#4 integrate
.. //depot/projects/usb/src/sys/dev/ral/rt2560.c#9 integrate
.. //depot/projects/usb/src/sys/dev/ral/rt2661.c#9 integrate
.. //depot/projects/usb/src/sys/dev/usb/if_rum.c#32 edit
.. //depot/projects/usb/src/sys/dev/usb/if_ural.c#58 edit
.. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#39 edit
.. //depot/projects/usb/src/sys/dev/wpi/if_wpi.c#4 integrate
.. //depot/projects/usb/src/sys/mips/include/pte.h#2 integrate
.. //depot/projects/usb/src/sys/mips/mips/trap.c#2 integrate
.. //depot/projects/usb/src/sys/modules/Makefile#14 integrate
.. //depot/projects/usb/src/sys/modules/bm/Makefile#1 branch
.. //depot/projects/usb/src/sys/net80211/ieee80211_node.c#8 integrate
.. //depot/projects/usb/src/sys/net80211/ieee80211_var.h#8 integrate
.. //depot/projects/usb/src/sys/powerpc/conf/GENERIC#9 integrate
.. //depot/projects/usb/src/sys/powerpc/conf/NOTES#8 integrate
.. //depot/projects/usb/src/sys/powerpc/include/dbdma.h#1 branch
.. //depot/projects/usb/src/sys/powerpc/powermac/dbdma.c#1 branch
.. //depot/projects/usb/src/sys/powerpc/powermac/dbdmavar.h#1 branch

Differences ...

==== //depot/projects/usb/src/sys/compat/linux/linux_file.c#9 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.113 2008/04/23 15:56:33 rdivacky Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_file.c,v 1.114 2008/06/08 11:09:25 rdivacky Exp $");
 
 #include "opt_compat.h"
 #include "opt_mac.h"
@@ -289,7 +289,7 @@
  */
 
 struct l_dirent {
-	l_long		d_ino;
+	l_ulong		d_ino;
 	l_off_t		d_off;
 	l_ushort	d_reclen;
 	char		d_name[LINUX_NAME_MAX + 1];
@@ -446,7 +446,7 @@
 
 		if (justone) {
 			/* readdir(2) case. */
-			linux_dirent.d_ino = (l_long)bdp->d_fileno;
+			linux_dirent.d_ino = bdp->d_fileno;
 			linux_dirent.d_off = (l_off_t)linuxreclen;
 			linux_dirent.d_reclen = (l_ushort)bdp->d_namlen;
 			strcpy(linux_dirent.d_name, bdp->d_name);

==== //depot/projects/usb/src/sys/conf/NOTES#13 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1492 2008/05/27 01:54:45 yongari Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1494 2008/06/08 01:58:11 marcel Exp $
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #

==== //depot/projects/usb/src/sys/conf/files.powerpc#9 (text+ko) ====

@@ -1,7 +1,7 @@
 # This file tells config what files go into building a kernel,
 # files marked standard are always included.
 #
-# $FreeBSD: src/sys/conf/files.powerpc,v 1.77 2008/04/30 00:50:50 marcel Exp $
+# $FreeBSD: src/sys/conf/files.powerpc,v 1.79 2008/06/07 22:58:32 marcel Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -27,6 +27,7 @@
 
 crypto/blowfish/bf_enc.c	optional	crypto | ipsec
 crypto/des/des_enc.c		optional	crypto | ipsec | netsmb
+dev/bm/if_bm.c			optional	bm powermac
 dev/fb/fb.c			optional	sc
 dev/hwpmc/hwpmc_powerpc.c	optional	hwpmc
 dev/kbd/kbd.c			optional	sc
@@ -107,6 +108,7 @@
 powerpc/ofw/ofw_syscons.c	optional	sc aim
 powerpc/powermac/ata_kauai.c	optional	powermac ata
 powerpc/powermac/ata_macio.c	optional	powermac ata
+powerpc/powermac/dbdma.c	optional	powermac pci
 powerpc/powermac/grackle.c	optional	powermac pci
 powerpc/powermac/hrowpic.c	optional	powermac pci
 powerpc/powermac/macio.c	optional	powermac pci

==== //depot/projects/usb/src/sys/dev/age/if_age.c#2 (text+ko) ====

@@ -28,7 +28,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/age/if_age.c,v 1.1 2008/05/19 01:39:59 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/age/if_age.c,v 1.2 2008/06/08 14:42:43 rpaulo Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -387,7 +387,7 @@
 		 * specification such that driver could not use
 		 * pci_get_vpd_readonly(9) with keyword 'NA'.
 		 * Search VPD data starting at address 0x0100. The data
-		 * chwould be used as initializers to set AGE_PAR0,
+		 * should be used as initializers to set AGE_PAR0,
 		 * AGE_PAR1 register including other PCI configuration
 		 * registers.
 		 */

==== //depot/projects/usb/src/sys/dev/ath/if_ath.c#9 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.190 2008/05/29 00:14:35 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.191 2008/06/07 18:38:02 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.
@@ -169,7 +169,8 @@
 			struct ath_descdma *, ath_bufhead *);
 static int	ath_desc_alloc(struct ath_softc *);
 static void	ath_desc_free(struct ath_softc *);
-static struct ieee80211_node *ath_node_alloc(struct ieee80211_node_table *);
+static struct ieee80211_node *ath_node_alloc(struct ieee80211vap *,
+			const uint8_t [IEEE80211_ADDR_LEN]);
 static void	ath_node_free(struct ieee80211_node *);
 static void	ath_node_getsignal(const struct ieee80211_node *,
 			int8_t *, int8_t *);
@@ -3659,9 +3660,9 @@
 }
 
 static struct ieee80211_node *
-ath_node_alloc(struct ieee80211_node_table *nt)
+ath_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
 {
-	struct ieee80211com *ic = nt->nt_ic;
+	struct ieee80211com *ic = vap->iv_ic;
 	struct ath_softc *sc = ic->ic_ifp->if_softc;
 	const size_t space = sizeof(struct ath_node) + sc->sc_rc->arc_space;
 	struct ath_node *an;

==== //depot/projects/usb/src/sys/dev/dc/if_dc.c#7 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.194 2008/03/24 17:38:24 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/dc/if_dc.c,v 1.195 2008/06/08 02:52:26 yongari Exp $");
 
 /*
  * DEC "tulip" clone ethernet driver. Supports the DEC/Intel 21143
@@ -1141,7 +1141,7 @@
 static void
 dc_setfilt_admtek(struct dc_softc *sc)
 {
-	uint32_t eaddr[(ETHER_ADDR_LEN+3)/4];
+	uint8_t eaddr[ETHER_ADDR_LEN];
 	struct ifnet *ifp;
 	struct ifmultiaddr *ifma;
 	int h = 0;
@@ -1151,8 +1151,9 @@
 
 	/* Init our MAC address. */
 	bcopy(IF_LLADDR(sc->dc_ifp), eaddr, ETHER_ADDR_LEN);
-	CSR_WRITE_4(sc, DC_AL_PAR0, eaddr[0]);
-	CSR_WRITE_4(sc, DC_AL_PAR1, eaddr[1]);
+	CSR_WRITE_4(sc, DC_AL_PAR0, eaddr[3] << 24 | eaddr[2] << 16 |
+	    eaddr[1] << 8 | eaddr[0]);
+	CSR_WRITE_4(sc, DC_AL_PAR1, eaddr[5] << 8 | eaddr[4]);
 
 	/* If we want promiscuous mode, set the allframes bit. */
 	if (ifp->if_flags & IFF_PROMISC)
@@ -1812,7 +1813,7 @@
 	u_int32_t command;
 	struct dc_softc *sc;
 	struct ifnet *ifp;
-	u_int32_t revision;
+	u_int32_t reg, revision;
 	int error = 0, rid, mac_offset;
 	int i;
 	u_int8_t *mac;
@@ -2052,8 +2053,15 @@
 		break;
 	case DC_TYPE_AL981:
 	case DC_TYPE_AN985:
-		eaddr[0] = CSR_READ_4(sc, DC_AL_PAR0);
-		eaddr[1] = CSR_READ_4(sc, DC_AL_PAR1);
+		reg = CSR_READ_4(sc, DC_AL_PAR0);
+		mac = (uint8_t *)&eaddr[0];
+		mac[0] = (reg >> 0) & 0xff;
+		mac[1] = (reg >> 8) & 0xff;
+		mac[2] = (reg >> 16) & 0xff;
+		mac[3] = (reg >> 24) & 0xff;
+		reg = CSR_READ_4(sc, DC_AL_PAR1);
+		mac[4] = (reg >> 0) & 0xff;
+		mac[5] = (reg >> 8) & 0xff;
 		break;
 	case DC_TYPE_CONEXANT:
 		bcopy(sc->dc_srom + DC_CONEXANT_EE_NODEADDR, &eaddr,

==== //depot/projects/usb/src/sys/dev/iwi/if_iwi.c#9 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.62 2008/05/12 00:15:28 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.63 2008/06/07 18:38:02 sam Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -147,7 +147,8 @@
 		    int);
 static void	iwi_reset_rx_ring(struct iwi_softc *, struct iwi_rx_ring *);
 static void	iwi_free_rx_ring(struct iwi_softc *, struct iwi_rx_ring *);
-static struct	ieee80211_node *iwi_node_alloc(struct ieee80211_node_table *);
+static struct ieee80211_node *iwi_node_alloc(struct ieee80211vap *,
+		    const uint8_t [IEEE80211_ADDR_LEN]);
 static void	iwi_node_free(struct ieee80211_node *);
 static void	iwi_media_status(struct ifnet *, struct ifmediareq *);
 static int	iwi_newstate(struct ieee80211vap *, enum ieee80211_state, int);
@@ -903,14 +904,14 @@
 }
 
 static struct ieee80211_node *
-iwi_node_alloc(struct ieee80211_node_table *nt)
+iwi_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
 {
 	struct iwi_node *in;
 
 	in = malloc(sizeof (struct iwi_node), M_80211_NODE, M_NOWAIT | M_ZERO);
 	if (in == NULL)
 		return NULL;
-
+	/* XXX assign sta table entry for adhoc */
 	in->in_station = -1;
 
 	return &in->in_node;

==== //depot/projects/usb/src/sys/dev/iwn/if_iwn.c#2 (text+ko) ====

@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/iwn/if_iwn.c,v 1.6 2008/05/26 07:40:14 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/iwn/if_iwn.c,v 1.7 2008/06/07 18:38:02 sam Exp $");
 
 #include <sys/param.h>
 #include <sys/sockio.h>
@@ -103,7 +103,8 @@
 		    int);
 void		iwn_reset_tx_ring(struct iwn_softc *, struct iwn_tx_ring *);
 void		iwn_free_tx_ring(struct iwn_softc *, struct iwn_tx_ring *);
-struct		ieee80211_node *iwn_node_alloc(struct ieee80211_node_table *);
+static struct ieee80211_node *iwn_node_alloc(struct ieee80211vap *,
+		    const uint8_t [IEEE80211_ADDR_LEN]);
 void		iwn_newassoc(struct ieee80211_node *, int);
 int		iwn_media_change(struct ifnet *);
 int		iwn_newstate(struct ieee80211vap *, enum ieee80211_state, int);
@@ -941,7 +942,7 @@
 }
 
 struct ieee80211_node *
-iwn_node_alloc(struct ieee80211_node_table *ic)
+iwn_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
 {
 	return malloc(sizeof (struct iwn_node), M_80211_NODE,M_NOWAIT | M_ZERO);
 }

==== //depot/projects/usb/src/sys/dev/mii/lxtphy.c#4 (text+ko) ====

@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mii/lxtphy.c,v 1.19 2007/01/12 22:27:46 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mii/lxtphy.c,v 1.20 2008/06/07 22:58:32 marcel Exp $");
 
 /*
  * driver for Level One's LXT-970 ethernet 10/100 PHY
@@ -139,6 +139,7 @@
 	struct mii_softc *sc;
 	struct mii_attach_args *ma;
 	struct mii_data *mii;
+	const char *nic;
 
 	sc = device_get_softc(dev);
 	ma = device_get_ivars(dev);
@@ -159,6 +160,15 @@
 	    PHY_READ(sc, MII_BMSR) & ma->mii_capmask;
 	device_printf(dev, " ");
 
+	/*
+	 * On Apple BMAC controllers, we end up in a weird state
+	 * of partially-completed autonegotiation on boot. So
+	 * force autonegotation to try again.
+	 */
+	nic = device_get_name(device_get_parent(sc->mii_dev));
+	if (strcmp(nic, "bm") == 0)
+		sc->mii_flags |= MIIF_FORCEANEG | MIIF_NOISOLATE;
+
 #define	ADD(m, c)	ifmedia_add(&mii->mii_media, (m), (c), NULL)
 	ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_FX, 0, sc->mii_inst),
 	    MII_MEDIA_100_TX);

==== //depot/projects/usb/src/sys/dev/ral/rt2560.c#9 (text) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.25 2008/05/12 00:32:52 sam Exp $	*/
+/*	$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.26 2008/06/07 18:38:02 sam Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.25 2008/05/12 00:32:52 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.26 2008/06/07 18:38:02 sam Exp $");
 
 /*-
  * Ralink Technology RT2560 chipset driver
@@ -104,8 +104,8 @@
 			    struct rt2560_rx_ring *);
 static void		rt2560_free_rx_ring(struct rt2560_softc *,
 			    struct rt2560_rx_ring *);
-static struct		ieee80211_node *rt2560_node_alloc(
-			    struct ieee80211_node_table *);
+static struct ieee80211_node *rt2560_node_alloc(struct ieee80211vap *,
+			    const uint8_t [IEEE80211_ADDR_LEN]);
 static void		rt2560_newassoc(struct ieee80211_node *, int);
 static int		rt2560_newstate(struct ieee80211vap *,
 			    enum ieee80211_state, int);
@@ -767,7 +767,8 @@
 }
 
 static struct ieee80211_node *
-rt2560_node_alloc(struct ieee80211_node_table *nt)
+rt2560_node_alloc(struct ieee80211vap *vap,
+	const uint8_t mac[IEEE80211_ADDR_LEN])
 {
 	struct rt2560_node *rn;
 

==== //depot/projects/usb/src/sys/dev/ral/rt2661.c#9 (text) ====

@@ -1,4 +1,4 @@
-/*	$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.25 2008/05/12 00:32:52 sam Exp $	*/
+/*	$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.26 2008/06/07 18:38:02 sam Exp $	*/
 
 /*-
  * Copyright (c) 2006
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.25 2008/05/12 00:32:52 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.26 2008/06/07 18:38:02 sam Exp $");
 
 /*-
  * Ralink Technology RT2561, RT2561S and RT2661 chipset driver
@@ -101,8 +101,8 @@
 			    struct rt2661_rx_ring *);
 static void		rt2661_free_rx_ring(struct rt2661_softc *,
 			    struct rt2661_rx_ring *);
-static struct		ieee80211_node *rt2661_node_alloc(
-			    struct ieee80211_node_table *);
+static struct ieee80211_node *rt2661_node_alloc(struct ieee80211vap *,
+			    const uint8_t [IEEE80211_ADDR_LEN]);
 static void		rt2661_newassoc(struct ieee80211_node *, int);
 static int		rt2661_newstate(struct ieee80211vap *,
 			    enum ieee80211_state, int);
@@ -776,7 +776,8 @@
 }
 
 static struct ieee80211_node *
-rt2661_node_alloc(struct ieee80211_node_table *nt)
+rt2661_node_alloc(struct ieee80211vap *vap,
+	const uint8_t mac[IEEE80211_ADDR_LEN])
 {
 	struct rt2661_node *rn;
 

==== //depot/projects/usb/src/sys/dev/usb/if_rum.c#32 (text+ko) ====

@@ -147,7 +147,7 @@
 static uint8_t rum_get_rssi(struct rum_softc *sc, uint8_t raw);
 static struct ieee80211vap *rum_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, int opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t mac[IEEE80211_ADDR_LEN]);
 static void rum_vap_delete(struct ieee80211vap *);
-static struct ieee80211_node *rum_node_alloc(struct ieee80211_node_table *);
+static struct ieee80211_node *rum_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]);
 static void rum_newassoc(struct ieee80211_node *, int);
 static void rum_cfg_disable_tsf_sync(struct rum_softc *sc);
 static void rum_cfg_set_run(struct rum_softc *sc, struct rum_config_copy *cc);
@@ -2395,7 +2395,6 @@
 	/* init AMRR */
 
 	ieee80211_amrr_node_init(&RUM_VAP(vap)->amrr, &RUM_NODE(ni)->amn, ni);
-	XXX;
 
 	/* enable AMRR timer */
 
@@ -2614,8 +2613,10 @@
 	return;
 }
 
+/* ARGUSED */
 static struct ieee80211_node *
-rum_node_alloc(struct ieee80211_node_table *nt)
+rum_node_alloc(struct ieee80211vap *vap __unused,
+    const uint8_t mac[IEEE80211_ADDR_LEN] __unused)
 {
 	struct rum_node *rn;
 

==== //depot/projects/usb/src/sys/dev/usb/if_ural.c#58 (text+ko) ====

@@ -1,3 +1,5 @@
+/*	$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.74 2008/06/07 18:38:02 sam Exp $	*/
+
 /*-
  * Copyright (c) 2005, 2006
  *	Damien Bergamini <damien.bergamini at free.fr>
@@ -26,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.73 2008/05/12 00:32:52 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.74 2008/06/07 18:38:02 sam Exp $");
 
 /*-
  * Ralink Technology RT2500USB chipset driver
@@ -151,7 +153,7 @@
 static void ural_cfg_amrr_start(struct ural_softc *sc);
 static struct ieee80211vap *ural_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, int opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t mac[IEEE80211_ADDR_LEN]);
 static void ural_vap_delete(struct ieee80211vap *);
-static struct ieee80211_node *ural_node_alloc(struct ieee80211_node_table *);
+static struct ieee80211_node *ural_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]);
 static void ural_newassoc(struct ieee80211_node *, int);
 static void ural_cfg_disable_tsf_sync(struct ural_softc *sc);
 static void ural_cfg_set_run(struct ural_softc *sc, struct ural_config_copy *cc);
@@ -2304,8 +2306,6 @@
 	/* init AMRR */
 
 	ieee80211_amrr_node_init(&URAL_VAP(vap)->amrr, &URAL_NODE(ni)->amn, ni);
-	XXX;
-
 	/* enable AMRR timer */
 
 	sc->sc_amrr_timer = 1;
@@ -2402,8 +2402,10 @@
 	return;
 }
 
+/* ARGUSED */
 static struct ieee80211_node *
-ural_node_alloc(struct ieee80211_node_table *nt)
+ural_node_alloc(struct ieee80211vap *vap __unused,
+    const uint8_t mac[IEEE80211_ADDR_LEN] __unused)
 {
 	struct ural_node *un;
 

==== //depot/projects/usb/src/sys/dev/usb/if_zyd.c#39 (text+ko) ====

@@ -149,7 +149,7 @@
 static void zyd_cfg_set_led(struct zyd_softc *sc, uint32_t which, uint8_t on);
 static struct ieee80211vap *zyd_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, int opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t mac[IEEE80211_ADDR_LEN]);
 static void zyd_vap_delete(struct ieee80211vap *);
-static struct ieee80211_node *zyd_node_alloc_cb(struct ieee80211_node_table *);
+static struct ieee80211_node *zyd_node_alloc_cb(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]);
 static void zyd_cfg_set_run(struct zyd_softc *sc, struct zyd_config_copy *cc);
 static void zyd_fill_write_queue(struct zyd_softc *sc);
 static void zyd_tx_clean_queue(struct zyd_softc *sc);
@@ -3045,8 +3045,10 @@
 	free(zvp, M_80211_VAP);
 }
 
+/* ARGUSED */
 static struct ieee80211_node *
-zyd_node_alloc_cb(struct ieee80211_node_table *nt)
+zyd_node_alloc_cb(struct ieee80211vap *vap __unused,
+    const uint8_t mac[IEEE80211_ADDR_LEN] __unused)
 {
 	struct zyd_node *zn;
 

==== //depot/projects/usb/src/sys/dev/wpi/if_wpi.c#4 (text+ko) ====

@@ -19,7 +19,7 @@
 #define VERSION "20071127"
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/wpi/if_wpi.c,v 1.14 2008/05/16 04:15:54 thompsa Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/wpi/if_wpi.c,v 1.15 2008/06/07 18:38:02 sam Exp $");
 
 /*
  * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@@ -170,7 +170,8 @@
 		    int, int);
 static void	wpi_reset_tx_ring(struct wpi_softc *, struct wpi_tx_ring *);
 static void	wpi_free_tx_ring(struct wpi_softc *, struct wpi_tx_ring *);
-static struct	ieee80211_node *wpi_node_alloc(struct ieee80211_node_table *);
+static struct ieee80211_node *wpi_node_alloc(struct ieee80211vap *,
+			    const uint8_t mac[IEEE80211_ADDR_LEN]);
 static int	wpi_newstate(struct ieee80211vap *, enum ieee80211_state, int);
 static void	wpi_mem_lock(struct wpi_softc *);
 static void	wpi_mem_unlock(struct wpi_softc *);
@@ -1246,7 +1247,8 @@
 
 /* ARGSUSED */
 static struct ieee80211_node *
-wpi_node_alloc(struct ieee80211_node_table *ic)
+wpi_node_alloc(struct ieee80211vap *vap __unused,
+	const uint8_t mac[IEEE80211_ADDR_LEN] __unused)
 {
 	struct wpi_node *wn;
 

==== //depot/projects/usb/src/sys/mips/include/pte.h#2 (text+ko) ====

@@ -40,7 +40,7 @@
  *	from: Utah Hdr: pte.h 1.11 89/09/03
  *	from: @(#)pte.h 8.1 (Berkeley) 6/10/93
  *	JNPR: pte.h,v 1.1.4.1 2007/09/10 06:20:19 girish
- * $FreeBSD: src/sys/mips/include/pte.h,v 1.1 2008/04/13 07:22:52 imp Exp $
+ * $FreeBSD: src/sys/mips/include/pte.h,v 1.2 2008/06/08 08:56:46 wkoszek Exp $
  */
 
 #ifndef _MACHINE_PTE_H_
@@ -121,7 +121,7 @@
 #define	vad_to_pfn64(x)	((quad_t)(x) >> PTE_SHIFT) & PTE_FRAME)
 #define	pfn_to_vad(x)	(((x) & PTE_FRAME) << PTE_SHIFT)
 
-/* User viritual to pte offset in page table */
+/* User virtual to pte offset in page table */
 #define	vad_to_pte_offset(adr)	(((adr) >> PGSHIFT) & (NPTEPG -1))
 
 #define	mips_pg_v(entry)	((entry) & PTE_V)

==== //depot/projects/usb/src/sys/mips/mips/trap.c#2 (text+ko) ====

@@ -39,7 +39,7 @@
  *	JNPR: trap.c,v 1.13.2.2 2007/08/29 10:03:49 girish
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/mips/mips/trap.c,v 1.1 2008/04/13 07:27:37 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/mips/mips/trap.c,v 1.2 2008/06/08 08:56:46 wkoszek Exp $");
 
 #include "opt_ddb.h"
 #include "opt_global.h"
@@ -140,7 +140,7 @@
 	MipsKernGenException,	/* coprocessor unusable */
 	MipsKernGenException,	/* arithmetic overflow */
 	MipsKernGenException,	/* trap exception */
-	MipsKernGenException,	/* viritual coherence exception inst */
+	MipsKernGenException,	/* virtual coherence exception inst */
 	MipsKernGenException,	/* floating point exception */
 	MipsKernGenException,	/* reserved */
 	MipsKernGenException,	/* reserved */
@@ -157,7 +157,7 @@
 	MipsKernGenException,	/* reserved */
 	MipsKernGenException,	/* reserved */
 	MipsKernGenException,	/* reserved */
-	MipsKernGenException,	/* viritual coherence exception data */
+	MipsKernGenException,	/* virtual coherence exception data */
 /*
  * The user exception handlers.
  */
@@ -210,7 +210,7 @@
 	"coprocessor unusable",
 	"arithmetic overflow",
 	"trap",
-	"viritual coherency instruction",
+	"virtual coherency instruction",
 	"floating point",
 	"reserved 16",
 	"reserved 17",
@@ -227,7 +227,7 @@
 	"reserved 28",
 	"reserved 29",
 	"reserved 30",
-	"viritual coherency data",
+	"virtual coherency data",
 };
 
 #if !defined(SMP) && (defined(DDB) || defined(DEBUG))

==== //depot/projects/usb/src/sys/modules/Makefile#14 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/Makefile,v 1.571 2008/05/28 20:26:25 jhb Exp $
+# $FreeBSD: src/sys/modules/Makefile,v 1.572 2008/06/07 22:58:32 marcel Exp $
 
 .include <bsd.own.mk>
 
@@ -40,6 +40,7 @@
 	bge \
 	${_bios} \
 	${_bktr} \
+	${_bm} \
 	bridgestp \
 	cam \
 	${_canbepm} \
@@ -629,6 +630,7 @@
 _ath_rate_amrr=	ath_rate_amrr
 _ath_rate_onoe=	ath_rate_onoe
 _ath_rate_sample=ath_rate_sample
+_bm=		bm
 _nvram=		powermac_nvram
 _smbfs=		smbfs
 .endif

==== //depot/projects/usb/src/sys/net80211/ieee80211_node.c#8 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.95 2008/05/28 23:18:17 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.99 2008/06/07 18:38:02 sam Exp $");
 
 #include "opt_wlan.h"
 
@@ -67,7 +67,8 @@
 
 static int ieee80211_sta_join1(struct ieee80211_node *);
 
-static struct ieee80211_node *node_alloc(struct ieee80211_node_table *);
+static struct ieee80211_node *node_alloc(struct ieee80211vap *,
+	const uint8_t [IEEE80211_ADDR_LEN]);
 static void node_cleanup(struct ieee80211_node *);
 static void node_free(struct ieee80211_node *);
 static void node_age(struct ieee80211_node *);
@@ -723,7 +724,7 @@
 }
 
 static struct ieee80211_node *
-node_alloc(struct ieee80211_node_table *nt)
+node_alloc(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
 {
 	struct ieee80211_node *ni;
 
@@ -948,7 +949,7 @@
 	struct ieee80211_node *ni;
 	int hash;
 
-	ni = ic->ic_node_alloc(nt);
+	ni = ic->ic_node_alloc(vap, macaddr);
 	if (ni == NULL) {
 		vap->iv_stats.is_rx_nodealloc++;
 		return NULL;
@@ -996,7 +997,7 @@
 	struct ieee80211com *ic = vap->iv_ic;
 	struct ieee80211_node *ni;
 
-	ni = ic->ic_node_alloc(&ic->ic_sta);
+	ni = ic->ic_node_alloc(vap, macaddr);
 	if (ni != NULL) {
 		IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
 			"%s %p<%s>\n", __func__, ni, ether_sprintf(macaddr));
@@ -1482,21 +1483,30 @@
 static void
 _ieee80211_free_node(struct ieee80211_node *ni)
 {
-	struct ieee80211vap *vap = ni->ni_vap;
 	struct ieee80211_node_table *nt = ni->ni_table;
 
+	/*
+	 * NB: careful about referencing the vap as it may be
+	 * gone if the last reference was held by a driver.
+	 * We know the com will always be present so it's safe
+	 * to use ni_ic below to reclaim resources.
+	 */
+#if 0
 	IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
 		"%s %p<%s> in %s table\n", __func__, ni,
 		ether_sprintf(ni->ni_macaddr),
 		nt != NULL ? nt->nt_name : "<gone>");
-
-	if (vap->iv_aid_bitmap != NULL)
-		IEEE80211_AID_CLR(vap, ni->ni_associd);
+#endif
+	if (ni->ni_associd != 0) {
+		struct ieee80211vap *vap = ni->ni_vap;
+		if (vap->iv_aid_bitmap != NULL)
+			IEEE80211_AID_CLR(vap, ni->ni_associd);
+	}
 	if (nt != NULL) {
 		TAILQ_REMOVE(&nt->nt_node, ni, ni_list);
 		LIST_REMOVE(ni, ni_hash);
 	}
-	vap->iv_ic->ic_node_free(ni);
+	ni->ni_ic->ic_node_free(ni);
 }
 
 void
@@ -1551,9 +1561,8 @@
 int
 ieee80211_node_delucastkey(struct ieee80211_node *ni)
 {
-	struct ieee80211vap *vap = ni->ni_vap;
-	/* XXX is ni_table safe? */
-	struct ieee80211_node_table *nt = &ni->ni_ic->ic_sta;
+	struct ieee80211com *ic = ni->ni_ic;
+	struct ieee80211_node_table *nt = &ic->ic_sta;
 	struct ieee80211_node *nikey;
 	ieee80211_keyix keyix;
 	int isowned, status;
@@ -1573,20 +1582,23 @@
 	isowned = IEEE80211_NODE_IS_LOCKED(nt);
 	if (!isowned)
 		IEEE80211_NODE_LOCK(nt);
-	keyix = ni->ni_ucastkey.wk_rxkeyix;
-	status = ieee80211_crypto_delkey(vap, &ni->ni_ucastkey);
-	if (nt->nt_keyixmap != NULL && keyix < nt->nt_keyixmax) {
-		nikey = nt->nt_keyixmap[keyix];
-		nt->nt_keyixmap[keyix] = NULL;;
-	} else
-		nikey = NULL;
+	nikey = NULL;
+	status = 1;		/* NB: success */
+	if (!IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)) {
+		keyix = ni->ni_ucastkey.wk_rxkeyix;
+		status = ieee80211_crypto_delkey(ni->ni_vap, &ni->ni_ucastkey);
+		if (nt->nt_keyixmap != NULL && keyix < nt->nt_keyixmax) {
+			nikey = nt->nt_keyixmap[keyix];
+			nt->nt_keyixmap[keyix] = NULL;;
+		}
+	}
 	if (!isowned)
 		IEEE80211_NODE_UNLOCK(nt);
 
 	if (nikey != NULL) {
 		KASSERT(nikey == ni,
 			("key map out of sync, ni %p nikey %p", ni, nikey));
-		IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
+		IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_NODE,
 			"%s: delete key map entry %p<%s> refcnt %d\n",
 			__func__, ni, ether_sprintf(ni->ni_macaddr),
 			ieee80211_node_refcnt(ni)-1);
@@ -2077,8 +2089,8 @@
 		(ieee80211_iter_func *) ieee80211_dump_node, nt);
 }
 
-void
-ieee80211_notify_erp(struct ieee80211com *ic)
+static void
+ieee80211_notify_erp_locked(struct ieee80211com *ic)
 {
 	struct ieee80211vap *vap;
 
@@ -2089,6 +2101,14 @@
 			ieee80211_beacon_notify(vap, IEEE80211_BEACON_ERP);
 }
 
+void
+ieee80211_notify_erp(struct ieee80211com *ic)
+{
+	IEEE80211_LOCK(ic);
+	ieee80211_notify_erp_locked(ic);
+	IEEE80211_UNLOCK(ic);
+}
+
 /*
  * Handle a station joining an 11g network.
  */
@@ -2151,7 +2171,7 @@
 			IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_ASSOC,
 			    "%s: enable use of protection\n", __func__);
 			ic->ic_flags |= IEEE80211_F_USEPROT;
-			ieee80211_notify_erp(ic);
+			ieee80211_notify_erp_locked(ic);
 		}
 	} else
 		ni->ni_flags |= IEEE80211_NODE_ERP;
@@ -2177,8 +2197,7 @@
 				break;
 		}
 		if (aid >= vap->iv_max_aid) {
-			IEEE80211_SEND_MGMT(ni, resp,
-			    IEEE80211_REASON_ASSOC_TOOMANY);
+			IEEE80211_SEND_MGMT(ni, resp, IEEE80211_STATUS_TOOMANY);
 			ieee80211_node_leave(ni);
 			return;
 		}
@@ -2241,7 +2260,7 @@
 		ic->ic_flags |= IEEE80211_F_SHPREAMBLE;
 		ic->ic_flags &= ~IEEE80211_F_USEBARKER;
 	}
-	ieee80211_notify_erp(ic);
+	ieee80211_notify_erp_locked(ic);
 }
 
 /*

==== //depot/projects/usb/src/sys/net80211/ieee80211_var.h#8 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.58 2008/05/28 23:19:20 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.59 2008/06/07 18:38:02 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_VAR_H_
 #define _NET80211_IEEE80211_VAR_H_
@@ -227,7 +227,8 @@
 	/* new station association callback/notification */
 	void			(*ic_newassoc)(struct ieee80211_node *, int);
 	/* node state management */
-	struct ieee80211_node*	(*ic_node_alloc)(struct ieee80211_node_table *);
+	struct ieee80211_node*	(*ic_node_alloc)(struct ieee80211vap *,
+				    const uint8_t [IEEE80211_ADDR_LEN]);
 	void			(*ic_node_free)(struct ieee80211_node *);
 	void			(*ic_node_cleanup)(struct ieee80211_node *);
 	void			(*ic_node_age)(struct ieee80211_node *);

==== //depot/projects/usb/src/sys/powerpc/conf/GENERIC#9 (text+ko) ====

@@ -16,7 +16,7 @@
 # If you are in doubt as to the purpose or necessity of a line, check first 
 # in NOTES.
 #
-# $FreeBSD: src/sys/powerpc/conf/GENERIC,v 1.78 2008/05/21 03:36:53 obrien Exp $
+# $FreeBSD: src/sys/powerpc/conf/GENERIC,v 1.79 2008/06/07 22:58:32 marcel Exp $
 
 cpu		AIM
 ident		GENERIC
@@ -106,6 +106,7 @@
 # PCI Ethernet NICs that use the common MII bus controller code.
 device		miibus		# MII bus support
 device		bge		# Broadcom BCM570xx Gigabit Ethernet
+device		bm		# Apple BMAC Ethernet
 device		gem		# Sun GEM/Sun ERI/Apple GMAC
 device		dc		# DEC/Intel 21143 and various workalikes
 device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)

==== //depot/projects/usb/src/sys/powerpc/conf/NOTES#8 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/powerpc/conf/NOTES,v 1.17 2008/04/27 22:33:42 marcel Exp $
+# $FreeBSD: src/sys/powerpc/conf/NOTES,v 1.18 2008/06/08 01:58:11 marcel Exp $
 #
 # This file contains machine dependent kernel configuration notes.  For
 # machine independent notes, look in /sys/conf/NOTES.
@@ -24,6 +24,7 @@
 # Standard busses
 device		pci
 
+device		bm		# Apple BMAC (Big Mac Ethernet)
 device		ofwd		# Open Firmware disks
 
 


More information about the p4-projects mailing list