Date: Fri, 12 Nov 2004 00:40:11 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 64925 for review Message-ID: <200411120040.iAC0eBtb052861@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=64925 Change 64925 by sam@sam_ebb on 2004/11/12 00:39:26 code shuffle; move erp code together in protocol area Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211.c#6 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.c#12 edit .. //depot/projects/wifi/sys/net80211/ieee80211_node.h#9 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#5 edit .. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#4 edit .. //depot/projects/wifi/sys/net80211/ieee80211_var.h#8 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211.c#6 (text+ko) ==== @@ -833,38 +833,6 @@ } /* - * Reset 11g-related state. - */ -void -ieee80211_reset_erp(struct ieee80211com *ic) -{ - ic->ic_flags &= ~IEEE80211_F_USEPROT; - ic->ic_nonerpsta = 0; - ic->ic_longslotsta = 0; - /* - * Short slot time is enabled only when operating in 11g - * and not in an IBSS. We must also honor whether or not - * the driver is capable of doing it. - */ - ieee80211_set_shortslottime(ic, - ic->ic_curmode == IEEE80211_MODE_11A || - (ic->ic_curmode == IEEE80211_MODE_11G && - ic->ic_opmode == IEEE80211_M_HOSTAP && - (ic->ic_caps & IEEE80211_C_SHSLOT))); - /* - * Set short preamble and ERP barker-preamble flags. - */ - if (ic->ic_curmode == IEEE80211_MODE_11A || - (ic->ic_caps & IEEE80211_C_SHPREAMBLE)) { - ic->ic_flags |= IEEE80211_F_SHPREAMBLE; - ic->ic_flags &= ~IEEE80211_F_USEBARKER; - } else { - ic->ic_flags &= ~IEEE80211_F_SHPREAMBLE; - ic->ic_flags |= IEEE80211_F_USEBARKER; - } -} - -/* * Return the phy mode for with the specified channel so the * caller can select a rate set. This is problematic for channels * where multiple operating modes are possible (e.g. 11g+11b). ==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#12 (text+ko) ==== @@ -1553,21 +1553,6 @@ ieee80211_free_node(ni); } -/* - * Set the short slot time state and notify the driver. - */ -void -ieee80211_set_shortslottime(struct ieee80211com *ic, int onoff) -{ - if (onoff) - ic->ic_flags |= IEEE80211_F_SHSLOT; - else - ic->ic_flags &= ~IEEE80211_F_SHSLOT; - /* notify driver */ - if (ic->ic_updateslot != NULL) - ic->ic_updateslot(ic->ic_ifp); -} - u_int8_t ieee80211_getrssi(struct ieee80211com *ic) { ==== //depot/projects/wifi/sys/net80211/ieee80211_node.h#9 (text+ko) ==== @@ -300,6 +300,5 @@ struct ieee80211_node *, int); extern void ieee80211_node_leave(struct ieee80211com *, struct ieee80211_node *); -extern void ieee80211_set_shortslottime(struct ieee80211com *, int onoff); extern u_int8_t ieee80211_getrssi(struct ieee80211com *ic); #endif /* _NET80211_IEEE80211_NODE_H_ */ ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#5 (text+ko) ==== @@ -405,6 +405,53 @@ } /* + * Reset 11g-related state. + */ +void +ieee80211_reset_erp(struct ieee80211com *ic) +{ + ic->ic_flags &= ~IEEE80211_F_USEPROT; + ic->ic_nonerpsta = 0; + ic->ic_longslotsta = 0; + /* + * Short slot time is enabled only when operating in 11g + * and not in an IBSS. We must also honor whether or not + * the driver is capable of doing it. + */ + ieee80211_set_shortslottime(ic, + ic->ic_curmode == IEEE80211_MODE_11A || + (ic->ic_curmode == IEEE80211_MODE_11G && + ic->ic_opmode == IEEE80211_M_HOSTAP && + (ic->ic_caps & IEEE80211_C_SHSLOT))); + /* + * Set short preamble and ERP barker-preamble flags. + */ + if (ic->ic_curmode == IEEE80211_MODE_11A || + (ic->ic_caps & IEEE80211_C_SHPREAMBLE)) { + ic->ic_flags |= IEEE80211_F_SHPREAMBLE; + ic->ic_flags &= ~IEEE80211_F_USEBARKER; + } else { + ic->ic_flags &= ~IEEE80211_F_SHPREAMBLE; + ic->ic_flags |= IEEE80211_F_USEBARKER; + } +} + +/* + * Set the short slot time state and notify the driver. + */ +void +ieee80211_set_shortslottime(struct ieee80211com *ic, int onoff) +{ + if (onoff) + ic->ic_flags |= IEEE80211_F_SHSLOT; + else + ic->ic_flags &= ~IEEE80211_F_SHSLOT; + /* notify driver */ + if (ic->ic_updateslot != NULL) + ic->ic_updateslot(ic->ic_ifp); +} + +/* * Check if the specified rate set supports ERP. * NB: the rate set is assumed to be sorted. */ ==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#4 (text+ko) ==== @@ -67,6 +67,9 @@ extern void ieee80211_pwrsave(struct ieee80211com *, struct ieee80211_node *, struct mbuf *); +extern void ieee80211_reset_erp(struct ieee80211com *); +extern void ieee80211_set_shortslottime(struct ieee80211com *, int onoff); + /* * Return the size of the 802.11 header for a management or data frame. */ ==== //depot/projects/wifi/sys/net80211/ieee80211_var.h#8 (text+ko) ==== @@ -356,7 +356,6 @@ u_int ieee80211_chan2ieee(struct ieee80211com *, struct ieee80211_channel *); u_int ieee80211_ieee2mhz(u_int, u_int); int ieee80211_setmode(struct ieee80211com *, enum ieee80211_phymode); -void ieee80211_reset_erp(struct ieee80211com *); enum ieee80211_phymode ieee80211_chan2mode(struct ieee80211com *, struct ieee80211_channel *);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411120040.iAC0eBtb052861>