From owner-svn-src-all@FreeBSD.ORG Mon Jan 25 19:36:49 2010 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 7349810656D5; Mon, 25 Jan 2010 19:36:49 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 623738FC0C; Mon, 25 Jan 2010 19:36:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0PJanfN058152; Mon, 25 Jan 2010 19:36:49 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0PJamD0058150; Mon, 25 Jan 2010 19:36:48 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201001251936.o0PJamD0058150@svn.freebsd.org> From: Rui Paulo Date: Mon, 25 Jan 2010 19:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202986 - head/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: Mon, 25 Jan 2010 19:36:49 -0000 Author: rpaulo Date: Mon Jan 25 19:36:48 2010 New Revision: 202986 URL: http://svn.freebsd.org/changeset/base/202986 Log: o add more notification strings in iwn_intr_str() o sync with OpenBSD code Submitted by: Bernhard Schmidt MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Jan 25 19:27:20 2010 (r202985) +++ head/sys/dev/iwn/if_iwn.c Mon Jan 25 19:36:48 2010 (r202986) @@ -1927,6 +1927,7 @@ iwn_rx_phy(struct iwn_softc *sc, struct struct iwn_rx_stat *stat = (struct iwn_rx_stat *)(desc + 1); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: received PHY stats\n", __func__); + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); /* Save RX statistics, they will be used on MPDU_RX_DONE. */ memcpy(&sc->last_rx_stat, stat, sizeof (*stat)); @@ -2140,6 +2141,7 @@ iwn5000_rx_calib_results(struct iwn_soft if (sc->sc_flags & IWN_FLAG_CALIB_DONE) return; + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); len = (le32toh(desc->len) & 0x3fff) - 4; switch (calib->code) { @@ -2202,6 +2204,7 @@ iwn_rx_statistics(struct iwn_softc *sc, (ic->ic_flags & IEEE80211_F_SCAN)) return; + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: cmd %d\n", __func__, desc->type); iwn_calib_reset(sc); /* Reset TX power calibration timeout. */ @@ -2253,6 +2256,7 @@ iwn4965_tx_done(struct iwn_softc *sc, st stat->btkillcnt, stat->rate, le16toh(stat->duration), le32toh(stat->status)); + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); iwn_tx_done(sc, desc, stat->ackfailcnt, le32toh(stat->status) & 0xff); } @@ -2272,6 +2276,8 @@ iwn5000_tx_done(struct iwn_softc *sc, st /* Reset TX scheduler slot. */ iwn5000_reset_sched(sc, desc->qid & 0xf, desc->idx); #endif + + bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); iwn_tx_done(sc, desc, stat->ackfailcnt, le16toh(stat->status) & 0xff); } @@ -2433,10 +2439,11 @@ iwn_notif_intr(struct iwn_softc *sc) { struct iwn_beacon_missed *miss = (struct iwn_beacon_missed *)(desc + 1); - int misses = le32toh(miss->consecutive); + int misses; bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); + misses = le32toh(miss->consecutive); /* XXX not sure why we're notified w/ zero */ if (misses == 0) @@ -4372,7 +4379,7 @@ iwn_send_sensitivity(struct iwn_softc *s cmd.corr_barker = htole16(190); cmd.corr_barker_mrc = htole16(390); - DPRINTF(sc, IWN_DEBUG_RESET, + DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: set sensitivity %d/%d/%d/%d/%d/%d/%d\n", __func__, calib->ofdm_x1, calib->ofdm_mrc_x1, calib->ofdm_x4, calib->ofdm_mrc_x4, calib->cck_x4, @@ -6388,10 +6395,14 @@ iwn_intr_str(uint8_t cmd) case IWN_CMD_SET_LED: return "IWN_CMD_SET_LED"; case IWN5000_CMD_WIMAX_COEX: return "IWN5000_CMD_WIMAX_COEX"; case IWN5000_CMD_CALIB_CONFIG: return "IWN5000_CMD_CALIB_CONFIG"; + case IWN5000_CMD_CALIB_RESULT: return "IWN5000_CMD_CALIB_RESULT"; + case IWN5000_CMD_CALIB_COMPLETE: return "IWN5000_CMD_CALIB_COMPLETE"; case IWN_CMD_SET_POWER_MODE: return "IWN_CMD_SET_POWER_MODE"; case IWN_CMD_SCAN: return "IWN_CMD_SCAN"; + case IWN_CMD_SCAN_RESULTS: return "IWN_CMD_SCAN_RESULTS"; case IWN_CMD_TXPOWER: return "IWN_CMD_TXPOWER"; case IWN_CMD_TXPOWER_DBM: return "IWN_CMD_TXPOWER_DBM"; + case IWN5000_CMD_TX_ANT_CONFIG: return "IWN5000_CMD_TX_ANT_CONFIG"; case IWN_CMD_BT_COEX: return "IWN_CMD_BT_COEX"; case IWN_CMD_SET_CRITICAL_TEMP: return "IWN_CMD_SET_CRITICAL_TEMP"; case IWN_CMD_SET_SENSITIVITY: return "IWN_CMD_SET_SENSITIVITY"; Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Mon Jan 25 19:27:20 2010 (r202985) +++ head/sys/dev/iwn/if_iwnreg.h Mon Jan 25 19:36:48 2010 (r202986) @@ -421,8 +421,11 @@ struct iwn_tx_cmd { #define IWN_CMD_SET_LED 72 #define IWN5000_CMD_WIMAX_COEX 90 #define IWN5000_CMD_CALIB_CONFIG 101 +#define IWN5000_CMD_CALIB_RESULT 102 +#define IWN5000_CMD_CALIB_COMPLETE 103 #define IWN_CMD_SET_POWER_MODE 119 #define IWN_CMD_SCAN 128 +#define IWN_CMD_SCAN_RESULTS 131 #define IWN_CMD_TXPOWER_DBM 149 #define IWN_CMD_TXPOWER 151 #define IWN5000_CMD_TX_ANT_CONFIG 152