mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
When anouncing link state changes on an 802.11 interface with a vap,
announce the change on the vap's ifnet instead of the main ifnet. This matches the behavior of other wireless drivers in the tree and allows the default devd configuration to correctly start dhclient automatically after an ndis wireless device associates. MFC after: 2 weeks
This commit is contained in:
parent
5be725d7e8
commit
d9abd30d22
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270830
@ -1710,23 +1710,26 @@ ndis_ticktask(d, xsc)
|
||||
if (sc->ndis_link == 0 &&
|
||||
sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) {
|
||||
sc->ndis_link = 1;
|
||||
NDIS_UNLOCK(sc);
|
||||
if ((sc->ndis_80211 != 0) && (vap != NULL)) {
|
||||
NDIS_UNLOCK(sc);
|
||||
ndis_getstate_80211(sc);
|
||||
ieee80211_new_state(vap, IEEE80211_S_RUN, -1);
|
||||
}
|
||||
NDIS_LOCK(sc);
|
||||
if_link_state_change(sc->ifp, LINK_STATE_UP);
|
||||
NDIS_LOCK(sc);
|
||||
if_link_state_change(vap->iv_ifp, LINK_STATE_UP);
|
||||
} else
|
||||
if_link_state_change(sc->ifp, LINK_STATE_UP);
|
||||
}
|
||||
|
||||
if (sc->ndis_link == 1 &&
|
||||
sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) {
|
||||
sc->ndis_link = 0;
|
||||
NDIS_UNLOCK(sc);
|
||||
if ((sc->ndis_80211 != 0) && (vap != NULL))
|
||||
if ((sc->ndis_80211 != 0) && (vap != NULL)) {
|
||||
NDIS_UNLOCK(sc);
|
||||
ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
|
||||
NDIS_LOCK(sc);
|
||||
if_link_state_change(sc->ifp, LINK_STATE_DOWN);
|
||||
NDIS_LOCK(sc);
|
||||
if_link_state_change(vap->iv_ifp, LINK_STATE_DOWN);
|
||||
} else
|
||||
if_link_state_change(sc->ifp, LINK_STATE_DOWN);
|
||||
}
|
||||
|
||||
NDIS_UNLOCK(sc);
|
||||
|
Loading…
Reference in New Issue
Block a user