summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net80211/ieee80211_output.c')
-rw-r--r--sys/net80211/ieee80211_output.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 4204680..b2580d1 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -849,6 +849,15 @@ ieee80211_mgmt_output(struct ieee80211_node *ni, struct mbuf *m, int type,
return (ret);
}
+static void
+ieee80211_nulldata_transmitted(struct ieee80211_node *ni, void *arg,
+ int status)
+{
+ struct ieee80211vap *vap = ni->ni_vap;
+
+ wakeup(vap);
+}
+
/*
* Send a null data frame to the specified node. If the station
* is setup for QoS then a QoS Null Data frame is constructed.
@@ -937,6 +946,11 @@ ieee80211_send_nulldata(struct ieee80211_node *ni)
vap->iv_opmode != IEEE80211_M_HOSTAP)
wh->i_fc[1] |= IEEE80211_FC1_PWR_MGT;
}
+ if ((ic->ic_flags & IEEE80211_F_SCAN) &&
+ (ni->ni_flags & IEEE80211_NODE_PWR_MGT)) {
+ ieee80211_add_callback(m, ieee80211_nulldata_transmitted,
+ NULL);
+ }
m->m_len = m->m_pkthdr.len = hdrlen;
m->m_flags |= M_ENCAP; /* mark encapsulated */
OpenPOWER on IntegriCloud