Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mira probe timer not fired. #465

Merged
merged 1 commit into from
Dec 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions itl80211/openbsd/net80211/ieee80211_mira.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,15 @@ ieee80211_mira_cancel_timeouts(struct ieee80211_mira_node *mn)
{
int t;

for (t = 0; t < nitems(mn->probe_to); t++)
timeout_del(&mn->probe_to[t]);
}

void
ieee80211_mira_node_free(struct ieee80211_mira_node *mn)
{
int t;

for (t = 0; t < nitems(mn->probe_to); t++) {
timeout_del(&mn->probe_to[t]);
timeout_free(&mn->probe_to[t]);
Expand Down
3 changes: 3 additions & 0 deletions itl80211/openbsd/net80211/ieee80211_mira.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ void ieee80211_mira_choose(struct ieee80211_mira_node *,
/* Cancel timeouts scheduled by ieee80211_mira_choose(). */
void ieee80211_mira_cancel_timeouts(struct ieee80211_mira_node *);

/* Release rate control state. */
void ieee80211_mira_node_free(struct ieee80211_mira_node *);

/* Returns RTS threshold to be used for a frame about to be transmitted. */
int ieee80211_mira_get_rts_threshold(struct ieee80211_mira_node *,
struct ieee80211com *, struct ieee80211_node *, size_t);
Expand Down
4 changes: 2 additions & 2 deletions itlwm/hal_iwm/mac80211.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2788,7 +2788,7 @@ iwm_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
ieee80211_ba_del(ni);
}
timeout_del(&sc->sc_calib_to);
ieee80211_mira_cancel_timeouts(&in->in_mn);
ieee80211_mira_node_free(&in->in_mn);
that->iwm_del_task(sc, systq, &sc->ba_task);
that->iwm_del_task(sc, systq, &sc->htprot_task);
}
Expand Down Expand Up @@ -3316,7 +3316,7 @@ iwm_stop(struct _ifnet *ifp)

in->in_phyctxt = NULL;
if (ic->ic_state == IEEE80211_S_RUN)
ieee80211_mira_cancel_timeouts(&in->in_mn); /* XXX refcount? */
ieee80211_mira_node_free(&in->in_mn); /* XXX refcount? */

sc->sc_flags &= ~(IWM_FLAG_SCANNING | IWM_FLAG_BGSCAN);
sc->sc_flags &= ~IWM_FLAG_MAC_ACTIVE;
Expand Down
2 changes: 1 addition & 1 deletion itlwm/hal_iwn/ItlIwn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,7 @@ iwn_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
ieee80211_stop_ampdu_tx(ic, ni, -1);
ieee80211_ba_del(ni);
}
ieee80211_mira_cancel_timeouts(&wn->mn);
ieee80211_mira_node_free(&wn->mn);
timeout_del(&sc->calib_to);
sc->calib.state = IWN_CALIB_STATE_INIT;
if (sc->sc_flags & IWN_FLAG_BGSCAN)
Expand Down