Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163481920
D47533.id146337.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D47533.id146337.diff
View Options
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2624,6 +2624,7 @@
qlnx_ioctl(if_t ifp, u_long cmd, caddr_t data)
{
int ret = 0, mask;
+ int flags;
struct ifreq *ifr = (struct ifreq *)data;
#ifdef INET
struct ifaddr *ifa = (struct ifaddr *)data;
@@ -2677,15 +2678,16 @@
QL_DPRINT4(ha, "SIOCSIFFLAGS (0x%lx)\n", cmd);
QLNX_LOCK(ha);
+ flags = if_getflags(ifp);
- if (if_getflags(ifp) & IFF_UP) {
+ if (flags & IFF_UP) {
if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) {
- if ((if_getflags(ifp) ^ ha->if_flags) &
+ if ((flags ^ ha->if_flags) &
IFF_PROMISC) {
- ret = qlnx_set_promisc(ha, ifp->if_flags & IFF_PROMISC);
+ ret = qlnx_set_promisc(ha, flags & IFF_PROMISC);
} else if ((if_getflags(ifp) ^ ha->if_flags) &
IFF_ALLMULTI) {
- ret = qlnx_set_allmulti(ha, ifp->if_flags & IFF_ALLMULTI);
+ ret = qlnx_set_allmulti(ha, flags & IFF_ALLMULTI);
}
} else {
ha->max_frame_size = if_getmtu(ifp) +
@@ -7055,12 +7057,14 @@
{
int rc = 0;
uint8_t filter;
- const struct ifnet *ifp = ha->ifp;
+ const if_t ifp = ha->ifp;
+ const struct ifaddr *ifa;
struct sockaddr_dl *sdl;
- if (ifp->if_type == IFT_ETHER && ifp->if_addr != NULL &&
- ifp->if_addr->ifa_addr != NULL) {
- sdl = (struct sockaddr_dl *) ifp->if_addr->ifa_addr;
+ ifa = if_getifaddr(ifp);
+ if (if_gettype(ifp) == IFT_ETHER && ifa != NULL &&
+ ifa->ifa_addr != NULL) {
+ sdl = (struct sockaddr_dl *) ifa->ifa_addr;
rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, LLADDR(sdl));
} else {
@@ -7077,10 +7081,10 @@
ECORE_ACCEPT_MCAST_MATCHED |
ECORE_ACCEPT_BCAST;
- if (qlnx_vf_device(ha) == 0 || (ha->ifp->if_flags & IFF_PROMISC)) {
+ if (qlnx_vf_device(ha) == 0 || (if_getflags(ha->ifp) & IFF_PROMISC)) {
filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
filter |= ECORE_ACCEPT_MCAST_UNMATCHED;
- } else if (ha->ifp->if_flags & IFF_ALLMULTI) {
+ } else if (if_getflags(ha->ifp) & IFF_ALLMULTI) {
filter |= ECORE_ACCEPT_MCAST_UNMATCHED;
}
ha->filter = filter;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 3:25 PM (57 m, 16 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35426271
Default Alt Text
D47533.id146337.diff (2 KB)
Attached To
Mode
D47533: qlnx: Convert recent changes to IfAPI
Attached
Detach File
Event Timeline
Log In to Comment