mirror of
https://github.com/RinCat/RTL88x2BU-Linux-Driver.git
synced 2026-01-19 10:26:35 +00:00
Update to 5.6.1.6
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1787,7 +1787,7 @@ chbw_decision:
|
||||
, pdvobj->padapters[i]->mlmeextpriv.cur_channel
|
||||
, pdvobj->padapters[i]->mlmeextpriv.cur_bwmode
|
||||
, pdvobj->padapters[i]->mlmeextpriv.cur_ch_offset
|
||||
, ht_option);
|
||||
, ht_option, 0);
|
||||
}
|
||||
}
|
||||
#endif /* defined(CONFIG_IOCTL_CFG80211) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)) */
|
||||
|
||||
@@ -1191,6 +1191,62 @@ u8 *rtw_get_wps_attr_content(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* OWE */
|
||||
|
||||
/**
|
||||
* rtw_get_OWE_ie - Search OWE IE from a series of IEs
|
||||
* @in_ie: Address of IEs to search
|
||||
* @in_len: Length limit from in_ie
|
||||
* @wps_ie: If not NULL and OWE IE is found, OWE IE will be copied to the buf starting from owe_ie
|
||||
* @wps_ielen: If not NULL and OWE IE is found, will set to the length of the entire OWE IE
|
||||
*
|
||||
* Returns: The address of the OWE IE found, or NULL
|
||||
*/
|
||||
u8 *rtw_get_owe_ie(const u8 *in_ie, uint in_len, u8 *owe_ie, uint *owe_ielen)
|
||||
{
|
||||
uint cnt;
|
||||
const u8 *oweie_ptr = NULL;
|
||||
u8 eid;
|
||||
|
||||
if (owe_ielen)
|
||||
*owe_ielen = 0;
|
||||
|
||||
if (!in_ie) {
|
||||
rtw_warn_on(1);
|
||||
return (u8 *)oweie_ptr;
|
||||
}
|
||||
|
||||
if (in_len <= 0)
|
||||
return (u8 *)oweie_ptr;
|
||||
|
||||
cnt = 0;
|
||||
|
||||
while (cnt + 1 + 4 < in_len) {
|
||||
eid = in_ie[cnt];
|
||||
|
||||
if (cnt + 1 + 4 >= MAX_IE_SZ) {
|
||||
rtw_warn_on(1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((eid == WLAN_EID_EXTENSION) && (in_ie[cnt + 2] == WLAN_EID_EXT_OWE_DH_PARAM)) {
|
||||
oweie_ptr = in_ie + cnt;
|
||||
|
||||
if (owe_ie)
|
||||
_rtw_memcpy(owe_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
|
||||
|
||||
if (owe_ielen)
|
||||
*owe_ielen = in_ie[cnt + 1] + 2;
|
||||
|
||||
break;
|
||||
} else
|
||||
cnt += in_ie[cnt + 1] + 2;
|
||||
|
||||
}
|
||||
|
||||
return (u8 *)oweie_ptr;
|
||||
}
|
||||
|
||||
static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
|
||||
struct rtw_ieee802_11_elems *elems,
|
||||
int show_errors)
|
||||
|
||||
@@ -105,6 +105,7 @@ unsigned char WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02};
|
||||
unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04};
|
||||
unsigned char P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09};
|
||||
unsigned char WFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A};
|
||||
unsigned char DPP_OUI[] = {0x50, 0x6F, 0x9A, 0x1A};
|
||||
|
||||
unsigned char WMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
|
||||
unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
|
||||
@@ -6543,6 +6544,9 @@ unsigned int on_action_public_vendor(union recv_frame *precv_frame)
|
||||
unsigned int ret = _FAIL;
|
||||
u8 *pframe = precv_frame->u.hdr.rx_data;
|
||||
u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
_adapter *adapter = precv_frame->u.hdr.adapter;
|
||||
int cnt = 0;
|
||||
char msg[64];
|
||||
|
||||
if (_rtw_memcmp(frame_body + 2, P2P_OUI, 4) == _TRUE) {
|
||||
if (rtw_action_public_decache(precv_frame, 7) == _FAIL)
|
||||
@@ -6552,6 +6556,13 @@ unsigned int on_action_public_vendor(union recv_frame *precv_frame)
|
||||
rtw_rframe_del_wfd_ie(precv_frame, 8);
|
||||
|
||||
ret = on_action_public_p2p(precv_frame);
|
||||
} else if (_rtw_memcmp(frame_body + 2, DPP_OUI, 4) == _TRUE) {
|
||||
u8 dpp_type = frame_body[7];
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
cnt += sprintf((msg + cnt), "DPP(type:%u)", dpp_type);
|
||||
rtw_cfg80211_rx_action(adapter, precv_frame, msg);
|
||||
#endif
|
||||
}
|
||||
|
||||
exit:
|
||||
@@ -8937,6 +8948,23 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p
|
||||
#endif
|
||||
}
|
||||
|
||||
static u32 rtw_append_assoc_req_owe_ie(_adapter *adapter, u8 *pbuf)
|
||||
{
|
||||
struct security_priv *sec = &adapter->securitypriv;
|
||||
u32 len = 0;
|
||||
|
||||
if (sec == NULL)
|
||||
goto exit;
|
||||
|
||||
if (sec->owe_ie && sec->owe_ie_len > 0) {
|
||||
len = sec->owe_ie_len;
|
||||
_rtw_memcpy(pbuf, sec->owe_ie, len);
|
||||
}
|
||||
|
||||
exit:
|
||||
return len;
|
||||
}
|
||||
|
||||
void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
|
||||
{
|
||||
int ret = _FAIL;
|
||||
@@ -9383,6 +9411,15 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
|
||||
#endif
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
/* OWE */
|
||||
{
|
||||
u32 owe_ie_len;
|
||||
|
||||
owe_ie_len = rtw_append_assoc_req_owe_ie(padapter, pframe);
|
||||
pframe += owe_ie_len;
|
||||
pattrib->pktlen += owe_ie_len;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RTW_REPEATER_SON
|
||||
rtw_rson_append_ie(padapter, pframe, &pattrib->pktlen);
|
||||
#endif
|
||||
@@ -16066,7 +16103,7 @@ void rtw_join_done_chk_ch(_adapter *adapter, int join_res)
|
||||
|
||||
rtw_cfg80211_ch_switch_notify(iface
|
||||
, mlmeext->cur_channel, mlmeext->cur_bwmode, mlmeext->cur_ch_offset
|
||||
, ht_option);
|
||||
, ht_option, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -16279,12 +16316,12 @@ exit:
|
||||
ht_option = adapter->mlmepriv.htpriv.ht_option;
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
|
||||
/*
|
||||
/*
|
||||
when supplicant send the mlme frame,
|
||||
the bss freq is updated by channel switch event.
|
||||
*/
|
||||
rtw_cfg80211_ch_switch_notify(adapter,
|
||||
cur_ch, cur_bw, cur_ch_offset, ht_option);
|
||||
cur_ch, cur_bw, cur_ch_offset, ht_option, 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -4459,7 +4459,7 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
||||
u32 ies_len;
|
||||
u8 *p2p_ie;
|
||||
u32 p2p_ielen = 0;
|
||||
u8 noa_attr[MAX_P2P_IE_LEN] = { 0x00 };/* NoA length should be n*(13) + 2 */
|
||||
u8 *noa_attr; /* NoA length should be n*(13) + 2 */
|
||||
u32 attr_contentlen = 0;
|
||||
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
@@ -4486,7 +4486,8 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
||||
while (p2p_ie) {
|
||||
find_p2p = _TRUE;
|
||||
/* Get Notice of Absence IE. */
|
||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_NOA, noa_attr, &attr_contentlen)) {
|
||||
noa_attr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_NOA, NULL, &attr_contentlen);
|
||||
if (noa_attr) {
|
||||
find_p2p_ps = _TRUE;
|
||||
noa_index = noa_attr[0];
|
||||
|
||||
@@ -4499,8 +4500,8 @@ void process_p2p_ps_ie(PADAPTER padapter, u8 *IEs, u32 IELength)
|
||||
noa_offset = 2;
|
||||
noa_num = 0;
|
||||
/* NoA length should be n*(13) + 2 */
|
||||
if (attr_contentlen > 2) {
|
||||
while (noa_offset < attr_contentlen) {
|
||||
if (attr_contentlen > 2 && (attr_contentlen - 2) % 13 == 0) {
|
||||
while (noa_offset < attr_contentlen && noa_num < P2P_MAX_NOA_NUM) {
|
||||
/* _rtw_memcpy(&wifidirect_info->noa_count[noa_num], &noa_attr[noa_offset], 1); */
|
||||
pwdinfo->noa_count[noa_num] = noa_attr[noa_offset];
|
||||
noa_offset += 1;
|
||||
|
||||
Reference in New Issue
Block a user