diff options
author | Chun-Yeow Yeoh <yeohchunyeow@gmail.com> | 2011-11-24 20:15:20 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-28 14:44:02 -0500 |
commit | 4bb62344e4703414fd253ceb07c163ac37da80d4 (patch) | |
tree | dd8e23fa687ccf2cf21491ccd012fa0447fc08c5 /net | |
parent | 090891fb2c68eecf95c18c8ba117fc850d21abf8 (diff) |
{nl,cfg,mac}80211: Allow Setting Multicast Rate in Mesh
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/cfg.c | 6 | ||||
-rw-r--r-- | net/mac80211/tx.c | 1 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index a29f06c0bcf0..7ccba83dc8c8 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1195,6 +1195,8 @@ static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh, | |||
1195 | { | 1195 | { |
1196 | u8 *new_ie; | 1196 | u8 *new_ie; |
1197 | const u8 *old_ie; | 1197 | const u8 *old_ie; |
1198 | struct ieee80211_sub_if_data *sdata = container_of(ifmsh, | ||
1199 | struct ieee80211_sub_if_data, u.mesh); | ||
1198 | 1200 | ||
1199 | /* allocate information elements */ | 1201 | /* allocate information elements */ |
1200 | new_ie = NULL; | 1202 | new_ie = NULL; |
@@ -1221,6 +1223,10 @@ static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh, | |||
1221 | if (setup->is_secure) | 1223 | if (setup->is_secure) |
1222 | ifmsh->security |= IEEE80211_MESH_SEC_SECURED; | 1224 | ifmsh->security |= IEEE80211_MESH_SEC_SECURED; |
1223 | 1225 | ||
1226 | /* mcast rate setting in Mesh Node */ | ||
1227 | memcpy(sdata->vif.bss_conf.mcast_rate, setup->mcast_rate, | ||
1228 | sizeof(setup->mcast_rate)); | ||
1229 | |||
1224 | return 0; | 1230 | return 0; |
1225 | } | 1231 | } |
1226 | 1232 | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 5a75fc020807..655e3a97f92e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -640,6 +640,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
640 | else | 640 | else |
641 | txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1; | 641 | txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1; |
642 | txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP || | 642 | txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP || |
643 | tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT || | ||
643 | tx->sdata->vif.type == NL80211_IFTYPE_ADHOC); | 644 | tx->sdata->vif.type == NL80211_IFTYPE_ADHOC); |
644 | 645 | ||
645 | /* set up RTS protection if desired */ | 646 | /* set up RTS protection if desired */ |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 6026c29c338d..5699c3b1aba4 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -5667,6 +5667,11 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info) | |||
5667 | setup.mesh_id = nla_data(info->attrs[NL80211_ATTR_MESH_ID]); | 5667 | setup.mesh_id = nla_data(info->attrs[NL80211_ATTR_MESH_ID]); |
5668 | setup.mesh_id_len = nla_len(info->attrs[NL80211_ATTR_MESH_ID]); | 5668 | setup.mesh_id_len = nla_len(info->attrs[NL80211_ATTR_MESH_ID]); |
5669 | 5669 | ||
5670 | if (info->attrs[NL80211_ATTR_MCAST_RATE] && | ||
5671 | !nl80211_parse_mcast_rate(rdev, setup.mcast_rate, | ||
5672 | nla_get_u32(info->attrs[NL80211_ATTR_MCAST_RATE]))) | ||
5673 | return -EINVAL; | ||
5674 | |||
5670 | if (info->attrs[NL80211_ATTR_MESH_SETUP]) { | 5675 | if (info->attrs[NL80211_ATTR_MESH_SETUP]) { |
5671 | /* parse additional setup parameters if given */ | 5676 | /* parse additional setup parameters if given */ |
5672 | err = nl80211_parse_mesh_setup(info, &setup); | 5677 | err = nl80211_parse_mesh_setup(info, &setup); |