diff options
author | Javier Cardona <javier@cozybit.com> | 2010-12-16 20:37:48 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-20 14:46:57 -0500 |
commit | 24bdd9f4c9af75b33b438d60381a67626de0128d (patch) | |
tree | f5ff8c4f9ec2a7cdb976f419532179f2c46b06e8 /net/wireless | |
parent | 8a09d6d80c90c02f2f8c89f69c702cab0c8d9b42 (diff) |
mac80211: Rename mesh_params to mesh_config to prepare for mesh_setup
Mesh parameters can be to setup a mesh or to configure it.
This patch renames the ambiguous name mesh_params to mesh_config
in preparation for mesh_setup.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index aefce54d47e2..10be9350752e 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -123,7 +123,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { | |||
123 | .len = NL80211_MAX_SUPP_RATES }, | 123 | .len = NL80211_MAX_SUPP_RATES }, |
124 | [NL80211_ATTR_BSS_HT_OPMODE] = { .type = NLA_U16 }, | 124 | [NL80211_ATTR_BSS_HT_OPMODE] = { .type = NLA_U16 }, |
125 | 125 | ||
126 | [NL80211_ATTR_MESH_PARAMS] = { .type = NLA_NESTED }, | 126 | [NL80211_ATTR_MESH_CONFIG] = { .type = NLA_NESTED }, |
127 | 127 | ||
128 | [NL80211_ATTR_HT_CAPABILITY] = { .type = NLA_BINARY, | 128 | [NL80211_ATTR_HT_CAPABILITY] = { .type = NLA_BINARY, |
129 | .len = NL80211_HT_CAPABILITY_LEN }, | 129 | .len = NL80211_HT_CAPABILITY_LEN }, |
@@ -719,7 +719,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags, | |||
719 | CMD(add_beacon, NEW_BEACON); | 719 | CMD(add_beacon, NEW_BEACON); |
720 | CMD(add_station, NEW_STATION); | 720 | CMD(add_station, NEW_STATION); |
721 | CMD(add_mpath, NEW_MPATH); | 721 | CMD(add_mpath, NEW_MPATH); |
722 | CMD(update_mesh_params, SET_MESH_PARAMS); | 722 | CMD(update_mesh_config, SET_MESH_CONFIG); |
723 | CMD(change_bss, SET_BSS); | 723 | CMD(change_bss, SET_BSS); |
724 | CMD(auth, AUTHENTICATE); | 724 | CMD(auth, AUTHENTICATE); |
725 | CMD(assoc, ASSOCIATE); | 725 | CMD(assoc, ASSOCIATE); |
@@ -2673,7 +2673,7 @@ static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info) | |||
2673 | return r; | 2673 | return r; |
2674 | } | 2674 | } |
2675 | 2675 | ||
2676 | static int nl80211_get_mesh_params(struct sk_buff *skb, | 2676 | static int nl80211_get_mesh_config(struct sk_buff *skb, |
2677 | struct genl_info *info) | 2677 | struct genl_info *info) |
2678 | { | 2678 | { |
2679 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; | 2679 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; |
@@ -2688,7 +2688,7 @@ static int nl80211_get_mesh_params(struct sk_buff *skb, | |||
2688 | if (wdev->iftype != NL80211_IFTYPE_MESH_POINT) | 2688 | if (wdev->iftype != NL80211_IFTYPE_MESH_POINT) |
2689 | return -EOPNOTSUPP; | 2689 | return -EOPNOTSUPP; |
2690 | 2690 | ||
2691 | if (!rdev->ops->get_mesh_params) | 2691 | if (!rdev->ops->get_mesh_config) |
2692 | return -EOPNOTSUPP; | 2692 | return -EOPNOTSUPP; |
2693 | 2693 | ||
2694 | wdev_lock(wdev); | 2694 | wdev_lock(wdev); |
@@ -2696,7 +2696,7 @@ static int nl80211_get_mesh_params(struct sk_buff *skb, | |||
2696 | if (!wdev->mesh_id_len) | 2696 | if (!wdev->mesh_id_len) |
2697 | memcpy(&cur_params, &default_mesh_config, sizeof(cur_params)); | 2697 | memcpy(&cur_params, &default_mesh_config, sizeof(cur_params)); |
2698 | else | 2698 | else |
2699 | err = rdev->ops->get_mesh_params(&rdev->wiphy, dev, | 2699 | err = rdev->ops->get_mesh_config(&rdev->wiphy, dev, |
2700 | &cur_params); | 2700 | &cur_params); |
2701 | wdev_unlock(wdev); | 2701 | wdev_unlock(wdev); |
2702 | 2702 | ||
@@ -2708,10 +2708,10 @@ static int nl80211_get_mesh_params(struct sk_buff *skb, | |||
2708 | if (!msg) | 2708 | if (!msg) |
2709 | return -ENOMEM; | 2709 | return -ENOMEM; |
2710 | hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0, | 2710 | hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0, |
2711 | NL80211_CMD_GET_MESH_PARAMS); | 2711 | NL80211_CMD_GET_MESH_CONFIG); |
2712 | if (!hdr) | 2712 | if (!hdr) |
2713 | goto nla_put_failure; | 2713 | goto nla_put_failure; |
2714 | pinfoattr = nla_nest_start(msg, NL80211_ATTR_MESH_PARAMS); | 2714 | pinfoattr = nla_nest_start(msg, NL80211_ATTR_MESH_CONFIG); |
2715 | if (!pinfoattr) | 2715 | if (!pinfoattr) |
2716 | goto nla_put_failure; | 2716 | goto nla_put_failure; |
2717 | NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, dev->ifindex); | 2717 | NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, dev->ifindex); |
@@ -2773,7 +2773,7 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A | |||
2773 | [NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME] = { .type = NLA_U16 }, | 2773 | [NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME] = { .type = NLA_U16 }, |
2774 | }; | 2774 | }; |
2775 | 2775 | ||
2776 | static int nl80211_parse_mesh_params(struct genl_info *info, | 2776 | static int nl80211_parse_mesh_config(struct genl_info *info, |
2777 | struct mesh_config *cfg, | 2777 | struct mesh_config *cfg, |
2778 | u32 *mask_out) | 2778 | u32 *mask_out) |
2779 | { | 2779 | { |
@@ -2789,10 +2789,10 @@ do {\ | |||
2789 | } while (0);\ | 2789 | } while (0);\ |
2790 | 2790 | ||
2791 | 2791 | ||
2792 | if (!info->attrs[NL80211_ATTR_MESH_PARAMS]) | 2792 | if (!info->attrs[NL80211_ATTR_MESH_CONFIG]) |
2793 | return -EINVAL; | 2793 | return -EINVAL; |
2794 | if (nla_parse_nested(tb, NL80211_MESHCONF_ATTR_MAX, | 2794 | if (nla_parse_nested(tb, NL80211_MESHCONF_ATTR_MAX, |
2795 | info->attrs[NL80211_ATTR_MESH_PARAMS], | 2795 | info->attrs[NL80211_ATTR_MESH_CONFIG], |
2796 | nl80211_meshconf_params_policy)) | 2796 | nl80211_meshconf_params_policy)) |
2797 | return -EINVAL; | 2797 | return -EINVAL; |
2798 | 2798 | ||
@@ -2847,7 +2847,7 @@ do {\ | |||
2847 | #undef FILL_IN_MESH_PARAM_IF_SET | 2847 | #undef FILL_IN_MESH_PARAM_IF_SET |
2848 | } | 2848 | } |
2849 | 2849 | ||
2850 | static int nl80211_update_mesh_params(struct sk_buff *skb, | 2850 | static int nl80211_update_mesh_config(struct sk_buff *skb, |
2851 | struct genl_info *info) | 2851 | struct genl_info *info) |
2852 | { | 2852 | { |
2853 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; | 2853 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; |
@@ -2860,10 +2860,10 @@ static int nl80211_update_mesh_params(struct sk_buff *skb, | |||
2860 | if (wdev->iftype != NL80211_IFTYPE_MESH_POINT) | 2860 | if (wdev->iftype != NL80211_IFTYPE_MESH_POINT) |
2861 | return -EOPNOTSUPP; | 2861 | return -EOPNOTSUPP; |
2862 | 2862 | ||
2863 | if (!rdev->ops->update_mesh_params) | 2863 | if (!rdev->ops->update_mesh_config) |
2864 | return -EOPNOTSUPP; | 2864 | return -EOPNOTSUPP; |
2865 | 2865 | ||
2866 | err = nl80211_parse_mesh_params(info, &cfg, &mask); | 2866 | err = nl80211_parse_mesh_config(info, &cfg, &mask); |
2867 | if (err) | 2867 | if (err) |
2868 | return err; | 2868 | return err; |
2869 | 2869 | ||
@@ -2872,7 +2872,7 @@ static int nl80211_update_mesh_params(struct sk_buff *skb, | |||
2872 | err = -ENOLINK; | 2872 | err = -ENOLINK; |
2873 | 2873 | ||
2874 | if (!err) | 2874 | if (!err) |
2875 | err = rdev->ops->update_mesh_params(&rdev->wiphy, dev, | 2875 | err = rdev->ops->update_mesh_config(&rdev->wiphy, dev, |
2876 | mask, &cfg); | 2876 | mask, &cfg); |
2877 | 2877 | ||
2878 | wdev_unlock(wdev); | 2878 | wdev_unlock(wdev); |
@@ -4672,9 +4672,9 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info) | |||
4672 | /* start with default */ | 4672 | /* start with default */ |
4673 | memcpy(&cfg, &default_mesh_config, sizeof(cfg)); | 4673 | memcpy(&cfg, &default_mesh_config, sizeof(cfg)); |
4674 | 4674 | ||
4675 | if (info->attrs[NL80211_ATTR_MESH_PARAMS]) { | 4675 | if (info->attrs[NL80211_ATTR_MESH_CONFIG]) { |
4676 | /* and parse parameters if given */ | 4676 | /* and parse parameters if given */ |
4677 | err = nl80211_parse_mesh_params(info, &cfg, NULL); | 4677 | err = nl80211_parse_mesh_config(info, &cfg, NULL); |
4678 | if (err) | 4678 | if (err) |
4679 | return err; | 4679 | return err; |
4680 | } | 4680 | } |
@@ -4952,16 +4952,16 @@ static struct genl_ops nl80211_ops[] = { | |||
4952 | .flags = GENL_ADMIN_PERM, | 4952 | .flags = GENL_ADMIN_PERM, |
4953 | }, | 4953 | }, |
4954 | { | 4954 | { |
4955 | .cmd = NL80211_CMD_GET_MESH_PARAMS, | 4955 | .cmd = NL80211_CMD_GET_MESH_CONFIG, |
4956 | .doit = nl80211_get_mesh_params, | 4956 | .doit = nl80211_get_mesh_config, |
4957 | .policy = nl80211_policy, | 4957 | .policy = nl80211_policy, |
4958 | /* can be retrieved by unprivileged users */ | 4958 | /* can be retrieved by unprivileged users */ |
4959 | .internal_flags = NL80211_FLAG_NEED_NETDEV | | 4959 | .internal_flags = NL80211_FLAG_NEED_NETDEV | |
4960 | NL80211_FLAG_NEED_RTNL, | 4960 | NL80211_FLAG_NEED_RTNL, |
4961 | }, | 4961 | }, |
4962 | { | 4962 | { |
4963 | .cmd = NL80211_CMD_SET_MESH_PARAMS, | 4963 | .cmd = NL80211_CMD_SET_MESH_CONFIG, |
4964 | .doit = nl80211_update_mesh_params, | 4964 | .doit = nl80211_update_mesh_config, |
4965 | .policy = nl80211_policy, | 4965 | .policy = nl80211_policy, |
4966 | .flags = GENL_ADMIN_PERM, | 4966 | .flags = GENL_ADMIN_PERM, |
4967 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | | 4967 | .internal_flags = NL80211_FLAG_NEED_NETDEV_UP | |