summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_hostap.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-10-26 01:04:46 +0000
committersam <sam@FreeBSD.org>2008-10-26 01:04:46 +0000
commitdf1bd7956d87b2f4f2ebdc2a158213f0f9e4af63 (patch)
tree40c4aec4264205ea70874ded60169b7ccb7eca34 /sys/net80211/ieee80211_hostap.c
parentee9b1738af3926a7f536906cb6e6a1431174522f (diff)
downloadFreeBSD-src-df1bd7956d87b2f4f2ebdc2a158213f0f9e4af63.zip
FreeBSD-src-df1bd7956d87b2f4f2ebdc2a158213f0f9e4af63.tar.gz
New ap-side power save implementation; the main change is to allow drivers
to queue frames previously encapsulated on a separate high priority list that is dispatched before the unencapsulated frames (to preserve order).
Diffstat (limited to 'sys/net80211/ieee80211_hostap.c')
-rw-r--r--sys/net80211/ieee80211_hostap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index c0a99a1..1c837f4 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -2171,7 +2171,7 @@ hostap_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0)
{
struct ieee80211vap *vap = ni->ni_vap;
struct ieee80211_frame_min *wh;
- struct ifnet *ifp = vap->iv_ifp;
+ struct ifnet *ifp;
struct mbuf *m;
uint16_t aid;
int qlen;
@@ -2208,7 +2208,7 @@ hostap_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0)
}
/* Okay, take the first queued packet and put it out... */
- IEEE80211_NODE_SAVEQ_DEQUEUE(ni, m, qlen);
+ m = ieee80211_node_psq_dequeue(ni, &qlen);
if (m == NULL) {
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_POWER, wh->i_addr2,
"%s", "recv ps-poll, but queue empty");
@@ -2234,6 +2234,11 @@ hostap_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0)
vap->iv_set_tim(ni, 0);
}
m->m_flags |= M_PWR_SAV; /* bypass PS handling */
+
+ if (m->m_flags & M_ENCAP)
+ ifp = vap->iv_ic->ic_ifp;
+ else
+ ifp = vap->iv_ifp;
IF_ENQUEUE(&ifp->if_snd, m);
if_start(ifp);
}
OpenPOWER on IntegriCloud