summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorAshok Nagarajan <ashok@cozybit.com>2012-04-30 14:20:32 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-05-08 21:53:59 -0400
commit70c33eaae79e53f9e48324736c0cb85534d3f093 (patch)
tree103c59d0356e55341052adca0624b6256525ddbb /net/wireless
parentb91e64aad2c78b0477b9eb3a26335668b4032002 (diff)
downloadlinux-3.10-70c33eaae79e53f9e48324736c0cb85534d3f093.tar.gz
linux-3.10-70c33eaae79e53f9e48324736c0cb85534d3f093.tar.bz2
linux-3.10-70c33eaae79e53f9e48324736c0cb85534d3f093.zip
{nl,cfg,mac}80211: Allow user to see/configure HT protection mode
This patch introduces a new mesh configuration parameter "ht_opmode" and will allow user to check the current HT protection mode selected. Users could configure the protection mode by the command "iw mesh_iface set mesh_param mesh_ht_protection_mode=2". The default protection mode of mesh is set to non-HT mixed mode. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/mesh.c1
-rw-r--r--net/wireless/nl80211.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index 8c747fa9319..2749cb86b46 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -61,6 +61,7 @@ const struct mesh_config default_mesh_config = {
.dot11MeshGateAnnouncementProtocol = false,
.dot11MeshForwarding = true,
.rssi_threshold = MESH_RSSI_THRESHOLD,
+ .ht_opmode = IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED,
};
const struct mesh_setup default_mesh_setup = {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d5005c59c47..b67b1114e25 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3390,7 +3390,9 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
nla_put_u8(msg, NL80211_MESHCONF_FORWARDING,
cur_params.dot11MeshForwarding) ||
nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD,
- cur_params.rssi_threshold))
+ cur_params.rssi_threshold) ||
+ nla_put_u32(msg, NL80211_MESHCONF_HT_OPMODE,
+ cur_params.ht_opmode))
goto nla_put_failure;
nla_nest_end(msg, pinfoattr);
genlmsg_end(msg, hdr);
@@ -3426,6 +3428,7 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A
[NL80211_MESHCONF_GATE_ANNOUNCEMENTS] = { .type = NLA_U8 },
[NL80211_MESHCONF_FORWARDING] = { .type = NLA_U8 },
[NL80211_MESHCONF_RSSI_THRESHOLD] = { .type = NLA_U32},
+ [NL80211_MESHCONF_HT_OPMODE] = { .type = NLA_U16},
};
static const struct nla_policy
@@ -3523,6 +3526,8 @@ do {\
mask, NL80211_MESHCONF_FORWARDING, nla_get_u8);
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold,
mask, NL80211_MESHCONF_RSSI_THRESHOLD, nla_get_u32);
+ FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode,
+ mask, NL80211_MESHCONF_HT_OPMODE, nla_get_u16);
if (mask_out)
*mask_out = mask;