Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: remove useless ieee80211_vif_is_mesh() check

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

Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
Link: https://lore.kernel.org/r/20220203153035.198697-1-gasmibal@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Baligh Gasmi and committed by
Johannes Berg
45d33746 ea5907db

+1 -2
+1 -2
net/mac80211/sta_info.c
··· 364 364 goto free; 365 365 sta->mesh->plink_sta = sta; 366 366 spin_lock_init(&sta->mesh->plink_lock); 367 - if (ieee80211_vif_is_mesh(&sdata->vif) && 368 - !sdata->u.mesh.user_mpm) 367 + if (!sdata->u.mesh.user_mpm) 369 368 timer_setup(&sta->mesh->plink_timer, mesh_plink_timer, 370 369 0); 371 370 sta->mesh->nonpeer_pm = NL80211_MESH_POWER_ACTIVE;