diff options
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 6c95af3023cc..e468e155e8be 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -950,6 +950,11 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, | |||
950 | 950 | ||
951 | lbs_deb_enter(LBS_DEB_WEXT); | 951 | lbs_deb_enter(LBS_DEB_WEXT); |
952 | 952 | ||
953 | if (!lbs_is_cmd_allowed(priv)) { | ||
954 | ret = -EBUSY; | ||
955 | goto out; | ||
956 | } | ||
957 | |||
953 | if (!priv->radio_on) { | 958 | if (!priv->radio_on) { |
954 | ret = -EINVAL; | 959 | ret = -EINVAL; |
955 | goto out; | 960 | goto out; |
@@ -1017,6 +1022,12 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info, | |||
1017 | 1022 | ||
1018 | lbs_deb_enter(LBS_DEB_WEXT); | 1023 | lbs_deb_enter(LBS_DEB_WEXT); |
1019 | 1024 | ||
1025 | if (!lbs_is_cmd_allowed(priv)) { | ||
1026 | err = -EBUSY; | ||
1027 | lbs_deb_leave_args(LBS_DEB_WEXT, "ret %d", err); | ||
1028 | return err; | ||
1029 | } | ||
1030 | |||
1020 | /* iwlist should wait until the current scan is finished */ | 1031 | /* iwlist should wait until the current scan is finished */ |
1021 | if (priv->scan_channel) | 1032 | if (priv->scan_channel) |
1022 | return -EAGAIN; | 1033 | return -EAGAIN; |