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

iwn: fix ht rate stuck at mcs 0 when using the new ra #548

Merged
merged 3 commits into from
Mar 19, 2021

Conversation

pigworlds
Copy link
Contributor

There is a bug in the iwn driver for Centrino Wireless-N devices when set firmware rate table.
It was masked by the original mira algorithm. When the iwn driver is switched to the new ra algorithm, the tx rate is stuck at mcs 0 (6mpbs).

This also include a miscellaneous fix the rxon flags in a corner case.

The original function take value directly from ic->ic_bss, which may not always consist with other places..
@zxystd
Copy link
Collaborator

zxystd commented Mar 17, 2021

Thank you for the testing. which commit introduced this bug?

@@ -4102,7 +4102,7 @@ iwn_set_link_quality(struct iwn_softc *sc, struct ieee80211_node *ni)
}
}

if (tab == 0)
if (tab == 0 && rflags == 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is fixing the bug.

When rflags contains IWN_RFLAG_MCS, 0 is a good value for tab means mcs 0. In this case it should not break the loop. The result of this bug that the initial link quality retry table contain only legacy rates and no ht rate. In this condition the wifi card will not send any packets using ht rate, and will not trigger the iwn_ra_choose to update the table again. For some reason it was working with mira, but not the new ra. The fix is to check and break the loop when both tab and rflags are 0.

This bug was introduced in the df94da8 when port the logic from iwm to support tx mimo in iwn. The struct is one uint16 in iwm instead of two uint8 in iwn. The additional check is missed.

@zxystd zxystd merged commit e96f7d0 into OpenIntelWireless:master Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants