summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarcus Glocker <mglocker@cvs.openbsd.org>2007-11-03 14:59:56 +0000
committerMarcus Glocker <mglocker@cvs.openbsd.org>2007-11-03 14:59:56 +0000
commit3569bef6fb08fde3ba865ea9817bae1fb5634632 (patch)
treeba5eae78007bb3a81216668b1f6b6a786b3e1c63 /sys
parentb1c67c8850d5f5e35e1f4fdfb3b73b0bad2bdb57 (diff)
Revert last commit which added ieee80211_rate2plcp() and
ieee80211_plcp2rate() because I've got a late feedback from Damien that he dislike the implementation method a lot.
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211.c50
-rw-r--r--sys/net80211/ieee80211_node.h3
-rw-r--r--sys/net80211/ieee80211_var.h6
3 files changed, 6 insertions, 53 deletions
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 *);