Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2498913pxb; Thu, 3 Feb 2022 07:56:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxA0Pt0UsPkTsrIcNOtE7j+X4aXMJwbpDSfDnJePyKs+ggWkThDcUPt1TzZnp90P08fd0o3 X-Received: by 2002:a17:907:e9e:: with SMTP id ho30mr29239241ejc.648.1643903791618; Thu, 03 Feb 2022 07:56:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643903791; cv=none; d=google.com; s=arc-20160816; b=TXDw02rN7BNzOKOl5sdXu1gQvShmwuTzaT/upgxyKnh3y2lyau3OHAf8uXJ8H+0TIH V1O9T/XQ0r1ZLyL0POu2WSWi2RSEoZZorGQbBEQx4zaSVBC/+ZQ5RzQtnp5/w4qE9WwB iQeNuQRNFqQxei1qzj7W5ZB6QZLL4zr1GVIWNGJvznxKstW6hUzyCoAh+KbPu07orw7+ 7DbKkNtcKuEaLkHzWn8YGpnVXyvL4j5qFiu/KRgHyrfJ3MsdaaHmLyqxcm5XrIRDw99R lcBfdlztzpKQpYSeKZqv4FsGuKPt3HiJHv26zv3h+mLr5pKrBZeGwVYcn2tDEJswYG7o +IJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=qRQ95PT/Vrnz3TmgchsWQMEElvKn8TkczXxrd4JiXxg=; b=xqH9MVPgNvm3YYNEuRYYl5Kdp5ZFan+OuJqETSP8GSirv7KbAWPKXdYHnqgTev/o3b mZVCNZpmICEg3x7VkJEAsLFfhv/gZog/OQQvELXItjtETYUEkqb5kQkrlbw09axRoMOM wCnmy7HRg8/2c6gjIcfCUgxVqxTCO+IZYO57vqcjGMo5NFRvegKh54qXp1zAdm7LtUhD GXdAg/acqIAWGuKCzAX0+OS0sHTQVN3kHYr+sd4PSvNLa7htXB9Aeh8Fs79RN2OvLAgu FBVF8Z4nxj6Q5yieu5wJLfxG+E5S3oJHQFeCwI4p09sUH+2atRMUndC47l+MMQHgVCUu rPIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b="AkoM/A5r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di6si13964455ejc.546.2022.02.03.07.56.06; Thu, 03 Feb 2022 07:56:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b="AkoM/A5r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351871AbiBCPbd (ORCPT + 99 others); Thu, 3 Feb 2022 10:31:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236346AbiBCPba (ORCPT ); Thu, 3 Feb 2022 10:31:30 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33281C061714; Thu, 3 Feb 2022 07:31:30 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id w11so5777542wra.4; Thu, 03 Feb 2022 07:31:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qRQ95PT/Vrnz3TmgchsWQMEElvKn8TkczXxrd4JiXxg=; b=AkoM/A5rnKXsxCvCu64RpwCAa1kHe1CnXoXLu7P+imwHaVaI9eP28fg51hSaEFMOF4 +XPtzorhUV3yBmmCMxYy7eRn7+382DNo2rGvb+Fbkmd+zeq+pvWQ2ekbk1jBexZIVbcZ 5H9wxYmQj4P9dT3TqF+66PF81ZCqNeycsCVEAeNSxsSqoWFzJ5PslzH/ody6xNEO9DVa xKe1uvavMWzkVxrmnfvY9BlpN58Eo6m2hRwpsIju37UTIUipmjWEAKg5q1M0L7YthmOT uwxncGk607ESanGw5jKMLgLgMXVQehyqYk5yA7czIimEWTA734NnlDAbLubDDYW58LCU wMPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qRQ95PT/Vrnz3TmgchsWQMEElvKn8TkczXxrd4JiXxg=; b=qXeLInK9aVSXvJPHs2nkJsI7f9x87BOdw2sGlyd2TZPHxUagbWpXUUb3dS2Io5aUG+ 23e8FLhELkTCNjLGNAwQWvLqiKBih22u2cdnVE/T/T4nxf7cTWXk1NW7IFlNym3ISucQ KVRQUpz+8DrQICcFL9VDhkf79k3+PQA+ZnuAIkZjRwvuAEUF9/HmHCFBqIlr/lgvN1mg DAeE9T+9KkPRYQhNSxDJaByh8bTY+CTY4Aji+rmyB/J1Kz1OdEKWiKAfrz7vmjvgFFZx 8vh+xvpcFaFdSoeAFKetSBUoHyaIZnrn+vb6NDk0mcBzlbGA/1kd+W6ul0fFwo5PoRUc JbPw== X-Gm-Message-State: AOAM533XTSnyHz9ll0SD+0k9H6MdJs3mrk7dEuqA+8acXVyFoz0bBQ+G auyyEuxdjZCPQ7H5yxNACdyQVPCKeg1QkQ== X-Received: by 2002:adf:fd8b:: with SMTP id d11mr29096831wrr.606.1643902288679; Thu, 03 Feb 2022 07:31:28 -0800 (PST) Received: from baligh-ThinkCentre-M720q.iliad.local (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.googlemail.com with ESMTPSA id n5sm8627250wmq.43.2022.02.03.07.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 07:31:27 -0800 (PST) From: Baligh Gasmi Cc: gasmibal@gmail.com, Johannes Berg , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org (open list:MAC80211), netdev@vger.kernel.org (open list:NETWORKING [GENERAL]), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] mac80211: remove useless ieee80211_vif_is_mesh() check Date: Thu, 3 Feb 2022 16:30:34 +0100 Message-Id: <20220203153035.198697-1-gasmibal@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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