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>
This commit is contained in:

committed by
John W. Linville

parent
07896fe2f4
commit
9f926fb57a
@@ -807,6 +807,15 @@ void rt2800_config_intf(struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf,
|
||||
rt2x00_set_field32(®, BCN_TIME_CFG_TBTT_ENABLE,
|
||||
(conf->sync == TSF_SYNC_BEACON));
|
||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
|
||||
|
||||
/*
|
||||
* Enable pre tbtt interrupt for beaconing modes
|
||||
*/
|
||||
rt2800_register_read(rt2x00dev, INT_TIMER_EN, ®);
|
||||
rt2x00_set_field32(®, INT_TIMER_EN_PRE_TBTT_TIMER,
|
||||
(conf->sync == TSF_SYNC_BEACON));
|
||||
rt2800_register_write(rt2x00dev, INT_TIMER_EN, reg);
|
||||
|
||||
}
|
||||
|
||||
if (flags & CONFIG_UPDATE_MAC) {
|
||||
@@ -1732,6 +1741,13 @@ int rt2800_init_registers(struct rt2x00_dev *rt2x00dev)
|
||||
rt2800_register_read(rt2x00dev, TX_STA_CNT1, ®);
|
||||
rt2800_register_read(rt2x00dev, TX_STA_CNT2, ®);
|
||||
|
||||
/*
|
||||
* Setup leadtime for pre tbtt interrupt to 6ms
|
||||
*/
|
||||
rt2800_register_read(rt2x00dev, INT_TIMER_CFG, ®);
|
||||
rt2x00_set_field32(®, INT_TIMER_CFG_PRE_TBTT_TIMER, 6 << 4);
|
||||
rt2800_register_write(rt2x00dev, INT_TIMER_CFG, reg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2800_init_registers);
|
||||
|
Reference in New Issue
Block a user