diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-07-09 08:40:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-07-14 14:30:07 -0400 |
commit | 9d139c810a2aa17365cc548d0cd2a189d8433c65 (patch) | |
tree | ef10ca55f93689ab97368376d277102d2527c961 /drivers/net/wireless/ath5k/base.c | |
parent | f3947e2dfa3b18f375b7acd03b7ee2877d0751fc (diff) |
mac80211: revamp beacon configuration
This patch changes mac80211's beacon configuration handling
to never pass skbs to the driver directly but rather always
require the driver to use ieee80211_beacon_get(). Additionally,
it introduces "change flags" on the config_interface() call
to enable drivers to figure out what is changing. Finally, it
removes the beacon_update() driver callback in favour of
having IBSS beacon delivered by ieee80211_beacon_get() as well.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/base.c')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index a43e9b25169..217d506527a 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -207,7 +207,6 @@ static struct ieee80211_ops ath5k_hw_ops = { | |||
207 | .get_tx_stats = ath5k_get_tx_stats, | 207 | .get_tx_stats = ath5k_get_tx_stats, |
208 | .get_tsf = ath5k_get_tsf, | 208 | .get_tsf = ath5k_get_tsf, |
209 | .reset_tsf = ath5k_reset_tsf, | 209 | .reset_tsf = ath5k_reset_tsf, |
210 | .beacon_update = ath5k_beacon_update, | ||
211 | }; | 210 | }; |
212 | 211 | ||
213 | /* | 212 | /* |
@@ -2785,6 +2784,18 @@ ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
2785 | * a clean way of letting us retrieve this yet. */ | 2784 | * a clean way of letting us retrieve this yet. */ |
2786 | ath5k_hw_set_associd(ah, ah->ah_bssid, 0); | 2785 | ath5k_hw_set_associd(ah, ah->ah_bssid, 0); |
2787 | } | 2786 | } |
2787 | |||
2788 | if (conf->changed & IEEE80211_IFCC_BEACON && | ||
2789 | vif->type == IEEE80211_IF_TYPE_IBSS) { | ||
2790 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); | ||
2791 | if (!beacon) { | ||
2792 | ret = -ENOMEM; | ||
2793 | goto unlock; | ||
2794 | } | ||
2795 | /* call old handler for now */ | ||
2796 | ath5k_beacon_update(hw, beacon); | ||
2797 | } | ||
2798 | |||
2788 | mutex_unlock(&sc->lock); | 2799 | mutex_unlock(&sc->lock); |
2789 | 2800 | ||
2790 | return ath5k_reset(hw); | 2801 | return ath5k_reset(hw); |