mac80211: set forwarding in mesh capability info
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Fri, 12 Jul 2013 10:55:22 +0000 (18:55 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Jul 2013 06:58:14 +0000 (09:58 +0300)
Set the Forwarding bit in Mesh Capability Info according
to dot11MeshForwarding as defined in IEEE 802.11-2012
section 8.4.2.100.8.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh.c

index e536f22fbeca1db9d65c6beb04b8a60da6d6a15e..885a5f6e2c219b5c4e17b6574bd32e4231ed39b1 100644 (file)
@@ -273,7 +273,9 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata,
        neighbors = min_t(int, neighbors, IEEE80211_MAX_MESH_PEERINGS);
        *pos++ = neighbors << 1;
        /* Mesh capability */
-       *pos = IEEE80211_MESHCONF_CAPAB_FORWARDING;
+       *pos = 0x00;
+       *pos |= ifmsh->mshcfg.dot11MeshForwarding ?
+                       IEEE80211_MESHCONF_CAPAB_FORWARDING : 0x00;
        *pos |= ifmsh->accepting_plinks ?
                        IEEE80211_MESHCONF_CAPAB_ACCEPT_PLINKS : 0x00;
        /* Mesh PS mode. See IEEE802.11-2012 8.4.2.100.8 */