diff options
author | Dan Williams <dcbw@redhat.com> | 2008-08-21 17:51:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-29 16:24:07 -0400 |
commit | d5db2dfa660de13c3643149b89c7602dd49aa168 (patch) | |
tree | c2dbf5cbd27a83c73cba68f4285d1e51024d168f /drivers/net/wireless/libertas/scan.c | |
parent | 191bb40e725304c5fcfabd92c57eef58799f0e25 (diff) | |
download | linux-d5db2dfa660de13c3643149b89c7602dd49aa168.tar.gz linux-d5db2dfa660de13c3643149b89c7602dd49aa168.tar.bz2 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; |