aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-03-23 16:35:04 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-23 16:35:04 -0400
commit8be7cdccacfbfc707e7370cad9bb168defed636f (patch)
tree8416607b62ec352176c81afd6f4e7b571ceb957f /net/wireless/nl80211.c
parentecd4137320b59759bbe57eef89040ee3e5e66039 (diff)
parent61fa9dcf9329cb92c220f7b656410fbe5e72f933 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ucc_geth.c
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 8ac3d26014a..ab9d8f14e15 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);