diff options
-rw-r--r-- | share/man/man9/Makefile | 6 | ||||
-rw-r--r-- | share/man/man9/ieee80211.9 | 30 | ||||
-rw-r--r-- | sys/net80211/ieee80211.c | 50 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.h | 3 | ||||
-rw-r--r-- | sys/net80211/ieee80211_var.h | 6 |
5 files changed, 12 insertions, 83 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 64c7a6524fd..04378adc5f4 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.134 2007/11/01 22:34:19 mglocker Exp $ +# $OpenBSD: Makefile,v 1.135 2007/11/03 14:59:55 mglocker Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -139,9 +139,7 @@ MLINKS+=ieee80211.9 ieee80211_ifattach.9 \ ieee80211.9 ieee80211_setmode.9 \ ieee80211.9 ieee80211_chan2mode.9 \ ieee80211.9 ieee80211_rate2media.9 \ - ieee80211.9 ieee80211_media2rate.9 \ - ieee80211.9 ieee80211_rate2plcp.9 \ - ieee80211.9 ieee80211_plcp2rate.9 + ieee80211.9 ieee80211_media2rate.9 MLINKS+=ieee80211_crypto.9 ieee80211_crypto_attach.9 \ ieee80211_crypto.9 ieee80211_crypto_detach.9 \ ieee80211_crypto.9 ieee80211_wep_crypt.9 diff --git a/share/man/man9/ieee80211.9 b/share/man/man9/ieee80211.9 index a3d9ea67def..ef1e83f8a44 100644 --- a/share/man/man9/ieee80211.9 +++ b/share/man/man9/ieee80211.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ieee80211.9,v 1.8 2007/11/02 07:27:51 jmc Exp $ +.\" $OpenBSD: ieee80211.9,v 1.9 2007/11/03 14:59:55 mglocker Exp $ .\" .\" Copyright (c) 2004 Bruce M. Simpson <bms@spc.org> .\" Copyright (c) 2004 Darron Broad <darron@kewl.org> @@ -26,9 +26,9 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man9/ieee80211.9,v 1.3 2004/07/07 12:59:39 ru Exp $ -.\" $Id: ieee80211.9,v 1.8 2007/11/02 07:27:51 jmc Exp $ +.\" $Id: ieee80211.9,v 1.9 2007/11/03 14:59:55 mglocker Exp $ .\" -.Dd $Mdocdate: November 2 2007 $ +.Dd $Mdocdate: November 3 2007 $ .Dt IEEE80211 9 .Os .Sh NAME @@ -37,8 +37,7 @@ .Nm ieee80211_media_init , ieee80211_media_change , ieee80211_media_status , .Nm ieee80211_watchdog , .Nm ieee80211_setmode , ieee80211_chan2mode , -.Nm ieee80211_rate2media , ieee80211_media2rate , -.Nm ieee80211_rate2plcp , ieee80211_plcp2rate +.Nm ieee80211_rate2media , ieee80211_media2rate .Nd core 802.11 network stack functions .Sh SYNOPSIS .In net80211/ieee80211_var.h @@ -77,12 +76,6 @@ .Fc .Ft int .Fn ieee80211_media2rate "int mword" -.Ft u_int8_t -.Fn ieee80211_rate2plcp "struct ieee80211com *ic" "int rate" \ -"enum ieee80211_phymode mode" -.Ft int -.Fn ieee80211_plcp2rate "struct ieee80211com *ic" "u_int8_t plcp" \ -"enum ieee80211_phymode mode" .Sh DESCRIPTION The .Nm ieee80211 @@ -244,21 +237,6 @@ performs the reverse of this conversion, returning the bit rate (in 0.5Mbps units) corresponding to an .Vt ifmedia sub-type. -.Pp -.\" -The -.Fn ieee80211_rate2plcp -function converts the bit rate -.Fa rate -(measured in units of 0.5Mbps) to a -.Vt plcp -signal. -The -.Fn ieee80211_plcp2rate -function performs the reverse of this conversion, -returning the bit rate (in 0.5Mbps units) corresponding to a -.Vt plcp -signal. .\" .Sh SEE ALSO .Xr ifmedia 4 , diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 5875cda0654..51bb6bebe92 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211.c,v 1.26 2007/11/01 22:34:19 mglocker Exp $ */ +/* $OpenBSD: ieee80211.c,v 1.27 2007/11/03 14:59:55 mglocker Exp $ */ /* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */ /*- @@ -594,17 +594,13 @@ ieee80211_watchdog(struct ifnet *ifp) } const struct ieee80211_rateset ieee80211_std_rateset_11a = - { 8, { 12, 18, 24, 36, 48, 72, 96, 108 }, - { 0x0b, 0x0f, 0x0a, 0x0e, 0x09, 0x0d, 0x08, 0x0c } }; + { 8, { 12, 18, 24, 36, 48, 72, 96, 108 } }; const struct ieee80211_rateset ieee80211_std_rateset_11b = - { 4, { 2, 4, 11, 22 }, - { 0x0a, 0x14, 0x37, 0x6e } }; + { 4, { 2, 4, 11, 22 } }; const struct ieee80211_rateset ieee80211_std_rateset_11g = - { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 }, - { 0x0a, 0x14, 0x37, 0x6e, 0x0b, 0x0f, 0x0a, 0x0e, 0x09, 0x0d, 0x08, - 0x0c } }; + { 12, { 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 } }; /* * Mark the basic rates for the 11g rate table based on the @@ -926,41 +922,3 @@ ieee80211_media2rate(int mword) return 0; #undef N } - -/* - * Convert bit rate (in 0.5Mbps units) to PLCP signal and vice versa. - */ -u_int8_t -ieee80211_rate2plcp(struct ieee80211com *ic, int rate, - enum ieee80211_phymode mode) -{ - int i; - - rate &= IEEE80211_RATE_VAL; - - for (i = 0; i < IEEE80211_RATE_MAXSIZE; i++) { - if (ic->ic_sup_rates[mode].rs_rates[i] == rate) - return (ic->ic_sup_rates[mode].rs_plcp[i]); - } - - IEEE80211_DPRINTF(("%s: unsupported rate %u\n", __func__, rate)); - - return (0); -} - -int -ieee80211_plcp2rate(struct ieee80211com *ic, u_int8_t plcp, - enum ieee80211_phymode mode) -{ - int i; - - for (i = 0; i < IEEE80211_RATE_MAXSIZE; i++) { - if (ic->ic_sup_rates[mode].rs_plcp[i] == plcp) - return (ic->ic_sup_rates[mode].rs_rates[i] & - IEEE80211_RATE_VAL); - } - - IEEE80211_DPRINTF(("%s: unsupported plcp %u\n", __func__, plcp)); - - return (0); -} diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 27ef087b9d0..f7d971a78e9 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_node.h,v 1.24 2007/11/01 22:34:19 mglocker Exp $ */ +/* $OpenBSD: ieee80211_node.h,v 1.25 2007/11/03 14:59:55 mglocker Exp $ */ /* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */ /*- @@ -42,7 +42,6 @@ struct ieee80211_rateset { u_int8_t rs_nrates; u_int8_t rs_rates[IEEE80211_RATE_MAXSIZE]; - u_int8_t rs_plcp[IEEE80211_RATE_MAXSIZE]; }; extern const struct ieee80211_rateset ieee80211_std_rateset_11a; diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 5563be06d13..f086f7eb1ca 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_var.h,v 1.34 2007/11/01 22:34:19 mglocker Exp $ */ +/* $OpenBSD: ieee80211_var.h,v 1.35 2007/11/03 14:59:55 mglocker Exp $ */ /* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */ /*- @@ -313,10 +313,6 @@ int ieee80211_fix_rate(struct ieee80211com *, struct ieee80211_node *, int); int ieee80211_rate2media(struct ieee80211com *, int, enum ieee80211_phymode); int ieee80211_media2rate(int); -u_int8_t - ieee80211_rate2plcp(struct ieee80211com *, int, enum ieee80211_phymode); -int ieee80211_plcp2rate(struct ieee80211com *, u_int8_t, - enum ieee80211_phymode mode); u_int ieee80211_mhz2ieee(u_int, u_int); u_int ieee80211_chan2ieee(struct ieee80211com *, const struct ieee80211_channel *); |