Date: Wed, 26 Mar 2008 23:43:57 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 138685 for review Message-ID: <200803262343.m2QNhv30008459@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=138685 Change 138685 by sam@sam_ebb on 2008/03/26 23:43:50 o set roaming mode to disabled to get intersil card kinda working o cleanup more old cruft that can go away w/ symbol support Affected files ... .. //depot/projects/vap/sys/dev/wi/if_wi.c#14 edit .. //depot/projects/vap/sys/dev/wi/if_wivar.h#11 edit Differences ... ==== //depot/projects/vap/sys/dev/wi/if_wi.c#14 (text+ko) ==== @@ -183,12 +183,10 @@ 0, "control debugging printfs"); #define DPRINTF(X) if (wi_debug) printf X -#define DPRINTF2(X) if (wi_debug > 1) printf X #define IFF_DUMPPKTS(_ifp) \ (((_ifp)->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2)) #else #define DPRINTF(X) -#define DPRINTF2(X) #define IFF_DUMPPKTS(_ifp) 0 #endif @@ -369,11 +367,11 @@ switch (sc->sc_firmware_type) { case WI_LUCENT: sc->sc_ntxbuf = 1; - sc->sc_flags |= WI_FLAGS_HAS_SYSSCALE - | WI_FLAGS_HAS_MOR; + sc->sc_flags |= WI_FLAGS_HAS_MOR; ic->ic_caps |= IEEE80211_C_IBSS; - sc->sc_ibss_port = htole16(1); + sc->sc_ibss_port = WI_PORTTYPE_BSS; + sc->sc_monitor_port = WI_PORTTYPE_ADHOC; sc->sc_min_rssi = WI_LUCENT_MIN_RSSI; sc->sc_max_rssi = WI_LUCENT_MAX_RSSI; sc->sc_dbm_offset = WI_LUCENT_DBM_OFFSET; @@ -381,8 +379,7 @@ case WI_INTERSIL: sc->sc_ntxbuf = WI_NTXBUF; sc->sc_flags |= WI_FLAGS_HAS_FRAGTHR - | WI_FLAGS_HAS_ROAMING - | WI_FLAGS_HAS_SYSSCALE; + | WI_FLAGS_HAS_ROAMING; /* * Old firmware are slow, so give peace a chance. */ @@ -399,7 +396,8 @@ */ ic->ic_caps |= IEEE80211_C_HOSTAP; - sc->sc_ibss_port = htole16(0); + sc->sc_ibss_port = WI_PORTTYPE_IBSS; + sc->sc_monitor_port = WI_PORTTYPE_APSILENT; sc->sc_min_rssi = WI_PRISM_MIN_RSSI; sc->sc_max_rssi = WI_PRISM_MAX_RSSI; sc->sc_dbm_offset = WI_PRISM_DBM_OFFSET; @@ -435,11 +433,7 @@ sc->sc_dbm_offset = le16toh(val); } - sc->sc_max_datalen = 2304; - sc->sc_system_scale = 1; - sc->sc_roaming_mode = 2; /* NB: host decides */ sc->sc_portnum = WI_DEFAULT_PORT; - sc->sc_authtype = WI_DEFAULT_AUTHTYPE; ieee80211_ifattach(ic); ic->ic_raw_xmit = wi_raw_xmit; @@ -544,14 +538,7 @@ sc->sc_porttype = WI_PORTTYPE_HOSTAP; break; case IEEE80211_M_MONITOR: - switch (sc->sc_firmware_type) { - case WI_LUCENT: - sc->sc_porttype = WI_PORTTYPE_ADHOC; - break; - case WI_INTERSIL: - sc->sc_porttype = WI_PORTTYPE_APSILENT; - break; - } + sc->sc_porttype = sc->sc_monitor_port; break; default: break; @@ -637,13 +624,11 @@ wi_write_val(sc, WI_RID_PORTTYPE, sc->sc_porttype); wi_write_val(sc, WI_RID_CREATE_IBSS, 3); /* join only, don't create */ - wi_write_val(sc, WI_RID_MAX_DATALEN, sc->sc_max_datalen); + wi_write_val(sc, WI_RID_MAX_DATALEN, 2304); /* NB: for IEEE80211_BPF_NOACK */ wi_write_val(sc, WI_RID_ALT_RETRY_CNT, 0); - if (sc->sc_flags & WI_FLAGS_HAS_SYSSCALE) - wi_write_val(sc, WI_RID_SYSTEM_SCALE, sc->sc_system_scale); if (sc->sc_flags & WI_FLAGS_HAS_ROAMING) - wi_write_val(sc, WI_RID_ROAMING_MODE, sc->sc_roaming_mode); + wi_write_val(sc, WI_RID_ROAMING_MODE, 3); /* NB: disabled */ if (sc->sc_flags & WI_FLAGS_HAS_MOR) wi_write_val(sc, WI_RID_MICROWAVE_OVEN, sc->sc_microwave_oven); @@ -746,12 +731,6 @@ ic->ic_flags & IEEE80211_F_SCAN ? "" : "!")); WI_LOCK(sc); - /* - * Don't force the channel if we're not scanning; we may - * be called back on entering the AUTH and/or RUN state - * but the firmware gets unhappy as it's join primitive - * handles the channel change. - */ wi_write_val(sc, WI_RID_OWN_CHNL, ieee80211_chan2ieee(ic, ic->ic_curchan)); #if NBPFILTER > 0 @@ -776,14 +755,7 @@ /* * Switch device to monitor mode. */ - switch (sc->sc_firmware_type) { - case WI_LUCENT: - wi_write_val(sc, WI_RID_PORTTYPE, WI_PORTTYPE_ADHOC); - break; - case WI_INTERSIL: - wi_write_val(sc, WI_RID_PORTTYPE, WI_PORTTYPE_APSILENT); - break; - } + wi_write_val(sc, WI_RID_PORTTYPE, sc->sc_monitor_port); if (sc->sc_firmware_type == WI_INTERSIL) { wi_cmd(sc, WI_CMD_DISABLE | WI_PORT0, 0, 0, 0); wi_cmd(sc, WI_CMD_ENABLE | WI_PORT0, 0, 0, 0); @@ -894,10 +866,9 @@ wi_write_txrate(sc, vap); /* Configure WEP. */ - if (ic->ic_caps & IEEE80211_C_WEP) { - sc->sc_cnfauthmode = vap->iv_bss->ni_authmode; + if (ic->ic_caps & IEEE80211_C_WEP) wi_write_wep(sc, vap); - } else + else sc->sc_encryption = 0; /* NB: only Intersil supports HOSTAP so this works for now */ ==== //depot/projects/vap/sys/dev/wi/if_wivar.h#11 (text+ko) ==== @@ -115,13 +115,9 @@ int sc_porttype; u_int16_t sc_portnum; - u_int16_t sc_max_datalen; - u_int16_t sc_system_scale; - u_int16_t sc_cnfauthmode; - u_int16_t sc_roaming_mode; u_int16_t sc_microwave_oven; - u_int16_t sc_authtype; u_int16_t sc_encryption; + u_int16_t sc_monitor_port; /* RSSI interpretation */ u_int16_t sc_min_rssi; /* clamp sc_min_rssi < RSSI */ @@ -159,7 +155,6 @@ #define WI_FLAGS_HAS_MOR 0x0010 #define WI_FLAGS_HAS_ROAMING 0x0020 #define WI_FLAGS_HAS_DIVERSITY 0x0040 -#define WI_FLAGS_HAS_SYSSCALE 0x0080 #define WI_FLAGS_BUG_AUTOINC 0x0100 #define WI_FLAGS_HAS_FRAGTHR 0x0200 #define WI_FLAGS_HAS_DBMADJUST 0x0400
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803262343.m2QNhv30008459>