diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-23 12:25:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-23 12:25:58 -0400 |
commit | d56ffd38a93841a07c839a375049a56b51e9567c (patch) | |
tree | ac668709aa6f973de26e993f21adcf98626bed46 /net/wireless/nl80211.c | |
parent | 12a37b5e2c93f6550b82490c3de6d4eedc509c39 (diff) | |
parent | 61fa9dcf9329cb92c220f7b656410fbe5e72f933 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
ucc_geth: Fix oops when using fixed-link support
dm9000: locking bugfix
net: update dnet.c for bus_id removal
dnet: DNET should depend on HAS_IOMEM
dca: add missing copyright/license headers
nl80211: Check that function pointer != NULL before using it
sungem: missing net_device_ops
be2net: fix to restore vlan ids into BE2 during a IF DOWN->UP cycle
be2net: replenish when posting to rx-queue is starved in out of mem conditions
bas_gigaset: correctly allocate USB interrupt transfer buffer
smsc911x: reset last known duplex and carrier on open
sh_eth: Fix mistake of the address of SH7763
sh_eth: Change handling of IRQ
netns: oops in ip[6]_frag_reasm incrementing stats
net: kfree(napi->skb) => kfree_skb
net: fix sctp breakage
ipv6: fix display of local and remote sit endpoints
net: Document /proc/sys/net/core/netdev_budget
tulip: fix crash on iface up with shirq debug
virtio_net: Make virtio_net support carrier detection
...
Diffstat (limited to 'net/wireless/nl80211.c')
-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 1e728fff474..31b807af323 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1908,6 +1908,11 @@ static int nl80211_get_mesh_params(struct sk_buff *skb, | |||
1908 | if (err) | 1908 | if (err) |
1909 | return err; | 1909 | return err; |
1910 | 1910 | ||
1911 | if (!drv->ops->get_mesh_params) { | ||
1912 | err = -EOPNOTSUPP; | ||
1913 | goto out; | ||
1914 | } | ||
1915 | |||
1911 | /* Get the mesh params */ | 1916 | /* Get the mesh params */ |
1912 | rtnl_lock(); | 1917 | rtnl_lock(); |
1913 | err = drv->ops->get_mesh_params(&drv->wiphy, dev, &cur_params); | 1918 | 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) | |||
2017 | if (err) | 2022 | if (err) |
2018 | return err; | 2023 | return err; |
2019 | 2024 | ||
2025 | if (!drv->ops->set_mesh_params) { | ||
2026 | err = -EOPNOTSUPP; | ||
2027 | goto out; | ||
2028 | } | ||
2029 | |||
2020 | /* This makes sure that there aren't more than 32 mesh config | 2030 | /* This makes sure that there aren't more than 32 mesh config |
2021 | * parameters (otherwise our bitfield scheme would not work.) */ | 2031 | * parameters (otherwise our bitfield scheme would not work.) */ |
2022 | BUILD_BUG_ON(NL80211_MESHCONF_ATTR_MAX > 32); | 2032 | 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) | |||
2061 | err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask); | 2071 | err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask); |
2062 | rtnl_unlock(); | 2072 | rtnl_unlock(); |
2063 | 2073 | ||
2074 | out: | ||
2064 | /* cleanup */ | 2075 | /* cleanup */ |
2065 | cfg80211_put_dev(drv); | 2076 | cfg80211_put_dev(drv); |
2066 | dev_put(dev); | 2077 | dev_put(dev); |