From: Reinette Chatre <reinette.chatre@intel.com>
To: linville@tuxdriver.com, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
ipw3945-devel@lists.sourceforge.net,
Ron Rindjunsky <ron.rindjunsky@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [PATCH 6/8] iwlwifi: unregister to upper stack before releasing resources
Date: Fri, 28 Mar 2008 16:21:10 -0700 [thread overview]
Message-ID: <1206746472-10443-7-git-send-email-reinette.chatre@intel.com> (raw)
In-Reply-To: <1206746472-10443-6-git-send-email-reinette.chatre@intel.com>
From: Ron Rindjunsky <ron.rindjunsky@intel.com>
This patch fixes an early release of driver's resources before upper stack
was notified that low-level driver shuts down.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/net/wireless/iwlwifi/iwl4965-base.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 3ea8c7e..6b69429 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -8208,6 +8208,11 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n");
+ if (priv->mac80211_registered) {
+ ieee80211_unregister_hw(priv->hw);
+ priv->mac80211_registered = 0;
+ }
+
set_bit(STATUS_EXIT_PENDING, &priv->status);
iwl4965_down(priv);
@@ -8242,9 +8247,6 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
iwl4965_unset_hw_setting(priv);
iwlcore_clear_stations_table(priv);
- if (priv->mac80211_registered) {
- ieee80211_unregister_hw(priv->hw);
- }
/*netif_stop_queue(dev); */
flush_workqueue(priv->workqueue);
--
1.5.3.4
next prev parent reply other threads:[~2008-03-28 23:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 23:21 [PATCH 0/8] iwlwifi driver updates including one mac80211 change Reinette Chatre
2008-03-28 23:21 ` [PATCH 1/8] iwlwifi: add notification infrastructure to iwlcore Reinette Chatre
2008-03-28 23:21 ` [PATCH 2/8] iwlwifi: hook iwlwifi with Linux rfkill Reinette Chatre
2008-03-28 23:21 ` [PATCH 3/8] mac80211: enable driver to notify mac of status, change iwlwifi Reinette Chatre
2008-03-28 23:21 ` [PATCH 4/8] iwlwifi: fix race condition during driver unload Reinette Chatre
2008-03-28 23:21 ` [PATCH 5/8] iwlwifi: move rate registration to module load Reinette Chatre
2008-03-28 23:21 ` Reinette Chatre [this message]
2008-03-28 23:21 ` [PATCH 7/8] iwlwifi: LED initialize before registering Reinette Chatre
2008-03-28 23:21 ` [PATCH 8/8] iwlwifi: Fix synchronous host command Reinette Chatre
2008-03-28 23:41 ` [PATCH 3/8] mac80211: enable driver to notify mac of status, change iwlwifi Johannes Berg
2008-03-31 20:23 ` [PATCH 2/8] iwlwifi: hook iwlwifi with Linux rfkill Johannes Berg
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=1206746472-10443-7-git-send-email-reinette.chatre@intel.com \
--to=reinette.chatre@intel.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=ron.rindjunsky@intel.com \
--cc=tomas.winkler@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox