Allow the state of the interface to be "up" if the VAP is in SLEEP state.

Without this, the carrier will drop when the NIC transitions to SLEEP
and nothing will ever transmit.
This commit is contained in:
Adrian Chadd 2014-04-23 22:43:39 +00:00
parent c0990edac6
commit 9f098ac76f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264843

View File

@ -1408,7 +1408,8 @@ ieee80211_media_status(struct ifnet *ifp, struct ifmediareq *imr)
* rate only when running; otherwise we may have a mismatch
* in which case the rate will not be convertible.
*/
if (vap->iv_state == IEEE80211_S_RUN) {
if (vap->iv_state == IEEE80211_S_RUN ||
vap->iv_state == IEEE80211_S_SLEEP) {
imr->ifm_status |= IFM_ACTIVE;
mode = ieee80211_chan2mode(ic->ic_curchan);
} else