diff options
author | Andrea Merello <andrea.merello@gmail.com> | 2014-03-22 21:51:20 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-27 22:20:04 +0400 |
commit | fd6564fcdc0bfcd432e6e939f9538acc3905d08a (patch) | |
tree | 9feb0e42cd626e9f0a6973f79ea71c9897de1d04 /drivers/net/wireless/rtl818x/rtl8180/rtl8180.h | |
parent | 4818d82899aa97a482ba3508cd75864a60c483ac (diff) | |
download | linux-fd6564fcdc0bfcd432e6e939f9538acc3905d08a.tar.xz |
rtl8180: rationalize TX queues
On currently supported HW there are four TX queues (three for normal
packets and one for beacons).
The driver uses just one TX queue, and declare to mac80211 to
support just one queue, but it allocates coherent memory for all
queues.
Furthermore the TX is code is written assumimg four queues exists,
and even if we decide to enable more queues in future, its mapping
rule to mac80211 is fixed.
This means we have memory waste on rtl8180/rtl8185, and we have also
not enough flexibility to add support for boards (rtl8187se) that
will use more queues.
This patch changes things in order to allocate coherent memory only
for the queues effectively used and it make it possible to specify
how to map hardware queues on mac80211 queues, that will be used
by rtl8187se code as soon it will be merged.
Note: even if the beacon queue is currently unused, this should
change, so I kept it.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x/rtl8180/rtl8180.h')
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8180/rtl8180.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h b/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h index 26383d77fc3a..ad64c5e84857 100644 --- a/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h +++ b/drivers/net/wireless/rtl818x/rtl8180/rtl8180.h @@ -24,6 +24,11 @@ #define ANAPARAM_PWR1_SHIFT 20 #define ANAPARAM_PWR1_MASK (0x7F << ANAPARAM_PWR1_SHIFT) +/* rtl8180/rtl8185 have 3 queue + beacon queue. + * mac80211 can use just one, + beacon = 2 tot. + */ +#define RTL8180_NR_TX_QUEUES 2 + struct rtl8180_tx_desc { __le32 flags; __le16 rts_duration; @@ -75,7 +80,7 @@ struct rtl8180_priv { dma_addr_t rx_ring_dma; unsigned int rx_idx; struct sk_buff *rx_buf[32]; - struct rtl8180_tx_ring tx_ring[4]; + struct rtl8180_tx_ring tx_ring[RTL8180_NR_TX_QUEUES]; struct ieee80211_channel channels[14]; struct ieee80211_rate rates[12]; struct ieee80211_supported_band band; |