diff options
author | Ivo van Doorn <IvDoorn@gmail.com> | 2010-11-06 10:48:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 13:26:35 -0500 |
commit | ea175ee26268370ca07aff91cf6ba1e0f1a3bd36 (patch) | |
tree | a678a381f91f6ac139101aa4d2091cd1073d7c65 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | 8be4eed0ea7d8ef38692de878043a949e9db16e8 (diff) |
rt2x00: Remove rt2x00lib_toggle_rx
As part of the queue refactoring, the rt2x00lib_toggle_rx
can be removed and replaced with the call directly to
the set_device_state callback function.
We can remove the STATE_RADIO_RX_ON_LINK and
STATE_RADIO_RX_OFF_LINK, as it was only used for
special behavior inside rt2x00lib rather then the
drivers.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@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 | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 5793afef1c08..3afa2a3ebee4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -68,7 +68,8 @@ int rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev) | |||
68 | /* | 68 | /* |
69 | * Enable RX. | 69 | * Enable RX. |
70 | */ | 70 | */ |
71 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_ON); | 71 | rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_RX_ON); |
72 | rt2x00link_start_tuner(rt2x00dev); | ||
72 | 73 | ||
73 | /* | 74 | /* |
74 | * Start watchdog monitoring. | 75 | * Start watchdog monitoring. |
@@ -102,7 +103,8 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev) | |||
102 | /* | 103 | /* |
103 | * Disable RX. | 104 | * Disable RX. |
104 | */ | 105 | */ |
105 | rt2x00lib_toggle_rx(rt2x00dev, STATE_RADIO_RX_OFF); | 106 | rt2x00link_stop_tuner(rt2x00dev); |
107 | rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_RADIO_RX_OFF); | ||
106 | 108 | ||
107 | /* | 109 | /* |
108 | * Disable radio. | 110 | * Disable radio. |
@@ -113,23 +115,6 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev) | |||
113 | rt2x00leds_led_radio(rt2x00dev, false); | 115 | rt2x00leds_led_radio(rt2x00dev, false); |
114 | } | 116 | } |
115 | 117 | ||
116 | void rt2x00lib_toggle_rx(struct rt2x00_dev *rt2x00dev, enum dev_state state) | ||
117 | { | ||
118 | /* | ||
119 | * When we are disabling the RX, we should also stop the link tuner. | ||
120 | */ | ||
121 | if (state == STATE_RADIO_RX_OFF) | ||
122 | rt2x00link_stop_tuner(rt2x00dev); | ||
123 | |||
124 | rt2x00dev->ops->lib->set_device_state(rt2x00dev, state); | ||
125 | |||
126 | /* | ||
127 | * When we are enabling the RX, we should also start the link tuner. | ||
128 | */ | ||
129 | if (state == STATE_RADIO_RX_ON) | ||
130 | rt2x00link_start_tuner(rt2x00dev); | ||
131 | } | ||
132 | |||
133 | static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, | 118 | static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, |
134 | struct ieee80211_vif *vif) | 119 | struct ieee80211_vif *vif) |
135 | { | 120 | { |