diff options
Diffstat (limited to 'sys/net80211/ieee80211_mira.c')
-rw-r--r-- | sys/net80211/ieee80211_mira.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_mira.c b/sys/net80211/ieee80211_mira.c index 23bfcf0a331..bceb55f83a6 100644 --- a/sys/net80211/ieee80211_mira.c +++ b/sys/net80211/ieee80211_mira.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_mira.c,v 1.29 2020/04/17 07:09:05 stsp Exp $ */ +/* $OpenBSD: ieee80211_mira.c,v 1.30 2020/05/01 14:04:17 stsp Exp $ */ /* * Copyright (c) 2016 Stefan Sperling <stsp@openbsd.org> @@ -400,6 +400,9 @@ ieee80211_mira_update_stats(struct ieee80211_mira_node *mn, uint64_t rate = ieee80211_mira_get_txrate(ni->ni_txmcs, sgi); struct ieee80211_mira_goodput_stats *g = &mn->g[ni->ni_txmcs]; + if (mn->frames == 0) + return; /* avoid divide-by-zero in sfer calculation below */ + g->nprobes += mn->agglen; g->nprobe_bytes += mn->ampdu_size; |