mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 15:43:59 +08:00
rt2x00: restore original beaconing state
After changing local per interface beacon setting restore original global beaconing state. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
44ad4663d5
commit
bc0df75aea
@ -1005,10 +1005,9 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc)
|
||||
entry->skb->len + padding_len);
|
||||
|
||||
/*
|
||||
* Enable beaconing again.
|
||||
* Restore beaconing state.
|
||||
*/
|
||||
rt2x00_set_field32(®, BCN_TIME_CFG_BEACON_GEN, 1);
|
||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
|
||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, orig_reg);
|
||||
|
||||
/*
|
||||
* Clean up beacon skb.
|
||||
@ -1039,13 +1038,14 @@ static inline void rt2800_clear_beacon_register(struct rt2x00_dev *rt2x00dev,
|
||||
void rt2800_clear_beacon(struct queue_entry *entry)
|
||||
{
|
||||
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
||||
u32 reg;
|
||||
u32 orig_reg, reg;
|
||||
|
||||
/*
|
||||
* Disable beaconing while we are reloading the beacon data,
|
||||
* otherwise we might be sending out invalid data.
|
||||
*/
|
||||
rt2800_register_read(rt2x00dev, BCN_TIME_CFG, ®);
|
||||
rt2800_register_read(rt2x00dev, BCN_TIME_CFG, &orig_reg);
|
||||
reg = orig_reg;
|
||||
rt2x00_set_field32(®, BCN_TIME_CFG_BEACON_GEN, 0);
|
||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
|
||||
|
||||
@ -1055,10 +1055,9 @@ void rt2800_clear_beacon(struct queue_entry *entry)
|
||||
rt2800_clear_beacon_register(rt2x00dev, entry->entry_idx);
|
||||
|
||||
/*
|
||||
* Enabled beaconing again.
|
||||
* Restore beaconing state.
|
||||
*/
|
||||
rt2x00_set_field32(®, BCN_TIME_CFG_BEACON_GEN, 1);
|
||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, reg);
|
||||
rt2800_register_write(rt2x00dev, BCN_TIME_CFG, orig_reg);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2800_clear_beacon);
|
||||
|
||||
|
@ -2031,13 +2031,14 @@ static void rt61pci_write_beacon(struct queue_entry *entry,
|
||||
static void rt61pci_clear_beacon(struct queue_entry *entry)
|
||||
{
|
||||
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
||||
u32 reg;
|
||||
u32 orig_reg, reg;
|
||||
|
||||
/*
|
||||
* Disable beaconing while we are reloading the beacon data,
|
||||
* otherwise we might be sending out invalid data.
|
||||
*/
|
||||
rt2x00mmio_register_read(rt2x00dev, TXRX_CSR9, ®);
|
||||
rt2x00mmio_register_read(rt2x00dev, TXRX_CSR9, &orig_reg);
|
||||
reg = orig_reg;
|
||||
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0);
|
||||
rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||
|
||||
@ -2048,10 +2049,9 @@ static void rt61pci_clear_beacon(struct queue_entry *entry)
|
||||
HW_BEACON_OFFSET(entry->entry_idx), 0);
|
||||
|
||||
/*
|
||||
* Enable beaconing again.
|
||||
* Restore global beaconing state.
|
||||
*/
|
||||
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1);
|
||||
rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||
rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, orig_reg);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1597,13 +1597,14 @@ static void rt73usb_clear_beacon(struct queue_entry *entry)
|
||||
{
|
||||
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
||||
unsigned int beacon_base;
|
||||
u32 reg;
|
||||
u32 orig_reg, reg;
|
||||
|
||||
/*
|
||||
* Disable beaconing while we are reloading the beacon data,
|
||||
* otherwise we might be sending out invalid data.
|
||||
*/
|
||||
rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, ®);
|
||||
rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, &orig_reg);
|
||||
reg = orig_reg;
|
||||
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0);
|
||||
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||
|
||||
@ -1614,10 +1615,9 @@ static void rt73usb_clear_beacon(struct queue_entry *entry)
|
||||
rt2x00usb_register_write(rt2x00dev, beacon_base, 0);
|
||||
|
||||
/*
|
||||
* Enable beaconing again.
|
||||
* Restore beaconing state.
|
||||
*/
|
||||
rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1);
|
||||
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
|
||||
rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, orig_reg);
|
||||
}
|
||||
|
||||
static int rt73usb_get_tx_data_len(struct queue_entry *entry)
|
||||
|
Loading…
Reference in New Issue
Block a user