Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89539ebe authored by Ivo van Doorn's avatar Ivo van Doorn Committed by David S. Miller
Browse files

rt2x00: Fix queue_idx initialization



For TX rings the queue_idx should start at
IEEE80211_TX_QUEUE_DATA0 and for each followup
ring this index needs to be increased.

For the RX ring the queue_idx should be set
to 0. We don't need to initialize the tx_params.

Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 40561b84
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -1239,11 +1239,16 @@ static int rt2x00lib_alloc_rings(struct rt2x00_dev *rt2x00dev)


	/*
	/*
	 * Initialize ring parameters.
	 * Initialize ring parameters.
	 * cw_min: 2^5 = 32.
	 * RX: queue_idx = 0
	 * cw_max: 2^10 = 1024.
	 * TX: queue_idx = IEEE80211_TX_QUEUE_DATA0 + index
	 * TX: cw_min: 2^5 = 32.
	 * TX: cw_max: 2^10 = 1024.
	 */
	 */
	index = 0;
	rt2x00dev->rx->rt2x00dev = rt2x00dev;
	ring_for_each(rt2x00dev, ring) {
	rt2x00dev->rx->queue_idx = 0;

	index = IEEE80211_TX_QUEUE_DATA0;
	txring_for_each(rt2x00dev, ring) {
		ring->rt2x00dev = rt2x00dev;
		ring->rt2x00dev = rt2x00dev;
		ring->queue_idx = index++;
		ring->queue_idx = index++;
		ring->tx_params.aifs = 2;
		ring->tx_params.aifs = 2;