Commit fd602993 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723au: Get rid of ugly SetDuration() macro usage

parent 2bdbf939
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -306,7 +306,8 @@ _ConstructBeacon:

}

static void ConstructPSPoll(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength)
static void ConstructPSPoll(struct rtw_adapter *padapter,
			    u8 *pframe, u32 *pLength)
{
	struct ieee80211_hdr *pwlanhdr;
	__le16 *fctrl;
@@ -322,7 +323,7 @@ static void ConstructPSPoll(struct rtw_adapter *padapter, u8 *pframe, u32 *pLeng
	SetFrameSubType(pframe, WIFI_PSPOLL);

	/*  AID. */
	SetDuration(pframe, (pmlmeinfo->aid | 0xc000));
	pwlanhdr->duration_id = cpu_to_le16(pmlmeinfo->aid | 0xc000);

	/*  BSSID. */
	memcpy(pwlanhdr->addr1, get_my_bssid23a(&pmlmeinfo->network), ETH_ALEN);
+0 −4
Original line number Diff line number Diff line
@@ -93,10 +93,6 @@ enum WIFI_FRAME_SUBTYPE {
		*(__le16 *)(pbuf) |= cpu_to_le16(type); \
	} while (0)

#define SetDuration(pbuf, dur) \
	(*(__le16 *)((unsigned long)(pbuf) + 2) =		\
	 cpu_to_le16(0xffff & (dur)))

#define SetPriority(pbuf, tid)	\
	(*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf))