Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 May 2011 15:20:58 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r221841 - in projects/largeSMP: contrib/top lib/libfetch lib/libprocstat release/powerpc share/mk sys/dev/ath sys/dev/ath/ath_hal/ar5416 sys/dev/ath/ath_hal/ar9002 sys/dev/bge sys/dev/b...
Message-ID:  <201105131520.p4DFKw3B074637@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Fri May 13 15:20:57 2011
New Revision: 221841
URL: http://svn.freebsd.org/changeset/base/221841

Log:
  MFC

Modified:
  projects/largeSMP/lib/libfetch/Makefile
  projects/largeSMP/lib/libfetch/common.c
  projects/largeSMP/lib/libfetch/file.c
  projects/largeSMP/lib/libfetch/ftp.c
  projects/largeSMP/lib/libfetch/http.c
  projects/largeSMP/lib/libprocstat/Makefile
  projects/largeSMP/lib/libprocstat/libprocstat.c
  projects/largeSMP/release/powerpc/mkisoimages.sh
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c
  projects/largeSMP/sys/dev/ath/if_ath.c
  projects/largeSMP/sys/dev/bge/if_bge.c
  projects/largeSMP/sys/dev/bge/if_bgereg.h
  projects/largeSMP/sys/dev/bm/if_bm.c
  projects/largeSMP/sys/dev/bxe/if_bxe.c
  projects/largeSMP/sys/dev/bxe/if_bxe.h
  projects/largeSMP/sys/dev/mii/atphy.c
  projects/largeSMP/sys/dev/mii/mii_physubr.c
  projects/largeSMP/sys/dev/pci/isa_pci.c
  projects/largeSMP/sys/dev/xen/balloon/balloon.c
  projects/largeSMP/sys/i386/i386/machdep.c
  projects/largeSMP/sys/i386/xen/clock.c
  projects/largeSMP/sys/i386/xen/mp_machdep.c
  projects/largeSMP/sys/kern/kern_clocksource.c
  projects/largeSMP/sys/kern/kern_synch.c
  projects/largeSMP/sys/kern/kern_sysctl.c
  projects/largeSMP/sys/kern/vfs_bio.c
  projects/largeSMP/sys/kern/vfs_mount.c
  projects/largeSMP/sys/kern/vfs_subr.c
  projects/largeSMP/sys/kern/vfs_vnops.c
  projects/largeSMP/sys/kern/vnode_if.src
  projects/largeSMP/sys/sys/priority.h
  projects/largeSMP/sys/ufs/ffs/ffs_softdep.c
  projects/largeSMP/usr.bin/fstat/fstat.c
  projects/largeSMP/usr.bin/mkuzip/mkuzip.c
Directory Properties:
  projects/largeSMP/   (props changed)
  projects/largeSMP/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/contrib/bind9/   (props changed)
  projects/largeSMP/contrib/binutils/   (props changed)
  projects/largeSMP/contrib/bzip2/   (props changed)
  projects/largeSMP/contrib/dialog/   (props changed)
  projects/largeSMP/contrib/ee/   (props changed)
  projects/largeSMP/contrib/expat/   (props changed)
  projects/largeSMP/contrib/file/   (props changed)
  projects/largeSMP/contrib/gcc/   (props changed)
  projects/largeSMP/contrib/gdb/   (props changed)
  projects/largeSMP/contrib/gdtoa/   (props changed)
  projects/largeSMP/contrib/gnu-sort/   (props changed)
  projects/largeSMP/contrib/groff/   (props changed)
  projects/largeSMP/contrib/less/   (props changed)
  projects/largeSMP/contrib/libpcap/   (props changed)
  projects/largeSMP/contrib/libstdc++/   (props changed)
  projects/largeSMP/contrib/llvm/   (props changed)
  projects/largeSMP/contrib/llvm/tools/clang/   (props changed)
  projects/largeSMP/contrib/ncurses/   (props changed)
  projects/largeSMP/contrib/netcat/   (props changed)
  projects/largeSMP/contrib/ntp/   (props changed)
  projects/largeSMP/contrib/one-true-awk/   (props changed)
  projects/largeSMP/contrib/openbsm/   (props changed)
  projects/largeSMP/contrib/openpam/   (props changed)
  projects/largeSMP/contrib/pf/   (props changed)
  projects/largeSMP/contrib/sendmail/   (props changed)
  projects/largeSMP/contrib/tcpdump/   (props changed)
  projects/largeSMP/contrib/tcsh/   (props changed)
  projects/largeSMP/contrib/top/   (props changed)
  projects/largeSMP/contrib/top/install-sh   (props changed)
  projects/largeSMP/contrib/tzcode/stdtime/   (props changed)
  projects/largeSMP/contrib/tzcode/zic/   (props changed)
  projects/largeSMP/contrib/tzdata/   (props changed)
  projects/largeSMP/contrib/wpa/   (props changed)
  projects/largeSMP/contrib/xz/   (props changed)
  projects/largeSMP/crypto/openssh/   (props changed)
  projects/largeSMP/crypto/openssl/   (props changed)
  projects/largeSMP/gnu/lib/   (props changed)
  projects/largeSMP/gnu/usr.bin/binutils/   (props changed)
  projects/largeSMP/gnu/usr.bin/cc/cc_tools/   (props changed)
  projects/largeSMP/gnu/usr.bin/gdb/   (props changed)
  projects/largeSMP/lib/libc/   (props changed)
  projects/largeSMP/lib/libc/stdtime/   (props changed)
  projects/largeSMP/lib/libutil/   (props changed)
  projects/largeSMP/lib/libz/   (props changed)
  projects/largeSMP/sbin/   (props changed)
  projects/largeSMP/sbin/ipfw/   (props changed)
  projects/largeSMP/share/mk/bsd.arch.inc.mk   (props changed)
  projects/largeSMP/share/zoneinfo/   (props changed)
  projects/largeSMP/sys/   (props changed)
  projects/largeSMP/sys/amd64/include/xen/   (props changed)
  projects/largeSMP/sys/boot/   (props changed)
  projects/largeSMP/sys/boot/i386/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/ski/   (props changed)
  projects/largeSMP/sys/boot/powerpc/boot1.chrp/   (props changed)
  projects/largeSMP/sys/boot/powerpc/ofw/   (props changed)
  projects/largeSMP/sys/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/sys/conf/   (props changed)
  projects/largeSMP/sys/contrib/dev/acpica/   (props changed)
  projects/largeSMP/sys/contrib/octeon-sdk/   (props changed)
  projects/largeSMP/sys/contrib/pf/   (props changed)
  projects/largeSMP/sys/contrib/x86emu/   (props changed)
  projects/largeSMP/usr.bin/calendar/   (props changed)
  projects/largeSMP/usr.bin/csup/   (props changed)
  projects/largeSMP/usr.bin/procstat/   (props changed)
  projects/largeSMP/usr.sbin/ndiscvt/   (props changed)
  projects/largeSMP/usr.sbin/zic/   (props changed)

Modified: projects/largeSMP/lib/libfetch/Makefile
==============================================================================
--- projects/largeSMP/lib/libfetch/Makefile	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/lib/libfetch/Makefile	Fri May 13 15:20:57 2011	(r221841)
@@ -26,7 +26,6 @@ LDADD=		-lmd
 CFLAGS+=	-DFTP_COMBINE_CWDS
 
 CSTD?=		c99
-WARNS?=		2
 
 SHLIB_MAJOR=    6
 

Modified: projects/largeSMP/lib/libfetch/common.c
==============================================================================
--- projects/largeSMP/lib/libfetch/common.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/lib/libfetch/common.c	Fri May 13 15:20:57 2011	(r221841)
@@ -213,6 +213,7 @@ fetch_reopen(int sd)
 	/* allocate and fill connection structure */
 	if ((conn = calloc(1, sizeof(*conn))) == NULL)
 		return (NULL);
+	fcntl(sd, F_SETFD, FD_CLOEXEC);
 	conn->sd = sd;
 	++conn->ref;
 	return (conn);

Modified: projects/largeSMP/lib/libfetch/file.c
==============================================================================
--- projects/largeSMP/lib/libfetch/file.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/lib/libfetch/file.c	Fri May 13 15:20:57 2011	(r221841)
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/stat.h>
 
 #include <dirent.h>
+#include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
 
@@ -57,6 +58,7 @@ fetchXGetFile(struct url *u, struct url_
 		fetch_syserr();
 	}
 
+	fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
 	return (f);
 }
 
@@ -84,6 +86,7 @@ fetchPutFile(struct url *u, const char *
 		fetch_syserr();
 	}
 
+	fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
 	return (f);
 }
 

Modified: projects/largeSMP/lib/libfetch/ftp.c
==============================================================================
--- projects/largeSMP/lib/libfetch/ftp.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/lib/libfetch/ftp.c	Fri May 13 15:20:57 2011	(r221841)
@@ -127,7 +127,7 @@ unmappedaddr(struct sockaddr_in6 *sin6)
 	    !IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
 		return;
 	sin4 = (struct sockaddr_in *)sin6;
-	addr = *(u_int32_t *)&sin6->sin6_addr.s6_addr[12];
+	addr = *(u_int32_t *)(uintptr_t)&sin6->sin6_addr.s6_addr[12];
 	port = sin6->sin6_port;
 	memset(sin4, 0, sizeof(struct sockaddr_in));
 	sin4->sin_addr.s_addr = addr;

Modified: projects/largeSMP/lib/libfetch/http.c
==============================================================================
--- projects/largeSMP/lib/libfetch/http.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/lib/libfetch/http.c	Fri May 13 15:20:57 2011	(r221841)
@@ -454,7 +454,7 @@ http_match(const char *str, const char *
  * Get the next header and return the appropriate symbolic code.  We
  * need to read one line ahead for checking for a continuation line
  * belonging to the current header (continuation lines start with
- * white space). 
+ * white space).
  *
  * We get called with a fresh line already in the conn buffer, either
  * from the previous http_next_header() invocation, or, the first
@@ -462,7 +462,7 @@ http_match(const char *str, const char *
  *
  * This stops when we encounter an empty line (we dont read beyond the header
  * area).
- * 
+ *
  * Note that the "headerbuf" is just a place to return the result. Its
  * contents are not used for the next call. This means that no cleanup
  * is needed when ie doing another connection, just call the cleanup when
@@ -487,7 +487,7 @@ init_http_headerbuf(http_headerbuf_t *bu
 	buf->buflen = 0;
 }
 
-static void 
+static void
 clean_http_headerbuf(http_headerbuf_t *buf)
 {
 	if (buf->buf)
@@ -496,10 +496,10 @@ clean_http_headerbuf(http_headerbuf_t *b
 }
 
 /* Remove whitespace at the end of the buffer */
-static void 
+static void
 http_conn_trimright(conn_t *conn)
 {
-	while (conn->buflen && 
+	while (conn->buflen &&
 	       isspace((unsigned char)conn->buf[conn->buflen - 1]))
 		conn->buflen--;
 	conn->buf[conn->buflen] = '\0';
@@ -508,11 +508,11 @@ http_conn_trimright(conn_t *conn)
 static hdr_t
 http_next_header(conn_t *conn, http_headerbuf_t *hbuf, const char **p)
 {
-	int i, len;
+	unsigned int i, len;
 
-	/* 
+	/*
 	 * Have to do the stripping here because of the first line. So
-	 * it's done twice for the subsequent lines. No big deal 
+	 * it's done twice for the subsequent lines. No big deal
 	 */
 	http_conn_trimright(conn);
 	if (conn->buflen == 0)
@@ -527,19 +527,19 @@ http_next_header(conn_t *conn, http_head
 	strcpy(hbuf->buf, conn->buf);
 	hbuf->buflen = conn->buflen;
 
-	/* 
+	/*
 	 * Fetch possible continuation lines. Stop at 1st non-continuation
-	 * and leave it in the conn buffer 
-         */
+	 * and leave it in the conn buffer
+	 */
 	for (i = 0; i < HTTP_MAX_CONT_LINES; i++) {
 		if (fetch_getln(conn) == -1)
 			return (hdr_syserror);
 
-		/* 
+		/*
 		 * Note: we carry on the idea from the previous version
 		 * that a pure whitespace line is equivalent to an empty
 		 * one (so it's not continuation and will be handled when
-		 * we are called next) 
+		 * we are called next)
 		 */
 		http_conn_trimright(conn);
 		if (conn->buf[0] != ' ' && conn->buf[0] != "\t"[0])
@@ -555,7 +555,7 @@ http_next_header(conn_t *conn, http_head
 		}
 		strcpy(hbuf->buf + hbuf->buflen, conn->buf);
 		hbuf->buflen += conn->buflen;
-	} 
+	}
 
 	/*
 	 * We could check for malformed headers but we don't really care.
@@ -574,12 +574,12 @@ http_next_header(conn_t *conn, http_head
  * [Proxy-]Authenticate header parsing
  */
 
-/* 
- * Read doublequote-delimited string into output buffer obuf (allocated 
+/*
+ * Read doublequote-delimited string into output buffer obuf (allocated
  * by caller, whose responsibility it is to ensure that it's big enough)
  * cp points to the first char after the initial '"'
- * Handles \ quoting 
- * Returns pointer to the first char after the terminating double quote, or 
+ * Handles \ quoting
+ * Returns pointer to the first char after the terminating double quote, or
  * NULL for error.
  */
 static const char *
@@ -620,7 +620,7 @@ typedef struct {
 	int	 nc; /* Nonce count */
 } http_auth_challenge_t;
 
-static void 
+static void
 init_http_auth_challenge(http_auth_challenge_t *b)
 {
 	b->scheme = HTTPAS_UNKNOWN;
@@ -628,18 +628,18 @@ init_http_auth_challenge(http_auth_chall
 	b->stale = b->nc = 0;
 }
 
-static void 
+static void
 clean_http_auth_challenge(http_auth_challenge_t *b)
 {
-	if (b->realm) 
+	if (b->realm)
 		free(b->realm);
-	if (b->qop) 
+	if (b->qop)
 		free(b->qop);
-	if (b->nonce) 
+	if (b->nonce)
 		free(b->nonce);
-	if (b->opaque) 
+	if (b->opaque)
 		free(b->opaque);
-	if (b->algo) 
+	if (b->algo)
 		free(b->algo);
 	init_http_auth_challenge(b);
 }
@@ -652,7 +652,7 @@ typedef struct {
 	int	valid; /* We did parse an authenticate header */
 } http_auth_challenges_t;
 
-static void 
+static void
 init_http_auth_challenges(http_auth_challenges_t *cs)
 {
 	int i;
@@ -661,7 +661,7 @@ init_http_auth_challenges(http_auth_chal
 	cs->count = cs->valid = 0;
 }
 
-static void 
+static void
 clean_http_auth_challenges(http_auth_challenges_t *cs)
 {
 	int i;
@@ -675,19 +675,19 @@ clean_http_auth_challenges(http_auth_cha
 	init_http_auth_challenges(cs);
 }
 
-/* 
+/*
  * Enumeration for lexical elements. Separators will be returned as their own
  * ascii value
  */
 typedef enum {HTTPHL_WORD=256, HTTPHL_STRING=257, HTTPHL_END=258,
 	      HTTPHL_ERROR = 259} http_header_lex_t;
 
-/* 
+/*
  * Determine what kind of token comes next and return possible value
  * in buf, which is supposed to have been allocated big enough by
- * caller. Advance input pointer and return element type. 
+ * caller. Advance input pointer and return element type.
  */
-static int 
+static int
 http_header_lex(const char **cpp, char *buf)
 {
 	size_t l;
@@ -716,7 +716,7 @@ http_header_lex(const char **cpp, char *
 	return (HTTPHL_WORD);
 }
 
-/* 
+/*
  * Read challenges from http xxx-authenticate header and accumulate them
  * in the challenges list structure.
  *
@@ -728,7 +728,7 @@ http_header_lex(const char **cpp, char *
  *
  * We support both approaches anyway
  */
-static int 
+static int
 http_parse_authenticate(const char *cp, http_auth_challenges_t *cs)
 {
 	int ret = -1;
@@ -752,7 +752,7 @@ http_parse_authenticate(const char *cp, 
 
 	/* Loop on challenges */
 	for (; cs->count < MAX_CHALLENGES; cs->count++) {
-		cs->challenges[cs->count] = 
+		cs->challenges[cs->count] =
 			malloc(sizeof(http_auth_challenge_t));
 		if (cs->challenges[cs->count] == NULL) {
 			fetch_syserr();
@@ -765,14 +765,14 @@ http_parse_authenticate(const char *cp, 
 			cs->challenges[cs->count]->scheme = HTTPAS_DIGEST;
 		} else {
 			cs->challenges[cs->count]->scheme = HTTPAS_UNKNOWN;
-			/* 
-                         * Continue parsing as basic or digest may
+			/*
+			 * Continue parsing as basic or digest may
 			 * follow, and the syntax is the same for
 			 * all. We'll just ignore this one when
 			 * looking at the list
 			 */
 		}
-	
+
 		/* Loop on attributes */
 		for (;;) {
 			/* Key */
@@ -791,31 +791,31 @@ http_parse_authenticate(const char *cp, 
 				goto out;
 
 			if (!strcasecmp(key, "realm"))
-				cs->challenges[cs->count]->realm = 
+				cs->challenges[cs->count]->realm =
 					strdup(value);
 			else if (!strcasecmp(key, "qop"))
-				cs->challenges[cs->count]->qop = 
+				cs->challenges[cs->count]->qop =
 					strdup(value);
 			else if (!strcasecmp(key, "nonce"))
-				cs->challenges[cs->count]->nonce = 
+				cs->challenges[cs->count]->nonce =
 					strdup(value);
 			else if (!strcasecmp(key, "opaque"))
-				cs->challenges[cs->count]->opaque = 
+				cs->challenges[cs->count]->opaque =
 					strdup(value);
 			else if (!strcasecmp(key, "algorithm"))
-				cs->challenges[cs->count]->algo = 
+				cs->challenges[cs->count]->algo =
 					strdup(value);
 			else if (!strcasecmp(key, "stale"))
-				cs->challenges[cs->count]->stale = 
+				cs->challenges[cs->count]->stale =
 					strcasecmp(value, "no");
 			/* Else ignore unknown attributes */
 
 			/* Comma or Next challenge or End */
 			lex = http_header_lex(&cp, key);
-			/* 
-                         * If we get a word here, this is the beginning of the
-			 * next challenge. Break the attributes loop 
-                         */
+			/*
+			 * If we get a word here, this is the beginning of the
+			 * next challenge. Break the attributes loop
+			 */
 			if (lex == HTTPHL_WORD)
 				break;
 
@@ -832,10 +832,10 @@ http_parse_authenticate(const char *cp, 
 		} /* End attributes loop */
 	} /* End challenge loop */
 
-	/* 
-         * Challenges max count exceeded. This really can't happen
-	 * with normal data, something's fishy -> error 
-	 */ 
+	/*
+	 * Challenges max count exceeded. This really can't happen
+	 * with normal data, something's fishy -> error
+	 */
 
 out:
 	if (key)
@@ -1011,16 +1011,16 @@ init_http_auth_params(http_auth_params_t
 	s->scheme = s->realm = s->user = s->password = 0;
 }
 
-static void 
+static void
 clean_http_auth_params(http_auth_params_t *s)
 {
-	if (s->scheme) 
+	if (s->scheme)
 		free(s->scheme);
-	if (s->realm) 
+	if (s->realm)
 		free(s->realm);
-	if (s->user) 
+	if (s->user)
 		free(s->user);
-	if (s->password) 
+	if (s->password)
 		free(s->password);
 	init_http_auth_params(s);
 }
@@ -1075,7 +1075,7 @@ http_authfromenv(const char *p, http_aut
 	}
 	ret = 0;
 out:
-	if (ret == -1) 
+	if (ret == -1)
 		clean_http_auth_params(parms);
 	if (str)
 		free(str);
@@ -1083,11 +1083,11 @@ out:
 }
 
 
-/* 
+/*
  * Digest response: the code to compute the digest is taken from the
- * sample implementation in RFC2616 
+ * sample implementation in RFC2616
  */
-#define IN
+#define IN const
 #define OUT
 
 #define HASHLEN 16
@@ -1096,7 +1096,7 @@ typedef char HASH[HASHLEN];
 typedef char HASHHEX[HASHHEXLEN+1];
 
 static const char *hexchars = "0123456789abcdef";
-static void 
+static void
 CvtHex(IN HASH Bin, OUT HASHHEX Hex)
 {
 	unsigned short i;
@@ -1112,7 +1112,7 @@ CvtHex(IN HASH Bin, OUT HASHHEX Hex)
 };
 
 /* calculate H(A1) as per spec */
-static void 
+static void
 DigestCalcHA1(
 	IN char * pszAlg,
 	IN char * pszUserName,
@@ -1147,7 +1147,7 @@ DigestCalcHA1(
 }
 
 /* calculate request-digest/response-digest as per HTTP Digest spec */
-static void 
+static void
 DigestCalcResponse(
 	IN HASHHEX HA1,           /* H(A1) */
 	IN char * pszNonce,       /* nonce from server */
@@ -1160,7 +1160,7 @@ DigestCalcResponse(
 	OUT HASHHEX Response      /* request-digest or response-digest */
 	)
 {
-/*	DEBUG(fprintf(stderr, 
+/*	DEBUG(fprintf(stderr,
 		      "Calc: HA1[%s] Nonce[%s] qop[%s] method[%s] URI[%s]\n",
 		      HA1, pszNonce, pszQop, pszMethod, pszDigestUri));*/
 	MD5_CTX Md5Ctx;
@@ -1199,8 +1199,8 @@ DigestCalcResponse(
 	CvtHex(RespHash, Response);
 }
 
-/* 
- * Generate/Send a Digest authorization header 
+/*
+ * Generate/Send a Digest authorization header
  * This looks like: [Proxy-]Authorization: credentials
  *
  *  credentials      = "Digest" digest-response
@@ -1233,10 +1233,10 @@ http_digest_auth(conn_t *conn, const cha
 		DEBUG(fprintf(stderr, "realm/nonce not set in challenge\n"));
 		return(-1);
 	}
-	if (!c->algo) 
+	if (!c->algo)
 		c->algo = strdup("");
 
-	if (asprintf(&options, "%s%s%s%s", 
+	if (asprintf(&options, "%s%s%s%s",
 		     *c->algo? ",algorithm=" : "", c->algo,
 		     c->opaque? ",opaque=" : "", c->opaque?c->opaque:"")== -1)
 		return (-1);
@@ -1264,13 +1264,13 @@ http_digest_auth(conn_t *conn, const cha
 		r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\","
 			     "nonce=\"%s\",uri=\"%s\",response=\"%s\","
 			     "qop=\"auth\", cnonce=\"%s\", nc=%s%s",
-			     hdr, parms->user, c->realm, 
+			     hdr, parms->user, c->realm,
 			     c->nonce, url->doc, digest,
 			     cnonce, noncecount, options);
 	} else {
 		r = http_cmd(conn, "%s: Digest username=\"%s\",realm=\"%s\","
 			     "nonce=\"%s\",uri=\"%s\",response=\"%s\"%s",
-			     hdr, parms->user, c->realm, 
+			     hdr, parms->user, c->realm,
 			     c->nonce, url->doc, digest, options);
 	}
 	if (options)
@@ -1301,7 +1301,7 @@ http_basic_auth(conn_t *conn, const char
 }
 
 /*
- * Chose the challenge to answer and call the appropriate routine to 
+ * Chose the challenge to answer and call the appropriate routine to
  * produce the header.
  */
 static int
@@ -1327,16 +1327,16 @@ http_authorize(conn_t *conn, const char 
 	}
 
 	/* Error if "Digest" was specified and there is no Digest challenge */
-	if (!digest && (parms->scheme && 
+	if (!digest && (parms->scheme &&
 			!strcasecmp(parms->scheme, "digest"))) {
-		DEBUG(fprintf(stderr, 
+		DEBUG(fprintf(stderr,
 			      "Digest auth in env, not supported by peer\n"));
 		return (-1);
 	}
-	/* 
-         * If "basic" was specified in the environment, or there is no Digest
+	/*
+	 * If "basic" was specified in the environment, or there is no Digest
 	 * challenge, do the basic thing. Don't need a challenge for this,
-	 * so no need to check basic!=NULL 
+	 * so no need to check basic!=NULL
 	 */
 	if (!digest || (parms->scheme && !strcasecmp(parms->scheme,"basic")))
 		return (http_basic_auth(conn,hdr,parms->user,parms->password));
@@ -1492,7 +1492,7 @@ http_request(struct url *URL, const char
 	http_auth_challenges_t proxy_challenges;
 
 	/* The following calls don't allocate anything */
-	init_http_headerbuf(&headerbuf); 
+	init_http_headerbuf(&headerbuf);
 	init_http_auth_challenges(&server_challenges);
 	init_http_auth_challenges(&proxy_challenges);
 
@@ -1578,65 +1578,65 @@ http_request(struct url *URL, const char
 		/* virtual host */
 		http_cmd(conn, "Host: %s", host);
 
-		/* 
-                 * Proxy authorization: we only send auth after we received
-		 * a 407 error. We do not first try basic anyway (changed 
-                 * when support was added for digest-auth)
-                 */
+		/*
+		 * Proxy authorization: we only send auth after we received
+		 * a 407 error. We do not first try basic anyway (changed
+		 * when support was added for digest-auth)
+		 */
 		if (purl && proxy_challenges.valid) {
 			http_auth_params_t aparams;
 			init_http_auth_params(&aparams);
 			if (*purl->user || *purl->pwd) {
-				aparams.user = purl->user ? 
+				aparams.user = purl->user ?
 					strdup(purl->user) : strdup("");
 				aparams.password = purl->pwd?
 					strdup(purl->pwd) : strdup("");
-			} else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL && 
+			} else if ((p = getenv("HTTP_PROXY_AUTH")) != NULL &&
 				   *p != '\0') {
 				if (http_authfromenv(p, &aparams) < 0) {
 					http_seterr(HTTP_NEED_PROXY_AUTH);
 					goto ouch;
 				}
 			}
-			http_authorize(conn, "Proxy-Authorization", 
+			http_authorize(conn, "Proxy-Authorization",
 				       &proxy_challenges, &aparams, url);
 			clean_http_auth_params(&aparams);
 		}
 
-		/* 
-                 * Server authorization: we never send "a priori"
+		/*
+		 * Server authorization: we never send "a priori"
 		 * Basic auth, which used to be done if user/pass were
 		 * set in the url. This would be weird because we'd send the
-		 * password in the clear even if Digest is finally to be 
+		 * password in the clear even if Digest is finally to be
 		 * used (it would have made more sense for the
-		 * pre-digest version to do this when Basic was specified 
-                 * in the environment) 
-                 */
+		 * pre-digest version to do this when Basic was specified
+		 * in the environment)
+		 */
 		if (server_challenges.valid) {
 			http_auth_params_t aparams;
 			init_http_auth_params(&aparams);
 			if (*url->user || *url->pwd) {
-				aparams.user = url->user ? 
+				aparams.user = url->user ?
 					strdup(url->user) : strdup("");
-				aparams.password = url->pwd ? 
+				aparams.password = url->pwd ?
 					strdup(url->pwd) : strdup("");
-			} else if ((p = getenv("HTTP_AUTH")) != NULL && 
+			} else if ((p = getenv("HTTP_AUTH")) != NULL &&
 				   *p != '\0') {
 				if (http_authfromenv(p, &aparams) < 0) {
 					http_seterr(HTTP_NEED_AUTH);
 					goto ouch;
 				}
-			} else if (fetchAuthMethod && 
+			} else if (fetchAuthMethod &&
 				   fetchAuthMethod(url) == 0) {
-				aparams.user = url->user ? 
+				aparams.user = url->user ?
 					strdup(url->user) : strdup("");
-				aparams.password = url->pwd ? 
+				aparams.password = url->pwd ?
 					strdup(url->pwd) : strdup("");
 			} else {
 				http_seterr(HTTP_NEED_AUTH);
 				goto ouch;
 			}
-			http_authorize(conn, "Authorization", 
+			http_authorize(conn, "Authorization",
 				       &server_challenges, &aparams, url);
 			clean_http_auth_params(&aparams);
 		}
@@ -1804,12 +1804,12 @@ http_request(struct url *URL, const char
 		} while (h > hdr_end);
 
 		/* we need to provide authentication */
-		if (conn->err == HTTP_NEED_AUTH || 
+		if (conn->err == HTTP_NEED_AUTH ||
 		    conn->err == HTTP_NEED_PROXY_AUTH) {
 			e = conn->err;
-			if ((conn->err == HTTP_NEED_AUTH && 
-			     !server_challenges.valid) || 
-			    (conn->err == HTTP_NEED_PROXY_AUTH && 
+			if ((conn->err == HTTP_NEED_AUTH &&
+			     !server_challenges.valid) ||
+			    (conn->err == HTTP_NEED_PROXY_AUTH &&
 			     !proxy_challenges.valid)) {
 				/* 401/7 but no www/proxy-authenticate ?? */
 				DEBUG(fprintf(stderr, "401/7 and no auth header\n"));

Modified: projects/largeSMP/lib/libprocstat/Makefile
==============================================================================
--- projects/largeSMP/lib/libprocstat/Makefile	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/lib/libprocstat/Makefile	Fri May 13 15:20:57 2011	(r221841)
@@ -9,7 +9,6 @@ SRCS=	cd9660.c	\
 	libprocstat.c	\
         msdosfs.c	\
 	ntfs.c		\
-	nwfs.c		\
 	smbfs.c		\
 	udf.c
 
@@ -18,9 +17,14 @@ CFLAGS+=	-I. -I${.CURDIR} -D_KVM_VNODE
 SHLIB_MAJOR=	1
 WITHOUT_MAN=	yes
 
+.if ${MK_NCP} != "no"
+CFLAGS+=	-DLIBPROCSTAT_NWFS
+SRCS+=	nwfs.c
+.endif
+
 # XXX This is a hack.
 .if ${MK_CDDL} != "no"
-CFLAGS+=	-DZFS
+CFLAGS+=	-DLIBPROCSTAT_ZFS
 OBJS+=	zfs/zfs.o
 SOBJS+=	zfs/zfs.So
 POBJS+=	zfs/zfs.po

Modified: projects/largeSMP/lib/libprocstat/libprocstat.c
==============================================================================
--- projects/largeSMP/lib/libprocstat/libprocstat.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/lib/libprocstat/libprocstat.c	Fri May 13 15:20:57 2011	(r221841)
@@ -873,11 +873,13 @@ procstat_get_vnode_info_kvm(kvm_t *kd, s
 		FSTYPE(msdosfs),
 		FSTYPE(nfs),
 		FSTYPE(ntfs),
+#ifdef LIBPROCSTAT_NWFS
 		FSTYPE(nwfs), 
+#endif
 		FSTYPE(smbfs),
 		FSTYPE(udf), 
 		FSTYPE(ufs),
-#ifdef ZFS
+#ifdef LIBPROCSTAT_ZFS
 		FSTYPE(zfs),
 #endif
 	};

Modified: projects/largeSMP/release/powerpc/mkisoimages.sh
==============================================================================
--- projects/largeSMP/release/powerpc/mkisoimages.sh	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/release/powerpc/mkisoimages.sh	Fri May 13 15:20:57 2011	(r221841)
@@ -24,6 +24,7 @@
 # into base-bits-dir as part of making the image.
 
 if [ "x$1" = "x-b" ]; then
+	# Apple boot code
 	uudecode -o /tmp/hfs-boot-block.bz2 `dirname $0`/hfs-boot.bz2.uu
 	bzip2 -d /tmp/hfs-boot-block.bz2
 	OFFSET=$(hd /tmp/hfs-boot-block | grep 'Loader START' | cut -f 1 -d ' ')
@@ -31,6 +32,17 @@ if [ "x$1" = "x-b" ]; then
 	dd if=$4/boot/loader of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc
 
 	bootable="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot"
+
+	# pSeries/PAPR boot code
+	mkdir -p $4/ppc/chrp
+	cp $4/boot/loader $4/ppc/chrp
+	cat > $4/ppc/bootinfo.txt << EOF
+<chrp-boot>
+<description>FreeBSD Install</description>
+<os-name>FreeBSD</os-name>
+<boot-script>boot &device;:&partition;,\ppc\chrp\loader</boot-script>
+</chrp-boot>
+EOF
 	shift
 else
 	bootable=""
@@ -48,3 +60,5 @@ echo "/dev/iso9660/`echo $LABEL | tr '[:
 makefs -t cd9660 $bootable -o rockridge -o label=$LABEL $NAME $*
 rm $1/etc/fstab
 rm /tmp/hfs-boot-block
+rm -rf $1/ppc
+

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h	Fri May 13 15:20:57 2011	(r221841)
@@ -237,6 +237,15 @@ extern	HAL_BOOL ar5416GetChipPowerLimits
 		struct ieee80211_channel *chan);
 extern	void ar5416GetChannelCenters(struct ath_hal *,
 		const struct ieee80211_channel *chan, CHAN_CENTERS *centers);
+extern	void ar5416SetRatesArrayFromTargetPower(struct ath_hal *ah,
+		const struct ieee80211_channel *chan,
+		int16_t *ratesArray,
+		const CAL_TARGET_POWER_LEG *targetPowerCck,
+		const CAL_TARGET_POWER_LEG *targetPowerCckExt,
+		const CAL_TARGET_POWER_LEG *targetPowerOfdm,
+		const CAL_TARGET_POWER_LEG *targetPowerOfdmExt,
+		const CAL_TARGET_POWER_HT *targetPowerHt20,
+		const CAL_TARGET_POWER_HT *targetPowerHt40);
 extern	void ar5416GetTargetPowers(struct ath_hal *ah, 
 		const struct ieee80211_channel *chan,
 		CAL_TARGET_POWER_HT *powInfo,

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Fri May 13 15:20:57 2011	(r221841)
@@ -492,8 +492,9 @@ ar5416PerCalibrationN(struct ath_hal *ah
 		if (AH5416(ah)->ah_cal_pacal)
 			AH5416(ah)->ah_cal_pacal(ah, AH_FALSE);
 
-		/* Do temperature compensation if the chipset needs it */
-		AH5416(ah)->ah_olcTempCompensation(ah);
+		/* Do open-loop temperature compensation if the chipset needs it */
+		if (ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL))
+			AH5416(ah)->ah_olcTempCompensation(ah);
 
 		/*
 		 * Get the value from the previous NF cal

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Fri May 13 15:20:57 2011	(r221841)
@@ -202,8 +202,11 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
 	 */
 	ar5416InitChainMasks(ah);
 
-	/* Setup the open-loop temperature compensation if required */
-	AH5416(ah)->ah_olcInit(ah);
+	/* Setup the open-loop power calibration if required */
+	if (ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL)) {
+		AH5416(ah)->ah_olcInit(ah);
+		AH5416(ah)->ah_olcTempCompensation(ah);
+	}
 
 	/* Setup the transmit power values. */
 	if (!ah->ah_setTxPower(ah, chan, rfXpdGain)) {
@@ -1635,6 +1638,63 @@ ar5416SetBoardValues(struct ath_hal *ah,
  */
 
 /*
+ * Set the target power array "ratesArray" from the
+ * given set of target powers.
+ *
+ * This is used by the various chipset/EEPROM TX power
+ * setup routines.
+ */ 
+void
+ar5416SetRatesArrayFromTargetPower(struct ath_hal *ah,
+    const struct ieee80211_channel *chan,
+    int16_t *ratesArray,
+    const CAL_TARGET_POWER_LEG *targetPowerCck,
+    const CAL_TARGET_POWER_LEG *targetPowerCckExt,
+    const CAL_TARGET_POWER_LEG *targetPowerOfdm,
+    const CAL_TARGET_POWER_LEG *targetPowerOfdmExt,
+    const CAL_TARGET_POWER_HT *targetPowerHt20,
+    const CAL_TARGET_POWER_HT *targetPowerHt40)
+{
+#define	N(a)	(sizeof(a)/sizeof(a[0]))
+	int i;
+
+	/* Blank the rates array, to be consistent */
+	for (i = 0; i < Ar5416RateSize; i++)
+		ratesArray[i] = 0;
+
+	/* Set rates Array from collected data */
+	ratesArray[rate6mb] = ratesArray[rate9mb] = ratesArray[rate12mb] =
+	    ratesArray[rate18mb] = ratesArray[rate24mb] = targetPowerOfdm->tPow2x[0];
+	ratesArray[rate36mb] = targetPowerOfdm->tPow2x[1];
+	ratesArray[rate48mb] = targetPowerOfdm->tPow2x[2];
+	ratesArray[rate54mb] = targetPowerOfdm->tPow2x[3];
+	ratesArray[rateXr] = targetPowerOfdm->tPow2x[0];
+
+	for (i = 0; i < N(targetPowerHt20->tPow2x); i++) {
+		ratesArray[rateHt20_0 + i] = targetPowerHt20->tPow2x[i];
+	}
+
+	if (IEEE80211_IS_CHAN_2GHZ(chan)) {
+		ratesArray[rate1l]  = targetPowerCck->tPow2x[0];
+		ratesArray[rate2s] = ratesArray[rate2l]  = targetPowerCck->tPow2x[1];
+		ratesArray[rate5_5s] = ratesArray[rate5_5l] = targetPowerCck->tPow2x[2];
+		ratesArray[rate11s] = ratesArray[rate11l] = targetPowerCck->tPow2x[3];
+	}
+	if (IEEE80211_IS_CHAN_HT40(chan)) {
+		for (i = 0; i < N(targetPowerHt40->tPow2x); i++) {
+			ratesArray[rateHt40_0 + i] = targetPowerHt40->tPow2x[i];
+		}
+		ratesArray[rateDupOfdm] = targetPowerHt40->tPow2x[0];
+		ratesArray[rateDupCck]  = targetPowerHt40->tPow2x[0];
+		ratesArray[rateExtOfdm] = targetPowerOfdmExt->tPow2x[0];
+		if (IEEE80211_IS_CHAN_2GHZ(chan)) {
+			ratesArray[rateExtCck]  = targetPowerCckExt->tPow2x[0];
+		}
+	}
+#undef	N
+}
+
+/*
  * ar5416SetPowerPerRateTable
  *
  * Sets the transmit power in the baseband for the given
@@ -1855,33 +1915,13 @@ ar5416SetPowerPerRateTable(struct ath_ha
 	} /* end ctl mode checking */
 
 	/* Set rates Array from collected data */
-	ratesArray[rate6mb] = ratesArray[rate9mb] = ratesArray[rate12mb] = ratesArray[rate18mb] = ratesArray[rate24mb] = targetPowerOfdm.tPow2x[0];
-	ratesArray[rate36mb] = targetPowerOfdm.tPow2x[1];
-	ratesArray[rate48mb] = targetPowerOfdm.tPow2x[2];
-	ratesArray[rate54mb] = targetPowerOfdm.tPow2x[3];
-	ratesArray[rateXr] = targetPowerOfdm.tPow2x[0];
-
-	for (i = 0; i < N(targetPowerHt20.tPow2x); i++) {
-		ratesArray[rateHt20_0 + i] = targetPowerHt20.tPow2x[i];
-	}
-
-	if (IEEE80211_IS_CHAN_2GHZ(chan)) {
-		ratesArray[rate1l]  = targetPowerCck.tPow2x[0];
-		ratesArray[rate2s] = ratesArray[rate2l]  = targetPowerCck.tPow2x[1];
-		ratesArray[rate5_5s] = ratesArray[rate5_5l] = targetPowerCck.tPow2x[2];
-		ratesArray[rate11s] = ratesArray[rate11l] = targetPowerCck.tPow2x[3];
-	}
-	if (IEEE80211_IS_CHAN_HT40(chan)) {
-		for (i = 0; i < N(targetPowerHt40.tPow2x); i++) {
-			ratesArray[rateHt40_0 + i] = targetPowerHt40.tPow2x[i];
-		}
-		ratesArray[rateDupOfdm] = targetPowerHt40.tPow2x[0];
-		ratesArray[rateDupCck]  = targetPowerHt40.tPow2x[0];
-		ratesArray[rateExtOfdm] = targetPowerOfdmExt.tPow2x[0];
-		if (IEEE80211_IS_CHAN_2GHZ(chan)) {
-			ratesArray[rateExtCck]  = targetPowerCckExt.tPow2x[0];
-		}
-	}
+	ar5416SetRatesArrayFromTargetPower(ah, chan, ratesArray,
+	    &targetPowerCck,
+	    &targetPowerCckExt,
+	    &targetPowerOfdm,
+	    &targetPowerOfdmExt,
+	    &targetPowerHt20,
+	    &targetPowerHt40);
 	return AH_TRUE;
 #undef EXT_ADDITIVE
 #undef CTL_11A_EXT

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c	Fri May 13 15:20:57 2011	(r221841)
@@ -43,6 +43,12 @@ ar9280olcInit(struct ath_hal *ah)
 {
 	uint32_t i;
 
+	/* Only do OLC if it's enabled for this chipset */
+	if (! ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL))
+		return;
+
+	HALDEBUG(ah, HAL_DEBUG_RESET, "%s: Setting up TX gain tables.\n", __func__);
+
 	for (i = 0; i < AR9280_TX_GAIN_TABLE_SIZE; i++)
 		AH9280(ah)->originalGain[i] = MS(OS_REG_READ(ah,
 		    AR_PHY_TX_GAIN_TBL1 + i * 4), AR_PHY_TX_GAIN);
@@ -126,6 +132,9 @@ ar9280olcTemperatureCompensation(struct 
 	int delta, currPDADC, regval;
 	uint8_t hpwr_5g = 0;
 
+	if (! ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL))
+		return;
+
 	rddata = OS_REG_READ(ah, AR_PHY_TX_PWRCTRL4);
 	currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT);
 

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c	Fri May 13 15:20:57 2011	(r221841)
@@ -368,27 +368,32 @@ ar9285_ant_comb_scan(struct ath_hal *ah,
 	int curr_main_set, curr_bias;
 	int main_rssi = rs->rs_rssi_ctl[0];
 	int alt_rssi = rs->rs_rssi_ctl[1];
-	int rx_ant_conf, main_ant_conf;
+	int rx_ant_conf, main_ant_conf, alt_ant_conf;
 	HAL_BOOL short_scan = AH_FALSE;
 
+	rx_ant_conf = (rs->rs_rssi_ctl[2] >> 4) & ATH_ANT_RX_MASK;
+	main_ant_conf = (rs->rs_rssi_ctl[2] >> 2) & ATH_ANT_RX_MASK;
+	alt_ant_conf = (rs->rs_rssi_ctl[2] >> 0) & ATH_ANT_RX_MASK;
+
+#if 0
+	HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: RSSI %d/%d, conf %x/%x, rxconf %x, LNA: %d; ANT: %d; FastDiv: %d\n",
+	    __func__, main_rssi, alt_rssi, main_ant_conf,alt_ant_conf, rx_ant_conf,
+	    !!(rs->rs_rssi_ctl[2] & 0x80), !!(rs->rs_rssi_ctl[2] & 0x40), !!(rs->rs_rssi_ext[2] & 0x40));
+#endif
+
 	if (! ar9285_check_div_comb(ah))
 		return;
 
 	if (AH5212(ah)->ah_diversity == AH_FALSE)
 		return;
 
-	rx_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_CURRENT_SHIFT) &
-		       ATH_ANT_RX_MASK;
-	main_ant_conf = (rs->rs_rssi_ctl[2] >> ATH_ANT_RX_MAIN_SHIFT) &
-			 ATH_ANT_RX_MASK;
-
 #if 0
 	HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: main: %d, alt: %d, rx_ant_conf: %x, main_ant_conf: %x\n",
 	    __func__, main_rssi, alt_rssi, rx_ant_conf, main_ant_conf);
 #endif
 
 	/* Record packet only when alt_rssi is positive */
-	if (alt_rssi > 0) {
+	if (main_rssi > 0 && alt_rssi > 0) {
 		antcomb->total_pkt_count++;
 		antcomb->main_total_rssi += main_rssi;
 		antcomb->alt_total_rssi  += alt_rssi;
@@ -613,13 +618,13 @@ div_comb_done:
 	HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: alt_recv_cnt=%d\n",
 	   __func__, antcomb->alt_recv_cnt);
 
-	if (curr_alt_set != div_ant_conf.alt_lna_conf)
+//	if (curr_alt_set != div_ant_conf.alt_lna_conf)
 		HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: lna_conf: %x -> %x\n",
 		    __func__, curr_alt_set, div_ant_conf.alt_lna_conf);
-	if (curr_main_set != div_ant_conf.main_lna_conf)
+//	if (curr_main_set != div_ant_conf.main_lna_conf)
 		HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: main_lna_conf: %x -> %x\n",
 		    __func__, curr_main_set, div_ant_conf.main_lna_conf);
-	if (curr_bias != div_ant_conf.fast_div_bias)
+//	if (curr_bias != div_ant_conf.fast_div_bias)
 		HALDEBUG(ah, HAL_DEBUG_DIVERSITY, "%s: fast_div_bias: %x -> %x\n",
 		    __func__, curr_bias, div_ant_conf.fast_div_bias);
 

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c	Fri May 13 15:20:57 2011	(r221841)
@@ -533,32 +533,15 @@ ar9285SetPowerPerRateTable(struct ath_ha
 		}
 	} /* end ctl mode checking */
 
-	/* Set rates Array from collected data */
-	ratesArray[rate6mb] = ratesArray[rate9mb] = ratesArray[rate12mb] = ratesArray[rate18mb] = ratesArray[rate24mb] = targetPowerOfdm.tPow2x[0];
-	ratesArray[rate36mb] = targetPowerOfdm.tPow2x[1];
-	ratesArray[rate48mb] = targetPowerOfdm.tPow2x[2];
-	ratesArray[rate54mb] = targetPowerOfdm.tPow2x[3];
-	ratesArray[rateXr] = targetPowerOfdm.tPow2x[0];
-
-	for (i = 0; i < N(targetPowerHt20.tPow2x); i++) {
-		ratesArray[rateHt20_0 + i] = targetPowerHt20.tPow2x[i];
-	}
-
-	ratesArray[rate1l]  = targetPowerCck.tPow2x[0];
-	ratesArray[rate2s] = ratesArray[rate2l]  = targetPowerCck.tPow2x[1];
-	ratesArray[rate5_5s] = ratesArray[rate5_5l] = targetPowerCck.tPow2x[2];
-	ratesArray[rate11s] = ratesArray[rate11l] = targetPowerCck.tPow2x[3];
-	if (IEEE80211_IS_CHAN_HT40(chan)) {
-		for (i = 0; i < N(targetPowerHt40.tPow2x); i++) {
-			ratesArray[rateHt40_0 + i] = targetPowerHt40.tPow2x[i];
-		}
-		ratesArray[rateDupOfdm] = targetPowerHt40.tPow2x[0];
-		ratesArray[rateDupCck]  = targetPowerHt40.tPow2x[0];
-		ratesArray[rateExtOfdm] = targetPowerOfdmExt.tPow2x[0];
-		if (IEEE80211_IS_CHAN_2GHZ(chan)) {
-			ratesArray[rateExtCck]  = targetPowerCckExt.tPow2x[0];
-		}
-	}
+        /* Set rates Array from collected data */
+	ar5416SetRatesArrayFromTargetPower(ah, chan, ratesArray,
+	    &targetPowerCck,
+	    &targetPowerCckExt,
+	    &targetPowerOfdm,
+	    &targetPowerOfdmExt,
+	    &targetPowerHt20,
+	    &targetPowerHt40);
+
 	return AH_TRUE;
 #undef EXT_ADDITIVE
 #undef CTL_11G_EXT

Modified: projects/largeSMP/sys/dev/ath/if_ath.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/if_ath.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/ath/if_ath.c	Fri May 13 15:20:57 2011	(r221841)
@@ -1946,17 +1946,15 @@ ath_calcrxfilter(struct ath_softc *sc)
 	    IEEE80211_IS_CHAN_ANYG(ic->ic_curchan))
 		rfilt |= HAL_RX_FILTER_BEACON;
 
-#if 0
 	/*
 	 * Enable hardware PS-POLL RX only for hostap mode;
 	 * STA mode sends PS-POLL frames but never
 	 * receives them.
 	 */
-	if (ath_hal_getcapability(ah, HAL_CAP_HAS_PSPOLL,
+	if (ath_hal_getcapability(sc->sc_ah, HAL_CAP_PSPOLL,
 	    0, NULL) == HAL_OK &&
 	    ic->ic_opmode == IEEE80211_M_HOSTAP)
 		rfilt |= HAL_RX_FILTER_PSPOLL;
-#endif
 
 	if (sc->sc_nmeshvaps) {
 		rfilt |= HAL_RX_FILTER_BEACON;

Modified: projects/largeSMP/sys/dev/bge/if_bge.c
==============================================================================
--- projects/largeSMP/sys/dev/bge/if_bge.c	Fri May 13 15:09:35 2011	(r221840)
+++ projects/largeSMP/sys/dev/bge/if_bge.c	Fri May 13 15:20:57 2011	(r221841)
@@ -171,6 +171,7 @@ static const struct bge_type {
 	{ BCOM_VENDORID,	BCOM_DEVICEID_BCM5715S },
 	{ BCOM_VENDORID,	BCOM_DEVICEID_BCM5717 },
 	{ BCOM_VENDORID,	BCOM_DEVICEID_BCM5718 },
+	{ BCOM_VENDORID,	BCOM_DEVICEID_BCM5719 },
 	{ BCOM_VENDORID,	BCOM_DEVICEID_BCM5720 },
 	{ BCOM_VENDORID,	BCOM_DEVICEID_BCM5721 },
 	{ BCOM_VENDORID,	BCOM_DEVICEID_BCM5722 },
@@ -299,6 +300,7 @@ static const struct bge_revision {
 	{ BGE_CHIPID_BCM5715_A3,	"BCM5715 A3" },

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105131520.p4DFKw3B074637>