Merge pull request #5 from kimocoder/v5.2.20

Merging changes
This commit is contained in:
fariouche 2018-08-07 16:44:34 +02:00 committed by GitHub
commit 1a471e1fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 62 additions and 64 deletions

View File

@ -3,4 +3,3 @@ config RTL8812AU
depends on USB
---help---
Help message of RTL8812AU

View File

@ -196,6 +196,17 @@ ifeq ($(CONFIG_PCI_HCI), y)
HCI_NAME = pci
endif
ifeq ($(DEBUG), 1)
EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5
EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC
else ifeq ($(DEBUG), 2)
EXTRA_CFLAGS += -DDBG=1 -DCONFIG_RTW_DEBUG -DCONFIG_DBG_COUNTER -DRTW_LOG_LEVEL=5
EXTRA_CFLAGS += -DCONFIG_DEBUG_RTL871X
EXTRA_CFLAGS += -DCONFIG_RADIOTAP_WITH_RXDESC
else
EXTRA_CFLAGS += -DDBG=0
endif
ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A)_$(CONFIG_RTL8814A), y_y_y)
EXTRA_CFLAGS += -DDRV_NAME=\"rtl88xxau\"
@ -214,18 +225,6 @@ EXTRA_CFLAGS += -DDRV_NAME=\"rtl8812au\"
endif
#ifeq ($(RTL8814), 1)
#CONFIG_RTL8812A = n
#CONFIG_RTL8821A = n
#CONFIG_RTL8814A = y
#endif
#ifeq ($(RTL8821), 1)
#CONFIG_RTL8812A = y
#CONFIG_RTL8821A = y
#CONFIG_RTL8814A = n
#endif
ifeq ($(CONFIG_USB2_EXTERNAL_POWER), y)
EXTRA_CFLAGS += -DCONFIG_USE_EXTERNAL_POWER
endif

View File

@ -4,7 +4,7 @@
### DKMS
This driver can be installed using [DKMS]. This is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the `dkms` package, which on Debian (based) systems is done like this:
```
sudo apt install dkms
sudo apt-get install dkms
```
### Installation of Driver
@ -20,16 +20,11 @@ sudo ./dkms-remove.sh
```
### Make
For building & installing the rtl8812au/rtl8821au driver with 'make' use
For building & installing the driver with 'make' use
```
make
make install
```
and for building & installing the rtl8814au driver with 'make' use
```
make RTL8814=1
make install RTL8814=1
```
### Notes
Download
@ -46,7 +41,7 @@ sudo apt-get install linux-headers-`uname -r`
```
For Raspberry (RPI)
```
sudo apt install raspberrypi-kernel-headers
sudo apt-get install raspberrypi-kernel-headers
```
For setting monitor mode
1. Fix problematic interference in monitor mode.
@ -84,7 +79,7 @@ value can be y or n
#### statically by module parameter in /etc/modprobe.d/8812au.conf or wherever, for example:
```sh
options 8812au rtw_led_enable=0
options 88XXau rtw_led_enable=0
```
value can be 0 or 1

View File

@ -1,11 +1,10 @@
PACKAGE_NAME="realtek-rtl88xxau"
PACKAGE_VERSION="5.2.20.2~20180804"
CLEAN="make clean"
BUILT_MODULE_NAME[0]=8812au
PACKAGE_VERSION="5.2.20.2~20180806"
CLEAN="'make' clean"
BUILT_MODULE_NAME[0]=88XXau
PROCS_NUM=`nproc`
[ $PROCS_NUM -gt 16 ] && PROCS_NUM=16
DEST_MODULE_LOCATION[0]="/updates"
MAKE[0]="'make' -j$PROCS_NUM KVER=${kernelver} && 'make' -j$PROCS_NUM RTL8814=1 KVER=${kernelver}"
BUILT_MODULE_NAME[1]=8814au
DEST_MODULE_LOCATION[1]="/updates"
MAKE="'make' -j$PROCS_NUM KVER=${kernelver} KSRC=/lib/modules/${kernelver}/build"
AUTOINSTALL="yes"
REMAKE_INITRD=no

View File

@ -301,8 +301,9 @@ odm_txpowertracking_callback_thermal_meter(
/*4 3. Initialize ThermalValues of rf_calibrate_info*/
if (p_rf_calibrate_info->is_reloadtxpowerindex)
if (p_rf_calibrate_info->is_reloadtxpowerindex) {
ODM_RT_TRACE(p_dm, ODM_COMP_TX_PWR_TRACK, ODM_DBG_LOUD, ("reload ofdm index for band switch\n"));
}
/*4 4. Calculate average thermal meter*/

View File

@ -809,8 +809,9 @@ halrf_segment_iqk_trigger(
odm_acquire_spin_lock(p_dm, RT_IQK_SPINLOCK);
p_dm->rf_calibrate_info.is_iqk_in_progress = false;
odm_release_spin_lock(p_dm, RT_IQK_SPINLOCK);
} else
} else {
ODM_RT_TRACE(p_dm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("== Return the IQK CMD, because RFKs in Progress ==\n"));
}
}
@ -1331,12 +1332,12 @@ halrf_iqk_trigger(
odm_acquire_spin_lock(p_dm, RT_IQK_SPINLOCK);
p_dm->rf_calibrate_info.is_iqk_in_progress = false;
odm_release_spin_lock(p_dm, RT_IQK_SPINLOCK);
} else
} else {
ODM_RT_TRACE(p_dm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("== Return the IQK CMD, because RFKs in Progress ==\n"));
}
}
void
halrf_lck_trigger(
void *p_dm_void
@ -1457,8 +1458,9 @@ halrf_lck_trigger(
odm_acquire_spin_lock(p_dm, RT_IQK_SPINLOCK);
p_dm->rf_calibrate_info.is_lck_in_progress = false;
odm_release_spin_lock(p_dm, RT_IQK_SPINLOCK);
}else
} else {
ODM_RT_TRACE(p_dm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("== Return the LCK CMD, because RFK is in Progress ==\n"));
}
}
void

View File

@ -108,9 +108,9 @@ phydm_set_kfree_to_rf_8814a(
/*that means Kfree offset is negative, we need to record it.*/
p_rf_calibrate_info->kfree_offset[e_rf_path] = (-1) * p_rf_calibrate_info->kfree_offset[e_rf_path];
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("phy_ConfigKFree8814A(): kfree_offset = %d\n", p_rf_calibrate_info->kfree_offset[e_rf_path]));
} else
} else {
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("phy_ConfigKFree8814A(): kfree_offset = %d\n", p_rf_calibrate_info->kfree_offset[e_rf_path]));
}
}
@ -142,8 +142,9 @@ phydm_get_thermal_trim_offset_8821c(
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8821c thermal trim flag:0x%02x\n", p_power_trim_info->flag));
if (p_power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
if (p_power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8821c thermal:%d\n", p_power_trim_info->thermal));
}
}
@ -298,8 +299,9 @@ phydm_get_thermal_trim_offset_8822b(
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8822b thermal trim flag:0x%02x\n", p_power_trim_info->flag));
if (p_power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
if (p_power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8822b thermal:%d\n", p_power_trim_info->thermal));
}
#if 0
} else
return;
@ -493,9 +495,9 @@ phydm_get_pa_bias_offset_8822b(
for (e_rf_path = RF_PATH_A; e_rf_path < 2; e_rf_path++)
phydm_set_pa_bias_to_rf_8822b(p_dm, e_rf_path, tx_pa_bias[e_rf_path]);
}
else
} else {
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8822b 2g tx pa bias no pg\n"));
}
}
@ -581,9 +583,9 @@ void *p_dm_void)
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8710b thermal trim flag:0x%02x\n", p_power_trim_info->flag));
if (p_power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON)
if (p_power_trim_info->flag & KFREE_FLAG_THERMAL_K_ON) {
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8710b thermal:%d\n", p_power_trim_info->thermal));
}
}
void
@ -611,10 +613,9 @@ phydm_get_power_trim_offset_8710b(
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8710b power trim flag:0x%02x\n", p_power_trim_info->flag));
if (p_power_trim_info->flag & KFREE_FLAG_ON)
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8710b power_trim_data->bb_gain[0][0]=0x%X\n", p_power_trim_info->bb_gain[0][0]));
if (p_power_trim_info->flag & KFREE_FLAG_ON) {
ODM_RT_TRACE(p_dm, ODM_COMP_MP, ODM_DBG_LOUD, ("[kfree] 8710b power_trim_data->bb_gain[0][0]=0x%X\n", p_power_trim_info->bb_gain[0][0]));
}
}
void
phydm_set_kfree_to_rf_8710b(

View File

@ -1366,8 +1366,9 @@ phy_iq_calibrate_8812a(
if (p_dm->fw_offload_ability & PHYDM_RF_IQK_OFFLOAD) {
_phy_iq_calibrate_by_fw_8812a(p_dm);
phydm_iqk_wait(p_dm, 500);
if (p_dm->rf_calibrate_info.is_iqk_in_progress)
if (p_dm->rf_calibrate_info.is_iqk_in_progress) {
ODM_RT_TRACE(p_dm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("== FW IQK TIMEOUT (Still in progress after 500ms) ==\n"));
}
} else
_phy_iq_calibrate_8812a(p_dm, *p_dm->p_channel);
}

View File

@ -1069,8 +1069,9 @@ phydm_beamforming_notify(
/*if (p_sound_info->sound_mode == SOUNDING_SW_VHT_TIMER || p_sound_info->sound_mode == SOUNDING_SW_HT_TIMER)
odm_set_timer(p_dm, &p_beam_info->beamforming_timer, p_sound_info->sound_period);*/
odm_set_timer(p_dm, &p_beam_info->beamforming_timer, 1000); /*Do MU sounding every 1sec*/
} else
} else {
PHYDM_DBG(p_dm, DBG_TXBF, ("%s: Less or larger than 2 MU STAs, not to set timer\n", __func__));
}
break;
case BEAMFORMEE_NOTIFY_DELETE_MU:
@ -1188,8 +1189,9 @@ beamforming_init_entry(
if (p_beamformer_entry == NULL) {
p_beamformer_entry = beamforming_add_bfer_entry(p_dm, p_sta, beamform_cap, num_of_sounding_dim, &bfer_idx);
if (p_beamformer_entry == NULL)
if (p_beamformer_entry == NULL) {
PHYDM_DBG(p_dm, DBG_TXBF, ("[%s]Not enough BFer entry!!!!!\n", __func__));
}
}
}
@ -1594,9 +1596,9 @@ beamforming_timer_callback(
#endif
if (ret)
ret = beamforming_start_sw(p_dm, p_sound_info->sound_idx, p_sound_info->sound_mode, p_sound_info->sound_bw);
else
else {
PHYDM_DBG(p_dm, DBG_TXBF, ("%s, Error value return from BeamformingStart_V2\n", __func__));
}
if ((p_beam_info->beamformee_su_cnt != 0) || (p_beam_info->beamformee_mu_cnt > 1)) {
if (p_sound_info->sound_mode == SOUNDING_SW_VHT_TIMER || p_sound_info->sound_mode == SOUNDING_SW_HT_TIMER)
odm_set_timer(p_dm, &p_beam_info->beamforming_timer, p_sound_info->sound_period);

View File

@ -1283,9 +1283,9 @@ phydm_basic_dbg_message
if (p_dm->support_ic_type & ODM_IC_PHY_STATUE_NEW_TYPE)
PHYDM_DBG(p_dm, ODM_COMP_COMMON, ("Coding: LDPC=((%s)), STBC=((%s))\n", (p_dm->phy_dbg_info.is_ldpc_pkt) ? "Y" : "N", (p_dm->phy_dbg_info.is_stbc_pkt) ? "Y" : "N"));
#endif
} else
} else {
PHYDM_DBG(p_dm, ODM_COMP_COMMON, ("No Link !!!\n"));
}
PHYDM_DBG(p_dm, ODM_COMP_COMMON, ("[CCA Cnt] {CCK, OFDM, Total} = {%d, %d, %d}\n",
false_alm_cnt->cnt_cck_cca, false_alm_cnt->cnt_ofdm_cca, false_alm_cnt->cnt_cca_all));
@ -1567,9 +1567,10 @@ phydm_fw_trace_en_h2c(
PHYDM_DBG(p_dm, DBG_FW_TRACE, ("---->\n"));
if (monitor_mode == 0)
PHYDM_DBG(p_dm, DBG_FW_TRACE, ("[H2C] FW_debug_en: (( %d ))\n", enable));
else
else {
PHYDM_DBG(p_dm, DBG_FW_TRACE, ("[H2C] FW_debug_en: (( %d )), mode: (( %d )), macid: (( %d ))\n", enable, monitor_mode, macid));
odm_fill_h2c_cmd(p_dm, PHYDM_H2C_FW_TRACE_EN, cmd_length, h2c_parameter);
odm_fill_h2c_cmd(p_dm, PHYDM_H2C_FW_TRACE_EN, cmd_length, h2c_parameter);
}
}
void
@ -3146,9 +3147,9 @@ phydm_fw_trace_handler_code(
u16 content_3 = (((u16)buffer[9]) << 8) | ((u16)buffer[8]);
u16 content_4 = (((u16)buffer[11]) << 8) | ((u16)buffer[10]);
if (cmd_len > 12)
if (cmd_len > 12) {
PHYDM_DBG(p_dm, DBG_FW_TRACE, ("[FW Msg] Invalid cmd length (( %d )) >12\n", cmd_len));
}
/* PHYDM_DBG(p_dm, DBG_FW_TRACE,("[FW Msg] Func=((%d)), num=((%d)), ct_0=((%d)), ct_1=((%d)), ct_2=((%d)), ct_3=((%d)), ct_4=((%d))\n", */
/* function, dbg_num, content_0, content_1, content_2, content_3, content_4)); */

View File

@ -147,8 +147,9 @@ hal_txbf_jaguar_download_ndpa(
dl_bcn_count++;
} while (!(bcn_valid_reg & BIT(0)) && dl_bcn_count < 5);
if (!(bcn_valid_reg & BIT(0)))
if (!(bcn_valid_reg & BIT(0))) {
PHYDM_DBG(p_dm, DBG_TXBF, ("%s Download RSVD page failed!\n", __func__));
}
/*TDECTRL[15:8] 0x209[7:0] = 0xF6 Beacon Head for TXDMA*/
odm_write_1byte(p_dm, REG_TDECTRL_8812A + 1, tx_page_bndy);

View File

@ -323,7 +323,7 @@
/*
* Debug Related Config
*/
#define DBG 1
// #define DBG 1
#define CONFIG_PROC_DEBUG

View File

@ -4816,8 +4816,8 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd
int channel;
int control_freq;
int center_freq;
int center_freq2=0;
int width;
int center_freq2 = 0;
int width = NL80211_CHAN_WIDTH_20;
int band;
int bandWidth;
int offset;
@ -4829,7 +4829,7 @@ static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wd
return -ENODEV;
offset = rtw_get_oper_choffset(padapter);
channel = adapter_to_dvobj(padapter)->oper_channel;
center_freq = channel = adapter_to_dvobj(padapter)->oper_channel;
if (channel >= 1) {
switch (pHalData->current_band_type) {
case 0:

View File

@ -1352,7 +1352,6 @@ static u8 is_rtw_ndev(struct net_device *ndev)
static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state, void *ptr)
{
struct net_device *ndev;
_adapter *adapter = rtw_netdev_priv(ndev);
if (ptr == NULL)
return NOTIFY_DONE;
@ -1374,8 +1373,6 @@ static int rtw_ndev_notifier_call(struct notifier_block *nb, unsigned long state
switch (state) {
case NETDEV_CHANGENAME:
rtw_adapter_proc_replace(ndev);
strncpy(adapter->old_ifname, ndev->name, IFNAMSIZ);
adapter->old_ifname[IFNAMSIZ-1] = 0;
break;
}