From 91ca08d44e7637c72478b0d37d80a43a011c58ac Mon Sep 17 00:00:00 2001 From: dyoung Date: Mon, 13 Oct 2003 04:23:56 +0000 Subject: [PATCH] Add Kevin Lahey's power-saving support from the old 802.11 layer --- sys/net80211/ieee80211_proto.c | 6 ++++-- sys/net80211/ieee80211_proto.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 81ae813f3f75..72ce9ada2387 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_proto.c,v 1.4 2003/09/28 02:35:20 dyoung Exp $ */ +/* $NetBSD: ieee80211_proto.c,v 1.5 2003/10/13 04:23:56 dyoung Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -35,7 +35,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.3 2003/07/20 21:36:08 sam Exp $"); #else -__KERNEL_RCSID(0, "$NetBSD: ieee80211_proto.c,v 1.4 2003/09/28 02:35:20 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ieee80211_proto.c,v 1.5 2003/10/13 04:23:56 dyoung Exp $"); #endif /* @@ -143,6 +143,7 @@ ieee80211_proto_detach(struct ifnet *ifp) mtx_destroy(&ic->ic_mgtq.ifq_mtx); #else IF_PURGE(&ic->ic_mgtq); + IF_PURGE(&ic->ic_pwrsaveq); #endif } @@ -378,6 +379,7 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int mgt IF_DRAIN(&ic->ic_mgtq); #else IF_PURGE(&ic->ic_mgtq); + IF_PURGE(&ic->ic_pwrsaveq); #endif if (ic->ic_wep_ctx != NULL) { free(ic->ic_wep_ctx, M_DEVBUF); diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h index c73de0d2525a..ddd206db180b 100644 --- a/sys/net80211/ieee80211_proto.h +++ b/sys/net80211/ieee80211_proto.h @@ -1,4 +1,4 @@ -/* $NetBSD: ieee80211_proto.h,v 1.2 2003/09/14 01:14:55 dyoung Exp $ */ +/* $NetBSD: ieee80211_proto.h,v 1.3 2003/10/13 04:23:56 dyoung Exp $ */ /*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting @@ -65,6 +65,8 @@ extern int ieee80211_send_mgmt(struct ieee80211com *, struct ieee80211_node *, int, int); extern struct mbuf *ieee80211_encap(struct ifnet *, struct mbuf *, struct ieee80211_node **); +extern void ieee80211_pwrsave(struct ieee80211com *, struct ieee80211_node *, + struct mbuf *); extern struct mbuf *ieee80211_decap(struct ifnet *, struct mbuf *); extern u_int8_t *ieee80211_add_rates(u_int8_t *frm, const struct ieee80211_rateset *);