diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-21 16:39:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-21 16:39:45 -0500 |
commit | 53b15ef3c2a6bac8e3d9bb58c5689d731ed9593b (patch) | |
tree | 6b3194af697d91ac4c2ab1c716bd30c972cf4949 /net/ieee802154/nl-phy.c | |
parent | b48c5ec53ef9f0fe617aafa94a752f528fdad149 (diff) | |
parent | 9e6f3f472c8f95021ad048acc7cd3e40a827f8ce (diff) |
Merge tag 'master-2014-11-20' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says:
====================
pull request: wireless-next 2014-11-21
Please pull this batch of updates intended for the 3.19 stream...
For the mac80211 bits, Johannes says:
"It has been a while since my last pull request, so we accumulated
another relatively large set of changes:
* TDLS off-channel support set from Arik/Liad, with some support
patches I did
* custom regulatory fixes from Arik
* minstrel VHT fix (and a small optimisation) from Felix
* add back radiotap vendor namespace support (myself)
* random MAC address scanning for cfg80211/mac80211/hwsim (myself)
* CSA improvements (Luca)
* WoWLAN Net Detect (wake on network found) support (Luca)
* and lots of other smaller changes from many people"
For the Bluetooth bits, Johan says:
"Here's another set of patches for 3.19. Most of it is again fixes and
cleanups to ieee802154 related code from Alexander Aring. We've also got
better handling of hardware error events along with a proper API for HCI
drivers to notify the HCI core of such situations. There's also a minor
fix for mgmt events as well as a sparse warning fix. The code for
sending HCI commands synchronously also gets a fix where we might loose
the completion event in the case of very fast HW (particularly easily
reproducible with an emulated HCI device)."
And...
"Here's another bluetooth-next pull request for 3.19. We've got:
- Various fixes, cleanups and improvements to ieee802154/mac802154
- Support for a Broadcom BCM20702A1 variant
- Lots of lockdep fixes
- Fixed handling of LE CoC errors that should trigger SMP"
For the Atheros bits, Kalle says:
"One ath6kl patch and rest for ath10k, but nothing really major which
stands out. Most notable:
o fix resume (Bartosz)
o firmware restart is now faster and more reliable (Michal)
o it's now possible to test hardware restart functionality without
crashing the firmware using hw-restart parameter with
simulate_fw_crash debugfs file (Michal)"
On top of that...both ath9k and mwifiex get their usual level of
updates. Of note is the ath9k spectral scan work from Oleksij Rempel.
I also pulled from the wireless tree in order to avoid some merge issues.
Please let me know if there are problems!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154/nl-phy.c')
-rw-r--r-- | net/ieee802154/nl-phy.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/net/ieee802154/nl-phy.c b/net/ieee802154/nl-phy.c index 0afe760ff512..80a946dddd90 100644 --- a/net/ieee802154/nl-phy.c +++ b/net/ieee802154/nl-phy.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/nl802154.h> | 30 | #include <linux/nl802154.h> |
31 | 31 | ||
32 | #include "ieee802154.h" | 32 | #include "ieee802154.h" |
33 | #include "rdev-ops.h" | ||
34 | #include "core.h" | ||
33 | 35 | ||
34 | static int ieee802154_nl_fill_phy(struct sk_buff *msg, u32 portid, | 36 | static int ieee802154_nl_fill_phy(struct sk_buff *msg, u32 portid, |
35 | u32 seq, int flags, struct wpan_phy *phy) | 37 | u32 seq, int flags, struct wpan_phy *phy) |
@@ -203,11 +205,6 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info) | |||
203 | if (!msg) | 205 | if (!msg) |
204 | goto out_dev; | 206 | goto out_dev; |
205 | 207 | ||
206 | if (!phy->add_iface) { | ||
207 | rc = -EINVAL; | ||
208 | goto nla_put_failure; | ||
209 | } | ||
210 | |||
211 | if (info->attrs[IEEE802154_ATTR_HW_ADDR] && | 208 | if (info->attrs[IEEE802154_ATTR_HW_ADDR] && |
212 | nla_len(info->attrs[IEEE802154_ATTR_HW_ADDR]) != | 209 | nla_len(info->attrs[IEEE802154_ATTR_HW_ADDR]) != |
213 | IEEE802154_ADDR_LEN) { | 210 | IEEE802154_ADDR_LEN) { |
@@ -223,11 +220,13 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info) | |||
223 | } | 220 | } |
224 | } | 221 | } |
225 | 222 | ||
226 | dev = phy->add_iface(phy, devname, type); | 223 | dev = rdev_add_virtual_intf_deprecated(wpan_phy_to_rdev(phy), devname, |
224 | type); | ||
227 | if (IS_ERR(dev)) { | 225 | if (IS_ERR(dev)) { |
228 | rc = PTR_ERR(dev); | 226 | rc = PTR_ERR(dev); |
229 | goto nla_put_failure; | 227 | goto nla_put_failure; |
230 | } | 228 | } |
229 | dev_hold(dev); | ||
231 | 230 | ||
232 | if (info->attrs[IEEE802154_ATTR_HW_ADDR]) { | 231 | if (info->attrs[IEEE802154_ATTR_HW_ADDR]) { |
233 | struct sockaddr addr; | 232 | struct sockaddr addr; |
@@ -257,7 +256,7 @@ int ieee802154_add_iface(struct sk_buff *skb, struct genl_info *info) | |||
257 | 256 | ||
258 | dev_unregister: | 257 | dev_unregister: |
259 | rtnl_lock(); /* del_iface must be called with RTNL lock */ | 258 | rtnl_lock(); /* del_iface must be called with RTNL lock */ |
260 | phy->del_iface(phy, dev); | 259 | rdev_del_virtual_intf_deprecated(wpan_phy_to_rdev(phy), dev); |
261 | dev_put(dev); | 260 | dev_put(dev); |
262 | rtnl_unlock(); | 261 | rtnl_unlock(); |
263 | nla_put_failure: | 262 | nla_put_failure: |
@@ -288,8 +287,9 @@ int ieee802154_del_iface(struct sk_buff *skb, struct genl_info *info) | |||
288 | if (!dev) | 287 | if (!dev) |
289 | return -ENODEV; | 288 | return -ENODEV; |
290 | 289 | ||
291 | phy = ieee802154_mlme_ops(dev)->get_phy(dev); | 290 | phy = dev->ieee802154_ptr->wpan_phy; |
292 | BUG_ON(!phy); | 291 | BUG_ON(!phy); |
292 | get_device(&phy->dev); | ||
293 | 293 | ||
294 | rc = -EINVAL; | 294 | rc = -EINVAL; |
295 | /* phy name is optional, but should be checked if it's given */ | 295 | /* phy name is optional, but should be checked if it's given */ |
@@ -319,13 +319,8 @@ int ieee802154_del_iface(struct sk_buff *skb, struct genl_info *info) | |||
319 | if (!msg) | 319 | if (!msg) |
320 | goto out_dev; | 320 | goto out_dev; |
321 | 321 | ||
322 | if (!phy->del_iface) { | ||
323 | rc = -EINVAL; | ||
324 | goto nla_put_failure; | ||
325 | } | ||
326 | |||
327 | rtnl_lock(); | 322 | rtnl_lock(); |
328 | phy->del_iface(phy, dev); | 323 | rdev_del_virtual_intf_deprecated(wpan_phy_to_rdev(phy), dev); |
329 | 324 | ||
330 | /* We don't have device anymore */ | 325 | /* We don't have device anymore */ |
331 | dev_put(dev); | 326 | dev_put(dev); |