Skip to contentSkip to conversation

wifi: mt76: mt7925: Remove unnecessary if-check

PATCH New Thorsten Blum 1 participant 1 message Feb 23, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +1 -5
index 15815ad84713..7e4935965d35 100644
@@ -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);
Signature · 1 line
2.48.1