aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-07-11 06:28:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-12 16:05:35 -0400
commit9f926fb57a2eb14d58ea6d6699544f9ccd0df8c7 (patch)
tree968fd46eea2a5691e1be0d2cca4ec6697d53d825 /drivers/net/wireless/rt2x00/rt2x00dev.c
parent07896fe2f4df3802a224a2ee1aad1c7345d2513c (diff)
rt2x00: Use pretbtt irq for fetching beacons on rt2800pci
Updating the beacon on pre tbtt instead of beacondone allows much lower latency in regard to TIM updates. Hence, use the pre tbtt interrupt for updating the beacon in rt2800pci (older devices don't provide a pre tbtt interrupt). Also, add a new driver flag to indicate if a driver has pre tbtt support or not and implement the according behavior in rt2x00lib. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> 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.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index ae0adff0b832..f59b9f7226a8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -200,8 +200,8 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
200 } 200 }
201} 201}
202 202
203static void rt2x00lib_beacondone_iter(void *data, u8 *mac, 203static void rt2x00lib_beaconupdate_iter(void *data, u8 *mac,
204 struct ieee80211_vif *vif) 204 struct ieee80211_vif *vif)
205{ 205{
206 struct rt2x00_dev *rt2x00dev = data; 206 struct rt2x00_dev *rt2x00dev = data;
207 207
@@ -223,15 +223,33 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)
223 ieee80211_iterate_active_interfaces(rt2x00dev->hw, 223 ieee80211_iterate_active_interfaces(rt2x00dev->hw,
224 rt2x00lib_bc_buffer_iter, 224 rt2x00lib_bc_buffer_iter,
225 rt2x00dev); 225 rt2x00dev);
226 /*
227 * Devices with pre tbtt interrupt don't need to update the beacon
228 * here as they will fetch the next beacon directly prior to
229 * transmission.
230 */
231 if (test_bit(DRIVER_SUPPORT_PRE_TBTT_INTERRUPT, &rt2x00dev->flags))
232 return;
226 233
227 /* fetch next beacon */ 234 /* fetch next beacon */
228 ieee80211_iterate_active_interfaces(rt2x00dev->hw, 235 ieee80211_iterate_active_interfaces(rt2x00dev->hw,
229 rt2x00lib_beacondone_iter, 236 rt2x00lib_beaconupdate_iter,
230 rt2x00dev); 237 rt2x00dev);
231
232} 238}
233EXPORT_SYMBOL_GPL(rt2x00lib_beacondone); 239EXPORT_SYMBOL_GPL(rt2x00lib_beacondone);
234 240
241void rt2x00lib_pretbtt(struct rt2x00_dev *rt2x00dev)
242{
243 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
244 return;
245
246 /* fetch next beacon */
247 ieee80211_iterate_active_interfaces(rt2x00dev->hw,
248 rt2x00lib_beaconupdate_iter,
249 rt2x00dev);
250}
251EXPORT_SYMBOL_GPL(rt2x00lib_pretbtt);
252
235void rt2x00lib_txdone(struct queue_entry *entry, 253void rt2x00lib_txdone(struct queue_entry *entry,
236 struct txdone_entry_desc *txdesc) 254 struct txdone_entry_desc *txdesc)
237{ 255{