From owner-svn-src-stable-10@FreeBSD.ORG Wed Sep 17 18:17:19 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C9117FD; Wed, 17 Sep 2014 18:17:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D3E22CE; Wed, 17 Sep 2014 18:17:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8HIHJfG091640; Wed, 17 Sep 2014 18:17:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8HIHJWF091639; Wed, 17 Sep 2014 18:17:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409171817.s8HIHJWF091639@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 17 Sep 2014 18:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271714 - in stable: 10/sys/dev/if_ndis 9/sys/dev/if_ndis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 18:17:19 -0000 Author: jhb Date: Wed Sep 17 18:17:18 2014 New Revision: 271714 URL: http://svnweb.freebsd.org/changeset/base/271714 Log: MFC 270830: When anouncing link state changes on an 802.11 interface with a vap, announce the change on the vap's ifnet instead of the main ifnet. This matches the behavior of other wireless drivers in the tree and allows the default devd configuration to correctly start dhclient automatically after an ndis wireless device associates. Approved by: re (marius for 10) Modified: stable/10/sys/dev/if_ndis/if_ndis.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/if_ndis/if_ndis.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/if_ndis/if_ndis.c ============================================================================== --- stable/10/sys/dev/if_ndis/if_ndis.c Wed Sep 17 17:43:32 2014 (r271713) +++ stable/10/sys/dev/if_ndis/if_ndis.c Wed Sep 17 18:17:18 2014 (r271714) @@ -1709,23 +1709,26 @@ ndis_ticktask(d, xsc) if (sc->ndis_link == 0 && sc->ndis_sts == NDIS_STATUS_MEDIA_CONNECT) { sc->ndis_link = 1; - NDIS_UNLOCK(sc); if ((sc->ndis_80211 != 0) && (vap != NULL)) { + NDIS_UNLOCK(sc); ndis_getstate_80211(sc); ieee80211_new_state(vap, IEEE80211_S_RUN, -1); - } - NDIS_LOCK(sc); - if_link_state_change(sc->ifp, LINK_STATE_UP); + NDIS_LOCK(sc); + if_link_state_change(vap->iv_ifp, LINK_STATE_UP); + } else + if_link_state_change(sc->ifp, LINK_STATE_UP); } if (sc->ndis_link == 1 && sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) { sc->ndis_link = 0; - NDIS_UNLOCK(sc); - if ((sc->ndis_80211 != 0) && (vap != NULL)) + if ((sc->ndis_80211 != 0) && (vap != NULL)) { + NDIS_UNLOCK(sc); ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); - NDIS_LOCK(sc); - if_link_state_change(sc->ifp, LINK_STATE_DOWN); + NDIS_LOCK(sc); + if_link_state_change(vap->iv_ifp, LINK_STATE_DOWN); + } else + if_link_state_change(sc->ifp, LINK_STATE_DOWN); } NDIS_UNLOCK(sc);