* [PATCH wireless-next] wifi: mt76: mt7925: Remove unnecessary if-check
@ 2025-02-23 23:21 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2025-02-23 23:21 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
Sean Wang, Johannes Berg, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh, Quan Zhou
Cc: Thorsten Blum, linux-wireless, linux-kernel, linux-arm-kernel,
linux-mediatek
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>
---
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 15815ad84713..7e4935965d35 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);
--
2.48.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-23 23:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-23 23:21 [PATCH wireless-next] wifi: mt76: mt7925: Remove unnecessary if-check Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).