-/* $OpenBSD: ath.c,v 1.114 2017/04/11 14:43:49 dhill Exp $ */
+/* $OpenBSD: ath.c,v 1.115 2017/05/31 09:17:39 stsp Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
__func__, ni->ni_intval, nexttbtt));
if (ic->ic_opmode == IEEE80211_M_STA) {
HAL_BEACON_STATE bs;
- u_int32_t bmisstime;
/* NB: no PCF support right now */
bzero(&bs, sizeof(bs));
bs.bs_nextdtim = nexttbtt;
/*
* Calculate the number of consecutive beacons to miss
- * before taking a BMISS interrupt. The configuration
- * is specified in ms, so we need to convert that to
- * TU's and then calculate based on the beacon interval.
- * Note that we clamp the result to at most 10 beacons.
+ * before taking a BMISS interrupt.
+ * Note that we clamp the result to at most 7 beacons.
*/
- bmisstime = MAX(7, ic->ic_bmisstimeout);
- bs.bs_bmissthreshold = howmany(bmisstime, intval);
+ bs.bs_bmissthreshold = ic->ic_bmissthres;
if (bs.bs_bmissthreshold > 7) {
bs.bs_bmissthreshold = 7;
} else if (bs.bs_bmissthreshold <= 0) {
-/* $OpenBSD: if_iwm.c,v 1.186 2017/05/31 08:33:11 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.187 2017/05/31 09:17:39 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
struct iwm_rx_data *data)
{
struct ieee80211com *ic = &sc->sc_ic;
- int bmiss_threshold = ic->ic_bmisstimeout / ic->ic_lintval;
struct iwm_missed_beacons_notif *mbn = (void *)pkt->data;
if ((ic->ic_opmode != IEEE80211_M_STA) ||
bus_dmamap_sync(sc->sc_dmat, data->map, sizeof(*pkt),
sizeof(*mbn), BUS_DMASYNC_POSTREAD);
- if (mbn->consec_missed_beacons_since_last_rx > bmiss_threshold) {
+ if (mbn->consec_missed_beacons_since_last_rx > ic->ic_bmissthres) {
/*
* Rather than go directly to scan state, try to send a
* directed probe request first. If that fails then the
-/* $OpenBSD: ieee80211.c,v 1.60 2017/05/30 16:21:55 stsp Exp $ */
+/* $OpenBSD: ieee80211.c,v 1.61 2017/05/31 09:17:39 stsp Exp $ */
/* $NetBSD: ieee80211.c,v 1.19 2004/06/06 05:45:29 dyoung Exp $ */
/*-
if (ic->ic_lintval == 0)
ic->ic_lintval = 100; /* default sleep */
- ic->ic_bmisstimeout = 7*ic->ic_lintval; /* default 7 beacons */
+ ic->ic_bmissthres = 7; /* default 7 beacons */
ic->ic_dtim_period = 1; /* all TIMs are DTIMs */
LIST_INSERT_HEAD(&ieee80211com_head, ic, ic_list);
-/* $OpenBSD: ieee80211_var.h,v 1.78 2017/05/30 11:00:38 stsp Exp $ */
+/* $OpenBSD: ieee80211_var.h,v 1.79 2017/05/31 09:17:40 stsp Exp $ */
/* $NetBSD: ieee80211_var.h,v 1.7 2004/05/06 03:07:10 dyoung Exp $ */
/*-
int ic_max_nnodes; /* max length of ic_nnodes */
u_int16_t ic_lintval; /* listen interval */
int16_t ic_txpower; /* tx power setting (dBm) */
- u_int16_t ic_bmisstimeout;/* beacon miss threshold (ms) */
+ int ic_bmissthres; /* beacon miss threshold */
int ic_mgt_timer; /* mgmt timeout */
#ifndef IEEE80211_STA_ONLY
struct timeout ic_inact_timeout; /* node inactivity timeout */