diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-04-08 14:26:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:43 -0400 |
commit | d8052319f2a7d1ee86248df00193110ad1946a33 (patch) | |
tree | e85620ca14c9be81546a7ec282031474d7a7b806 /drivers/net/wireless/iwlwifi | |
parent | cbb6ab94b66cfb7136e640191a9628c5a71220a3 (diff) |
iwl3945: use iwl_mac_remove_interface from iwlwifi
3945 can now use iwl_mac_remove_interface from iwlwifi
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 25 |
4 files changed, 28 insertions, 48 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7e7b584ec257..5cc30a223cf0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2332,30 +2332,6 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, | |||
2332 | return 0; | 2332 | return 0; |
2333 | } | 2333 | } |
2334 | 2334 | ||
2335 | static void iwl_mac_remove_interface(struct ieee80211_hw *hw, | ||
2336 | struct ieee80211_if_init_conf *conf) | ||
2337 | { | ||
2338 | struct iwl_priv *priv = hw->priv; | ||
2339 | |||
2340 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2341 | |||
2342 | mutex_lock(&priv->mutex); | ||
2343 | |||
2344 | if (iwl_is_ready_rf(priv)) { | ||
2345 | iwl_scan_cancel_timeout(priv, 100); | ||
2346 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
2347 | iwlcore_commit_rxon(priv); | ||
2348 | } | ||
2349 | if (priv->vif == conf->vif) { | ||
2350 | priv->vif = NULL; | ||
2351 | memset(priv->bssid, 0, ETH_ALEN); | ||
2352 | } | ||
2353 | mutex_unlock(&priv->mutex); | ||
2354 | |||
2355 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2356 | |||
2357 | } | ||
2358 | |||
2359 | static void iwl_mac_update_tkip_key(struct ieee80211_hw *hw, | 2335 | static void iwl_mac_update_tkip_key(struct ieee80211_hw *hw, |
2360 | struct ieee80211_key_conf *keyconf, const u8 *addr, | 2336 | struct ieee80211_key_conf *keyconf, const u8 *addr, |
2361 | u32 iv32, u16 *phase1key) | 2337 | u32 iv32, u16 *phase1key) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index e08aee9b2b8c..b8afd9b81fb8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -2418,6 +2418,31 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, | |||
2418 | } | 2418 | } |
2419 | EXPORT_SYMBOL(iwl_mac_add_interface); | 2419 | EXPORT_SYMBOL(iwl_mac_add_interface); |
2420 | 2420 | ||
2421 | void iwl_mac_remove_interface(struct ieee80211_hw *hw, | ||
2422 | struct ieee80211_if_init_conf *conf) | ||
2423 | { | ||
2424 | struct iwl_priv *priv = hw->priv; | ||
2425 | |||
2426 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
2427 | |||
2428 | mutex_lock(&priv->mutex); | ||
2429 | |||
2430 | if (iwl_is_ready_rf(priv)) { | ||
2431 | iwl_scan_cancel_timeout(priv, 100); | ||
2432 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
2433 | iwlcore_commit_rxon(priv); | ||
2434 | } | ||
2435 | if (priv->vif == conf->vif) { | ||
2436 | priv->vif = NULL; | ||
2437 | memset(priv->bssid, 0, ETH_ALEN); | ||
2438 | } | ||
2439 | mutex_unlock(&priv->mutex); | ||
2440 | |||
2441 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
2442 | |||
2443 | } | ||
2444 | EXPORT_SYMBOL(iwl_mac_remove_interface); | ||
2445 | |||
2421 | #ifdef CONFIG_PM | 2446 | #ifdef CONFIG_PM |
2422 | 2447 | ||
2423 | int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | 2448 | int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 7df54405bef7..5dc33065f0ba 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -276,6 +276,8 @@ int iwl_commit_rxon(struct iwl_priv *priv); | |||
276 | int iwl_set_mode(struct iwl_priv *priv, int mode); | 276 | int iwl_set_mode(struct iwl_priv *priv, int mode); |
277 | int iwl_mac_add_interface(struct ieee80211_hw *hw, | 277 | int iwl_mac_add_interface(struct ieee80211_hw *hw, |
278 | struct ieee80211_if_init_conf *conf); | 278 | struct ieee80211_if_init_conf *conf); |
279 | void iwl_mac_remove_interface(struct ieee80211_hw *hw, | ||
280 | struct ieee80211_if_init_conf *conf); | ||
279 | 281 | ||
280 | /***************************************************** | 282 | /***************************************************** |
281 | * RX handlers. | 283 | * RX handlers. |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 955e50a124b5..f82a9dc82eef 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3640,29 +3640,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
3640 | return 0; | 3640 | return 0; |
3641 | } | 3641 | } |
3642 | 3642 | ||
3643 | static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw, | ||
3644 | struct ieee80211_if_init_conf *conf) | ||
3645 | { | ||
3646 | struct iwl_priv *priv = hw->priv; | ||
3647 | |||
3648 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
3649 | |||
3650 | mutex_lock(&priv->mutex); | ||
3651 | |||
3652 | if (iwl_is_ready_rf(priv)) { | ||
3653 | iwl_scan_cancel_timeout(priv, 100); | ||
3654 | priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; | ||
3655 | iwlcore_commit_rxon(priv); | ||
3656 | } | ||
3657 | if (priv->vif == conf->vif) { | ||
3658 | priv->vif = NULL; | ||
3659 | memset(priv->bssid, 0, ETH_ALEN); | ||
3660 | } | ||
3661 | mutex_unlock(&priv->mutex); | ||
3662 | |||
3663 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
3664 | } | ||
3665 | |||
3666 | static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 3643 | static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
3667 | struct ieee80211_vif *vif, | 3644 | struct ieee80211_vif *vif, |
3668 | struct ieee80211_sta *sta, | 3645 | struct ieee80211_sta *sta, |
@@ -4338,7 +4315,7 @@ static struct ieee80211_ops iwl3945_hw_ops = { | |||
4338 | .start = iwl3945_mac_start, | 4315 | .start = iwl3945_mac_start, |
4339 | .stop = iwl3945_mac_stop, | 4316 | .stop = iwl3945_mac_stop, |
4340 | .add_interface = iwl_mac_add_interface, | 4317 | .add_interface = iwl_mac_add_interface, |
4341 | .remove_interface = iwl3945_mac_remove_interface, | 4318 | .remove_interface = iwl_mac_remove_interface, |
4342 | .config = iwl3945_mac_config, | 4319 | .config = iwl3945_mac_config, |
4343 | .config_interface = iwl3945_mac_config_interface, | 4320 | .config_interface = iwl3945_mac_config_interface, |
4344 | .configure_filter = iwl_configure_filter, | 4321 | .configure_filter = iwl_configure_filter, |