diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-05-22 13:58:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-22 13:58:36 -0400 |
commit | 40a10fd740a4d5a9f3da255cf8dae48c6723d1a6 (patch) | |
tree | a65eb4adca8e37ed7335345e94e36918593f7f92 /net/wireless/sme.c | |
parent | 99abe65ff18b6bbac2e55524827b571c3eccfa86 (diff) | |
parent | 67af9811539be83dbdc0739215d29af23c870405 (diff) | |
download | op-kernel-dev-40a10fd740a4d5a9f3da255cf8dae48c6723d1a6.zip op-kernel-dev-40a10fd740a4d5a9f3da255cf8dae48c6723d1a6.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r-- | net/wireless/sme.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 0c0844b..8bbeeb3 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -149,7 +149,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev) case CFG80211_CONN_SCAN_AGAIN: return cfg80211_conn_scan(wdev); case CFG80211_CONN_AUTHENTICATE_NEXT: - BUG_ON(!rdev->ops->auth); + if (WARN_ON(!rdev->ops->auth)) + return -EOPNOTSUPP; wdev->conn->state = CFG80211_CONN_AUTHENTICATING; return cfg80211_mlme_auth(rdev, wdev->netdev, params->channel, params->auth_type, @@ -161,7 +162,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev) case CFG80211_CONN_AUTH_FAILED: return -ENOTCONN; case CFG80211_CONN_ASSOCIATE_NEXT: - BUG_ON(!rdev->ops->assoc); + if (WARN_ON(!rdev->ops->assoc)) + return -EOPNOTSUPP; wdev->conn->state = CFG80211_CONN_ASSOCIATING; if (wdev->conn->prev_bssid_valid) req.prev_bssid = wdev->conn->prev_bssid; @@ -877,7 +879,7 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, } void cfg80211_disconnected(struct net_device *dev, u16 reason, - u8 *ie, size_t ie_len, gfp_t gfp) + const u8 *ie, size_t ie_len, gfp_t gfp) { struct wireless_dev *wdev = dev->ieee80211_ptr; struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); |