Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net80211/ieee80211_output.c
Show First 20 Lines • Show All 843 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
IEEE80211_NODE_STAT(ni, tx_mgmt); | IEEE80211_NODE_STAT(ni, tx_mgmt); | ||||
ret = ieee80211_raw_output(vap, ni, m, params); | ret = ieee80211_raw_output(vap, ni, m, params); | ||||
IEEE80211_TX_UNLOCK(ic); | IEEE80211_TX_UNLOCK(ic); | ||||
return (ret); | 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 | * Send a null data frame to the specified node. If the station | ||||
* is setup for QoS then a QoS Null Data frame is constructed. | * is setup for QoS then a QoS Null Data frame is constructed. | ||||
* If this is a WDS station then a 4-address frame is constructed. | * If this is a WDS station then a 4-address frame is constructed. | ||||
* | * | ||||
* NB: the caller is assumed to have setup a node reference | * NB: the caller is assumed to have setup a node reference | ||||
* for use; this is necessary to deal with a race condition | * for use; this is necessary to deal with a race condition | ||||
* when probing for inactive stations. Like ieee80211_mgmt_output | * when probing for inactive stations. Like ieee80211_mgmt_output | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | ieee80211_send_setup(ni, m, | ||||
IEEE80211_NONQOS_TID, | IEEE80211_NONQOS_TID, | ||||
vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); | vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); | ||||
} | } | ||||
if (vap->iv_opmode != IEEE80211_M_WDS) { | if (vap->iv_opmode != IEEE80211_M_WDS) { | ||||
/* NB: power management bit is never sent by an AP */ | /* NB: power management bit is never sent by an AP */ | ||||
if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && | if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && | ||||
vap->iv_opmode != IEEE80211_M_HOSTAP) | vap->iv_opmode != IEEE80211_M_HOSTAP) | ||||
wh->i_fc[1] |= IEEE80211_FC1_PWR_MGT; | 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_len = m->m_pkthdr.len = hdrlen; | ||||
m->m_flags |= M_ENCAP; /* mark encapsulated */ | m->m_flags |= M_ENCAP; /* mark encapsulated */ | ||||
M_WME_SETAC(m, WME_AC_BE); | M_WME_SETAC(m, WME_AC_BE); | ||||
IEEE80211_NODE_STAT(ni, tx_data); | IEEE80211_NODE_STAT(ni, tx_data); | ||||
▲ Show 20 Lines • Show All 2,547 Lines • Show Last 20 Lines |