Commit ffb9d7bc authored by Thorsten Blum's avatar Thorsten Blum Committed by Felix Fietkau
Browse files

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: default avatarThorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250223232127.99357-2-thorsten.blum@linux.dev


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 4bc1da52
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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;

	if (ieee80211_vif_is_mld(vif))
		err = mt7925_mcu_mlo_sta_cmd(&dev->mphy, &info);