svn commit: r304325 - head/sys/dev/usb/net
Pyun YongHyeon
yongari at FreeBSD.org
Thu Aug 18 04:25:19 UTC 2016
Author: yongari
Date: Thu Aug 18 04:25:17 2016
New Revision: 304325
URL: https://svnweb.freebsd.org/changeset/base/304325
Log:
Rename cryptic RX filter constants with more readable ones.
No functional change.
Modified:
head/sys/dev/usb/net/if_axge.c
head/sys/dev/usb/net/if_axgereg.h
Modified: head/sys/dev/usb/net/if_axge.c
==============================================================================
--- head/sys/dev/usb/net/if_axge.c Thu Aug 18 02:14:39 2016 (r304324)
+++ head/sys/dev/usb/net/if_axge.c Thu Aug 18 04:25:17 2016 (r304325)
@@ -743,11 +743,11 @@ axge_setmulti(struct usb_ether *ue)
rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR);
if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
- rxmode |= RCR_AMALL;
+ rxmode |= RCR_ACPT_ALL_MCAST;
axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode);
return;
}
- rxmode &= ~RCR_AMALL;
+ rxmode &= ~RCR_ACPT_ALL_MCAST;
if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
@@ -775,9 +775,9 @@ axge_setpromisc(struct usb_ether *ue)
rxmode = axge_read_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR);
if (ifp->if_flags & IFF_PROMISC)
- rxmode |= RCR_PRO;
+ rxmode |= RCR_PROMISC;
else
- rxmode &= ~RCR_PRO;
+ rxmode &= ~RCR_PROMISC;
axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode);
axge_setmulti(ue);
@@ -828,16 +828,16 @@ axge_init(struct usb_ether *ue)
axge_csum_cfg(ue);
/* Configure RX settings. */
- rxmode = (RCR_AM | RCR_SO | RCR_DROP_CRCE);
+ rxmode = (RCR_ACPT_MCAST | RCR_START | RCR_DROP_CRCERR);
if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
rxmode |= RCR_IPE;
/* If we want promiscuous mode, set the allframes bit. */
if (ifp->if_flags & IFF_PROMISC)
- rxmode |= RCR_PRO;
+ rxmode |= RCR_PROMISC;
if (ifp->if_flags & IFF_BROADCAST)
- rxmode |= RCR_AB;
+ rxmode |= RCR_ACPT_BCAST;
axge_write_cmd_2(sc, AXGE_ACCESS_MAC, 2, AXGE_RCR, rxmode);
Modified: head/sys/dev/usb/net/if_axgereg.h
==============================================================================
--- head/sys/dev/usb/net/if_axgereg.h Thu Aug 18 02:14:39 2016 (r304324)
+++ head/sys/dev/usb/net/if_axgereg.h Thu Aug 18 04:25:17 2016 (r304325)
@@ -57,13 +57,14 @@
/* Rx control register */
#define AXGE_RCR 0x0b
#define RCR_STOP 0x0000
-#define RCR_PRO 0x0001
-#define RCR_AMALL 0x0002
-#define RCR_AB 0x0008
-#define RCR_AM 0x0010
-#define RCR_AP 0x0020
-#define RCR_SO 0x0080
-#define RCR_DROP_CRCE 0x0100
+#define RCR_PROMISC 0x0001
+#define RCR_ACPT_ALL_MCAST 0x0002
+#define RCR_AUTOPAD_BNDRY 0x0004
+#define RCR_ACPT_BCAST 0x0008
+#define RCR_ACPT_MCAST 0x0010
+#define RCR_ACPT_PHY_MCAST 0x0020
+#define RCR_START 0x0080
+#define RCR_DROP_CRCERR 0x0100
#define RCR_IPE 0x0200
#define RCR_TX_CRC_PAD 0x0400
More information about the svn-src-head
mailing list