Axe IFF_SMART. Fortunately this layering violating flag was never used,

it was just declared.
This commit is contained in:
Gleb Smirnoff 2013-11-05 12:52:56 +00:00
parent 5fb009bda7
commit af50ea380f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257699
5 changed files with 5 additions and 18 deletions

View file

@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd April 26, 2013
.Dd November 5, 2013
.Dt IFNET 9
.Os
.Sh NAME
@ -583,14 +583,6 @@ The interface is a loopback device.
The interface is point-to-point;
.Dq broadcast
address is actually the address of the other end.
.It Dv IFF_SMART
.Aq S*
The interface manages its own routes, rather than using the generic
code in
.Fn if_up
and
.Fn if_down .
This is probably useful for serial lines.
.It Dv IFF_DRV_RUNNING
.Aq D*
The interface has been configured and dynamic resources were

View file

@ -2287,7 +2287,7 @@ linux_gifflags(struct thread *td, struct ifnet *ifp, struct l_ifreq *ifr)
flags = (ifp->if_flags | ifp->if_drv_flags) & 0xffff;
/* these flags have no Linux equivalent */
flags &= ~(IFF_SMART|IFF_DRV_OACTIVE|IFF_SIMPLEX|
flags &= ~(IFF_DRV_OACTIVE|IFF_SIMPLEX|
IFF_LINK0|IFF_LINK1|IFF_LINK2);
/* Linux' multicast flag is in a different bit */
if (flags & IFF_MULTICAST) {

View file

@ -2210,9 +2210,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td)
*/
new_flags = (ifr->ifr_flags & 0xffff) |
(ifr->ifr_flagshigh << 16);
if (ifp->if_flags & IFF_SMART) {
/* Smart drivers twiddle their own routes */
} else if (ifp->if_flags & IFF_UP &&
if (ifp->if_flags & IFF_UP &&
(new_flags & IFF_UP) == 0) {
if_down(ifp);
} else if (new_flags & IFF_UP &&

View file

@ -129,7 +129,7 @@ struct if_data {
#define IFF_DEBUG 0x4 /* (n) turn on debugging */
#define IFF_LOOPBACK 0x8 /* (i) is a loopback net */
#define IFF_POINTOPOINT 0x10 /* (i) is a point-to-point link */
#define IFF_SMART 0x20 /* (i) interface manages own routes */
/* 0x20 was IFF_SMART */
#define IFF_DRV_RUNNING 0x40 /* (d) resources allocated */
#define IFF_NOARP 0x80 /* (n) no address resolution protocol */
#define IFF_PROMISC 0x100 /* (n) receive all packets */
@ -159,7 +159,7 @@ struct if_data {
/* flags set internally only: */
#define IFF_CANTCHANGE \
(IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\
IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\
IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_PROMISC|\
IFF_DYING|IFF_CANTCONFIG)
/*

View file

@ -2584,9 +2584,6 @@ do { \
IFFLAG("POINTOPOINT", IFF_POINTOPOINT);
#ifdef IFF_NOTRAILERS
IFFLAG("NOTRAILERS", IFF_NOTRAILERS);
#endif
#ifdef IFF_SMART
IFFLAG("SMART", IFF_SMART);
#endif
IFFLAG("RUNNING", IFF_RUNNING);
IFFLAG("NOARP", IFF_NOARP);