diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-02-24 00:21:24 +0100 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2025-03-19 14:47:03 +0100 |
| commit | ffb9d7bcd3e3e2d937bcfd7fc064b15f3b7ca3e3 (patch) | |
| tree | a44fba86306c73d435606d4b1e3ae41ba5430a29 /drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | |
| parent | 4bc1da524b502999da28d287de4286c986a1af57 (diff) | |
wifi: mt76: mt7925: Remove unnecessary if-check
The if and else branches implement the same logic. Remove the
unnecessary if-check and simplify the code.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250223232127.99357-2-thorsten.blum@linux.dev
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7925/mcu.c')
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c index 10272af24dd1..eee65cf48203 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c @@ -1983,11 +1983,7 @@ int mt7925_mcu_sta_update(struct mt792x_dev *dev, mlink = mt792x_sta_to_link(msta, link_sta->link_id); } info.wcid = link_sta ? &mlink->wcid : &mvif->sta.deflink.wcid; - - if (link_sta) - info.newly = state != MT76_STA_INFO_STATE_ASSOC; - else - info.newly = state == MT76_STA_INFO_STATE_ASSOC ? false : true; + info.newly = state != MT76_STA_INFO_STATE_ASSOC; if (ieee80211_vif_is_mld(vif)) err = mt7925_mcu_mlo_sta_cmd(&dev->mphy, &info); |