From owner-p4-projects@FreeBSD.ORG Thu Mar 27 00:19:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B96DD1065670; Thu, 27 Mar 2008 00:19:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79B7F106564A for ; Thu, 27 Mar 2008 00:19:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCB58FC1B for ; Thu, 27 Mar 2008 00:19:39 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2R0Jd1d013005 for ; Thu, 27 Mar 2008 00:19:39 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2R0Jdis013000 for perforce@freebsd.org; Thu, 27 Mar 2008 00:19:39 GMT (envelope-from sam@freebsd.org) Date: Thu, 27 Mar 2008 00:19:39 GMT Message-Id: <200803270019.m2R0Jdis013000@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 138691 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2008 00:19:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=138691 Change 138691 by sam@sam_ebb on 2008/03/27 00:19:17 o things work much better when interrupts are enabled o clear out yet more cruft Affected files ... .. //depot/projects/vap/sys/dev/wi/if_wi.c#15 edit .. //depot/projects/vap/sys/dev/wi/if_wivar.h#12 edit Differences ... ==== //depot/projects/vap/sys/dev/wi/if_wi.c#15 (text+ko) ==== @@ -367,7 +367,6 @@ switch (sc->sc_firmware_type) { case WI_LUCENT: sc->sc_ntxbuf = 1; - sc->sc_flags |= WI_FLAGS_HAS_MOR; ic->ic_caps |= IEEE80211_C_IBSS; sc->sc_ibss_port = WI_PORTTYPE_BSS; @@ -613,6 +612,9 @@ /* enable port */ wi_cmd(sc, WI_CMD_ENABLE | sc->sc_portnum, 0, 0, 0); sc->sc_enabled = 1; + + /* Enable interrupts */ + CSR_WRITE_2(sc, WI_INT_EN, WI_INTRS); } static int @@ -629,8 +631,6 @@ wi_write_val(sc, WI_RID_ALT_RETRY_CNT, 0); if (sc->sc_flags & WI_FLAGS_HAS_ROAMING) 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); wi_write_rid(sc, WI_RID_MAC_NODE, mac, IEEE80211_ADDR_LEN); @@ -676,13 +676,11 @@ WI_UNLOCK(sc); return; } - wi_enable(sc); /* Enable desired port */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - /* Enable interrupts */ - CSR_WRITE_2(sc, WI_INT_EN, WI_INTRS); + wi_enable(sc); /* Enable desired port */ WI_UNLOCK(sc); ieee80211_start_all(ic); @@ -875,8 +873,6 @@ wi_write_ssid(sc, WI_RID_OWN_SSID, vap->iv_des_ssid[0].ssid, vap->iv_des_ssid[0].len); wi_write_val(sc, WI_RID_OWN_BEACON_INT, ic->ic_bintval); - wi_write_val(sc, WI_RID_BASIC_RATE, 0x03); /* 1, 2 */ - wi_write_val(sc, WI_RID_SUPPORT_RATE, 0x0f); /* 1, 2, 5.5, 11 */ wi_write_val(sc, WI_RID_DTIM_PERIOD, vap->iv_dtim_period); /* XXX: some cards need to be re-enabled for hostap */ ==== //depot/projects/vap/sys/dev/wi/if_wivar.h#12 (text+ko) ==== @@ -115,7 +115,6 @@ int sc_porttype; u_int16_t sc_portnum; - u_int16_t sc_microwave_oven; u_int16_t sc_encryption; u_int16_t sc_monitor_port; @@ -152,10 +151,7 @@ /* maximum consecutive false change-of-BSSID indications */ #define WI_MAX_FALSE_SYNS 10 -#define WI_FLAGS_HAS_MOR 0x0010 #define WI_FLAGS_HAS_ROAMING 0x0020 -#define WI_FLAGS_HAS_DIVERSITY 0x0040 -#define WI_FLAGS_BUG_AUTOINC 0x0100 #define WI_FLAGS_HAS_FRAGTHR 0x0200 #define WI_FLAGS_HAS_DBMADJUST 0x0400