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

staging: rtl8723au: ioctl_cfg80211.c: Use ieee80211.h provided fctl bits

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6023377b
...@@ -310,15 +310,17 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, ...@@ -310,15 +310,17 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
pwlanhdr = (struct ieee80211_hdr *)pbuf; pwlanhdr = (struct ieee80211_hdr *)pbuf;
pwlanhdr->frame_control = 0;
pwlanhdr->seq_ctrl = 0; pwlanhdr->seq_ctrl = 0;
if (pnetwork->network.reserved == 1) { /* WIFI_BEACON */ if (pnetwork->network.reserved == 1) { /* WIFI_BEACON */
eth_broadcast_addr(pwlanhdr->addr1); eth_broadcast_addr(pwlanhdr->addr1);
SetFrameSubType(pbuf, WIFI_BEACON); pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_BEACON);
} else { } else {
memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN); memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN);
SetFrameSubType(pbuf, WIFI_PROBERSP); pwlanhdr->frame_control =
cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_PROBE_RESP);
} }
memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN); memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN);
...@@ -2484,7 +2486,8 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, ...@@ -2484,7 +2486,8 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,
pmgmt_frame = mgmt_buf; pmgmt_frame = mgmt_buf;
pwlanhdr = (struct ieee80211_hdr *)pmgmt_frame; pwlanhdr = (struct ieee80211_hdr *)pmgmt_frame;
pwlanhdr->frame_control = 0; pwlanhdr->frame_control =
cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH);
memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN); memcpy(pwlanhdr->addr1, myid(&padapter->eeprompriv), ETH_ALEN);
memcpy(pwlanhdr->addr2, da, ETH_ALEN); memcpy(pwlanhdr->addr2, da, ETH_ALEN);
...@@ -2493,7 +2496,6 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, ...@@ -2493,7 +2496,6 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,
pwlanhdr->seq_ctrl = pwlanhdr->seq_ctrl =
cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq)); cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
pmlmeext->mgnt_seq++; pmlmeext->mgnt_seq++;
SetFrameSubType(pmgmt_frame, WIFI_DEAUTH);
pmgmt_frame += sizeof(struct ieee80211_hdr_3addr); pmgmt_frame += sizeof(struct ieee80211_hdr_3addr);
frame_len = sizeof(struct ieee80211_hdr_3addr); frame_len = sizeof(struct ieee80211_hdr_3addr);
......
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