From owner-p4-projects@FreeBSD.ORG Mon Jan 28 00:08:38 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4313416A468; Mon, 28 Jan 2008 00:08:38 +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 089FB16A419 for ; Mon, 28 Jan 2008 00:08:38 +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 ED49013C45D for ; Mon, 28 Jan 2008 00:08:37 +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 m0S08bpn066756 for ; Mon, 28 Jan 2008 00:08:37 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0S08bBZ066753 for perforce@freebsd.org; Mon, 28 Jan 2008 00:08:37 GMT (envelope-from sam@freebsd.org) Date: Mon, 28 Jan 2008 00:08:37 GMT Message-Id: <200801280008.m0S08bBZ066753@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 134261 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: Mon, 28 Jan 2008 00:08:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=134261 Change 134261 by sam@sam_ebb on 2008/01/28 00:08:13 rt2560_reset is wrong; channel changes happen through a different callback and returning ENETRESET when we cannot handle the request is wrong and screws up ioctls Affected files ... .. //depot/projects/vap/sys/dev/ral/rt2560.c#8 edit Differences ... ==== //depot/projects/vap/sys/dev/ral/rt2560.c#8 (text) ==== @@ -132,7 +132,6 @@ struct ieee80211_node *); static void rt2560_start(struct ifnet *); static void rt2560_watchdog(void *); -static int rt2560_reset(struct ieee80211vap *); static int rt2560_ioctl(struct ifnet *, u_long, caddr_t); static void rt2560_bbp_write(struct rt2560_softc *, uint8_t, uint8_t); @@ -387,7 +386,6 @@ /* enable s/w bmiss handling for sta mode */ ieee80211_vap_setup(ic, vap, name, unit, opmode, flags | IEEE80211_CLONE_NOBEACONS, bssid, mac); - vap->iv_reset = rt2560_reset; /* override state transition machine */ rvp->ral_newstate = vap->iv_newstate; @@ -2066,25 +2064,6 @@ } } -/* - * This function allows for fast channel switching in monitor mode (used by - * net-mgmt/kismet). In IBSS mode, we must explicitly reset the interface to - * generate a new beacon frame. - */ -static int -rt2560_reset(struct ieee80211vap *vap) -{ - struct ieee80211com *ic = vap->iv_ic; - struct rt2560_softc *sc = ic->ic_ifp->if_softc; - - if (vap->iv_opmode != IEEE80211_M_MONITOR) - return ENETRESET; - - rt2560_set_chan(sc, ic->ic_curchan); - - return 0; -} - static int rt2560_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) {