]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ath5k: fix mesh point operation
authorAndrey Yurovsky <andrey@cozybit.com>
Tue, 14 Oct 2008 01:23:07 +0000 (18:23 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 31 Oct 2008 23:00:21 +0000 (19:00 -0400)
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>
drivers/net/wireless/ath5k/base.c

index b1e9a47c1c550e192cab9c076312ec274de9a3b6..44401f6f578d01c7ce5a01b8f958d7cb93e37b13 100644 (file)
@@ -2159,6 +2159,7 @@ ath5k_beacon_config(struct ath5k_softc *sc)
        if (sc->opmode == NL80211_IFTYPE_STATION) {
                sc->imask |= AR5K_INT_BMISS;
        } else if (sc->opmode == NL80211_IFTYPE_ADHOC ||
+                       sc->opmode == NL80211_IFTYPE_MESH_POINT ||
                        sc->opmode == NL80211_IFTYPE_AP) {
                /*
                 * 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,
        case NL80211_IFTYPE_AP:
        case NL80211_IFTYPE_STATION:
        case NL80211_IFTYPE_ADHOC:
+       case NL80211_IFTYPE_MESH_POINT:
        case NL80211_IFTYPE_MONITOR:
                sc->opmode = conf->type;
                break;
@@ -2824,6 +2826,7 @@ ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        }
        if (conf->changed & IEEE80211_IFCC_BEACON &&
                        (vif->type == NL80211_IFTYPE_ADHOC ||
+                        vif->type == NL80211_IFTYPE_MESH_POINT ||
                         vif->type == NL80211_IFTYPE_AP)) {
                struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
                if (!beacon) {
@@ -2952,6 +2955,9 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
                rfilt |= AR5K_RX_FILTER_PROM;
        if (sc->opmode == NL80211_IFTYPE_ADHOC)
                rfilt |= AR5K_RX_FILTER_BEACON;
+       if (sc->opmode == NL80211_IFTYPE_MESH_POINT)
+               rfilt |= AR5K_RX_FILTER_CONTROL | AR5K_RX_FILTER_BEACON |
+                       AR5K_RX_FILTER_PROBEREQ | AR5K_RX_FILTER_PROM;
 
        /* Set filters */
        ath5k_hw_set_rx_filter(ah,rfilt);