| 1 | --- a/include/linux/nl80211.h |
| 2 | +++ b/include/linux/nl80211.h |
| 3 | @@ -804,6 +804,8 @@ enum nl80211_commands { |
| 4 | * @NL80211_ATTR_SUPPORT_IBSS_RSN: The device supports IBSS RSN, which mostly |
| 5 | * means support for per-station GTKs. |
| 6 | * |
| 7 | + * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS |
| 8 | + * |
| 9 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 10 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 11 | */ |
| 12 | @@ -973,6 +975,8 @@ enum nl80211_attrs { |
| 13 | |
| 14 | NL80211_ATTR_SUPPORT_IBSS_RSN, |
| 15 | |
| 16 | + NL80211_ATTR_MCAST_RATE, |
| 17 | + |
| 18 | /* add attributes here, update the policy in nl80211.c */ |
| 19 | |
| 20 | __NL80211_ATTR_AFTER_LAST, |
| 21 | --- a/include/net/cfg80211.h |
| 22 | +++ b/include/net/cfg80211.h |
| 23 | @@ -924,6 +924,7 @@ struct cfg80211_disassoc_request { |
| 24 | * @privacy: this is a protected network, keys will be configured |
| 25 | * after joining |
| 26 | * @basic_rates: bitmap of basic rates to use when creating the IBSS |
| 27 | + * @mcast_rate: multicast tx rate (in 100 kbps) |
| 28 | */ |
| 29 | struct cfg80211_ibss_params { |
| 30 | u8 *ssid; |
| 31 | @@ -935,6 +936,7 @@ struct cfg80211_ibss_params { |
| 32 | u32 basic_rates; |
| 33 | bool channel_fixed; |
| 34 | bool privacy; |
| 35 | + int mcast_rate; |
| 36 | }; |
| 37 | |
| 38 | /** |
| 39 | --- a/net/wireless/nl80211.c |
| 40 | +++ b/net/wireless/nl80211.c |
| 41 | @@ -167,6 +167,7 @@ static const struct nla_policy nl80211_p |
| 42 | [NL80211_ATTR_WIPHY_TX_POWER_SETTING] = { .type = NLA_U32 }, |
| 43 | [NL80211_ATTR_WIPHY_TX_POWER_LEVEL] = { .type = NLA_U32 }, |
| 44 | [NL80211_ATTR_FRAME_TYPE] = { .type = NLA_U16 }, |
| 45 | + [NL80211_ATTR_MCAST_RATE] = { .type = NLA_U32 }, |
| 46 | }; |
| 47 | |
| 48 | /* policy for the key attributes */ |
| 49 | @@ -3652,6 +3653,9 @@ static int nl80211_join_ibss(struct sk_b |
| 50 | return -EINVAL; |
| 51 | } |
| 52 | } |
| 53 | + if (info->attrs[NL80211_ATTR_MCAST_RATE]) |
| 54 | + ibss.mcast_rate = |
| 55 | + nla_get_u32(info->attrs[NL80211_ATTR_MCAST_RATE]); |
| 56 | |
| 57 | if (ibss.privacy && info->attrs[NL80211_ATTR_KEYS]) { |
| 58 | connkeys = nl80211_parse_connkeys(rdev, |
| 59 | |