From owner-svn-src-all@FreeBSD.ORG Sat Jun 18 11:31:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9671A1065670; Sat, 18 Jun 2011 11:31:19 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BF9B8FC14; Sat, 18 Jun 2011 11:31:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5IBVJvQ038488; Sat, 18 Jun 2011 11:31:19 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5IBVJdI038486; Sat, 18 Jun 2011 11:31:19 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201106181131.p5IBVJdI038486@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 18 Jun 2011 11:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223237 - stable/8/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2011 11:31:19 -0000 Author: bschmidt Date: Sat Jun 18 11:31:19 2011 New Revision: 223237 URL: http://svn.freebsd.org/changeset/base/223237 Log: MFC r220662: Split out bluetooth coexistence setup. Modified: stable/8/sys/dev/iwn/if_iwn.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sat Jun 18 11:29:44 2011 (r223236) +++ stable/8/sys/dev/iwn/if_iwn.c Sat Jun 18 11:31:19 2011 (r223237) @@ -196,6 +196,7 @@ static void iwn_tune_sensitivity(struct const struct iwn_rx_stats *); static int iwn_send_sensitivity(struct iwn_softc *); static int iwn_set_pslevel(struct iwn_softc *, int, int, int); +static int iwn_send_btcoex(struct iwn_softc *); static int iwn_config(struct iwn_softc *); static uint8_t *ieee80211_add_ssid(uint8_t *, const uint8_t *, u_int); static int iwn_scan(struct iwn_softc *); @@ -4464,12 +4465,25 @@ iwn_set_pslevel(struct iwn_softc *sc, in } static int +iwn_send_btcoex(struct iwn_softc *sc) +{ + struct iwn_bluetooth cmd; + + memset(&cmd, 0, sizeof cmd); + cmd.flags = IWN_BT_COEX_CHAN_ANN | IWN_BT_COEX_BT_PRIO; + cmd.lead_time = IWN_BT_LEAD_TIME_DEF; + cmd.max_kill = IWN_BT_MAX_KILL_DEF; + DPRINTF(sc, IWN_DEBUG_RESET, "%s: configuring bluetooth coexistence\n", + __func__); + return iwn_cmd(sc, IWN_CMD_BT_COEX, &cmd, sizeof(cmd), 0); +} + +static int iwn_config(struct iwn_softc *sc) { const struct iwn_hal *hal = sc->sc_hal; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - struct iwn_bluetooth bluetooth; uint32_t txmask; int error; uint16_t rxchain; @@ -4490,13 +4504,7 @@ iwn_config(struct iwn_softc *sc) } /* Configure bluetooth coexistence. */ - memset(&bluetooth, 0, sizeof bluetooth); - bluetooth.flags = IWN_BT_COEX_CHAN_ANN | IWN_BT_COEX_BT_PRIO; - bluetooth.lead_time = IWN_BT_LEAD_TIME_DEF; - bluetooth.max_kill = IWN_BT_MAX_KILL_DEF; - DPRINTF(sc, IWN_DEBUG_RESET, "%s: config bluetooth coexistence\n", - __func__); - error = iwn_cmd(sc, IWN_CMD_BT_COEX, &bluetooth, sizeof bluetooth, 0); + error = iwn_send_btcoex(sc); if (error != 0) { device_printf(sc->sc_dev, "%s: could not configure bluetooth coexistence, error %d\n",