aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-12-23 07:15:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:55:07 -0500
commit1ed32e4fc8cfc9656cc1101e7f9617d485fcbe7b (patch)
tree81697637a36eb4776df39c81a77a9e09ec951a1a /drivers/net/wireless/iwlwifi/iwl-core.c
parent98b6218388e345064c3f2d3c161383a18274c638 (diff)
mac80211: remove struct ieee80211_if_init_conf
All its members (vif, mac_addr, type) are now available in the vif struct directly, so we can pass that instead of the conf struct. I generated this patch (except the mac80211 and header file changes) with this semantic patch: @@ identifier conf, fn, hw; type tp; @@ tp fn(struct ieee80211_hw *hw, -struct ieee80211_if_init_conf *conf) +struct ieee80211_vif *vif) { <... ( -conf->type +vif->type | -conf->mac_addr +vif->addr | -conf->vif +vif ) ...> } Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index e3b96b48b7fe..14f482960d7f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2584,12 +2584,12 @@ int iwl_set_mode(struct iwl_priv *priv, int mode)
2584EXPORT_SYMBOL(iwl_set_mode); 2584EXPORT_SYMBOL(iwl_set_mode);
2585 2585
2586int iwl_mac_add_interface(struct ieee80211_hw *hw, 2586int iwl_mac_add_interface(struct ieee80211_hw *hw,
2587 struct ieee80211_if_init_conf *conf) 2587 struct ieee80211_vif *vif)
2588{ 2588{
2589 struct iwl_priv *priv = hw->priv; 2589 struct iwl_priv *priv = hw->priv;
2590 unsigned long flags; 2590 unsigned long flags;
2591 2591
2592 IWL_DEBUG_MAC80211(priv, "enter: type %d\n", conf->type); 2592 IWL_DEBUG_MAC80211(priv, "enter: type %d\n", vif->type);
2593 2593
2594 if (priv->vif) { 2594 if (priv->vif) {
2595 IWL_DEBUG_MAC80211(priv, "leave - vif != NULL\n"); 2595 IWL_DEBUG_MAC80211(priv, "leave - vif != NULL\n");
@@ -2597,19 +2597,19 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw,
2597 } 2597 }
2598 2598
2599 spin_lock_irqsave(&priv->lock, flags); 2599 spin_lock_irqsave(&priv->lock, flags);
2600 priv->vif = conf->vif; 2600 priv->vif = vif;
2601 priv->iw_mode = conf->type; 2601 priv->iw_mode = vif->type;
2602 2602
2603 spin_unlock_irqrestore(&priv->lock, flags); 2603 spin_unlock_irqrestore(&priv->lock, flags);
2604 2604
2605 mutex_lock(&priv->mutex); 2605 mutex_lock(&priv->mutex);
2606 2606
2607 if (conf->mac_addr) { 2607 if (vif->addr) {
2608 IWL_DEBUG_MAC80211(priv, "Set %pM\n", conf->mac_addr); 2608 IWL_DEBUG_MAC80211(priv, "Set %pM\n", vif->addr);
2609 memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); 2609 memcpy(priv->mac_addr, vif->addr, ETH_ALEN);
2610 } 2610 }
2611 2611
2612 if (iwl_set_mode(priv, conf->type) == -EAGAIN) 2612 if (iwl_set_mode(priv, vif->type) == -EAGAIN)
2613 /* we are not ready, will run again when ready */ 2613 /* we are not ready, will run again when ready */
2614 set_bit(STATUS_MODE_PENDING, &priv->status); 2614 set_bit(STATUS_MODE_PENDING, &priv->status);
2615 2615
@@ -2621,7 +2621,7 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw,
2621EXPORT_SYMBOL(iwl_mac_add_interface); 2621EXPORT_SYMBOL(iwl_mac_add_interface);
2622 2622
2623void iwl_mac_remove_interface(struct ieee80211_hw *hw, 2623void iwl_mac_remove_interface(struct ieee80211_hw *hw,
2624 struct ieee80211_if_init_conf *conf) 2624 struct ieee80211_vif *vif)
2625{ 2625{
2626 struct iwl_priv *priv = hw->priv; 2626 struct iwl_priv *priv = hw->priv;
2627 2627
@@ -2634,7 +2634,7 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
2634 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 2634 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
2635 iwlcore_commit_rxon(priv); 2635 iwlcore_commit_rxon(priv);
2636 } 2636 }
2637 if (priv->vif == conf->vif) { 2637 if (priv->vif == vif) {
2638 priv->vif = NULL; 2638 priv->vif = NULL;
2639 memset(priv->bssid, 0, ETH_ALEN); 2639 memset(priv->bssid, 0, ETH_ALEN);
2640 } 2640 }