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

staging: rtl8723au: issue_assocrsp(): Use struct ieee80211_mgmt instead of rtw_set_fixed_ie23a()

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 88e06f02
...@@ -3182,7 +3182,7 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status, ...@@ -3182,7 +3182,7 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
struct sta_info *pstat, u16 pkt_type) struct sta_info *pstat, u16 pkt_type)
{ {
struct xmit_frame *pmgntframe; struct xmit_frame *pmgntframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_mgmt *mgmt;
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
unsigned short val; unsigned short val;
...@@ -3207,37 +3207,30 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status, ...@@ -3207,37 +3207,30 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET); memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct ieee80211_hdr *)pframe; mgmt = (struct ieee80211_mgmt *)pframe;
pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | pkt_type); mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | pkt_type);
ether_addr_copy(pwlanhdr->addr1, pstat->hwaddr); ether_addr_copy(mgmt->da, pstat->hwaddr);
ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv)); ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network)); ether_addr_copy(mgmt->bssid, get_my_bssid23a(&pmlmeinfo->network));
pwlanhdr->seq_ctrl = mgmt->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++;
pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr); pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen += pattrib->hdrlen; pattrib->pktlen =
pframe += pattrib->hdrlen; offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
/* capability */ /* capability */
val = *(unsigned short *)rtw_get_capability23a_from_ie(ie); val = *(unsigned short *)rtw_get_capability23a_from_ie(ie);
pframe = rtw_set_fixed_ie23a(pframe, _CAPABILITY_, mgmt->u.assoc_resp.capab_info = val;
(unsigned char *)&val, &pattrib->pktlen); mgmt->u.assoc_resp.status_code = cpu_to_le16(status);
mgmt->u.assoc_resp.aid = cpu_to_le16(pstat->aid | BIT(14) | BIT(15));
status = cpu_to_le16(status);
pframe = rtw_set_fixed_ie23a(pframe, _STATUS_CODE_,
(unsigned char *)&status,
&pattrib->pktlen);
val = cpu_to_le16(pstat->aid | BIT(14) | BIT(15)); pframe = mgmt->u.assoc_resp.variable;
pframe = rtw_set_fixed_ie23a(pframe, _ASOC_ID_, (unsigned char *)&val,
&pattrib->pktlen);
if (pstat->bssratelen <= 8) { if (pstat->bssratelen <= 8) {
pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES,
......
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