From patchwork Thu May 25 00:11:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9747223 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 3BB6C60246 for ; Thu, 25 May 2017 00:12:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C486205F8 for ; Thu, 25 May 2017 00:12:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E5BE26E54; Thu, 25 May 2017 00:12:00 +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 B6426205F8 for ; Thu, 25 May 2017 00:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164770AbdEYAL5 (ORCPT ); Wed, 24 May 2017 20:11:57 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:34399 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164694AbdEYALx (ORCPT ); Wed, 24 May 2017 20:11:53 -0400 Received: by mail-pf0-f172.google.com with SMTP id 9so150117475pfj.1 for ; Wed, 24 May 2017 17:11:53 -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=LNMrzaZ1jkpCjiRb9THsYr7snh2pAJVqsDVg3IArFF4=; b=MC8SNfrvoVtl2ezn82/Bl/BqkEZYm45EoDT5JKDkkrNrpOV+CiRSaLZRGkyX1KSuZk fPufUCCHh8CaUP5HStaJ2py0tiakFEeblDr2W1+o4ptZLZPt6rgDOlcU1X+6+l5OEPsU FLhxkOyAoVQINM7RyLZEvva5JnGciBHy1tiOk= 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=LNMrzaZ1jkpCjiRb9THsYr7snh2pAJVqsDVg3IArFF4=; b=Fkcs3eZBwF3AzibQe47tfWttUBhKCyNTcqj8rJctQt9gbsUQcPCJRwuqs9RZUsEVa5 NL3eKwwWThglmjpcoxOV4uTtEM6dpDOky+IOIkbWw5zIf8CGTMvGz1A3qBnY1XeiqDLf c2wPi+X/PO+UuqSJViLceSi9GBLi7ziZYY5nRfx6p4Au+fleLS/gnnrzlqip1ggFg1ye F9PlpV3q9+0xSCtddFL7nRXOVtKJlKJ/1/O2UlfrPzqoyl4jTwFR8RMePtomJpcodxNu edZD1KNW4yZ6d7JHGrd9JToUc60Ka4Gr92ivLe5kKVXPafL3NWcjEv90iIKvK1TdmBwC ZkYA== X-Gm-Message-State: AODbwcBFoim5EzySw1HAHhMiPb6xzwk+LqGPUJeeGO27ADN4Y7JLgdoy /DnATh16fQyhVYol X-Received: by 10.99.121.4 with SMTP id u4mr42071062pgc.167.1495671099014; Wed, 24 May 2017 17:11:39 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id s23sm9823692pfg.81.2017.05.24.17.11.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 17:11:38 -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 06/14] mwifiex: don't short-circuit netdev notifiers on interface deletion Date: Wed, 24 May 2017 17:11:11 -0700 Message-Id: <20170525001119.64791-6-briannorris@chromium.org> X-Mailer: git-send-email 2.13.0.219.gdb65acc882-goog In-Reply-To: <20170525001119.64791-1-briannorris@chromium.org> References: <20170525001119.64791-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 --- 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 025bc06a19d6..c3a25b7f2b48 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -3129,11 +3129,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: