Commit 4d76451c authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: use ieee80211 helper to read the qos tid



Replace the driver-specific GetPriority macro with ieee80211_get_tid,
which does exactly the same thing.

Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220413200742.276806-2-martin@kaiser.cx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 176735b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -978,7 +978,7 @@ static int validate_recv_data_frame(struct adapter *adapter,
	pattrib->ack_policy = 0;
	pattrib->ack_policy = 0;
	/* parsing QC field */
	/* parsing QC field */
	if (pattrib->qos) {
	if (pattrib->qos) {
		pattrib->priority = GetPriority((ptr + 24));
		pattrib->priority = ieee80211_get_tid(hdr);
		pattrib->ack_policy = GetAckpolicy((ptr + 24));
		pattrib->ack_policy = GetAckpolicy((ptr + 24));
		pattrib->amsdu = GetAMsdu((ptr + 24));
		pattrib->amsdu = GetAMsdu((ptr + 24));
		pattrib->hdrlen = 26;
		pattrib->hdrlen = 26;
+0 −2
Original line number Original line Diff line number Diff line
@@ -211,8 +211,6 @@ enum WIFI_REG_DOMAIN {
#define SetPriority(pbuf, tid)	\
#define SetPriority(pbuf, tid)	\
	*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)
	*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)


#define GetPriority(pbuf)	((le16_to_cpu(*(__le16 *)(pbuf))) & 0xf)

#define SetEOSP(pbuf, eosp)	\
#define SetEOSP(pbuf, eosp)	\
		*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)
		*(__le16 *)(pbuf) |= cpu_to_le16((eosp & 1) << 4)