summaryrefslogtreecommitdiffstats
path: root/sys/dev/iwn
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2010-01-25 19:36:48 +0000
committerrpaulo <rpaulo@FreeBSD.org>2010-01-25 19:36:48 +0000
commit03ff497455ffa7fe810e1fb42d95a0e867cb4294 (patch)
tree0e3aefe5ac904bdfc7123c4e280bd3cf82ec069b /sys/dev/iwn
parent4ac34cbf90d631bda5ab7745c48093ba012fabf6 (diff)
downloadFreeBSD-src-03ff497455ffa7fe810e1fb42d95a0e867cb4294.zip
FreeBSD-src-03ff497455ffa7fe810e1fb42d95a0e867cb4294.tar.gz
o add more notification strings in iwn_intr_str()
o sync with OpenBSD code Submitted by: Bernhard Schmidt <bschmidt at techwires.net> MFC after: 3 days
Diffstat (limited to 'sys/dev/iwn')
-rw-r--r--sys/dev/iwn/if_iwn.c15
-rw-r--r--sys/dev/iwn/if_iwnreg.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 3eab670..bbd8dd9 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -1927,6 +1927,7 @@ iwn_rx_phy(struct iwn_softc *sc, struct iwn_rx_desc *desc,
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_softc *sc, struct iwn_rx_desc *desc,
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, struct iwn_rx_desc *desc,
(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, struct iwn_rx_desc *desc,
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, struct iwn_rx_desc *desc,
/* 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 *sc)
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";
diff --git a/sys/dev/iwn/if_iwnreg.h b/sys/dev/iwn/if_iwnreg.h
index 08ef36c..0aa7669 100644
--- a/sys/dev/iwn/if_iwnreg.h
+++ b/sys/dev/iwn/if_iwnreg.h
@@ -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
OpenPOWER on IntegriCloud