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

mt7603 not entering dynamic power save at association, only after explicit power save frame #937

Open
wryun opened this issue Dec 13, 2024 · 1 comment

Comments

@wryun
Copy link

wryun commented Dec 13, 2024

The STA may use the SM Power Save frame to communicate its SM power save state. The STA may also use SM Power Save subfield in the HT Capabilities element of its (Re)Association Request frame to achieve the same purpose. The latter allows the STA to use only a single receive chain immediately after (re)association.

Unfortunately, it seems like it's only if an explicit action frame is sent that this is working (at least with an iwlwifi station connected to an mt7603 access point). i.e. on connection, the AP sends at MCS15 without RTS/CTS, and it's only after toggling power_save on/off on the iwlwifi station that that AP uses RTS/CTS.

@wryun
Copy link
Author

wryun commented Dec 16, 2024

On further investigation, it seems like the SMPS command to the MCU is applied too early (before assocation). Or at least things work better if I do:

--- a/mt7603/main.c
+++ b/mt7603/main.c
@@ -373,6 +373,12 @@ mt7603_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
                 struct ieee80211_sta *sta)
 {
        struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
+       struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
+
+       // Once association has happened, we need to make sure that the SMPS
+       // mode is set again (if it's happened earlier, the firmware seems to forget
+       // about it, at least in terms of the observed behaviour).
+       msta->smps = ~0;
 
        mt7603_wtbl_update_cap(dev, sta);
 }

This forces the SMPS command to run after association, and the observed behaviour is now correct (i.e. RTS/CTS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant