diff options
author | Andrey Yurovsky <andrey@cozybit.com> | 2008-10-13 21:23:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:21 -0400 |
commit | b706e65b40417e03c2451bb3f92488f3736843fa (patch) | |
tree | 187f86b86e707e6fd59ece0cbb262fe631a908d7 /drivers/net/wireless/ath5k/base.c | |
parent | 6e0e0bf80c963d83f511e1cda652630cf31ebf85 (diff) |
ath5k: fix mesh point operation
This patch fixes mesh point operation (thanks to YanBo for pointing
out the problem): make mesh point interfaces start beaconing when
they come up and configure the RX filter in mesh mode so that mesh
beacons and action frames are received. Add mesh point to the check
in ath5k_add_interface. Tested with multiple AR5211 cards.
Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index b1e9a47c1c55..44401f6f578d 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -2159,6 +2159,7 @@ ath5k_beacon_config(struct ath5k_softc *sc) | |||
2159 | if (sc->opmode == NL80211_IFTYPE_STATION) { | 2159 | if (sc->opmode == NL80211_IFTYPE_STATION) { |
2160 | sc->imask |= AR5K_INT_BMISS; | 2160 | sc->imask |= AR5K_INT_BMISS; |
2161 | } else if (sc->opmode == NL80211_IFTYPE_ADHOC || | 2161 | } else if (sc->opmode == NL80211_IFTYPE_ADHOC || |
2162 | sc->opmode == NL80211_IFTYPE_MESH_POINT || | ||
2162 | sc->opmode == NL80211_IFTYPE_AP) { | 2163 | sc->opmode == NL80211_IFTYPE_AP) { |
2163 | /* | 2164 | /* |
2164 | * In IBSS mode we use a self-linked tx descriptor and let the | 2165 | * In IBSS mode we use a self-linked tx descriptor and let the |
@@ -2753,6 +2754,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw, | |||
2753 | case NL80211_IFTYPE_AP: | 2754 | case NL80211_IFTYPE_AP: |
2754 | case NL80211_IFTYPE_STATION: | 2755 | case NL80211_IFTYPE_STATION: |
2755 | case NL80211_IFTYPE_ADHOC: | 2756 | case NL80211_IFTYPE_ADHOC: |
2757 | case NL80211_IFTYPE_MESH_POINT: | ||
2756 | case NL80211_IFTYPE_MONITOR: | 2758 | case NL80211_IFTYPE_MONITOR: |
2757 | sc->opmode = conf->type; | 2759 | sc->opmode = conf->type; |
2758 | break; | 2760 | break; |
@@ -2824,6 +2826,7 @@ ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
2824 | } | 2826 | } |
2825 | if (conf->changed & IEEE80211_IFCC_BEACON && | 2827 | if (conf->changed & IEEE80211_IFCC_BEACON && |
2826 | (vif->type == NL80211_IFTYPE_ADHOC || | 2828 | (vif->type == NL80211_IFTYPE_ADHOC || |
2829 | vif->type == NL80211_IFTYPE_MESH_POINT || | ||
2827 | vif->type == NL80211_IFTYPE_AP)) { | 2830 | vif->type == NL80211_IFTYPE_AP)) { |
2828 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); | 2831 | struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); |
2829 | if (!beacon) { | 2832 | if (!beacon) { |
@@ -2952,6 +2955,9 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw, | |||
2952 | rfilt |= AR5K_RX_FILTER_PROM; | 2955 | rfilt |= AR5K_RX_FILTER_PROM; |
2953 | if (sc->opmode == NL80211_IFTYPE_ADHOC) | 2956 | if (sc->opmode == NL80211_IFTYPE_ADHOC) |
2954 | rfilt |= AR5K_RX_FILTER_BEACON; | 2957 | rfilt |= AR5K_RX_FILTER_BEACON; |
2958 | if (sc->opmode == NL80211_IFTYPE_MESH_POINT) | ||
2959 | rfilt |= AR5K_RX_FILTER_CONTROL | AR5K_RX_FILTER_BEACON | | ||
2960 | AR5K_RX_FILTER_PROBEREQ | AR5K_RX_FILTER_PROM; | ||
2955 | 2961 | ||
2956 | /* Set filters */ | 2962 | /* Set filters */ |
2957 | ath5k_hw_set_rx_filter(ah,rfilt); | 2963 | ath5k_hw_set_rx_filter(ah,rfilt); |