mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-03 21:04:05 +00:00
commit
f0cbddd397
32
README.md
32
README.md
@ -4,15 +4,11 @@
|
||||
## TODO
|
||||
These are the problems that needs attention, any help would be appreciated.
|
||||
```
|
||||
* USB3 (USBModeSwitch) does not work correctly, forcing adapters to use only USB2.0.
|
||||
Considering many adapters supported are high speed this needs attention.
|
||||
Check issue report @ https://github.com/aircrack-ng/rtl8812au/issues/29
|
||||
|
||||
* AP AC speed does NOT work.
|
||||
Check issue report @ https://github.com/aircrack-ng/rtl8812au/issues/31
|
||||
* txpower control has been added, but some issues remain.
|
||||
Check issue reports for more information.
|
||||
|
||||
* RadioTap FCS flag is set, but frame does not contain FCS.
|
||||
Check issue report @https://github.com/aircrack-ng/rtl8812au/issues/28
|
||||
Check issue report @ https://github.com/aircrack-ng/rtl8812au/issues/28
|
||||
|
||||
```
|
||||
## DKMS
|
||||
@ -51,10 +47,6 @@ Download
|
||||
git clone -b v5.1.5 https://github.com/aircrack-ng/rtl8812au.git
|
||||
cd rtl*
|
||||
```
|
||||
To download v4.3.21
|
||||
```
|
||||
git clone -b v4.3.21 https://github.com/aircrack-ng/rtl8812au.git
|
||||
```
|
||||
Package / Build dependencies
|
||||
```
|
||||
sudo apt-get install build-essential
|
||||
@ -79,7 +71,7 @@ For setting monitor mode
|
||||
```
|
||||
sudo ip link set wlan0 up
|
||||
```
|
||||
For setting TX power (v4.3.21 branch only):
|
||||
For setting TX power
|
||||
```
|
||||
sudo iwconfig wlan0 txpower 30
|
||||
```
|
||||
@ -97,7 +89,7 @@ at the end of file /etc/NetworkManager/NetworkManager.conf and restart NetworkMa
|
||||
sudo service NetworkManager restart
|
||||
```
|
||||
|
||||
## Led Parameter
|
||||
## LED Parameter
|
||||
```
|
||||
We've added the "realtek-leds.conf" in build directory,
|
||||
with this you may change the leds to
|
||||
@ -110,16 +102,6 @@ $ sudo modprobe 8812au rtw_led_ctrl=1
|
||||
|
||||
## Credits
|
||||
```
|
||||
astsam - for the main work + monitor/injection support - https://github.com/astsam
|
||||
```
|
||||
|
||||
## Other Sources
|
||||
```
|
||||
astsam - https://github.com/astsam/rtl8812au
|
||||
gnab - https://github.com/gnab/rtl8812au
|
||||
zebulon2 - https://github.com/zebulon2/rtl8812au
|
||||
paspro - https://github.com/paspro/rtl8812au
|
||||
ulli-kroll - https://github.com/ulli-kroll/rtl8821au
|
||||
tpircher - https://github.com/tpircher/rtl8814AU
|
||||
xxNull-lsk - https://github.com/xxNull-lsk/rtl8812AU
|
||||
astsam - for the main work + monitor/injection support - https://github.com/astsam
|
||||
evilphish - for great patching (USB3, VHT + txpower control +++) - https://github.com/evilphish
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
PACKAGE_NAME="realtek-rtl88xxau"
|
||||
PACKAGE_VERSION="5.1.5~20171002"
|
||||
PACKAGE_VERSION="5.1.5~20171022"
|
||||
CLEAN="make clean"
|
||||
BUILT_MODULE_NAME[0]=8812au
|
||||
DEST_MODULE_LOCATION[0]="/updates"
|
||||
|
@ -750,7 +750,7 @@ check_bss:
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
|
||||
struct cfg80211_roam_info roam_info = {};
|
||||
#endif
|
||||
|
||||
|
||||
freq = rtw_ch2freq(channel);
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
#endif
|
||||
@ -930,7 +930,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta == NULL)) {
|
||||
RTW_INFO("r871x_set_encryption, crypt.alg = WEP\n");
|
||||
|
||||
@ -973,7 +972,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_pa
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!psta && check_fwstate(pmlmepriv, WIFI_AP_STATE)) { /* group key */
|
||||
if (param->u.crypt.set_tx == 0) { /* group key */
|
||||
if (strcmp(param->u.crypt.alg, "WEP") == 0) {
|
||||
@ -1153,7 +1151,6 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
RTW_INFO("%s\n", __func__);
|
||||
|
||||
param->u.crypt.err = 0;
|
||||
@ -1238,7 +1235,6 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
|
||||
if (strcmp(param->u.crypt.alg, "none") != 0)
|
||||
psta->ieee8021x_blocked = _FALSE;
|
||||
|
||||
|
||||
if ((padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption2Enabled) ||
|
||||
(padapter->securitypriv.ndisencryptstatus == Ndis802_11Encryption3Enabled))
|
||||
psta->dot118021XPrivacy = padapter->securitypriv.dot11PrivacyAlgrthm;
|
||||
@ -1376,7 +1372,6 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev, struct ieee_param
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
exit:
|
||||
|
||||
RTW_INFO("%s, ret=%d\n", __func__, ret);
|
||||
@ -1473,7 +1468,6 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
param->u.crypt.set_tx = 1; /* for wpa/wpa2 pairwise key */
|
||||
}
|
||||
|
||||
|
||||
/* param->u.crypt.idx = key_index - 1; */
|
||||
param->u.crypt.idx = key_index;
|
||||
|
||||
@ -2306,7 +2300,6 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
_rtw_memset(ssid, 0, sizeof(NDIS_802_11_SSID) * RTW_SSID_SCAN_AMOUNT);
|
||||
/* parsing request ssids, n_ssids */
|
||||
for (i = 0; i < request->n_ssids && i < RTW_SSID_SCAN_AMOUNT; i++) {
|
||||
@ -2403,8 +2396,6 @@ static int cfg80211_rtw_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int rtw_cfg80211_set_wpa_version(struct security_priv *psecuritypriv, u32 wpa_version)
|
||||
{
|
||||
RTW_INFO("%s, wpa_version=%d\n", __func__, wpa_version);
|
||||
@ -2414,7 +2405,6 @@ static int rtw_cfg80211_set_wpa_version(struct security_priv *psecuritypriv, u32
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (wpa_version & (NL80211_WPA_VERSION_1 | NL80211_WPA_VERSION_2))
|
||||
psecuritypriv->ndisauthtype = Ndis802_11AuthModeWPAPSK;
|
||||
|
||||
@ -2463,7 +2453,6 @@ static int rtw_cfg80211_set_auth_type(struct security_priv *psecuritypriv,
|
||||
|
||||
psecuritypriv->ndisencryptstatus = Ndis802_11Encryption1Enabled;
|
||||
|
||||
|
||||
break;
|
||||
default:
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
|
||||
@ -2552,7 +2541,6 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv, u32 key
|
||||
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_WAPI;
|
||||
#endif
|
||||
|
||||
|
||||
else {
|
||||
RTW_INFO("Invalid key mgt: 0x%x\n", key_mgt);
|
||||
/* return -EINVAL; */
|
||||
@ -2748,7 +2736,6 @@ static int rtw_cfg80211_set_wpa_ie(_adapter *padapter, u8 *pie, size_t ielen)
|
||||
/* || check_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS) == _TRUE) */
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_OFF_RCR_AM, null_addr);
|
||||
|
||||
|
||||
exit:
|
||||
if (buf)
|
||||
rtw_mfree(buf, ielen);
|
||||
@ -2811,7 +2798,6 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
|
||||
rtw_mi_buddy_scan_abort(padapter, _TRUE); /* OR rtw_mi_scan_abort(padapter, _TRUE);*/
|
||||
#endif /*CONFIG_CONCURRENT_MODE*/
|
||||
|
||||
|
||||
_rtw_memset(&ndis_ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
ndis_ssid.SsidLength = params->ssid_len;
|
||||
_rtw_memcpy(ndis_ssid.Ssid, (u8 *)params->ssid, params->ssid_len);
|
||||
@ -2971,11 +2957,9 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||
|
||||
RTW_INFO("ssid=%s, len=%zu\n", ndis_ssid.Ssid, sme->ssid_len);
|
||||
|
||||
|
||||
if (sme->bssid)
|
||||
RTW_INFO("bssid="MAC_FMT"\n", MAC_ARG(sme->bssid));
|
||||
|
||||
|
||||
psecuritypriv->ndisencryptstatus = Ndis802_11EncryptionDisabled;
|
||||
psecuritypriv->dot11PrivacyAlgrthm = _NO_PRIVACY_;
|
||||
psecuritypriv->dot118021XGrpPrivacy = _NO_PRIVACY_;
|
||||
@ -3005,7 +2989,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||
padapter->mlmeextpriv.mlmext_info.auth_algo = psecuritypriv->dot11AuthAlgrthm;
|
||||
#endif
|
||||
|
||||
|
||||
if (ret < 0)
|
||||
goto cancel_ps_deny;
|
||||
|
||||
@ -3611,7 +3594,6 @@ dump:
|
||||
pattrib->seqnum = pmlmeext->mgnt_seq;
|
||||
pmlmeext->mgnt_seq++;
|
||||
|
||||
|
||||
pattrib->last_txcmdsz = pattrib->pktlen;
|
||||
|
||||
dump_mgntframe(padapter, pmgntframe);
|
||||
@ -3619,7 +3601,6 @@ dump:
|
||||
} else
|
||||
RTW_INFO("frame_ctl=0x%x\n", frame_ctl & (RTW_IEEE80211_FCTL_FTYPE | RTW_IEEE80211_FCTL_STYPE));
|
||||
|
||||
|
||||
fail:
|
||||
|
||||
rtw_skb_free(skb);
|
||||
@ -3856,22 +3837,18 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
/* struct sta_priv *pstapriv = &padapter->stapriv; */
|
||||
|
||||
|
||||
RTW_INFO("%s beacon_head_len=%zu, beacon_tail_len=%zu\n", __FUNCTION__, head_len, tail_len);
|
||||
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != _TRUE)
|
||||
return -EINVAL;
|
||||
|
||||
if (head_len < 24)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
pbuf = rtw_zmalloc(head_len + tail_len);
|
||||
if (!pbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
/* _rtw_memcpy(&pstapriv->max_num_sta, param->u.bcn_ie.reserved, 2); */
|
||||
|
||||
/* if((pstapriv->max_num_sta>NUM_STA) || (pstapriv->max_num_sta<=0)) */
|
||||
@ -3932,7 +3909,6 @@ static int rtw_add_beacon(_adapter *adapter, const u8 *head, size_t head_len, co
|
||||
} else
|
||||
ret = -EINVAL;
|
||||
|
||||
|
||||
rtw_mfree(pbuf, head_len + tail_len);
|
||||
|
||||
return ret;
|
||||
@ -4126,7 +4102,6 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||
|
||||
RTW_INFO("+"FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0))
|
||||
target_mac = mac;
|
||||
#else
|
||||
@ -4138,7 +4113,6 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
if (!target_mac) {
|
||||
RTW_INFO("flush all sta, and cam_entry\n");
|
||||
|
||||
@ -4149,7 +4123,6 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
RTW_INFO("free sta macaddr =" MAC_FMT "\n", MAC_ARG(target_mac));
|
||||
|
||||
if (target_mac[0] == 0xff && target_mac[1] == 0xff &&
|
||||
@ -4157,7 +4130,6 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||
target_mac[4] == 0xff && target_mac[5] == 0xff)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
|
||||
|
||||
phead = &pstapriv->asoc_list;
|
||||
@ -4708,7 +4680,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
u8 *frame_body = (unsigned char *)(buf + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
size_t frame_body_len = len - sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||
|
||||
|
||||
RTW_INFO("[%s] In\n", __FUNCTION__);
|
||||
|
||||
/* prepare for building provision_request frame */
|
||||
@ -4742,7 +4713,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, frame_body_len - _PUBLIC_ACTION_IE_OFFSET_, p2p_ie, &p2p_ielen)) {
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, devinfo_content, &devinfo_contentlen);
|
||||
@ -4750,7 +4720,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* start to build provision_request frame */
|
||||
_rtw_memset(wpsie, 0, sizeof(wpsie));
|
||||
_rtw_memset(p2p_ie, 0, sizeof(p2p_ie));
|
||||
@ -4760,7 +4729,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
if (pmgntframe == NULL)
|
||||
return;
|
||||
|
||||
|
||||
/* update attribute */
|
||||
pattrib = &pmgntframe->attrib;
|
||||
update_mgntframe_attrib(padapter, pattrib);
|
||||
@ -4790,7 +4758,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
pframe = rtw_set_fixed_ie(pframe, 1, &(oui_subtype), &(pattrib->pktlen));
|
||||
pframe = rtw_set_fixed_ie(pframe, 1, &(dialogToken), &(pattrib->pktlen));
|
||||
|
||||
|
||||
/* build_prov_disc_request_p2p_ie */
|
||||
/* P2P OUI */
|
||||
p2pielen = 0;
|
||||
@ -4820,7 +4787,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
_rtw_memcpy(p2p_ie + p2pielen, &capability, 2);
|
||||
p2pielen += 2;
|
||||
|
||||
|
||||
/* Device Info ATTR */
|
||||
/* Type: */
|
||||
p2p_ie[p2pielen++] = P2P_ATTR_DEVICE_INFO;
|
||||
@ -4836,7 +4802,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
_rtw_memcpy(p2p_ie + p2pielen, devinfo_content, devinfo_contentlen);
|
||||
p2pielen += devinfo_contentlen;
|
||||
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2p_ie, &p2p_ielen);
|
||||
/* p2pielen = build_prov_disc_request_p2p_ie( pwdinfo, pframe, NULL, 0, pwdinfo->tx_prov_disc_info.peerDevAddr); */
|
||||
/* pframe += p2pielen; */
|
||||
@ -4874,7 +4839,6 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf,
|
||||
|
||||
pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *) wpsie, &pattrib->pktlen);
|
||||
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfdielen = build_provdisc_req_wfd_ie(pwdinfo, pframe);
|
||||
pframe += wfdielen;
|
||||
@ -5056,7 +5020,6 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy,
|
||||
} else
|
||||
RTW_INFO("%s remain_ch:%u not in channel plan!!!!\n", __FUNCTION__, remain_ch);
|
||||
|
||||
|
||||
/* call this after other things have been done */
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (ATOMIC_READ(&pwdev_priv->ro_ch_to) == 1 ||
|
||||
@ -5824,7 +5787,6 @@ static int rtw_cfg80211_set_beacon_wpsp2pie(struct net_device *ndev, char *buf,
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfd_ie = rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen);
|
||||
if (wfd_ie) {
|
||||
@ -5950,7 +5912,6 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
||||
RTW_INFO("Got P2P Capability Attr, grp_cap=0x%x, is_GO\n", grp_cap);
|
||||
}
|
||||
|
||||
|
||||
if (is_GO == _FALSE) {
|
||||
if (pmlmepriv->p2p_probe_resp_ie) {
|
||||
u32 free_len = pmlmepriv->p2p_probe_resp_ie_len;
|
||||
@ -5988,7 +5949,6 @@ static int rtw_cfg80211_set_probe_resp_wpsp2pie(struct net_device *net, char *bu
|
||||
}
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
wfd_ie = rtw_get_wfd_ie(buf, len, NULL, &wfd_ielen);
|
||||
if (wfd_ie) {
|
||||
@ -6325,12 +6285,10 @@ static void rtw_cfg80211_init_vht_capab(_adapter *padapter, struct ieee80211_sta
|
||||
HighestRate = VHT_MCS_DATA_RATE[bw][pvhtpriv->sgi_80m][((pvhtpriv->vht_highest_rate - MGN_VHT1SS_MCS0)&0x3f)];
|
||||
HighestRate = (HighestRate+1) >> 1;
|
||||
|
||||
|
||||
vht_cap->vht_mcs.tx_highest = HighestRate; //indicate we support highest rx rate is 600Mbps.
|
||||
vht_cap->vht_mcs.rx_highest = HighestRate; //indicate we support highest rx rate is 600Mbps.
|
||||
}
|
||||
|
||||
|
||||
static void rtw_cfg80211_create_vht_cap(_adapter *padapter, struct ieee80211_sta_vht_cap *vht_cap)
|
||||
{
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
@ -6362,7 +6320,6 @@ static void rtw_cfg80211_create_vht_cap(_adapter *padapter, struct ieee80211_sta
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void rtw_cfg80211_init_wiphy(_adapter *padapter)
|
||||
{
|
||||
u8 rf_type;
|
||||
|
Loading…
Reference in New Issue
Block a user