ath5k: add Mesh Point support
Subsystems (2)
PATCH 1/1 ath5k: add Mesh Point support
This enables draft-802.11s Mesh Point operation. For that we need mesh beaconing. Tested with AR5212/AR5213 PCI card against Zydas and b43 mesh nodes.
---
drivers/net/wireless/ath5k/base.c +3 -1
@@ -1425,7 +1425,8 @@ ath5k_beaconq_config(struct ath5k_softc *sc) ret =ath5k_hw_get_tx_queueprops (ah, sc->bhalq, &qi);if (ret)return ret; -if (sc->opmode ==IEEE80211_IF_TYPE_AP ) { +if (sc->opmode ==IEEE80211_IF_TYPE_AP || + sc->opmode ==IEEE80211_IF_TYPE_MESH_POINT ) {/* * Always burst out beacon and CAB traffic * (aifs = cwmin = cwmax = 0)
@@ -2911,6 +2912,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,if (sc->opmode !=IEEE80211_IF_TYPE_STA ) rfilt |=AR5K_RX_FILTER_PROBEREQ ;if (sc->opmode !=IEEE80211_IF_TYPE_AP && + sc->opmode !=IEEE80211_IF_TYPE_MESH_POINT &&test_bit (ATH_STAT_PROMISC , sc->status)) rfilt |=AR5K_RX_FILTER_PROM ; if (sc->opmode == IEEE80211_IF_TYPE_STA ||
drivers/net/wireless/ath5k/hw.c +1 -0
@@ -2326,6 +2326,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)break ;case IEEE80211_IF_TYPE_AP : +case IEEE80211_IF_TYPE_MESH_POINT : pcu_reg |=AR5K_STA_ID1_AP |AR5K_STA_ID1_RTS_DEF_ANTENNA | (ah->ah_version ==AR5K_AR5210 ?AR5K_STA_ID1_NO_PSPOLL :0 );
2008/7/17 Andrey Yurovsky <[email protected]>:
Quoted 35 lines
This enables draft-802.11s Mesh Point operation. For that we need mesh beaconing. Tested with AR5212/AR5213 PCI card against Zydas and b43 mesh nodes.
Signed-off-by Andrey Yurovsky <[email protected]>---
drivers/net/wireless/ath5k/base.c +3
-1@@ -1425,7 +1425,8 @@ ath5k_beaconq_config(struct ath5k_softc *sc) ret =ath5k_hw_get_tx_queueprops (ah, sc->bhalq, &qi);if (ret)return ret; -if (sc->opmode ==IEEE80211_IF_TYPE_AP ) { +if (sc->opmode ==IEEE80211_IF_TYPE_AP || + sc->opmode ==IEEE80211_IF_TYPE_MESH_POINT ) {/* * Always burst out beacon and CAB traffic * (aifs = cwmin = cwmax = 0) @@ -2911,6 +2912,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,if (sc->opmode !=IEEE80211_IF_TYPE_STA ) rfilt |=AR5K_RX_FILTER_PROBEREQ ;if (sc->opmode !=IEEE80211_IF_TYPE_AP && + sc->opmode !=IEEE80211_IF_TYPE_MESH_POINT &&test_bit (ATH_STAT_PROMISC , sc->status)) rfilt |=AR5K_RX_FILTER_PROM ; if (sc->opmode == IEEE80211_IF_TYPE_STA ||drivers/net/wireless/ath5k/hw.c +0
-0
drivers/net/wireless/ath5k/hw.c int ath5k_hw_set_opmode(struct ath5k_hw *ah) · line 2332
Quoted 7 lines
drivers/net/wireless/ath5k/hw.c +1
-0@@ -2326,6 +2326,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)break ;case IEEE80211_IF_TYPE_AP : +case IEEE80211_IF_TYPE_MESH_POINT : pcu_reg |=AR5K_STA_ID1_AP |AR5K_STA_ID1_RTS_DEF_ANTENNA | (ah->ah_version ==AR5K_AR5210 ?AR5K_STA_ID1_NO_PSPOLL :0 );
Thanks ;-)
Signature · 3 lines
GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick
Quoted 35 lines · Andrey Yurovsky
This enables draft-802.11s Mesh Point operation. For that we need mesh beaconing. Tested with AR5212/AR5213 PCI card against Zydas and b43 mesh nodes.
Signed-off-by Andrey Yurovsky <[email protected]>---
drivers/net/wireless/ath5k/base.c +3
-1@@ -1425,7 +1425,8 @@ ath5k_beaconq_config(struct ath5k_softc *sc) ret =ath5k_hw_get_tx_queueprops (ah, sc->bhalq, &qi);if (ret)return ret; -if (sc->opmode ==IEEE80211_IF_TYPE_AP ) { +if (sc->opmode ==IEEE80211_IF_TYPE_AP || + sc->opmode ==IEEE80211_IF_TYPE_MESH_POINT ) {/* * Always burst out beacon and CAB traffic * (aifs = cwmin = cwmax = 0) @@ -2911,6 +2912,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,if (sc->opmode !=IEEE80211_IF_TYPE_STA ) rfilt |=AR5K_RX_FILTER_PROBEREQ ;if (sc->opmode !=IEEE80211_IF_TYPE_AP && + sc->opmode !=IEEE80211_IF_TYPE_MESH_POINT &&test_bit (ATH_STAT_PROMISC , sc->status)) rfilt |=AR5K_RX_FILTER_PROM ; if (sc->opmode == IEEE80211_IF_TYPE_STA ||drivers/net/wireless/ath5k/hw.c +0
-0
drivers/net/wireless/ath5k/hw.c int ath5k_hw_set_opmode(struct ath5k_hw *ah) · line 2332
Quoted 7 lines
drivers/net/wireless/ath5k/hw.c +1
-0@@ -2326,6 +2326,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)break ;case IEEE80211_IF_TYPE_AP : +case IEEE80211_IF_TYPE_MESH_POINT : pcu_reg |=AR5K_STA_ID1_AP |AR5K_STA_ID1_RTS_DEF_ANTENNA | (ah->ah_version ==AR5K_AR5210 ?AR5K_STA_ID1_NO_PSPOLL :0 );
Hi Andrey
First of all, Thanks for your works to enable the ath5k support 80211s. I just testing them with the newest wireless-testing tree and meet some problems:
The Atheros chipset what I used is one AR2413 cardbus card and one AR5414(the lspci show it as AR5413 but debug message show is as AR5414) , after apply the patch, I waked the up them by follow commands:
iw dev wmaster0 interface add mesh type mp mesh_id 12345 iwconfig mesh channel 1
ifconfig mesh 192.168.3.80/192.168.3.81
but there is no beacon was send from any of them, after input "iw dev mesh station dump"
it also no station was found,(PS:the two PC are very close), ping each other also no response.
After roughly browse the ath5k code and the patch, I have below questions:
1. From the patch, there is no any place to set the sc->opmode's value to IEEE80211_IF_TYPE_MESH_POINT.
2. it also haven't found code to enable/trigger "beacon send" in MESH_POINT mode.
So I think maybe this patch can make ath5k work in mesh mode if some mesh point(with b43 or zd1211rw) has been waked up early. because it can correctly deal with the RX mesh packet. but it can't work independent in a pure ath5k mesh network, cause none can send beacon correctly, and hence they can't set up link each other.
BR
yanbo
Quoted 50 lines · YanBo
Quoted 36 lines · Andrey Yurovsky
This enables draft-802.11s Mesh Point operation. For that we need mesh beaconing. Tested with AR5212/AR5213 PCI card against Zydas and b43 mesh nodes.
Signed-off-by Andrey Yurovsky <[email protected]>---
drivers/net/wireless/ath5k/base.c +3
-1@@ -1425,7 +1425,8 @@ ath5k_beaconq_config(struct ath5k_softc *sc) ret =ath5k_hw_get_tx_queueprops (ah, sc->bhalq, &qi);if (ret)return ret; -if (sc->opmode ==IEEE80211_IF_TYPE_AP ) { +if (sc->opmode ==IEEE80211_IF_TYPE_AP || + sc->opmode ==IEEE80211_IF_TYPE_MESH_POINT ) {/* * Always burst out beacon and CAB traffic * (aifs = cwmin = cwmax = 0) @@ -2911,6 +2912,7 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,if (sc->opmode !=IEEE80211_IF_TYPE_STA ) rfilt |=AR5K_RX_FILTER_PROBEREQ ;if (sc->opmode !=IEEE80211_IF_TYPE_AP && + sc->opmode !=IEEE80211_IF_TYPE_MESH_POINT &&test_bit (ATH_STAT_PROMISC , sc->status)) rfilt |=AR5K_RX_FILTER_PROM ; if (sc->opmode == IEEE80211_IF_TYPE_STA ||drivers/net/wireless/ath5k/hw.c +0
-0drivers/net/wireless/ath5k/hw.c int ath5k_hw_set_opmode(struct ath5k_hw *ah) · line 2332
Quoted 7 lines
drivers/net/wireless/ath5k/hw.c +1
-0@@ -2326,6 +2326,7 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)break ;case IEEE80211_IF_TYPE_AP : +case IEEE80211_IF_TYPE_MESH_POINT : pcu_reg |=AR5K_STA_ID1_AP |AR5K_STA_ID1_RTS_DEF_ANTENNA | (ah->ah_version ==AR5K_AR5210 ?AR5K_STA_ID1_NO_PSPOLL :0 );Hi Andrey
commands:
Quoted 10 lines
iw dev wmaster0 interface add mesh type mp
mesh_id12345 iwconfig mesh channel 1
ifconfig mesh 192.168.3.80/192.168.3.81but there is no beacon was send from any of them, after input "iw dev mesh station dump"
it also no station was found,(PS:the two PC are very close), ping each other also no response.
I've been looking at this too. After the "revamp beacon configuration" patch, mesh no longer send beacons. If I revert it, beacons reappear and my two stations are found. I'm using both a b43 & zd1211rw.
I believe the problem is in mac80211. It appears that the call to ieee80211_if_config that was previously in ieee80211_open never made it to the new start_mesh routine in the revision. The attached patch seems to revive beacons and both stations are now found. I'm not familiar with the code and wouldn't call this a fix.
BTW: the Wireshark patch for mesh frames at open80211s.org is outdated. The header length is now 6 and the ie codes have changed. I'll post a new patch back there. Also, only madwifi and b43 drivers return all frames when in monitor mode. The ath5k driver doesn't. It sure would be nice if it did.
Steve
net/mac80211/mlme.c +1 -0
@@ -3300,6 +3300,7 @@ void ieee80211_start_mesh(struct net_device *dev) {struct ieee80211_if_sta *ifsta;struct ieee80211_sub_if_data *sdata =IEEE80211_DEV_TO_SUB_IF (dev); +ieee80211_if_config (sdata,IEEE80211_IFCC_BEACON ); ifsta = &sdata->u.sta; ifsta->state =IEEE80211_MESH_UP ;ieee80211_sta_timer ((unsigned long )sdata);
Johannes Berg
maintainerQuoted 10 lines
I've been looking at this too. After the "revamp beacon configuration" patch, mesh no longer send beacons. If I revert it, beacons reappear and my two stations are found. I'm using both a b43 & zd1211rw.
I believe the problem is in mac80211. It appears that the call to
ieee80211_if_configthat was previously inieee80211_opennever made it to the newstart_meshroutine in the revision. The attached patch seems to revive beacons and both stations are now found. I'm not familiar with the code and wouldn't call this a fix.
Yeah, we talked about it yesterday or the day before, and this seems like the right fix, except you say that AP is also broken.
I'll look into everything when I no longer feel hung over from travelling for about 18 hours.
johannes
Quoted 5 lines · Johannes Berg
Quoted 4 lines
I've been looking at this too. After the "revamp beacon configuration" patch, mesh no longer send beacons. If I revert it, beacons reappear and my two stations are found. I'm using both a b43 & zd1211rw.
I believe the problem is in mac80211. It appears that the call to
ieee80211_if_configthat was previously inieee80211_opennever made it to the newstart_meshroutine in the revision. The attached patch seems to revive beacons and both stations are now found. I'm not familiar with the code and wouldn't call this a fix.
Quoted 8 lines
Yeah, we talked about it yesterday or the day before, and this seems like the right fix, except you say that AP is also broken.
I'll look into everything when I no longer feel hung over from travelling for about 18 hours.
johannes
I haven't tested AP, just mesh. So far, it's working w/ 3 nodes. In rereading my post, it wasn't clear which beacons I meant.
Although mesh path timeout seems to default to 5000ms, in my testing it takes about 50 min. Is this really the timeout that removes a node when it's beacon is off for this period?
Steve
Quoted 1 line · Steve Brown
Although mesh path timeout seems to default to 5000ms, in my testing =
it=20
Quoted 1 line
takes about 50 min. Is this really the timeout that removes a node wh=
en=20
Quoted 1 line
it's beacon is off for this period?
=EF=BB=BF
When a mesh path timeouts it is marked accordingly and it is no longer valid for routing. In a continuous traffic scenario this means that every five seconds, the route are refreshed. Actually we start refreshing one second before the route expires, so that we have a fresh path before the current one times out.
Mesh path timeout does not _remove_ the path from the mesh path table, so you will see it for a while, the table cleanup function which remove= s
from the table paths that have expired long ago has a separate timing.
--=20
Luis Carlos Cobo Rus GnuPG ID: 44019B60
cozybit Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html