1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 13:24:36 +00:00

Fix compiler (rtw_br_ext.c:969:11) and kernel (net/wireless/sme.c:843) warnings

This commit is contained in:
gluker 2023-04-02 04:56:03 +03:00
parent eee82ac140
commit 0445b2ba0a
2 changed files with 15 additions and 8 deletions

View File

@ -137,7 +137,9 @@ static __inline__ int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_ta
/* have a room for new tag */ /* have a room for new tag */
memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length)); memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length));
ph->length = htons(ntohs(ph->length) + data_len); ph->length = htons(ntohs(ph->length) + data_len);
#pragma GCC diagnostic ignored "-Wstringop-overread"
memcpy((unsigned char *)ph->tag, tag, data_len); memcpy((unsigned char *)ph->tag, tag, data_len);
#pragma GCC diagnostic pop
return data_len; return data_len;
} }

View File

@ -1156,7 +1156,8 @@ check_bss:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
roam_info.links[0].bssid = cur_network->network.MacAddress; roam_info.links[0].channel = notify_channel;
roam_info.links[0].bssid = cur_network->network.MacAddress;
#else #else
roam_info.bssid = cur_network->network.MacAddress; roam_info.bssid = cur_network->network.MacAddress;
#endif #endif
@ -1190,13 +1191,17 @@ check_bss:
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state); RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
#endif #endif
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE) if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE) {
rtw_cfg80211_connect_result(pwdev, cur_network->network.MacAddress roam_info.links[0].bss = cfg80211_get_bss(pwdev->wiphy, roam_info.links[0].channel,
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2 roam_info.links[0].bssid, pwdev->u.client.ssid, pwdev->u.client.ssid_len,
, pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2 pwdev->conn_bss_type, IEEE80211_PRIVACY_ANY);
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6 cfg80211_connect_bss(wdev_to_ndev(pwdev), cur_network->network.MacAddress, roam_info.links[0].bss
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6 , pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
, WLAN_STATUS_SUCCESS, GFP_ATOMIC); , pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2
, pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6
, pmlmepriv->assoc_rsp_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 6
, WLAN_STATUS_SUCCESS, GFP_ATOMIC, NL80211_TIMEOUT_UNSPECIFIED);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) || defined(COMPAT_KERNEL_RELEASE)
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state); RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
#endif #endif