mirror of
https://git.freebsd.org/ports.git
synced 2025-06-07 13:50:38 -04:00
39 lines
1.3 KiB
C
39 lines
1.3 KiB
C
--- src/drivers/driver_bsd.c.orig 2021-06-02 14:11:18.000000000 -0700
|
|
+++ src/drivers/driver_bsd.c 2021-06-13 23:11:15.089256000 -0700
|
|
@@ -853,14 +853,18 @@
|
|
drv = bsd_get_drvindex(global, ifm->ifm_index);
|
|
if (drv == NULL)
|
|
return;
|
|
- if ((ifm->ifm_flags & IFF_UP) == 0 &&
|
|
- (drv->flags & IFF_UP) != 0) {
|
|
+ if (((ifm->ifm_flags & IFF_UP) == 0 ||
|
|
+ (ifm->ifm_flags & IFF_RUNNING) == 0) &&
|
|
+ (drv->flags & IFF_UP) != 0 &&
|
|
+ (drv->flags & IFF_RUNNING) != 0) {
|
|
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",
|
|
drv->ifname);
|
|
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_DISABLED,
|
|
NULL);
|
|
} else if ((ifm->ifm_flags & IFF_UP) != 0 &&
|
|
- (drv->flags & IFF_UP) == 0) {
|
|
+ (ifm->ifm_flags & IFF_RUNNING) != 0 &&
|
|
+ ((drv->flags & IFF_UP) == 0 ||
|
|
+ (drv->flags & IFF_RUNNING) == 0)) {
|
|
wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
|
|
drv->ifname);
|
|
wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_ENABLED,
|
|
@@ -1220,7 +1224,14 @@
|
|
mode = 0 /* STA */;
|
|
break;
|
|
case IEEE80211_MODE_IBSS:
|
|
+ /*
|
|
+ * Ref bin/203086 - FreeBSD's net80211 currently uses
|
|
+ * IFM_IEEE80211_ADHOC.
|
|
+ */
|
|
+#if 0
|
|
mode = IFM_IEEE80211_IBSS;
|
|
+#endif
|
|
+ mode = IFM_IEEE80211_ADHOC;
|
|
break;
|
|
case IEEE80211_MODE_AP:
|
|
mode = IFM_IEEE80211_HOSTAP;
|