Commit 09af1403 authored by Don Fry's avatar Don Fry Committed by Wey-Yi Guy

iwlwifi: create iwl_mac80211 unregister routine

The mac80211 setup_register operations are collected in one routine,
but the cleanup routines are not.  Create a routine for this.
Signed-off-by: default avatarDon Fry <donald.h.fry@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 23fd7b02
...@@ -1915,12 +1915,7 @@ void __devexit iwl_remove(struct iwl_priv * priv) ...@@ -1915,12 +1915,7 @@ void __devexit iwl_remove(struct iwl_priv * priv)
set_bit(STATUS_EXIT_PENDING, &priv->shrd->status); set_bit(STATUS_EXIT_PENDING, &priv->shrd->status);
iwl_testmode_cleanup(priv); iwl_testmode_cleanup(priv);
iwl_leds_exit(priv); iwlagn_mac_unregister(priv);
if (priv->mac80211_registered) {
ieee80211_unregister_hw(priv->hw);
priv->mac80211_registered = 0;
}
iwl_tt_exit(priv); iwl_tt_exit(priv);
......
...@@ -91,6 +91,7 @@ void iwlagn_prepare_restart(struct iwl_priv *priv); ...@@ -91,6 +91,7 @@ void iwlagn_prepare_restart(struct iwl_priv *priv);
struct ieee80211_hw *iwl_alloc_all(void); struct ieee80211_hw *iwl_alloc_all(void);
int iwlagn_mac_setup_register(struct iwl_priv *priv, int iwlagn_mac_setup_register(struct iwl_priv *priv,
struct iwlagn_ucode_capabilities *capa); struct iwlagn_ucode_capabilities *capa);
void iwlagn_mac_unregister(struct iwl_priv *priv);
/* RXON */ /* RXON */
int iwlagn_set_pan_params(struct iwl_priv *priv); int iwlagn_set_pan_params(struct iwl_priv *priv);
......
...@@ -245,6 +245,15 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, ...@@ -245,6 +245,15 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
return 0; return 0;
} }
void iwlagn_mac_unregister(struct iwl_priv *priv)
{
if (!priv->mac80211_registered)
return;
iwl_leds_exit(priv);
ieee80211_unregister_hw(priv->hw);
priv->mac80211_registered = 0;
}
static int __iwl_up(struct iwl_priv *priv) static int __iwl_up(struct iwl_priv *priv)
{ {
struct iwl_rxon_context *ctx; struct iwl_rxon_context *ctx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment