diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-23 07:15:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:55:07 -0500 |
commit | 1ed32e4fc8cfc9656cc1101e7f9617d485fcbe7b (patch) | |
tree | 81697637a36eb4776df39c81a77a9e09ec951a1a /drivers/net/wireless/ath/ath5k/base.c | |
parent | 98b6218388e345064c3f2d3c161383a18274c638 (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/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 18 |
1 files changed, 9 insertions, 9 deletions
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); | |||
225 | static int ath5k_start(struct ieee80211_hw *hw); | 225 | static int ath5k_start(struct ieee80211_hw *hw); |
226 | static void ath5k_stop(struct ieee80211_hw *hw); | 226 | static void ath5k_stop(struct ieee80211_hw *hw); |
227 | static int ath5k_add_interface(struct ieee80211_hw *hw, | 227 | static int ath5k_add_interface(struct ieee80211_hw *hw, |
228 | struct ieee80211_if_init_conf *conf); | 228 | struct ieee80211_vif *vif); |
229 | static void ath5k_remove_interface(struct ieee80211_hw *hw, | 229 | static void ath5k_remove_interface(struct ieee80211_hw *hw, |
230 | struct ieee80211_if_init_conf *conf); | 230 | struct ieee80211_vif *vif); |
231 | static int ath5k_config(struct ieee80211_hw *hw, u32 changed); | 231 | static int ath5k_config(struct ieee80211_hw *hw, u32 changed); |
232 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | 232 | static 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 | ||
2787 | static int ath5k_add_interface(struct ieee80211_hw *hw, | 2787 | static 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 | ||
2823 | static void | 2823 | static void |
2824 | ath5k_remove_interface(struct ieee80211_hw *hw, | 2824 | ath5k_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); |