summaryrefslogtreecommitdiffstats
path: root/sys/net/if_media.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-04-28 16:35:51 +0000
committersam <sam@FreeBSD.org>2003-04-28 16:35:51 +0000
commita37db6668700646e20198e8605d477205a472821 (patch)
treeee60e8af0c39e6d55f0fa65c34ffc70d6ae4b8ed /sys/net/if_media.c
parent867a1b8a0abf379df1d34ac66dece97af674d6ab (diff)
downloadFreeBSD-src-a37db6668700646e20198e8605d477205a472821.zip
FreeBSD-src-a37db6668700646e20198e8605d477205a472821.tar.gz
o add support for multi-mode devices like 802.11 wireless cards that support
11a/b/g by adding an optional 3-bit mode field o correct the spelling of OFDM (was ODFM) o add an 802.11 subtype option for turbo mode: the phy is clocked at 2x the normal clock rate; note this can be applied to both OFDM in 11a and OFDM in 11g mode (and possibly DS11 in 11b for certain phy's) o add 802.11 CCK aliases for 11b/11g rates--the more common terminology
Diffstat (limited to 'sys/net/if_media.c')
-rw-r--r--sys/net/if_media.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys/net/if_media.c b/sys/net/if_media.c
index 34bb902..2201c97 100644
--- a/sys/net/if_media.c
+++ b/sys/net/if_media.c
@@ -409,6 +409,9 @@ struct ifmedia_description ifm_subtype_ieee80211_descriptions[] =
struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] =
IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS;
+struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] =
+ IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS;
+
struct ifmedia_description ifm_subtype_shared_descriptions[] =
IFM_SUBTYPE_SHARED_DESCRIPTIONS;
@@ -418,25 +421,30 @@ struct ifmedia_description ifm_shared_option_descriptions[] =
struct ifmedia_type_to_subtype {
struct ifmedia_description *subtypes;
struct ifmedia_description *options;
+ struct ifmedia_description *modes;
};
/* must be in the same order as IFM_TYPE_DESCRIPTIONS */
struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = {
{
&ifm_subtype_ethernet_descriptions[0],
- &ifm_subtype_ethernet_option_descriptions[0]
+ &ifm_subtype_ethernet_option_descriptions[0],
+ NULL,
},
{
&ifm_subtype_tokenring_descriptions[0],
- &ifm_subtype_tokenring_option_descriptions[0]
+ &ifm_subtype_tokenring_option_descriptions[0],
+ NULL,
},
{
&ifm_subtype_fddi_descriptions[0],
- &ifm_subtype_fddi_option_descriptions[0]
+ &ifm_subtype_fddi_option_descriptions[0],
+ NULL,
},
{
&ifm_subtype_ieee80211_descriptions[0],
- &ifm_subtype_ieee80211_option_descriptions[0]
+ &ifm_subtype_ieee80211_option_descriptions[0],
+ &ifm_subtype_ieee80211_mode_descriptions[0]
},
};
@@ -462,6 +470,14 @@ ifmedia_printword(ifmw)
}
printf(desc->ifmt_string);
+ /* Any mode. */
+ for (desc = ttos->modes; desc && desc->ifmt_string != NULL; desc++)
+ if (IFM_MODE(ifmw) == desc->ifmt_word) {
+ if (desc->ifmt_string != NULL)
+ printf(" mode %s", desc->ifmt_string);
+ break;
+ }
+
/*
* Check for the shared subtype descriptions first, then the
* type-specific ones.
OpenPOWER on IntegriCloud