diff options
author | Dan Williams <dcbw@redhat.com> | 2008-08-21 23:51:07 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-29 22:24:07 +0200 |
commit | d5db2dfa660de13c3643149b89c7602dd49aa168 (patch) | |
tree | c2dbf5cbd27a83c73cba68f4285d1e51024d168f /drivers/net/wireless/libertas/scan.c | |
parent | libertas: convert CMD_802_11_DEAUTHENTICATE to a direct command (diff) | |
download | linux-d5db2dfa660de13c3643149b89c7602dd49aa168.tar.xz linux-d5db2dfa660de13c3643149b89c7602dd49aa168.zip |
libertas: convert CMD_802_11_RADIO_CONTROL to a direct command
and return errors for operations like join & scan that aren't possible
when the radio is turned off.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 4b274562f965..8f66903641b9 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c @@ -944,6 +944,11 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info, lbs_deb_enter(LBS_DEB_WEXT); + if (!priv->radio_on) { + ret = -EINVAL; + goto out; + } + if (!netif_running(dev)) { ret = -ENETDOWN; goto out; |