Skip to contentSkip to conversation

mac80211: remove useless ieee80211_vif_is_mesh() check

PATCH New [email protected] 1 participant 1 message Nov 19, 2021 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: remove useless ieee80211_vif_is_mesh() check

From: Baligh Gasmi <[email protected]>

We check ieee80211_vif_is_mesh() at the top if() block, there's no need to check for it again.

---
 net/mac80211/sta_info.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/mac80211/sta_info.c +1 -2
index 51b49f0d3ad4..b979778c6d76 100644
@@ -364,8 +364,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
 			goto free;
 		sta->mesh->plink_sta = sta;
 		spin_lock_init(&sta->mesh->plink_lock);
-		if (ieee80211_vif_is_mesh(&sdata->vif) &&
-		    !sdata->u.mesh.user_mpm)
+		if (!sdata->u.mesh.user_mpm)
 			timer_setup(&sta->mesh->plink_timer, mesh_plink_timer,
 				    0);
 		sta->mesh->nonpeer_pm = NL80211_MESH_POWER_ACTIVE;
Signature · 1 line
2.34.0