staging: rtl8723au: Get rid of ugly SetDuration() macro usage
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 21 May 2014 07:38:01 +0000 (09:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 07:27:46 +0000 (16:27 +0900)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
drivers/staging/rtl8723au/include/wifi.h

index bfe754fef8ca9485446f9ed52b0e60250e7c2ad6..a58de6775bca52df3a26dd4ceee0a982fb97cfd9 100644 (file)
@@ -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);
index 8d3066c1817a768196955ac3265ecc3770e86e62..3791561ac3a80efd6d23e6cc7a2245bf42abff5f 100644 (file)
@@ -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))