From: gasmibal@gmail.com
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, davem@davemloft.net,
kuba@kernel.org, Baligh Gasmi <gasmibal@gmail.com>
Subject: [PATCH] mac80211: remove useless ieee80211_vif_is_mesh() check
Date: Fri, 19 Nov 2021 21:04:13 +0100 [thread overview]
Message-ID: <20211119200413.1236482-1-gasmibal@gmail.com> (raw)
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
next reply other threads:[~2021-11-19 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-19 20:04 gasmibal [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-02-03 15:30 [PATCH] mac80211: remove useless ieee80211_vif_is_mesh() check Baligh Gasmi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211119200413.1236482-1-gasmibal@gmail.com \
--to=gasmibal@gmail.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.