From owner-p4-projects@FreeBSD.ORG Fri Apr 21 21:28:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D62DE16A404; Fri, 21 Apr 2006 21:28:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A73EB16A403 for ; Fri, 21 Apr 2006 21:28:11 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7394F43D48 for ; Fri, 21 Apr 2006 21:28:11 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3LLSBJW001922 for ; Fri, 21 Apr 2006 21:28:11 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3LLSBmS001919 for perforce@freebsd.org; Fri, 21 Apr 2006 21:28:11 GMT (envelope-from imp@freebsd.org) Date: Fri, 21 Apr 2006 21:28:11 GMT Message-Id: <200604212128.k3LLSBmS001919@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 95829 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:28:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=95829 Change 95829 by imp@imp_hammer on 2006/04/21 21:27:19 SWAP16(constant) instead of (var) in a few more places. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#9 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#9 (text+ko) ==== @@ -236,7 +236,7 @@ static void CheckForNewPacket(ip_header_t *pHeader) { - unsigned short *pFrameType, *pArpOp; + unsigned short *pFrameType; unsigned i; char *pData; ip_header_t *pIpHeader; @@ -264,11 +264,9 @@ case PROTOCOL_ARP: - pArpOp = (unsigned short *) (pData + 20); p_ARP = (arp_header_t*)pData; - if (SWAP16(*pArpOp) == ARP_REPLY) { - + if (p_ARP->operation == SWAP16(ARP_REPLY)) { // check if new server info is available if ((!serverMACSet) && (!(p_memcmp((char*)p_ARP->sender_ip, @@ -279,12 +277,9 @@ p_memcpy((char*)serverMACAddr, (char*)p_ARP->sender_mac, 6); } - } - - if (SWAP16(*pArpOp) == ARP_REQUEST) { - + } else if (p_ARP->operation == SWAP16(ARP_REQUEST)) { // ARP REPLY operation - *pArpOp = SWAP16(ARP_REPLY); + p_ARP->operation = SWAP16(ARP_REPLY); // Fill the dest address and src address for (i = 0; i <6; i++) {