void ieee80211_node_saveq_get_info(struct ieee80211_node *ni, ieee80211_node_saveq_info *info) { struct node_powersave_queue *dataq,*mgtq; dataq = IEEE80211_NODE_SAVEQ_DATAQ(ni); mgtq = IEEE80211_NODE_SAVEQ_MGMTQ(ni); IEEE80211_NODE_SAVEQ_LOCK(dataq); IEEE80211_NODE_SAVEQ_LOCK(mgtq); info->data_count = IEEE80211_NODE_SAVEQ_QLEN(dataq); info->mgt_count = IEEE80211_NODE_SAVEQ_QLEN(mgtq); info->data_len = IEEE80211_NODE_SAVEQ_BYTES(dataq); info->mgt_len = IEEE80211_NODE_SAVEQ_BYTES(mgtq); info->ps_frame_count = mgtq->nsq_num_ps_frames; IEEE80211_NODE_SAVEQ_UNLOCK(mgtq); IEEE80211_NODE_SAVEQ_UNLOCK(dataq); }
void ieee80211_node_saveq_get_info(struct ieee80211_node *ni, ieee80211_node_saveq_info *info) { struct node_powersave_queue *dataq,*mgtq; #if LMAC_SUPPORT_POWERSAVE_QUEUE struct ieee80211com *ic = ni->ni_ic; ic->ic_node_pwrsaveq_get_info(ic, ni, info); return; #endif dataq = IEEE80211_NODE_SAVEQ_DATAQ(ni); mgtq = IEEE80211_NODE_SAVEQ_MGMTQ(ni); IEEE80211_NODE_SAVEQ_LOCK(dataq); IEEE80211_NODE_SAVEQ_LOCK(mgtq); info->data_count = IEEE80211_NODE_SAVEQ_QLEN(dataq); info->mgt_count = IEEE80211_NODE_SAVEQ_QLEN(mgtq); info->data_len = IEEE80211_NODE_SAVEQ_BYTES(dataq); info->mgt_len = IEEE80211_NODE_SAVEQ_BYTES(mgtq); info->ps_frame_count = mgtq->nsq_num_ps_frames; IEEE80211_NODE_SAVEQ_UNLOCK(mgtq); IEEE80211_NODE_SAVEQ_UNLOCK(dataq); }