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_node statistics in driver #466

Merged
merged 2 commits into from
Dec 26, 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
19 changes: 3 additions & 16 deletions itlwm/hal_iwm/mac80211.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,9 @@ iwm_ampdu_rate_control(struct iwm_softc *sc, struct ieee80211_node *ni,
(SEQ_LT(ba->ba_winend, s) ||
(ba->ba_bitmap & (1 << bit)) == 0)) {
have_ack++;
wn->in_mn.frames = txdata->ampdu_nframes;
wn->in_mn.agglen = txdata->ampdu_nframes;
wn->in_mn.ampdu_size = txdata->ampdu_size;
wn->in_mn.frames++;
wn->in_mn.agglen++;
wn->in_mn.ampdu_size = txdata->ampdu_size / txdata->ampdu_nframes;
if (txdata->retries > 1)
wn->in_mn.retries++;
if (!SEQ_LT(ba->ba_winend, s))
Expand All @@ -788,7 +788,6 @@ iwm_ampdu_rate_control(struct iwm_softc *sc, struct ieee80211_node *ni,
}

if (have_ack > 0) {
wn->in_mn.txfail = wn->in_mn.frames - have_ack;
iwm_mira_choose(sc, ni);
}
}
Expand Down Expand Up @@ -1157,18 +1156,6 @@ iwm_rx_tx_cmd(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
le16_to_cpu((&tx_resp->status)[i].idx)));
}

/*
* In the multi-frame case the firmware has just transmitted a bunch
* of frames in an A-MPDU. The final Tx status of those frames won't
* be known until the peer ACKs subframes with a block ack or firmware
* gives up on a particular subframe.
* Subframes for which the firmware never sees an ACK will be retried
* and will eventually arrive here as a single-frame Tx failure.
* So there is nothing to do, for now.
*/
if (tx_resp->frame_count != 1)
return;

txd = &ring->data[idx];
if (txd->m == NULL)
return;
Expand Down
7 changes: 3 additions & 4 deletions itlwm/hal_iwn/ItlIwn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2347,9 +2347,9 @@ iwn_ampdu_rate_control(struct iwn_softc *sc, struct ieee80211_node *ni,
(SEQ_LT(ba->ba_winend, s) ||
(ba->ba_bitmap & (1 << bit)) == 0)) {
have_ack++;
wn->mn.frames = txdata->ampdu_nframes;
wn->mn.agglen = txdata->ampdu_nframes;
wn->mn.ampdu_size = txdata->ampdu_size;
wn->mn.frames++;
wn->mn.agglen++;
wn->mn.ampdu_size = txdata->ampdu_size / txdata->ampdu_nframes;
if (txdata->retries > 1)
wn->mn.retries++;
if (!SEQ_LT(ba->ba_winend, s))
Expand All @@ -2362,7 +2362,6 @@ iwn_ampdu_rate_control(struct iwn_softc *sc, struct ieee80211_node *ni,
}

if (have_ack > 0) {
wn->mn.txfail = wn->mn.frames - have_ack;
iwn_mira_choose(sc, ni);
}
}
Expand Down