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

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

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2bdbf939
...@@ -306,7 +306,8 @@ static void ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLeng ...@@ -306,7 +306,8 @@ static void ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLeng
} }
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; struct ieee80211_hdr *pwlanhdr;
__le16 *fctrl; __le16 *fctrl;
...@@ -322,7 +323,7 @@ static void ConstructPSPoll(struct rtw_adapter *padapter, u8 *pframe, u32 *pLeng ...@@ -322,7 +323,7 @@ static void ConstructPSPoll(struct rtw_adapter *padapter, u8 *pframe, u32 *pLeng
SetFrameSubType(pframe, WIFI_PSPOLL); SetFrameSubType(pframe, WIFI_PSPOLL);
/* AID. */ /* AID. */
SetDuration(pframe, (pmlmeinfo->aid | 0xc000)); pwlanhdr->duration_id = cpu_to_le16(pmlmeinfo->aid | 0xc000);
/* BSSID. */ /* BSSID. */
memcpy(pwlanhdr->addr1, get_my_bssid23a(&pmlmeinfo->network), ETH_ALEN); memcpy(pwlanhdr->addr1, get_my_bssid23a(&pmlmeinfo->network), ETH_ALEN);
......
...@@ -93,10 +93,6 @@ enum WIFI_FRAME_SUBTYPE { ...@@ -93,10 +93,6 @@ enum WIFI_FRAME_SUBTYPE {
*(__le16 *)(pbuf) |= cpu_to_le16(type); \ *(__le16 *)(pbuf) |= cpu_to_le16(type); \
} while (0) } while (0)
#define SetDuration(pbuf, dur) \
(*(__le16 *)((unsigned long)(pbuf) + 2) = \
cpu_to_le16(0xffff & (dur)))
#define SetPriority(pbuf, tid) \ #define SetPriority(pbuf, tid) \
(*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf)) (*(__le16 *)(pbuf) |= cpu_to_le16(tid & 0xf))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment