1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 21:34:37 +00:00

Merge pull request #1065 from gglluukk/v5.6.4.2

Fix compiler and kernel warnings
This commit is contained in:
Christian Bremvåg 2023-04-02 12:24:14 +02:00 committed by GitHub
commit 9d5c4aac62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 */
memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length));
ph->length = htons(ntohs(ph->length) + data_len);
#pragma GCC diagnostic ignored "-Wstringop-overread"
memcpy((unsigned char *)ph->tag, tag, data_len);
#pragma GCC diagnostic pop
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(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
roam_info.bssid = cur_network->network.MacAddress;
#endif
@ -1190,13 +1191,17 @@ check_bss:
RTW_INFO("pwdev->sme_state(b)=%d\n", pwdev->sme_state);
#endif
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE)
rtw_cfg80211_connect_result(pwdev, cur_network->network.MacAddress
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
, 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);
if (check_fwstate(pmlmepriv, WIFI_MONITOR_STATE) != _TRUE) {
struct cfg80211_bss *bss;
bss = cfg80211_get_bss(pwdev->wiphy, NULL, cur_network->network.MacAddress, NULL, 0,
IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY);
cfg80211_connect_bss(wdev_to_ndev(pwdev), cur_network->network.MacAddress, bss
, pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2
, 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)
RTW_INFO("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
#endif