From owner-p4-projects@FreeBSD.ORG Sun Mar 16 03:52:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1CB021065673; Sun, 16 Mar 2008 03:52:54 +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 D03BB106564A for ; Sun, 16 Mar 2008 03:52:53 +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 CEF958FC16 for ; Sun, 16 Mar 2008 03:52:53 +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 m2G3qrdZ017252 for ; Sun, 16 Mar 2008 03:52:53 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G3qr9X017250 for perforce@freebsd.org; Sun, 16 Mar 2008 03:52:53 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 03:52:53 GMT Message-Id: <200803160352.m2G3qr9X017250@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 137823 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: Sun, 16 Mar 2008 03:52:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=137823 Change 137823 by sam@sam_ebb on 2008/03/16 03:52:37 must call iv_reset before checking ENETRESET so the default method can return it and force the legacy path Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#44 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#44 (text+ko) ==== @@ -3311,14 +3311,14 @@ * reload of the hardware state but not a complete re-init; * in that case we use the iv_reset callback. If a device * does not fillin iv_reset then it defaults to one that - * calls the init method--which may be suboptimal. + * returns ENETRESET--which may be suboptimal. */ + if (error == ERESTART) + error = IFNET_IS_UP_RUNNING(ifp) ? vap->iv_reset(vap, cmd) : 0; if (error == ENETRESET) { if (IFNET_IS_UP_RUNNING(ifp)) ieee80211_init(vap); error = 0; - } else if (error == ERESTART) { - error = IFNET_IS_UP_RUNNING(ifp) ? vap->iv_reset(vap, cmd) : 0; } return error; }