1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-26 15:14:02 +00:00

Merge remote-tracking branch 'upstream/v5.3.4' into v5.3.4

This commit is contained in:
Carlos Garces 2019-05-22 23:59:45 +02:00
commit a530cae860
11 changed files with 149 additions and 65 deletions

View File

@ -10,7 +10,7 @@ EXTRA_CFLAGS += -Wextra
#EXTRA_CFLAGS += -Wno-tautological-compare
#EXTRA_CFLAGS += -Wno-incompatible-pointer-types
#EXTRA_CFLAGS += -Wno-switch
EXTRA_CFLAGS += -Wmissing-field-initializers
#EXTRA_CFLAGS += -Wmissing-field-initializers
EXTRA_CFLAGS += -Wno-cast-function-type
EXTRA_CFLAGS += -Wno-unused-variable
EXTRA_CFLAGS += -Wno-unused-value
@ -156,6 +156,7 @@ CONFIG_PLATFORM_ARM_SPREADTRUM_6820 = n
CONFIG_PLATFORM_ARM_SPREADTRUM_8810 = n
CONFIG_PLATFORM_ARM_WMT = n
CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_ARM64_RPI = n
CONFIG_PLATFORM_ARM_ODROIDC2 = n
CONFIG_PLATFORM_TI_DM365 = n
CONFIG_PLATFORM_MOZART = n
@ -1456,6 +1457,17 @@ MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
ifeq ($(CONFIG_PLATFORM_ARM64_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT
ARCH ?= arm64
CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
ifeq ($(CONFIG_PLATFORM_ARM_ODROIDC2), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
@ -1718,7 +1730,7 @@ install:
/sbin/depmod -a ${KVER}
uninstall:
rm -f $(MODDESTDIR)/$(MODULE_NAME).ko
rm -f $(MODDESTDIR)$(MODULE_NAME).ko
/sbin/depmod -a ${KVER}
backup_rtlwifi:

View File

@ -5965,7 +5965,7 @@ void issue_probersp_p2p(_adapter *padapter, unsigned char *da)
/* DS parameter set */
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&pwdinfo->listen_channel, &pattrib->pktlen);
#if 0
#ifdef CONFIG_IOCTL_CFG80211
if (adapter_wdev_data(padapter)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211) {
if (pmlmepriv->wps_probe_resp_ie != NULL && pmlmepriv->p2p_probe_resp_ie != NULL) {
/* WPS IE */

View File

@ -4094,8 +4094,8 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe,
/* guard interval */
#ifndef CONFIG_RTL8814A
hdr_buf[rt_len] |= BIT2;
#endif
hdr_buf[rt_len + 1] |= (pattrib->sgi & 0x01) << 2;
#endif
/* STBC */
#ifndef CONFIG_RTL8814A
@ -4424,7 +4424,7 @@ int recv_func(_adapter *padapter, union recv_frame *rframe)
if (cnt)
RTW_INFO(FUNC_ADPT_FMT" dequeue %d from uc_swdec_pending_queue\n",
FUNC_ADPT_ARG(padapter), cnt);
FUNC_ADPT_ARG(padapter), cnt);
}
}

View File

@ -7,7 +7,7 @@ else
echo "About to run dkms install steps..."
fi
DRV_DIR=`pwd`
DRV_DIR="$(pwd)"
DRV_NAME=rtl8812au
DRV_VERSION=5.3.4
@ -20,7 +20,7 @@ RESULT=$?
echo "Finished running dkms install steps."
if defined(CONFIG_DISABLE_IPV6)
if grep -q -e "^CONFIG_DISABLE_IPV6 = y$" "$DRV_DIR/Makefile" ; then
if echo "net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf; then
@ -29,6 +29,6 @@ if defined(CONFIG_DISABLE_IPV6)
else
echo "Could not disable IPv6"
fi
endif
fi
exit $RESULT

View File

@ -7,7 +7,7 @@ else
echo "About to run dkms removal steps..."
fi
DRV_DIR=rtl8812au
DRV_DIR="$(pwd)"
DRV_NAME=rtl8812au
DRV_VERSION=5.3.4

View File

@ -1,5 +1,5 @@
PACKAGE_NAME="realtek-rtl88xxau"
PACKAGE_VERSION="5.3.4~20190409"
PACKAGE_VERSION="5.3.4~20190522"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=88XXau
PROCS_NUM=`nproc`

View File

@ -299,13 +299,13 @@ odm_config_bb_with_header_file(
/*if (p_dm->rfe_type == 0)
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type0);
else if (dm->rfe_type == 2)
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type2);
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type2);
else if (dm->rfe_type == 3)
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type3);
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type3);
else if (dm->rfe_type == 4)
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type4);
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type4);
else if (dm->rfe_type == 5)
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type5);
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type5);
else if (dm->rfe_type == 7)
READ_AND_CONFIG_MP(8814a,_phy_reg_pg_type7);
else if (dm->rfe_type == 8)

View File

@ -3939,22 +3939,43 @@ int value;
value = dbm;
#endif
if (value < 0) {
if(value < 0)
value = 0;
}
if (value > 40) {
if(value > 40)
value = 40;
}
if (type == NL80211_TX_POWER_FIXED) {
pHalData->CurrentTxPwrIdx = value;
rtw_hal_set_tx_power_level(padapter, pHalData->current_channel);
} else {
if(type == NL80211_TX_POWER_FIXED) {
pHalData->CurrentTxPwrIdx = value;
rtw_hal_set_tx_power_level(padapter, pHalData->current_channel);
} else
return -EOPNOTSUPP;
}
return -EOPNOTSUPP;
#if 0
struct iwm_priv *iwm = wiphy_to_iwm(wiphy);
int ret;
switch (type) {
case NL80211_TX_POWER_AUTOMATIC:
return 0;
case NL80211_TX_POWER_FIXED:
if (mbm < 0 || (mbm % 100))
return -EOPNOTSUPP;
if (!test_bit(IWM_STATUS_READY, &iwm->status))
return 0;
ret = iwm_umac_set_config_fix(iwm, UMAC_PARAM_TBL_CFG_FIX,
CFG_TX_PWR_LIMIT_USR,
MBM_TO_DBM(mbm) * 2);
if (ret < 0)
return ret;
return iwm_tx_power_trigger(iwm);
default:
IWM_ERR(iwm, "Unsupported power type: %d\n", type);
return -EOPNOTSUPP;
}
#endif
RTW_INFO("%s\n", __func__);
return 0;
}
@ -5710,48 +5731,104 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
/* TODO: 160 MHz bandwidth */
static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy, struct cfg80211_chan_def *chandef)
static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
, struct cfg80211_chan_def *chandef
#else
, struct ieee80211_channel *chan
, enum nl80211_channel_type channel_type
#endif
)
{
int chan_target = (u8) ieee80211_frequency_to_channel(chandef->chan->center_freq);
int chan_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
int chan_width = CHANNEL_WIDTH_20;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
struct ieee80211_channel *chan = chandef->chan;
#endif
_adapter *padapter = wiphy_to_adapter(wiphy);
int target_channal = chan->hw_value;
int target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
int target_width = CHANNEL_WIDTH_20;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
#ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("center_freq %u Mhz ch %u width %u freq1 %u freq2 %u\n"
, chan->center_freq
, chan->hw_value
, chandef->width
, chandef->center_freq1
, chandef->center_freq2);
#endif /* CONFIG_DEBUG_CFG80211 */
switch (chandef->width) {
case NL80211_CHAN_WIDTH_20_NOHT:
case NL80211_CHAN_WIDTH_20:
chan_width = CHANNEL_WIDTH_20;
chan_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
target_width = CHANNEL_WIDTH_20;
target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
break;
case NL80211_CHAN_WIDTH_40:
chan_width = CHANNEL_WIDTH_40;
if (chandef->center_freq1 > chandef->chan->center_freq)
chan_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
target_width = CHANNEL_WIDTH_40;
if (chandef->center_freq1 > chan->center_freq)
target_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
else
chan_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
target_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
break;
case NL80211_CHAN_WIDTH_80:
chan_width = CHANNEL_WIDTH_80;
if (chandef->center_freq1 > chandef->chan->center_freq)
chan_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
else
chan_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
target_width = CHANNEL_WIDTH_80;
target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
break;
case NL80211_CHAN_WIDTH_80P80:
target_width = CHANNEL_WIDTH_80_80;
target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
break;
case NL80211_CHAN_WIDTH_160:
target_width = CHANNEL_WIDTH_160;
target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
break;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
case NL80211_CHAN_WIDTH_5:
case NL80211_CHAN_WIDTH_10:
#endif
default:
chan_width = CHANNEL_WIDTH_20;
chan_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
target_width = CHANNEL_WIDTH_20;
target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
break;
}
#else
#ifdef CONFIG_DEBUG_CFG80211
RTW_INFO("center_freq %u Mhz ch %u channel_type %u\n"
, chan->center_freq
, chan->hw_value
, channel_type);
#endif /* CONFIG_DEBUG_CFG80211 */
switch (channel_type) {
case NL80211_CHAN_NO_HT:
case NL80211_CHAN_HT20:
target_width = CHANNEL_WIDTH_20;
target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
break;
case NL80211_CHAN_HT40MINUS:
target_width = CHANNEL_WIDTH_40;
target_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
break;
case NL80211_CHAN_HT40PLUS:
target_width = CHANNEL_WIDTH_40;
target_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
break;
default:
target_width = CHANNEL_WIDTH_20;
target_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
break;
}
#endif
RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d\n"
, FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset);
rtw_set_chbw_cmd(padapter, target_channal, target_width, target_offset, RTW_CMDF_WAIT_ACK);
set_channel_bwmode(padapter, chan_target, chan_offset, chan_width);
RTW_INFO("%s : %d %d %d\n", __func__, chan_target, chan_offset, chan_width);
return 0;
}
#endif
static int cfg80211_rtw_auth(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_auth_request *req)
@ -9458,9 +9535,6 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
.set_pmksa = cfg80211_rtw_set_pmksa,
.del_pmksa = cfg80211_rtw_del_pmksa,
.flush_pmksa = cfg80211_rtw_flush_pmksa,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
.set_monitor_channel = cfg80211_rtw_set_monitor_channel,
#endif
#ifdef CONFIG_AP_MODE
.add_virtual_intf = cfg80211_rtw_add_virtual_intf,

View File

@ -863,7 +863,7 @@ static int wpa_set_auth_algs(struct net_device *dev, u32 value)
static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, u32 param_len)
{
int ret = 0;
u32 wep_key_idx, wep_key_len, wep_total_len;
u32 wep_key_idx, wep_key_len, wep_total_len = 0;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
@ -6942,7 +6942,7 @@ out:
static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param, u32 param_len)
{
int ret = 0;
u32 wep_key_idx, wep_key_len, wep_total_len = 0;
u32 wep_key_idx, wep_key_len, wep_total_len;
NDIS_802_11_WEP *pwep = NULL;
struct sta_info *psta = NULL, *pbcmc_sta = NULL;
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
@ -12355,9 +12355,8 @@ static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
}
#endif
#if defined(CONFIG_WIRELESS_EXT) && !defined(CONFIG_CFG80211_WEXT)
struct iw_handler_def rtw_handlers_def =
{
#ifdef CONFIG_WIRELESS_EXT
struct iw_handler_def rtw_handlers_def = {
.standard = rtw_handlers,
.num_standard = sizeof(rtw_handlers) / sizeof(iw_handler),
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)) || defined(CONFIG_WEXT_PRIV)

View File

@ -1273,20 +1273,18 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
return dscp >> 5;
}
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(4,19,0))
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev,
select_queue_fallback_t fallback)
#else
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0))
, void *accel_priv
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
#else
, struct net_device *sb_dev
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0))
, select_queue_fallback_t fallback
#endif
#endif
)
#endif
{
_adapter *padapter = rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -1531,7 +1529,7 @@ struct net_device *rtw_init_netdev(_adapter *old_padapter)
/* pnetdev->tx_timeout = NULL; */
pnetdev->watchdog_timeo = HZ * 3; /* 3 second timeout */
#if defined(CONFIG_WIRELESS_EXT) && !defined(CONFIG_CFG80211_WEXT)
#ifdef CONFIG_WIRELESS_EXT
pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
#endif
@ -2650,8 +2648,8 @@ static int netdev_vir_if_close(struct net_device *pnetdev)
#endif
#ifdef CONFIG_IOCTL_CFG80211
padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR;
padapter->rtw_wdev->current_bss = NULL;
wdev->iftype = NL80211_IFTYPE_MONITOR;
wdev->current_bss = NULL;
rtw_scan_abort(padapter);
rtw_cfg80211_wait_scan_req_empty(padapter, 200);
adapter_wdev_data(padapter)->bandroid_scan = _FALSE;

View File

@ -218,6 +218,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
{USB_DEVICE(0x056E, 0x4007), .driver_info = RTL8821}, /* Elecom - WDC-433DU2HBK */
{USB_DEVICE(0x0BDA, 0xA811), .driver_info = RTL8821}, /* GMYLE - AC450 */
{USB_DEVICE(0x3823, 0x6249), .driver_info = RTL8821}, /* Obihai - OBiWiFi */
{USB_DEVICE(0x2357, 0x0122), .driver_info = RTL8821}, /* TP Link - T2U Nano */
#endif
#ifdef CONFIG_RTL8192E