Module Name:    src
Committed By:   msaitoh
Date:           Mon Apr 22 08:39:10 UTC 2019

Modified Files:
        src/sys/arch/mips/sibyte/dev: sbmac.c

Log Message:
 This driver does ether_ioctl() on SIOC{ADD,DEL}MULTI, SIOC{G,S}IFMEDIA and
default case in the switch statement. Only the default case didn't check the
return value with ENETRESET. Integrate them to one ether_ioctl() call with
ENETRESET test. This driver might require some additional fixes for SIOCSIFMTU
and other ioctl()s.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mips/sibyte/dev/sbmac.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/sibyte/dev/sbmac.c
diff -u src/sys/arch/mips/sibyte/dev/sbmac.c:1.56 src/sys/arch/mips/sibyte/dev/sbmac.c:1.57
--- src/sys/arch/mips/sibyte/dev/sbmac.c:1.56	Sun Mar 31 12:47:33 2019
+++ src/sys/arch/mips/sibyte/dev/sbmac.c	Mon Apr 22 08:39:10 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sbmac.c,v 1.56 2019/03/31 12:47:33 simonb Exp $ */
+/* $NetBSD: sbmac.c,v 1.57 2019/04/22 08:39:10 msaitoh Exp $ */
 
 /*
  * Copyright 2000, 2001, 2004
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.56 2019/03/31 12:47:33 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sbmac.c,v 1.57 2019/04/22 08:39:10 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_ns.h"
@@ -2026,19 +2026,13 @@ sbmac_ioctl(struct ifnet *ifp, u_long cm
 		error = 0;
 		break;
 
-	case SIOCADDMULTI:
-	case SIOCDELMULTI:
-	case SIOCSIFMEDIA:
-	case SIOCGIFMEDIA:
+	default:
 		if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
 			error = 0;
 			if (ifp->if_flags & IFF_RUNNING)
 				sbmac_setmulti(sc);
 		}
 		break;
-	default:
-		error = ether_ioctl(ifp, cmd, data);
-		break;
 	}
 
 	(void)splx(s);

Reply via email to