Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev add support(?) for PC4500 which is a 2Mbps product.
details: https://anonhg.NetBSD.org/src/rev/d901024b057f
branches: trunk
changeset: 500444:d901024b057f
user: onoe <onoe%NetBSD.org@localhost>
date: Tue Dec 12 05:34:02 2000 +0000
description:
add support(?) for PC4500 which is a 2Mbps product.
Though ifconfig -m no longer show 5Mbps/11Mbps for PC4500 by this fix,
I cannot find how to set fixed transmit speed to the firmware.
FreeBSD version of driver apparently ignore the value set by ancontrol(8).
diffstat:
sys/dev/ic/an.c | 46 ++++++++++++++++++++++++++++++------------
sys/dev/pcmcia/if_an_pcmcia.c | 4 ++-
2 files changed, 36 insertions(+), 14 deletions(-)
diffs (92 lines):
diff -r acfc97fdafed -r d901024b057f sys/dev/ic/an.c
--- a/sys/dev/ic/an.c Tue Dec 12 05:26:38 2000 +0000
+++ b/sys/dev/ic/an.c Tue Dec 12 05:34:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: an.c,v 1.4 2000/12/12 05:11:15 onoe Exp $ */
+/* $NetBSD: an.c,v 1.5 2000/12/12 05:34:02 onoe Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul%ctr.columbia.edu@localhost>. All rights reserved.
@@ -212,6 +212,7 @@
{
struct ifnet *ifp = &sc->arpcom.ec_if;
#ifdef IFM_IEEE80211
+ int i, mtype;
struct ifmediareq imr;
#endif
@@ -294,18 +295,32 @@
#ifdef IFM_IEEE80211
ifmedia_init(&sc->sc_media, 0, an_media_change, an_media_status);
-#define ADD(m, o) ifmedia_add(&sc->sc_media, IFM_MAKEWORD(IFM_IEEE80211, (m), (o), 0), 0, NULL)
- ADD(IFM_AUTO, 0);
- ADD(IFM_AUTO, IFM_IEEE80211_ADHOC);
- ADD(IFM_IEEE80211_DS1, 0);
- ADD(IFM_IEEE80211_DS1, IFM_IEEE80211_ADHOC);
- ADD(IFM_IEEE80211_DS2, 0);
- ADD(IFM_IEEE80211_DS2, IFM_IEEE80211_ADHOC);
- ADD(IFM_IEEE80211_DS5, 0);
- ADD(IFM_IEEE80211_DS5, IFM_IEEE80211_ADHOC);
- ADD(IFM_IEEE80211_DS11, 0);
- ADD(IFM_IEEE80211_DS11, IFM_IEEE80211_ADHOC);
-#undef ADD
+ ifmedia_add(&sc->sc_media, IFM_MAKEWORD(IFM_IEEE80211, IFM_AUTO,
+ 0, 0), 0, NULL);
+ ifmedia_add(&sc->sc_media, IFM_MAKEWORD(IFM_IEEE80211, IFM_AUTO,
+ IFM_IEEE80211_ADHOC, 0), 0, NULL);
+ for (i = 0; i < sizeof(sc->an_caps.an_rates); i++) {
+ switch (sc->an_caps.an_rates[i]) {
+ case AN_RATE_1MBPS:
+ mtype = IFM_IEEE80211_DS1;
+ break;
+ case AN_RATE_2MBPS:
+ mtype = IFM_IEEE80211_DS2;
+ break;
+ case AN_RATE_5_5MBPS:
+ mtype = IFM_IEEE80211_DS5;
+ break;
+ case AN_RATE_11MBPS:
+ mtype = IFM_IEEE80211_DS11;
+ break;
+ default:
+ continue;
+ }
+ ifmedia_add(&sc->sc_media, IFM_MAKEWORD(IFM_IEEE80211, mtype,
+ 0, 0), 0, NULL);
+ ifmedia_add(&sc->sc_media, IFM_MAKEWORD(IFM_IEEE80211, mtype,
+ IFM_IEEE80211_ADHOC, 0), 0, NULL);
+ }
an_media_status(ifp, &imr);
ifmedia_set(&sc->sc_media, imr.ifm_active);
#endif
@@ -1103,6 +1118,11 @@
sc->an_config.an_opmode = AN_OPMODE_IBSS_ADHOC;
else
sc->an_config.an_opmode = AN_OPMODE_INFRASTRUCTURE_STATION;
+ /*
+ * XXX: how to set txrate for the firmware?
+ * There is a struct defined as an_txframe, which is used nowhere.
+ * Perhaps we need to change the transmit mode from 802.3 to native.
+ */
if (sc->sc_enabled)
an_init(ifp);
return error;
diff -r acfc97fdafed -r d901024b057f sys/dev/pcmcia/if_an_pcmcia.c
--- a/sys/dev/pcmcia/if_an_pcmcia.c Tue Dec 12 05:26:38 2000 +0000
+++ b/sys/dev/pcmcia/if_an_pcmcia.c Tue Dec 12 05:34:02 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_an_pcmcia.c,v 1.3 2000/12/12 05:11:16 onoe Exp $ */
+/* $NetBSD: if_an_pcmcia.c,v 1.4 2000/12/12 05:34:02 onoe Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -123,6 +123,8 @@
} an_pcmcia_products[] = {
{ PCMCIA_VENDOR_AIRONET, PCMCIA_PRODUCT_AIRONET_PC4800,
PCMCIA_CIS_AIRONET_PC4800, PCMCIA_STR_AIRONET_PC4800 },
+ { PCMCIA_VENDOR_AIRONET, PCMCIA_PRODUCT_AIRONET_PC4500,
+ PCMCIA_CIS_AIRONET_PC4500, PCMCIA_STR_AIRONET_PC4500 },
{ 0, 0,
{ NULL, NULL, NULL, NULL }, NULL }
};
Home |
Main Index |
Thread Index |
Old Index