diff options
author | pengcheng chen - Sun Microsystems - Beijing China <Pengcheng.Chen@Sun.COM> | 2009-02-13 10:01:26 +0800 |
---|---|---|
committer | pengcheng chen - Sun Microsystems - Beijing China <Pengcheng.Chen@Sun.COM> | 2009-02-13 10:01:26 +0800 |
commit | 09539a3c2da6fef054f5306232ef0480de261eab (patch) | |
tree | e737a2c57e3ffb6ed92443fd445303eb4aaf5ac6 | |
parent | 5d7d0335a97589020dfec51e473eb515c329204f (diff) | |
download | illumos-joyent-09539a3c2da6fef054f5306232ef0480de261eab.tar.gz |
6804548 Failed to disable WPA in the driver (wpi/iwk/iwh)
-rw-r--r-- | usr/src/uts/common/io/iwh/iwh.c | 23 | ||||
-rw-r--r-- | usr/src/uts/common/io/iwk/iwk2.c | 21 | ||||
-rw-r--r-- | usr/src/uts/common/io/wpi/wpi.c | 23 |
3 files changed, 17 insertions, 50 deletions
diff --git a/usr/src/uts/common/io/iwh/iwh.c b/usr/src/uts/common/io/iwh/iwh.c index 1e3919ff98..89ca47d936 100644 --- a/usr/src/uts/common/io/iwh/iwh.c +++ b/usr/src/uts/common/io/iwh/iwh.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -464,11 +464,15 @@ iwh_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) sc = ddi_get_soft_state(iwh_soft_state_p, ddi_get_instance(dip)); ASSERT(sc != NULL); + + mutex_enter(&sc->sc_glock); + sc->sc_flags &= ~IWH_F_SUSPEND; + mutex_exit(&sc->sc_glock); + if (sc->sc_flags & IWH_F_RUNNING) (void) iwh_init(sc); mutex_enter(&sc->sc_glock); - sc->sc_flags &= ~IWH_F_SUSPEND; sc->sc_flags |= IWH_F_LAZY_RESUME; mutex_exit(&sc->sc_glock); @@ -3142,14 +3146,6 @@ iwh_m_ioctl(void* arg, queue_t *wq, mblk_t *mp) ieee80211com_t *ic = &sc->sc_ic; int err; - mutex_enter(&sc->sc_glock); - if (sc->sc_flags & (IWH_F_SUSPEND | IWH_F_HW_ERR_RECOVER)) { - miocnak(wq, mp, 0, ENXIO); - mutex_exit(&sc->sc_glock); - return; - } - mutex_exit(&sc->sc_glock); - err = ieee80211_ioctl(ic, wq, mp); if (ENETRESET == err) { /* @@ -3195,13 +3191,6 @@ iwh_m_setprop(void *arg, const char *pr_name, mac_prop_id_t wldp_pr_num, ieee80211com_t *ic = &sc->sc_ic; int err; - mutex_enter(&sc->sc_glock); - if (sc->sc_flags & (IWH_F_SUSPEND | IWH_F_HW_ERR_RECOVER)) { - mutex_exit(&sc->sc_glock); - return (ENXIO); - } - mutex_exit(&sc->sc_glock); - err = ieee80211_setprop(ic, pr_name, wldp_pr_num, wldp_length, wldp_buf); diff --git a/usr/src/uts/common/io/iwk/iwk2.c b/usr/src/uts/common/io/iwk/iwk2.c index f32433804f..7513ec7362 100644 --- a/usr/src/uts/common/io/iwk/iwk2.c +++ b/usr/src/uts/common/io/iwk/iwk2.c @@ -477,11 +477,15 @@ iwk_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) sc = ddi_get_soft_state(iwk_soft_state_p, ddi_get_instance(dip)); ASSERT(sc != NULL); + + mutex_enter(&sc->sc_glock); + sc->sc_flags &= ~IWK_F_SUSPEND; + mutex_exit(&sc->sc_glock); + if (sc->sc_flags & IWK_F_RUNNING) (void) iwk_init(sc); mutex_enter(&sc->sc_glock); - sc->sc_flags &= ~IWK_F_SUSPEND; sc->sc_flags |= IWK_F_LAZY_RESUME; mutex_exit(&sc->sc_glock); @@ -2908,14 +2912,6 @@ iwk_m_ioctl(void* arg, queue_t *wq, mblk_t *mp) oldmod = ic->ic_opmode; - mutex_enter(&sc->sc_glock); - if (sc->sc_flags & (IWK_F_SUSPEND | IWK_F_HW_ERR_RECOVER)) { - miocnak(wq, mp, 0, ENXIO); - mutex_exit(&sc->sc_glock); - return; - } - mutex_exit(&sc->sc_glock); - err = ieee80211_ioctl(ic, wq, mp); /* @@ -3080,13 +3076,6 @@ iwk_m_setprop(void *arg, const char *pr_name, mac_prop_id_t wldp_pr_num, iwk_sc_t *sc = (iwk_sc_t *)arg; ieee80211com_t *ic = &sc->sc_ic; - mutex_enter(&sc->sc_glock); - if (sc->sc_flags & (IWK_F_SUSPEND | IWK_F_HW_ERR_RECOVER)) { - mutex_exit(&sc->sc_glock); - return (ENXIO); - } - mutex_exit(&sc->sc_glock); - err = ieee80211_setprop(ic, pr_name, wldp_pr_num, wldp_length, wldp_buf); diff --git a/usr/src/uts/common/io/wpi/wpi.c b/usr/src/uts/common/io/wpi/wpi.c index 6b5cfcea0a..4863ab0cb8 100644 --- a/usr/src/uts/common/io/wpi/wpi.c +++ b/usr/src/uts/common/io/wpi/wpi.c @@ -1,5 +1,5 @@ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -414,11 +414,15 @@ wpi_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) sc = ddi_get_soft_state(wpi_soft_state_p, ddi_get_instance(dip)); ASSERT(sc != NULL); + + mutex_enter(&sc->sc_glock); + sc->sc_flags &= ~WPI_F_SUSPEND; + mutex_exit(&sc->sc_glock); + if (sc->sc_flags & WPI_F_RUNNING) (void) wpi_init(sc); mutex_enter(&sc->sc_glock); - sc->sc_flags &= ~WPI_F_SUSPEND; sc->sc_flags |= WPI_F_LAZY_RESUME; mutex_exit(&sc->sc_glock); @@ -2282,14 +2286,6 @@ wpi_m_ioctl(void* arg, queue_t *wq, mblk_t *mp) ieee80211com_t *ic = &sc->sc_ic; int err; - mutex_enter(&sc->sc_glock); - if (sc->sc_flags & (WPI_F_SUSPEND | WPI_F_HW_ERR_RECOVER)) { - miocnak(wq, mp, 0, ENXIO); - mutex_exit(&sc->sc_glock); - return; - } - mutex_exit(&sc->sc_glock); - err = ieee80211_ioctl(ic, wq, mp); if (err == ENETRESET) { /* @@ -2335,13 +2331,6 @@ wpi_m_setprop(void *arg, const char *pr_name, mac_prop_id_t wldp_pr_name, wpi_sc_t *sc = (wpi_sc_t *)arg; ieee80211com_t *ic = &sc->sc_ic; - mutex_enter(&sc->sc_glock); - if (sc->sc_flags & (WPI_F_SUSPEND | WPI_F_HW_ERR_RECOVER)) { - mutex_exit(&sc->sc_glock); - return (ENXIO); - } - mutex_exit(&sc->sc_glock); - err = ieee80211_setprop(ic, pr_name, wldp_pr_name, wldp_length, wldp_buf); |