Skip to content

Commit 6a96205

Browse files
jerome-pouillergregkh
authored andcommitted
staging: wfx: fix AC priority
In order to work properly all the queues of the device must be filled (the device chooses itself the queue to use depending of AC parameters and other things). It is the job of wfx_tx_queues_get_skb() to choose which queue must be filled. However, the sorting algorithm was inverted, so it prioritized the already filled queue! Consequently, the AC priorities was badly broken. Fixes: 6bf418c ("staging: wfx: change the way to choose frame to send") Signed-off-by: Jérôme Pouiller <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b3a9e3b commit 6a96205

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/wfx/queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev)
246246
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
247247
sorted_queues[i] = &wdev->tx_queue[i];
248248
for (j = i; j > 0; j--)
249-
if (atomic_read(&sorted_queues[j]->pending_frames) >
249+
if (atomic_read(&sorted_queues[j]->pending_frames) <
250250
atomic_read(&sorted_queues[j - 1]->pending_frames))
251251
swap(sorted_queues[j - 1], sorted_queues[j]);
252252
}

0 commit comments

Comments
 (0)