cozybit/open80211s — Issue #1: Mesh nodes should respond to probe requests
Author: jcard0na
Created: 2012-03-01 19:54:58+00:00
State: open

It's not hard. Here's an outline of what needs to be implemented:

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index c707c8b..6b4254e 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -609,6 +609,48 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
ieee80211_configure_filter(local);
}

+static void ieee80211_mesh_rx_preq(struct ieee80211_sub_if_data *sdata,
+ u16 stype,
+ struct ieee80211_mgmt *mgmt,
+ size_t len,
+ struct ieee80211_rx_status *rx_status)
+{
+ /* TODO: parse probe request, and respond with probe response if
+ appropriate. */
+}
+
static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
u16 stype,
struct ieee80211_mgmt *mgmt,
@@ -695,6 +737,10 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
ieee80211_mesh_rx_bcn_presp(sdata, stype, mgmt, skb->len,
rx_status);
break;
+ case IEEE80211_STYPE_PROBE_REQ:
+ ieee80211_mesh_rx_bcn_preq(sdata, stype, mgmt, skb->len,
+ rx_status);
+ break;
case IEEE80211_STYPE_ACTION:
ieee80211_mesh_rx_mgmt_action(sdata, mgmt, skb->len, rx_status);
break;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 7a4ff02..e13fc40 100644
--- a/net/mac80211/rx.c
break;
case cpu_to_le16(IEEE80211_STYPE_PROBE_REQ):
/* process only for ibss */
- if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
+ if (sdata->vif.type != NL80211_IFTYPE_ADHOC ||
+ sdata->vif.type != NL80211_IFTYPE_MESH_POINT)
return RX_DROP_MONITOR;
break;
default: