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

staging: rl8723au: rtw_make_wlanhdr(): Use ieee80211_qos_hdr

Use the kernel provided struct and defines to fill in qos_ctrl
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec3f4e2a
...@@ -861,9 +861,8 @@ static int xmitframe_swencrypt(struct rtw_adapter *padapter, ...@@ -861,9 +861,8 @@ static int xmitframe_swencrypt(struct rtw_adapter *padapter,
static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr, static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr,
struct pkt_attrib *pattrib) struct pkt_attrib *pattrib)
{ {
u16 *qc;
struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr; struct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr;
struct ieee80211_qos_hdr *qoshdr;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
u8 qos_option = false; u8 qos_option = false;
int res = _SUCCESS; int res = _SUCCESS;
...@@ -942,11 +941,18 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr, ...@@ -942,11 +941,18 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr,
pwlanhdr->frame_control |= pwlanhdr->frame_control |=
cpu_to_le16(IEEE80211_FCTL_PROTECTED); cpu_to_le16(IEEE80211_FCTL_PROTECTED);
if (qos_option) { if (qos_option) {
qc = (unsigned short *)(hdr + pattrib->hdrlen - 2); qoshdr = (struct ieee80211_qos_hdr *)hdr;
if (pattrib->priority)
SetPriority(qc, pattrib->priority); qoshdr->qos_ctrl = cpu_to_le16(
SetEOSP(qc, pattrib->eosp); pattrib->priority & IEEE80211_QOS_CTL_TID_MASK);
SetAckpolicy(qc, pattrib->ack_policy);
qoshdr->qos_ctrl |= cpu_to_le16(
(pattrib->ack_policy << 5) &
IEEE80211_QOS_CTL_ACK_POLICY_MASK);
if (pattrib->eosp)
qoshdr->qos_ctrl |=
cpu_to_le16(IEEE80211_QOS_CTL_EOSP);
} }
/* TODO: fill HT Control Field */ /* TODO: fill HT Control Field */
......
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