pmlmeinfo->chg_txt,
&pattrib->pktlen);
- SetPrivacy(fctrl);
+ pwlanhdr->frame_control |=
+ cpu_to_le16(IEEE80211_FCTL_PROTECTED);
pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
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));
SetToDs(fctrl);
if (pattrib->mdata)
- SetMData(fctrl);
+ pwlanhdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA);
qc = (unsigned short *)(pframe + pattrib->hdrlen - 2);
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)
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. */
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:
#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))); \