Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650052

[PATCH 06/14] mwifiex: don't short-circuit netdev notifiers on interface deletion

From Brian Norris <briannorris@chromium.org>
Newsgroups linux.kernel
Subject [PATCH 06/14] mwifiex: don't short-circuit netdev notifiers on interface deletion
Date 2017-05-25 02:20 +0200
Message-ID <tKOFs-Qx-21@gated-at.bofh.it> (permalink)
References <tKOFr-Qx-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <briannorris@chromium.org>
---
 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:
-- 
2.13.0.219.gdb65acc882-goog

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/14] mwifiex: pcie: properly synchronize, disable interrupts in driver callbacks Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 13/14] mwifiex: drop 'add_tail' param from mwifiex_insert_cmd_to_pending_q() Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 06/14] mwifiex: don't short-circuit netdev notifiers on interface deletion Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 10/14] mwifiex: pcie: stop masking interrupts in FW downloader Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 09/14] mwifiex: pcie: remove redundant synchronize_irq() Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 14/14] mwifiex: pcie: fix whitespace Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 11/14] mwifiex: utilize netif_tx_{wake,stop}_all_queues() Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  Re: [PATCH 01/14] mwifiex: pcie: properly synchronize, disable  interrupts in driver callbacks Brian Norris <briannorris@chromium.org> - 2017-05-31 19:20 +0200
    Re: [PATCH 01/14] mwifiex: pcie: properly synchronize, disable  interrupts in driver callbacks Xinming Hu <huxm@marvell.com> - 2017-06-05 14:00 +0200

csiph-web