diff options
author | Ivo van Doorn <IvDoorn@gmail.com> | 2008-06-03 18:58:56 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-14 12:17:55 -0400 |
commit | 2b08da3fb595432f87b5206c1c77dcb72300cacf (patch) | |
tree | b165baf29c47a5e58ac7f9d755942aca5d519614 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | 9dad92b9ba49eaab72513d821ae43298bcf93b90 (diff) | |
download | blackbird-op-linux-2b08da3fb595432f87b5206c1c77dcb72300cacf.tar.gz blackbird-op-linux-2b08da3fb595432f87b5206c1c77dcb72300cacf.zip |
rt2x00: Cleanup/optimize set_state() function callback function
* Reduce goto usage
* Mark if-statements which are true on hardware error unlikely()
* Cleanup debug messages
This makes the code look nicer and be better optimized since
the chance of hardware errors should be very small.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index dc5ab90a52c3..48f4aec1a4d9 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -112,6 +112,8 @@ int rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev) if (status) return status; + rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_IRQ_ON); + rt2x00leds_led_radio(rt2x00dev, true); rt2x00led_led_activity(rt2x00dev, true); @@ -157,6 +159,7 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev) * Disable radio. */ rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_OFF); + rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_IRQ_OFF); rt2x00led_led_activity(rt2x00dev, false); rt2x00leds_led_radio(rt2x00dev, false); } |