Short preamble can be used to improve wireless performance on devices different from lagacy-802.11. This patch enabled the user to specify such capability on IBSS join. Signed-off-by: Antonio Quartulli <antonio@xxxxxxxxxxxxx> --- * fixed email address include/net/cfg80211.h | 1 + net/wireless/nl80211.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8e6a6b7..c93955c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1416,6 +1416,7 @@ struct cfg80211_ibss_params { bool privacy; bool control_port; int mcast_rate[IEEE80211_NUM_BANDS]; + bool use_short_preamble; }; /** diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f45706a..e82c51a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5459,6 +5459,7 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) struct wiphy *wiphy; struct cfg80211_cached_keys *connkeys = NULL; int err; + bool sp; memset(&ibss, 0, sizeof(ibss)); @@ -5554,6 +5555,9 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) ibss.control_port = nla_get_flag(info->attrs[NL80211_ATTR_CONTROL_PORT]); + sp = nla_get_flags(info->attr[NL80211_ATTR_BSS_SHORT_PREAMBLE]); + ibss.use_short_preamble = sp; + err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys); if (err) kfree(connkeys); -- 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html