net80211: wakeup scan_start() task when null data frame was actually
transmitted - Use M_TXCB mechanism to report about null data frame transmission. - Increase timeout from 1 to 10 ms (the previous one may be not enough for non-empty queue). Tested with: * Intel 3945BG, STA mode. * RTL8188CUS, STA mode. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D5147
This commit is contained in:
parent
551f27f37a
commit
9f82bedaa1
@ -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 */
|
||||
|
||||
|
@ -629,13 +629,9 @@ scan_start(void *arg, int pending)
|
||||
if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) {
|
||||
/* Enable station power save mode */
|
||||
vap->iv_sta_ps(vap, 1);
|
||||
/*
|
||||
* Use an 1ms delay so the null data frame has a chance
|
||||
* to go out.
|
||||
* XXX Should use M_TXCB mechanism to eliminate this.
|
||||
*/
|
||||
/* Wait until null data frame will be ACK'ed */
|
||||
mtx_sleep(vap, IEEE80211_LOCK_OBJ(ic), PCATCH,
|
||||
"sta_ps", msecs_to_ticks(1));
|
||||
"sta_ps", msecs_to_ticks(10));
|
||||
if (ss_priv->ss_iflags & ISCAN_ABORT) {
|
||||
scan_done(ss, 0);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user