A mesh probe request must include the mesh ID IE and a wildcard SSID IE. Add this and transpose the SSID scan list into mesh IDs for mesh interfaces.
Also allow the user to specify a mesh ID IE in the user scan IEs, since additional SSID IEs seem to be allowed. Signed-off-by: Thomas Pedersen <[email protected]> --- net/mac80211/tx.c | 23 ++++++++++++++++++----- net/mac80211/util.c | 1 + 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index cb311e1..7410260 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2624,11 +2624,24 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw, memcpy(hdr->addr2, vif->addr, ETH_ALEN); eth_broadcast_addr(hdr->addr3); - pos = skb_put(skb, ie_ssid_len); - *pos++ = WLAN_EID_SSID; - *pos++ = ssid_len; - if (ssid_len) - memcpy(pos, ssid, ssid_len); + if (ieee80211_vif_is_mesh(vif)) { + /* first the NULL SSID */ + pos = skb_put(skb, 2); + *pos++ = WLAN_EID_SSID; + *pos++ = 0; + /* NOTE: the mesh ID IE won't be in order */ + pos = skb_put(skb, 2 + ssid_len); + *pos++ = WLAN_EID_MESH_ID; + *pos++ = ssid_len; + if (ssid_len) + memcpy(pos, ssid, ssid_len); + } else { + pos = skb_put(skb, 2 + ssid_len); + *pos++ = WLAN_EID_SSID; + *pos++ = ssid_len; + if (ssid_len) + memcpy(pos, ssid, ssid_len); + } pos += ssid_len; return skb; diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 7519018..6edb119 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1179,6 +1179,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, if (ie && ie_len) { static const u8 before_ht[] = { WLAN_EID_SSID, + WLAN_EID_MESH_ID, WLAN_EID_SUPP_RATES, WLAN_EID_REQUEST, WLAN_EID_EXT_SUPP_RATES, -- 1.7.10.4 _______________________________________________ Devel mailing list [email protected] http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel
