From: Jes Sorensen Date: Wed, 21 May 2014 07:38:06 +0000 (+0200) Subject: staging: rtl8723au: _issue_qos_nulldata23a(): Use struct ieee80211_qos_hdr X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=24af77b4af497bcf03e289e2181182eab300f2aa;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723au: _issue_qos_nulldata23a(): Use struct ieee80211_qos_hdr Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 2c12ba68e890..5defb71c7491 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -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));