diff options
author | monthadar <monthadar@FreeBSD.org> | 2013-02-07 21:25:32 +0000 |
---|---|---|
committer | monthadar <monthadar@FreeBSD.org> | 2013-02-07 21:25:32 +0000 |
commit | 6bc4d326227cd340b42d20c050e4a27b9c41f2b2 (patch) | |
tree | ab5ffa5fa3cc5080d12b498ab1016aad70a601d3 /sys/net80211/ieee80211_hwmp.c | |
parent | 4ef618069cca4eaa62cd2dc2529e8fc7ca2db7d9 (diff) | |
download | FreeBSD-src-6bc4d326227cd340b42d20c050e4a27b9c41f2b2.zip FreeBSD-src-6bc4d326227cd340b42d20c050e4a27b9c41f2b2.tar.gz |
Send frames to mesh gate if 11s discovery fails.
* Send frames that have no path to a known valid Mesh Gate;
* Added the function ieee80211_mesh_forward_to_gates that sends the frame
to the first found Mesh Gate in the forwarding information;
* If we try to discover again while we are discovering queue frame,
the discovery callout will send the frames either to mesh gates
or discards them silently;
* Queue frame also if we try to discover to frequently;
Approved by: adrian (mentor)
Diffstat (limited to 'sys/net80211/ieee80211_hwmp.c')
-rw-r--r-- | sys/net80211/ieee80211_hwmp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index c740afd..52a3152 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -1839,12 +1839,11 @@ hwmp_rediscover_cb(void *arg) hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route); if (hr->hr_preqretries >= ieee80211_hwmp_maxpreq_retries) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, - rt->rt_dest, NULL, "%s", - "no valid path , max number of discovery, send GATE"); - /* TODO: send to known gates */ + IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_ANY, + rt->rt_dest, "%s", + "max number of discovery, send queued frames to GATE"); + ieee80211_mesh_forward_to_gates(vap, rt); vap->iv_stats.is_mesh_fwd_nopath++; - rt->rt_flags = 0; /* Mark invalid */ return ; /* XXX: flush queue? */ } @@ -1914,6 +1913,12 @@ hwmp_discover(struct ieee80211vap *vap, } hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route); + if (rt->rt_flags & IEEE80211_MESHRT_FLAGS_DISCOVER) { + IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_HWMP, dest, + "%s", "already discovering queue frame until path found"); + sendpreq = 1; + goto done; + } if ((rt->rt_flags & IEEE80211_MESHRT_FLAGS_VALID) == 0) { if (hr->hr_lastdiscovery != 0 && (ticks - hr->hr_lastdiscovery < @@ -1921,7 +1926,7 @@ hwmp_discover(struct ieee80211vap *vap, IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, dest, NULL, "%s", "too frequent discovery requeust"); - /* XXX: stats? */ + sendpreq = 1; goto done; } hr->hr_lastdiscovery = ticks; |