Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci no need to swap 32bit-packed macaddr on big endian
details: https://anonhg.NetBSD.org/src/rev/00fb6a4643c4
branches: trunk
changeset: 976437:00fb6a4643c4
user: ryo <ryo%NetBSD.org@localhost>
date: Thu Sep 24 05:09:46 2020 +0000
description:
no need to swap 32bit-packed macaddr on big endian
diffstat:
sys/dev/pci/if_aq.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r a1c16a666fe9 -r 00fb6a4643c4 sys/dev/pci/if_aq.c
--- a/sys/dev/pci/if_aq.c Thu Sep 24 03:17:18 2020 +0000
+++ b/sys/dev/pci/if_aq.c Thu Sep 24 05:09:46 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aq.c,v 1.17 2020/05/14 08:34:18 msaitoh Exp $ */
+/* $NetBSD: if_aq.c,v 1.18 2020/09/24 05:09:46 ryo Exp $ */
/**
* aQuantia Corporation Network Driver
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.17 2020/05/14 08:34:18 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aq.c,v 1.18 2020/09/24 05:09:46 ryo Exp $");
#ifdef _KERNEL_OPT
#include "opt_if_aq.h"
@@ -2564,8 +2564,8 @@
return ENXIO;
}
- mac_addr[0] = bswap32(mac_addr[0]);
- mac_addr[1] = bswap32(mac_addr[1]);
+ mac_addr[0] = htobe32(mac_addr[0]);
+ mac_addr[1] = htobe32(mac_addr[1]);
memcpy(sc->sc_enaddr.ether_addr_octet,
(uint8_t *)mac_addr, ETHER_ADDR_LEN);
Home |
Main Index |
Thread Index |
Old Index