YanBo wrote:
On Fri, Jul 18, 2008 at 4:12 AM, Andrey Yurovsky <andrey@xxxxxxxxxxx> wrote:
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 <andrey@xxxxxxxxxxx>
---
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 217d506..6d9f4e1 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -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 ||
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index c6d12c5..8854820 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -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:
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.
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
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 8f51375..10f5d6a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -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);