diff options
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 8ac3d26014a8..ab9d8f14e151 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1950,6 +1950,11 @@ static int nl80211_get_mesh_params(struct sk_buff *skb, | |||
1950 | if (err) | 1950 | if (err) |
1951 | return err; | 1951 | return err; |
1952 | 1952 | ||
1953 | if (!drv->ops->get_mesh_params) { | ||
1954 | err = -EOPNOTSUPP; | ||
1955 | goto out; | ||
1956 | } | ||
1957 | |||
1953 | /* Get the mesh params */ | 1958 | /* Get the mesh params */ |
1954 | rtnl_lock(); | 1959 | rtnl_lock(); |
1955 | err = drv->ops->get_mesh_params(&drv->wiphy, dev, &cur_params); | 1960 | err = drv->ops->get_mesh_params(&drv->wiphy, dev, &cur_params); |
@@ -2059,6 +2064,11 @@ static int nl80211_set_mesh_params(struct sk_buff *skb, struct genl_info *info) | |||
2059 | if (err) | 2064 | if (err) |
2060 | return err; | 2065 | return err; |
2061 | 2066 | ||
2067 | if (!drv->ops->set_mesh_params) { | ||
2068 | err = -EOPNOTSUPP; | ||
2069 | goto out; | ||
2070 | } | ||
2071 | |||
2062 | /* This makes sure that there aren't more than 32 mesh config | 2072 | /* This makes sure that there aren't more than 32 mesh config |
2063 | * parameters (otherwise our bitfield scheme would not work.) */ | 2073 | * parameters (otherwise our bitfield scheme would not work.) */ |
2064 | BUILD_BUG_ON(NL80211_MESHCONF_ATTR_MAX > 32); | 2074 | BUILD_BUG_ON(NL80211_MESHCONF_ATTR_MAX > 32); |
@@ -2103,6 +2113,7 @@ static int nl80211_set_mesh_params(struct sk_buff *skb, struct genl_info *info) | |||
2103 | err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask); | 2113 | err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask); |
2104 | rtnl_unlock(); | 2114 | rtnl_unlock(); |
2105 | 2115 | ||
2116 | out: | ||
2106 | /* cleanup */ | 2117 | /* cleanup */ |
2107 | cfg80211_put_dev(drv); | 2118 | cfg80211_put_dev(drv); |
2108 | dev_put(dev); | 2119 | dev_put(dev); |