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

staging: rtl8723au: Get rid of SetPrivacy()/SetPwrMgt()/SetMData() macros

Set these bits directly in the code instead of fiddling with wrapper
macros.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd602993
......@@ -3091,7 +3091,8 @@ void issue_auth23a(struct rtw_adapter *padapter, struct sta_info *psta,
pmlmeinfo->chg_txt,
&pattrib->pktlen);
SetPrivacy(fctrl);
pwlanhdr->frame_control |=
cpu_to_le16(IEEE80211_FCTL_PROTECTED);
pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
......@@ -3573,7 +3574,7 @@ static int _issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da,
SetToDs(fctrl);
if (power_mode)
SetPwrMgt(fctrl);
pwlanhdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
ether_addr_copy(pwlanhdr->addr1, da);
ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
......@@ -3697,7 +3698,7 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter,
SetToDs(fctrl);
if (pattrib->mdata)
SetMData(fctrl);
pwlanhdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
......
......@@ -936,9 +936,11 @@ static int rtw_make_wlanhdr(struct rtw_adapter *padapter, u8 *hdr,
goto exit;
}
if (pattrib->mdata)
SetMData(fctrl);
pwlanhdr->frame_control |=
cpu_to_le16(IEEE80211_FCTL_MOREDATA);
if (pattrib->encrypt)
SetPrivacy(fctrl);
pwlanhdr->frame_control |=
cpu_to_le16(IEEE80211_FCTL_PROTECTED);
if (qos_option) {
qc = (unsigned short *)(hdr + pattrib->hdrlen - 2);
if (pattrib->priority)
......
......@@ -310,16 +310,13 @@ static void ConstructPSPoll(struct rtw_adapter *padapter,
u8 *pframe, u32 *pLength)
{
struct ieee80211_hdr *pwlanhdr;
__le16 *fctrl;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
pwlanhdr = (struct ieee80211_hdr *)pframe;
/* Frame control. */
fctrl = &pwlanhdr->frame_control;
*(fctrl) = 0;
SetPwrMgt(fctrl);
pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FCTL_PM);
SetFrameSubType(pframe, WIFI_PSPOLL);
/* AID. */
......@@ -355,7 +352,7 @@ ConstructNullFunctionData(struct rtw_adapter *padapter, u8 *pframe,
fctrl = &pwlanhdr->frame_control;
if (bForcePowerSave)
SetPwrMgt(fctrl);
pwlanhdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM);
switch (cur_network->network.ifmode) {
case NL80211_IFTYPE_P2P_CLIENT:
......
......@@ -72,15 +72,6 @@ enum WIFI_FRAME_SUBTYPE {
#define SetFrDs(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_FROMDS))
#define SetPwrMgt(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_PM))
#define SetMData(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_MOREDATA))
#define SetPrivacy(pbuf) \
(*(__le16 *)(pbuf) |= cpu_to_le16(IEEE80211_FCTL_PROTECTED))
#define SetFrameType(pbuf, type) \
do { \
*(__le16 *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
......
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