From owner-svn-src-stable@FreeBSD.ORG Sat Oct 25 15:14:20 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20074738; Sat, 25 Oct 2014 15:14:20 +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 0B98420B; Sat, 25 Oct 2014 15:14:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9PFEJvE058849; Sat, 25 Oct 2014 15:14:19 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9PFEJmp058848; Sat, 25 Oct 2014 15:14:19 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201410251514.s9PFEJmp058848@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sat, 25 Oct 2014 15:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r273637 - stable/9/sys/dev/usb/wlan X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2014 15:14:20 -0000 Author: kevlo Date: Sat Oct 25 15:14:19 2014 New Revision: 273637 URL: https://svnweb.freebsd.org/changeset/base/273637 Log: MFC r270643, r273448: - Fix typo: s/mac_rev/mac_ver/ - Fix the kernel panic in hostap mode. rvp->beacon_mbuf was NULL in run_update_beacon(). Modified: stable/9/sys/dev/usb/wlan/if_run.c (contents, props changed) Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Oct 25 15:06:09 2014 (r273636) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Oct 25 15:14:19 2014 (r273637) @@ -4910,6 +4910,12 @@ run_update_beacon(struct ieee80211vap *v } setbit(rvp->bo.bo_flags, item); + if (rvp->beacon_mbuf == NULL) { + rvp->beacon_mbuf = ieee80211_beacon_alloc(vap->iv_bss, + &rvp->bo); + if (rvp->beacon_mbuf == NULL) + return; + } ieee80211_beacon_update(vap->iv_bss, &rvp->bo, rvp->beacon_mbuf, mcast); i = RUN_CMDQ_GET(&sc->cmdq_store); @@ -5487,7 +5493,7 @@ run_rt3070_rf_init(struct run_softc *sc) run_rt3070_rf_write(sc, 17, rf); } - if (sc->mac_rev == 0x3071) { + if (sc->mac_ver == 0x3071) { run_rt3070_rf_read(sc, 1, &rf); rf &= ~(RT3070_RX0_PD | RT3070_TX0_PD); rf |= RT3070_RF_BLOCK | RT3070_RX1_PD | RT3070_TX1_PD;