staging: rtl8723au: _issue_qos_nulldata23a(): Use struct ieee80211_qos_hdr
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 21 May 2014 07:38:06 +0000 (09:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 07:27:47 +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/core/rtw_mlme_ext.c

index 2c12ba68e8901e4a21861fb6e7f545a3e27d09dc..5defb71c7491c64ed0351869619b6b931ed89990 100644 (file)
@@ -3662,9 +3662,8 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter,
        struct xmit_frame *pmgntframe;
        struct pkt_attrib *pattrib;
        unsigned char *pframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_qos_hdr *pwlanhdr;
        __le16 *fctrl;
-       u16 *qc;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -3687,7 +3686,7 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter,
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       pwlanhdr = (struct ieee80211_qos_hdr *)pframe;
 
        fctrl = &pwlanhdr->frame_control;
        *fctrl = 0;
@@ -3700,13 +3699,11 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter,
        if (pattrib->mdata)
                pwlanhdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
 
-       qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
-
-       SetPriority(qc, tid);
-
-       SetEOSP(qc, pattrib->eosp);
-
-       SetAckpolicy(qc, pattrib->ack_policy);
+       pwlanhdr->qos_ctrl = cpu_to_le16(tid & IEEE80211_QOS_CTL_TID_MASK);
+       pwlanhdr->qos_ctrl |= cpu_to_le16((pattrib->ack_policy << 5) &
+                                         IEEE80211_QOS_CTL_ACK_POLICY_MASK);
+       if (pattrib->eosp)
+               pwlanhdr->qos_ctrl |= cpu_to_le16(IEEE80211_QOS_CTL_EOSP);
 
        ether_addr_copy(pwlanhdr->addr1, da);
        ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));