diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt61pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 8a8753e29308..3a7eccac8856 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2657,6 +2657,7 @@ static int rt61pci_conf_tx(struct ieee80211_hw *hw, u16 queue_idx, | |||
2657 | struct rt2x00_field32 field; | 2657 | struct rt2x00_field32 field; |
2658 | int retval; | 2658 | int retval; |
2659 | u32 reg; | 2659 | u32 reg; |
2660 | u32 offset; | ||
2660 | 2661 | ||
2661 | /* | 2662 | /* |
2662 | * First pass the configuration through rt2x00lib, that will | 2663 | * First pass the configuration through rt2x00lib, that will |
@@ -2668,24 +2669,23 @@ static int rt61pci_conf_tx(struct ieee80211_hw *hw, u16 queue_idx, | |||
2668 | if (retval) | 2669 | if (retval) |
2669 | return retval; | 2670 | return retval; |
2670 | 2671 | ||
2672 | /* | ||
2673 | * We only need to perform additional register initialization | ||
2674 | * for WMM queues/ | ||
2675 | */ | ||
2676 | if (queue_idx >= 4) | ||
2677 | return 0; | ||
2678 | |||
2671 | queue = rt2x00queue_get_queue(rt2x00dev, queue_idx); | 2679 | queue = rt2x00queue_get_queue(rt2x00dev, queue_idx); |
2672 | 2680 | ||
2673 | /* Update WMM TXOP register */ | 2681 | /* Update WMM TXOP register */ |
2674 | if (queue_idx < 2) { | 2682 | offset = AC_TXOP_CSR0 + (sizeof(u32) * (!!(queue_idx & 2))); |
2675 | field.bit_offset = queue_idx * 16; | 2683 | field.bit_offset = (queue_idx & 1) * 16; |
2676 | field.bit_mask = 0xffff << field.bit_offset; | 2684 | field.bit_mask = 0xffff << field.bit_offset; |
2677 | 2685 | ||
2678 | rt2x00pci_register_read(rt2x00dev, AC_TXOP_CSR0, ®); | 2686 | rt2x00pci_register_read(rt2x00dev, offset, ®); |
2679 | rt2x00_set_field32(®, field, queue->txop); | 2687 | rt2x00_set_field32(®, field, queue->txop); |
2680 | rt2x00pci_register_write(rt2x00dev, AC_TXOP_CSR0, reg); | 2688 | rt2x00pci_register_write(rt2x00dev, offset, reg); |
2681 | } else if (queue_idx < 4) { | ||
2682 | field.bit_offset = (queue_idx - 2) * 16; | ||
2683 | field.bit_mask = 0xffff << field.bit_offset; | ||
2684 | |||
2685 | rt2x00pci_register_read(rt2x00dev, AC_TXOP_CSR1, ®); | ||
2686 | rt2x00_set_field32(®, field, queue->txop); | ||
2687 | rt2x00pci_register_write(rt2x00dev, AC_TXOP_CSR1, reg); | ||
2688 | } | ||
2689 | 2689 | ||
2690 | /* Update WMM registers */ | 2690 | /* Update WMM registers */ |
2691 | field.bit_offset = queue_idx * 4; | 2691 | field.bit_offset = queue_idx * 4; |