summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2017-01-12 18:06:58 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2017-01-12 18:06:58 +0000
commitef4a3b67d10347ab36a9aeedd43baeeee3bdf5d6 (patch)
tree17c99cc82ee6e86a33c8e720781608e65c8f1d97
parent1392b50d062cb927b3ff62380856ed0edc29540c (diff)
Rename ieee80211_mira_node_destroy() to ieee80211_mira_cancel_timeouts().
No functional change. The previous name was chosen at a time when I could not yet anticipate what this function would really end up doing. The new name should make this function's purpose more obvious, especially where it appears at strategic places in driver code.
-rw-r--r--sys/dev/ic/athn.c8
-rw-r--r--sys/dev/pci/if_iwm.c4
-rw-r--r--sys/dev/pci/if_iwn.c4
-rw-r--r--sys/net80211/ieee80211_mira.c4
-rw-r--r--sys/net80211/ieee80211_mira.h8
5 files changed, 15 insertions, 13 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index 1b616a5a59d..83b3837b655 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.94 2017/01/12 16:32:28 stsp Exp $ */
+/* $OpenBSD: athn.c,v 1.95 2017/01/12 18:06:57 stsp Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -2417,7 +2417,7 @@ athn_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni)
{
struct athn_node *an = (void *)ni;
if (ic->ic_flags & IEEE80211_F_HTON)
- ieee80211_mira_node_destroy(&an->mn);
+ ieee80211_mira_cancel_timeouts(&an->mn);
}
#endif
@@ -2467,7 +2467,7 @@ void
athn_iter_mira_delete(void *arg, struct ieee80211_node *ni)
{
struct athn_node *an = (struct athn_node *)ni;
- ieee80211_mira_node_destroy(&an->mn);
+ ieee80211_mira_cancel_timeouts(&an->mn);
}
/* Delete pending timeouts managed by MiRA. */
@@ -2478,7 +2478,7 @@ athn_delete_mira_nodes(struct athn_softc *sc)
if (ic->ic_opmode == IEEE80211_M_STA) {
struct athn_node *an = (struct athn_node *)ic->ic_bss;
- ieee80211_mira_node_destroy(&an->mn);
+ ieee80211_mira_cancel_timeouts(&an->mn);
} else
ieee80211_iterate_nodes(ic, athn_iter_mira_delete, sc);
}
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index e3912b75060..74334359a79 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.155 2016/12/18 10:37:42 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.156 2017/01/12 18:06:57 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -5498,7 +5498,7 @@ iwm_newstate_task(void *psc)
if (ostate == IEEE80211_S_RUN && nstate != ostate) {
iwm_disable_beacon_filter(sc);
- ieee80211_mira_node_destroy(&in->in_mn);
+ ieee80211_mira_cancel_timeouts(&in->in_mn);
}
/* Reset the device if moving out of AUTH, ASSOC, or RUN. */
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index 16096e5722e..b49cc9f458e 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.180 2016/12/23 18:44:51 kettenis Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.181 2017/01/12 18:06:57 stsp Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1764,7 +1764,7 @@ iwn_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
if (ic->ic_state == IEEE80211_S_RUN &&
(ni->ni_flags & IEEE80211_NODE_HT))
- ieee80211_mira_node_destroy(&wn->mn);
+ ieee80211_mira_cancel_timeouts(&wn->mn);
switch (nstate) {
case IEEE80211_S_SCAN:
diff --git a/sys/net80211/ieee80211_mira.c b/sys/net80211/ieee80211_mira.c
index 8b34bacf01c..f412646ba66 100644
--- a/sys/net80211/ieee80211_mira.c
+++ b/sys/net80211/ieee80211_mira.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_mira.c,v 1.7 2017/01/09 19:50:49 stsp Exp $ */
+/* $OpenBSD: ieee80211_mira.c,v 1.8 2017/01/12 18:06:57 stsp Exp $ */
/*
* Copyright (c) 2016 Stefan Sperling <stsp@openbsd.org>
@@ -1098,7 +1098,7 @@ ieee80211_mira_node_init(struct ieee80211_mira_node *mn)
}
void
-ieee80211_mira_node_destroy(struct ieee80211_mira_node *mn)
+ieee80211_mira_cancel_timeouts(struct ieee80211_mira_node *mn)
{
int t;
diff --git a/sys/net80211/ieee80211_mira.h b/sys/net80211/ieee80211_mira.h
index abf6d353f19..9fb797e1165 100644
--- a/sys/net80211/ieee80211_mira.h
+++ b/sys/net80211/ieee80211_mira.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_mira.h,v 1.2 2016/12/10 14:46:04 stsp Exp $ */
+/* $OpenBSD: ieee80211_mira.h,v 1.3 2017/01/12 18:06:57 stsp Exp $ */
/*
* Copyright (c) 2016 Stefan Sperling <stsp@openbsd.org>
@@ -91,12 +91,14 @@ struct ieee80211_mira_node {
struct ieee80211_mira_goodput_stats g[IEEE80211_MIRA_NUM_RATES];
};
-/* Set up and tear down rate control. */
+/* Initialize rate control state. */
void ieee80211_mira_node_init(struct ieee80211_mira_node *);
-void ieee80211_mira_node_destroy(struct ieee80211_mira_node *);
/* Called by drivers from the Tx completion interrupt handler. */
void ieee80211_mira_choose(struct ieee80211_mira_node *,
struct ieee80211com *, struct ieee80211_node *);
+/* Cancel timeouts scheduled by ieee80211_mira_choose(). */
+void ieee80211_mira_cancel_timeouts(struct ieee80211_mira_node *);
+
#endif /* _NET80211_IEEE80211_MIRA_H_ */