aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
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/ath
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/ath')
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c8
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c18
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c28
3 files changed, 27 insertions, 27 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 20f04ab2b13e..4d27f7f67c76 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -1939,7 +1939,7 @@ err_free:
1939} 1939}
1940 1940
1941static int ar9170_op_add_interface(struct ieee80211_hw *hw, 1941static int ar9170_op_add_interface(struct ieee80211_hw *hw,
1942 struct ieee80211_if_init_conf *conf) 1942 struct ieee80211_vif *vif)
1943{ 1943{
1944 struct ar9170 *ar = hw->priv; 1944 struct ar9170 *ar = hw->priv;
1945 struct ath_common *common = &ar->common; 1945 struct ath_common *common = &ar->common;
@@ -1952,8 +1952,8 @@ static int ar9170_op_add_interface(struct ieee80211_hw *hw,
1952 goto unlock; 1952 goto unlock;
1953 } 1953 }
1954 1954
1955 ar->vif = conf->vif; 1955 ar->vif = vif;
1956 memcpy(common->macaddr, conf->mac_addr, ETH_ALEN); 1956 memcpy(common->macaddr, vif->addr, ETH_ALEN);
1957 1957
1958 if (modparam_nohwcrypt || (ar->vif->type != NL80211_IFTYPE_STATION)) { 1958 if (modparam_nohwcrypt || (ar->vif->type != NL80211_IFTYPE_STATION)) {
1959 ar->rx_software_decryption = true; 1959 ar->rx_software_decryption = true;
@@ -1973,7 +1973,7 @@ unlock:
1973} 1973}
1974 1974
1975static void ar9170_op_remove_interface(struct ieee80211_hw *hw, 1975static void ar9170_op_remove_interface(struct ieee80211_hw *hw,
1976 struct ieee80211_if_init_conf *conf) 1976 struct ieee80211_vif *vif)
1977{ 1977{
1978 struct ar9170 *ar = hw->priv; 1978 struct ar9170 *ar = hw->priv;
1979 1979
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index a4c086f069b1..20c7e5b450aa 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -225,9 +225,9 @@ static int ath5k_reset_wake(struct ath5k_softc *sc);
225static int ath5k_start(struct ieee80211_hw *hw); 225static int ath5k_start(struct ieee80211_hw *hw);
226static void ath5k_stop(struct ieee80211_hw *hw); 226static void ath5k_stop(struct ieee80211_hw *hw);
227static int ath5k_add_interface(struct ieee80211_hw *hw, 227static int ath5k_add_interface(struct ieee80211_hw *hw,
228 struct ieee80211_if_init_conf *conf); 228 struct ieee80211_vif *vif);
229static void ath5k_remove_interface(struct ieee80211_hw *hw, 229static void ath5k_remove_interface(struct ieee80211_hw *hw,
230 struct ieee80211_if_init_conf *conf); 230 struct ieee80211_vif *vif);
231static int ath5k_config(struct ieee80211_hw *hw, u32 changed); 231static int ath5k_config(struct ieee80211_hw *hw, u32 changed);
232static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, 232static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw,
233 int mc_count, struct dev_addr_list *mc_list); 233 int mc_count, struct dev_addr_list *mc_list);
@@ -2785,7 +2785,7 @@ static void ath5k_stop(struct ieee80211_hw *hw)
2785} 2785}
2786 2786
2787static int ath5k_add_interface(struct ieee80211_hw *hw, 2787static int ath5k_add_interface(struct ieee80211_hw *hw,
2788 struct ieee80211_if_init_conf *conf) 2788 struct ieee80211_vif *vif)
2789{ 2789{
2790 struct ath5k_softc *sc = hw->priv; 2790 struct ath5k_softc *sc = hw->priv;
2791 int ret; 2791 int ret;
@@ -2796,22 +2796,22 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
2796 goto end; 2796 goto end;
2797 } 2797 }
2798 2798
2799 sc->vif = conf->vif; 2799 sc->vif = vif;
2800 2800
2801 switch (conf->type) { 2801 switch (vif->type) {
2802 case NL80211_IFTYPE_AP: 2802 case NL80211_IFTYPE_AP:
2803 case NL80211_IFTYPE_STATION: 2803 case NL80211_IFTYPE_STATION:
2804 case NL80211_IFTYPE_ADHOC: 2804 case NL80211_IFTYPE_ADHOC:
2805 case NL80211_IFTYPE_MESH_POINT: 2805 case NL80211_IFTYPE_MESH_POINT:
2806 case NL80211_IFTYPE_MONITOR: 2806 case NL80211_IFTYPE_MONITOR:
2807 sc->opmode = conf->type; 2807 sc->opmode = vif->type;
2808 break; 2808 break;
2809 default: 2809 default:
2810 ret = -EOPNOTSUPP; 2810 ret = -EOPNOTSUPP;
2811 goto end; 2811 goto end;
2812 } 2812 }
2813 2813
2814 ath5k_hw_set_lladdr(sc->ah, conf->mac_addr); 2814 ath5k_hw_set_lladdr(sc->ah, vif->addr);
2815 ath5k_mode_setup(sc); 2815 ath5k_mode_setup(sc);
2816 2816
2817 ret = 0; 2817 ret = 0;
@@ -2822,13 +2822,13 @@ end:
2822 2822
2823static void 2823static void
2824ath5k_remove_interface(struct ieee80211_hw *hw, 2824ath5k_remove_interface(struct ieee80211_hw *hw,
2825 struct ieee80211_if_init_conf *conf) 2825 struct ieee80211_vif *vif)
2826{ 2826{
2827 struct ath5k_softc *sc = hw->priv; 2827 struct ath5k_softc *sc = hw->priv;
2828 u8 mac[ETH_ALEN] = {}; 2828 u8 mac[ETH_ALEN] = {};
2829 2829
2830 mutex_lock(&sc->lock); 2830 mutex_lock(&sc->lock);
2831 if (sc->vif != conf->vif) 2831 if (sc->vif != vif)
2832 goto end; 2832 goto end;
2833 2833
2834 ath5k_hw_set_lladdr(sc->ah, mac); 2834 ath5k_hw_set_lladdr(sc->ah, mac);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3f5b887d0fcd..446bd23756e5 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2534,12 +2534,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
2534} 2534}
2535 2535
2536static int ath9k_add_interface(struct ieee80211_hw *hw, 2536static int ath9k_add_interface(struct ieee80211_hw *hw,
2537 struct ieee80211_if_init_conf *conf) 2537 struct ieee80211_vif *vif)
2538{ 2538{
2539 struct ath_wiphy *aphy = hw->priv; 2539 struct ath_wiphy *aphy = hw->priv;
2540 struct ath_softc *sc = aphy->sc; 2540 struct ath_softc *sc = aphy->sc;
2541 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 2541 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
2542 struct ath_vif *avp = (void *)conf->vif->drv_priv; 2542 struct ath_vif *avp = (void *)vif->drv_priv;
2543 enum nl80211_iftype ic_opmode = NL80211_IFTYPE_UNSPECIFIED; 2543 enum nl80211_iftype ic_opmode = NL80211_IFTYPE_UNSPECIFIED;
2544 int ret = 0; 2544 int ret = 0;
2545 2545
@@ -2551,7 +2551,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
2551 goto out; 2551 goto out;
2552 } 2552 }
2553 2553
2554 switch (conf->type) { 2554 switch (vif->type) {
2555 case NL80211_IFTYPE_STATION: 2555 case NL80211_IFTYPE_STATION:
2556 ic_opmode = NL80211_IFTYPE_STATION; 2556 ic_opmode = NL80211_IFTYPE_STATION;
2557 break; 2557 break;
@@ -2562,11 +2562,11 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
2562 ret = -ENOBUFS; 2562 ret = -ENOBUFS;
2563 goto out; 2563 goto out;
2564 } 2564 }
2565 ic_opmode = conf->type; 2565 ic_opmode = vif->type;
2566 break; 2566 break;
2567 default: 2567 default:
2568 ath_print(common, ATH_DBG_FATAL, 2568 ath_print(common, ATH_DBG_FATAL,
2569 "Interface type %d not yet supported\n", conf->type); 2569 "Interface type %d not yet supported\n", vif->type);
2570 ret = -EOPNOTSUPP; 2570 ret = -EOPNOTSUPP;
2571 goto out; 2571 goto out;
2572 } 2572 }
@@ -2598,18 +2598,18 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
2598 * Enable MIB interrupts when there are hardware phy counters. 2598 * Enable MIB interrupts when there are hardware phy counters.
2599 * Note we only do this (at the moment) for station mode. 2599 * Note we only do this (at the moment) for station mode.
2600 */ 2600 */
2601 if ((conf->type == NL80211_IFTYPE_STATION) || 2601 if ((vif->type == NL80211_IFTYPE_STATION) ||
2602 (conf->type == NL80211_IFTYPE_ADHOC) || 2602 (vif->type == NL80211_IFTYPE_ADHOC) ||
2603 (conf->type == NL80211_IFTYPE_MESH_POINT)) { 2603 (vif->type == NL80211_IFTYPE_MESH_POINT)) {
2604 sc->imask |= ATH9K_INT_MIB; 2604 sc->imask |= ATH9K_INT_MIB;
2605 sc->imask |= ATH9K_INT_TSFOOR; 2605 sc->imask |= ATH9K_INT_TSFOOR;
2606 } 2606 }
2607 2607
2608 ath9k_hw_set_interrupts(sc->sc_ah, sc->imask); 2608 ath9k_hw_set_interrupts(sc->sc_ah, sc->imask);
2609 2609
2610 if (conf->type == NL80211_IFTYPE_AP || 2610 if (vif->type == NL80211_IFTYPE_AP ||
2611 conf->type == NL80211_IFTYPE_ADHOC || 2611 vif->type == NL80211_IFTYPE_ADHOC ||
2612 conf->type == NL80211_IFTYPE_MONITOR) 2612 vif->type == NL80211_IFTYPE_MONITOR)
2613 ath_start_ani(common); 2613 ath_start_ani(common);
2614 2614
2615out: 2615out:
@@ -2618,12 +2618,12 @@ out:
2618} 2618}
2619 2619
2620static void ath9k_remove_interface(struct ieee80211_hw *hw, 2620static void ath9k_remove_interface(struct ieee80211_hw *hw,
2621 struct ieee80211_if_init_conf *conf) 2621 struct ieee80211_vif *vif)
2622{ 2622{
2623 struct ath_wiphy *aphy = hw->priv; 2623 struct ath_wiphy *aphy = hw->priv;
2624 struct ath_softc *sc = aphy->sc; 2624 struct ath_softc *sc = aphy->sc;
2625 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 2625 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
2626 struct ath_vif *avp = (void *)conf->vif->drv_priv; 2626 struct ath_vif *avp = (void *)vif->drv_priv;
2627 int i; 2627 int i;
2628 2628
2629 ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n"); 2629 ath_print(common, ATH_DBG_CONFIG, "Detach Interface\n");
@@ -2644,7 +2644,7 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
2644 sc->sc_flags &= ~SC_OP_BEACONS; 2644 sc->sc_flags &= ~SC_OP_BEACONS;
2645 2645
2646 for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) { 2646 for (i = 0; i < ARRAY_SIZE(sc->beacon.bslot); i++) {
2647 if (sc->beacon.bslot[i] == conf->vif) { 2647 if (sc->beacon.bslot[i] == vif) {
2648 printk(KERN_DEBUG "%s: vif had allocated beacon " 2648 printk(KERN_DEBUG "%s: vif had allocated beacon "
2649 "slot\n", __func__); 2649 "slot\n", __func__);
2650 sc->beacon.bslot[i] = NULL; 2650 sc->beacon.bslot[i] = NULL;