linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: remove useless ieee80211_vif_is_mesh() check
@ 2021-11-19 20:04 gasmibal
  0 siblings, 0 replies; 2+ messages in thread
From: gasmibal @ 2021-11-19 20:04 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, davem, kuba, Baligh Gasmi

From: Baligh Gasmi <gasmibal@gmail.com>

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(-)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 51b49f0d3ad4..b979778c6d76 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -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;
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] mac80211: remove useless ieee80211_vif_is_mesh() check
@ 2022-02-03 15:30 Baligh Gasmi
  0 siblings, 0 replies; 2+ messages in thread
From: Baligh Gasmi @ 2022-02-03 15:30 UTC (permalink / raw)
  Cc: gasmibal, Johannes Berg, David S. Miller, Jakub Kicinski,
	open list:MAC80211, open list:NETWORKING [GENERAL], open list

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>
---
 net/mac80211/sta_info.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 537535a88990..91fbb1ee5c38 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -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;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-03 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-03 15:30 [PATCH] mac80211: remove useless ieee80211_vif_is_mesh() check Baligh Gasmi
  -- strict thread matches above, loose matches on Subject: below --
2021-11-19 20:04 gasmibal

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).