staging: r8188eu: use ieee80211 helper to read the qos tid
authorMartin Kaiser <martin@kaiser.cx>
Wed, 13 Apr 2022 20:07:39 +0000 (22:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Apr 2022 07:07:34 +0000 (09:07 +0200)
Replace the driver-specific GetPriority macro with ieee80211_get_tid,
which does exactly the same thing.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220413200742.276806-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_recv.c
drivers/staging/r8188eu/include/wifi.h

index 91a6e0f..1622447 100644 (file)
@@ -978,7 +978,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
        pattrib->ack_policy = 0;
        /* parsing QC field */
        if (pattrib->qos) {
-               pattrib->priority = GetPriority((ptr + 24));
+               pattrib->priority = ieee80211_get_tid(hdr);
                pattrib->ack_policy = GetAckpolicy((ptr + 24));
                pattrib->amsdu = GetAMsdu((ptr + 24));
                pattrib->hdrlen = 26;
index b26770e..0254310 100644 (file)
@@ -211,8 +211,6 @@ enum WIFI_REG_DOMAIN {
 #define SetPriority(pbuf, tid) \
        *(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
 
-#define GetPriority(pbuf)      ((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)
-
 #define SetEOSP(pbuf, eosp)    \
                *(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)