]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt7996: reduce phy work in set_coverage
authorDylan Eskew <dylan.eskew@candelatech.com>
Wed, 15 Apr 2026 15:53:55 +0000 (08:53 -0700)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jun 2026 10:15:22 +0000 (10:15 +0000)
In mt7996_set_coverage_class(), each phy is iterated over in calling
mt7996_mac_set_coverage_class(). Thus, the phy2 and phy3 configuration
logic in mt7996_mac_set_coverage_class() can be dropped.

Signed-off-by: Dylan Eskew <dylan.eskew@candelatech.com>
Link: https://patch.msgid.link/20260415155354.1135548-2-dylan.eskew@candelatech.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/mac.c

index 44713a7a86f8cc2259a7f0b7e980786dc8e6c726..83e8e1e7feb4a006a21c21b7849bf8ba6646fc36 100644 (file)
@@ -2058,8 +2058,6 @@ void mt7996_mac_set_coverage_class(struct mt7996_phy *phy)
 {
        s16 coverage_class = phy->coverage_class;
        struct mt7996_dev *dev = phy->dev;
-       struct mt7996_phy *phy2 = mt7996_phy2(dev);
-       struct mt7996_phy *phy3 = mt7996_phy3(dev);
        u32 reg_offset;
        u32 cck = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, 231) |
                  FIELD_PREP(MT_TIMEOUT_VAL_CCA, 48);
@@ -2071,14 +2069,6 @@ void mt7996_mac_set_coverage_class(struct mt7996_phy *phy)
        if (!test_bit(MT76_STATE_RUNNING, &phy->mt76->state))
                return;
 
-       if (phy2)
-               coverage_class = max_t(s16, dev->phy.coverage_class,
-                                      phy2->coverage_class);
-
-       if (phy3)
-               coverage_class = max_t(s16, coverage_class,
-                                      phy3->coverage_class);
-
        offset = 3 * coverage_class;
        reg_offset = FIELD_PREP(MT_TIMEOUT_VAL_PLCP, offset) |
                     FIELD_PREP(MT_TIMEOUT_VAL_CCA, offset);