aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.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/ath/ath9k/main.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/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c28
1 files changed, 14 insertions, 14 deletions
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;