From patchwork Tue Jul 25 01:13:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9861003 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 749736038C for ; Tue, 25 Jul 2017 01:18:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66A65283BF for ; Tue, 25 Jul 2017 01:18:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B775285A2; Tue, 25 Jul 2017 01:18:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 160F7283BF for ; Tue, 25 Jul 2017 01:18:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757125AbdGYBSW (ORCPT ); Mon, 24 Jul 2017 21:18:22 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:33609 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756724AbdGYBOQ (ORCPT ); Mon, 24 Jul 2017 21:14:16 -0400 Received: by mail-pf0-f177.google.com with SMTP id s70so53108148pfs.0 for ; Mon, 24 Jul 2017 18:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Nzm9pQThMILahh+w74JcvrYc5m84sncnWncd/+jpL1Q=; b=BbE1FwBhwOoDynK5skTgH38uKQFv0esC8BAfZt9uKwbePhLEfa4hcsGIE9tVXJK12V hhewtg5LqR44oeJbLaJG0OAxbvwXSsoXhkvnkWbn7pcAzr46bXBRqV2fSt6l1w+eSc/Z LBWL4sGWKt3C60ewPy9YDboM1mqcyDZy4Gqvw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Nzm9pQThMILahh+w74JcvrYc5m84sncnWncd/+jpL1Q=; b=FyJNDYDBFEkjKuIRZAyuXUe3l4mOIn0gAHMmNpuyEpKlCQagLtMzGpV6UQLdC1w3Dp IwaefC5T70hHwpznSdNnbvfOf55mBgMkwUXzdobAGHr1g9BOanxgo2uFp4NfRIKS59F0 xBYTUO3mOauLyDA0p2EtFGEuA7qSHA+XcWTd/uAkP+RNV1fvE9odSwGB8m6rr8RilLhH 88UBS27cYdNzylZSFZ7qnSp9h6jRMco8JFzLjgsnzwJQxI5TULwU0m+zpGJvdRjAghSd PoXYL336l9ncJTxP5aStpey6y5CL/Vo7954oVnBjkAq5/1EqWww+CnusT5urYyHEpE2+ BmdA== X-Gm-Message-State: AIVw112JXDb2ZnzH6XfGgCK2zsTl2wGi6GP0rxVCwgvEJjSbt2DpfHWd tg7Yyo5HJen7Xgte X-Received: by 10.98.9.19 with SMTP id e19mr17997022pfd.177.1500945256224; Mon, 24 Jul 2017 18:14:16 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.113.17]) by smtp.gmail.com with ESMTPSA id h123sm21497036pgc.36.2017.07.24.18.14.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Jul 2017 18:14:15 -0700 (PDT) From: Brian Norris To: Ganapathi Bhat , Nishant Sarmukadam Cc: , Dmitry Torokhov , Amitkumar Karwar , Kalle Valo , linux-wireless@vger.kernel.org, Brian Norris Subject: [PATCH v2 06/20] mwifiex: don't short-circuit netdev notifiers on interface deletion Date: Mon, 24 Jul 2017 18:13:22 -0700 Message-Id: <20170725011336.99993-7-briannorris@chromium.org> X-Mailer: git-send-email 2.14.0.rc0.284.gd933b75aa4-goog In-Reply-To: <20170725011336.99993-1-briannorris@chromium.org> References: <20170725011336.99993-1-briannorris@chromium.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When we leave the delete interface function, there are still netdev hooks that might try to process the device. We're short-circuiting some of that by changing the interface type and clearing ieee80211_ptr. This means we skip NETDEV_UNREGISTER_FINAL in cfg80211. Fortunately, that is currently a no-op. We don't need most of the cleanup here anyway: * the connection state will get (un)set as part of the disconnect process (which cfg80211 already initiates for us) * the interface type doesn't actually need to be cleared at all (it'll trigger a WARN_ON() in cfg80211 if we do) * the iee80211_ptr isn't really "ours" to clear anyway So stop resetting those 3 things. Signed-off-by: Brian Norris --- v2: no change --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index 06ad2d50f9b0..f86a8a69d060 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -3123,11 +3123,7 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) priv->dfs_chan_sw_workqueue = NULL; } /* Clear the priv in adapter */ - priv->netdev->ieee80211_ptr = NULL; priv->netdev = NULL; - priv->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; - - priv->media_connected = false; switch (priv->bss_mode) { case NL80211_IFTYPE_UNSPECIFIED: