diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-01-09 14:47:04 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-01-10 11:03:27 +0100 |
commit | 0577772720a4ecb050a230f75346f90b246e93c8 (patch) | |
tree | a3fba8bb57e77c932e08dd0d4bbe49adb6312e5e /freebsd/sys/net | |
parent | Update to FreeBSD head 2016-12-10 (diff) | |
download | rtems-libbsd-0577772720a4ecb050a230f75346f90b246e93c8.tar.bz2 |
Update to FreeBSD head 2017-01-09
Git mirror commit 1f8e4a995a6ede4bdb24e6d335ccda2bdb0175ab.
Diffstat (limited to 'freebsd/sys/net')
-rw-r--r-- | freebsd/sys/net/if.c | 6 | ||||
-rw-r--r-- | freebsd/sys/net/if_lagg.c | 2 | ||||
-rw-r--r-- | freebsd/sys/net/if_media.h | 7 |
3 files changed, 12 insertions, 3 deletions
diff --git a/freebsd/sys/net/if.c b/freebsd/sys/net/if.c index e1c525bd..882eee5c 100644 --- a/freebsd/sys/net/if.c +++ b/freebsd/sys/net/if.c @@ -2302,7 +2302,7 @@ static int ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) { struct ifreq *ifr; - int error = 0; + int error = 0, do_ifup = 0; int new_flags, temp_flags; size_t namelen, onamelen; size_t descrlen; @@ -2429,7 +2429,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) if_down(ifp); } else if (new_flags & IFF_UP && (ifp->if_flags & IFF_UP) == 0) { - if_up(ifp); + do_ifup = 1; } /* See if permanently promiscuous mode bit is about to flip */ if ((ifp->if_flags ^ new_flags) & IFF_PPROMISC) { @@ -2448,6 +2448,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) if (ifp->if_ioctl) { (void) (*ifp->if_ioctl)(ifp, cmd, data); } + if (do_ifup) + if_up(ifp); getmicrotime(&ifp->if_lastchange); break; diff --git a/freebsd/sys/net/if_lagg.c b/freebsd/sys/net/if_lagg.c index 9cfb7b8b..b5b61364 100644 --- a/freebsd/sys/net/if_lagg.c +++ b/freebsd/sys/net/if_lagg.c @@ -1024,7 +1024,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) return (error); fallback: - if (lp->lp_ioctl != NULL) + if (lp != NULL && lp->lp_ioctl != NULL) return ((*lp->lp_ioctl)(ifp, cmd, data)); return (EINVAL); diff --git a/freebsd/sys/net/if_media.h b/freebsd/sys/net/if_media.h index 86439950..b6c999d3 100644 --- a/freebsd/sys/net/if_media.h +++ b/freebsd/sys/net/if_media.h @@ -264,6 +264,7 @@ uint64_t ifmedia_baudrate(int); #define IFM_IEEE80211_OFDM27 23 /* OFDM 27Mbps */ /* NB: not enough bits to express MCS fully */ #define IFM_IEEE80211_MCS 24 /* HT MCS rate */ +#define IFM_IEEE80211_VHT 25 /* HT MCS rate */ #define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc mode */ #define IFM_IEEE80211_HOSTAP 0x00000200 /* Operate in Host AP mode */ @@ -280,6 +281,8 @@ uint64_t ifmedia_baudrate(int); #define IFM_IEEE80211_FH 0x00040000 /* 2Ghz, GFSK mode */ #define IFM_IEEE80211_11NA 0x00050000 /* 5Ghz, HT mode */ #define IFM_IEEE80211_11NG 0x00060000 /* 2Ghz, HT mode */ +#define IFM_IEEE80211_VHT5G 0x00070000 /* 5Ghz, VHT mode */ +#define IFM_IEEE80211_VHT2G 0x00080000 /* 2Ghz, VHT mode */ /* * ATM @@ -570,6 +573,7 @@ struct ifmedia_description { { IFM_IEEE80211_OFDM4, "OFDM/4.5Mbps" }, \ { IFM_IEEE80211_OFDM27, "OFDM/27Mbps" }, \ { IFM_IEEE80211_MCS, "MCS" }, \ + { IFM_IEEE80211_VHT, "VHT" }, \ { 0, NULL }, \ } @@ -609,6 +613,7 @@ struct ifmedia_description { { IFM_IEEE80211_OFDM4, "OFDM4.5" }, \ { IFM_IEEE80211_OFDM27, "OFDM27" }, \ { IFM_IEEE80211_MCS, "MCS" }, \ + { IFM_IEEE80211_VHT, "VHT" }, \ { 0, NULL }, \ } @@ -631,6 +636,8 @@ struct ifmedia_description { { IFM_IEEE80211_FH, "fh" }, \ { IFM_IEEE80211_11NA, "11na" }, \ { IFM_IEEE80211_11NG, "11ng" }, \ + { IFM_IEEE80211_VHT5G, "11ac" }, \ + { IFM_IEEE80211_VHT2G, "11ac2" }, \ { 0, NULL }, \ } |