Skip to content

Commit c2f3252

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2 parents 5ed0102 + f3f9258 commit c2f3252

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎net/wireless/nl80211.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,6 +1908,11 @@ static int nl80211_get_mesh_params(struct sk_buff *skb,
19081908
if (err)
19091909
return err;
19101910

1911+
if (!drv->ops->get_mesh_params) {
1912+
err = -EOPNOTSUPP;
1913+
goto out;
1914+
}
1915+
19111916
/* Get the mesh params */
19121917
rtnl_lock();
19131918
err = drv->ops->get_mesh_params(&drv->wiphy, dev, &cur_params);
@@ -2017,6 +2022,11 @@ static int nl80211_set_mesh_params(struct sk_buff *skb, struct genl_info *info)
20172022
if (err)
20182023
return err;
20192024

2025+
if (!drv->ops->set_mesh_params) {
2026+
err = -EOPNOTSUPP;
2027+
goto out;
2028+
}
2029+
20202030
/* This makes sure that there aren't more than 32 mesh config
20212031
* parameters (otherwise our bitfield scheme would not work.) */
20222032
BUILD_BUG_ON(NL80211_MESHCONF_ATTR_MAX > 32);
@@ -2061,6 +2071,7 @@ static int nl80211_set_mesh_params(struct sk_buff *skb, struct genl_info *info)
20612071
err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask);
20622072
rtnl_unlock();
20632073

2074+
out:
20642075
/* cleanup */
20652076
cfg80211_put_dev(drv);
20662077
dev_put(dev);

0 commit comments

Comments
 (0)