rtw88: pci: use ieee80211_ac_numbers instead of 0-3
authorYan-Hsuan Chuang <yhchuang@realtek.com>
Fri, 3 May 2019 11:53:32 +0000 (19:53 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 28 May 2019 11:50:44 +0000 (14:50 +0300)
AC numbers are defined as enum in mac80211, use them instead of bare
0-3 indexing.

Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtw88/pci.c

index cfe05ba7280de520a51f1505cc82279f38cac4d2..87bfcb3504d5cc74b0c693712e9d5e9eb3fc5e0b 100644 (file)
@@ -487,10 +487,10 @@ static void rtw_pci_stop(struct rtw_dev *rtwdev)
 }
 
 static u8 ac_to_hwq[] = {
-       [0] = RTW_TX_QUEUE_VO,
-       [1] = RTW_TX_QUEUE_VI,
-       [2] = RTW_TX_QUEUE_BE,
-       [3] = RTW_TX_QUEUE_BK,
+       [IEEE80211_AC_VO] = RTW_TX_QUEUE_VO,
+       [IEEE80211_AC_VI] = RTW_TX_QUEUE_VI,
+       [IEEE80211_AC_BE] = RTW_TX_QUEUE_BE,
+       [IEEE80211_AC_BK] = RTW_TX_QUEUE_BK,
 };
 
 static u8 rtw_hw_queue_mapping(struct sk_buff *skb)