Add some Android fixes

pull/1007/head
kimocoder 2022-08-27 03:10:39 +02:00
parent ae0b0a5a04
commit 2aafb1ead6
7 changed files with 44 additions and 12 deletions

View File

@ -1573,7 +1573,7 @@ u32 rtw_aes_encrypt(_adapter *padapter, u8 *pxmitframe)
pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset;
/* 4 start to encrypt each fragment */
if ((pattrib->encrypt == _AES_)) {
if (pattrib->encrypt == _AES_) {
/*
if(pattrib->psta)
{
@ -1928,7 +1928,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
u32 res = _SUCCESS;
pframe = (unsigned char *)((union recv_frame *)precvframe)->u.hdr.rx_data;
/* 4 start to encrypt each fragment */
if ((prxattrib->encrypt == _AES_)) {
if (prxattrib->encrypt == _AES_) {
stainfo = rtw_get_stainfo(&padapter->stapriv , &prxattrib->ta[0]);
if (stainfo != NULL) {

View File

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

View File

@ -576,7 +576,7 @@ void rtw_hal_turbo_edca(_adapter *adapter)
return;
}
if ((pregpriv->wifi_spec == 1)) { /* || (pmlmeinfo->HT_enable == 0)) */
if (pregpriv->wifi_spec == 1) { /* || (pmlmeinfo->HT_enable == 0)) */
precvpriv->is_any_non_be_pkts = _FALSE;
return;
}

View File

@ -181,7 +181,7 @@ void hal_mpt_CCKTxPowerAdjust(PADAPTER Adapter, BOOLEAN bInCH14)
} else if (IS_HARDWARE_TYPE_8723D(Adapter)) {
/* 2.4G CCK TX DFIR */
/* 2016.01.20 Suggest from RS BB mingzhi*/
if ((u1Channel == 14)) {
if (u1Channel == 14) {
phy_set_bb_reg(Adapter, rCCK0_TxFilter2, bMaskDWord, 0x0000B81C);
phy_set_bb_reg(Adapter, rCCK0_DebugPort, bMaskDWord, 0x00000000);
phy_set_bb_reg(Adapter, 0xAAC, bMaskDWord, 0x00003667);

View File

@ -48,7 +48,7 @@ Hal_InitEfuseVars_8814A(
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
PEFUSE_HAL pEfuseHal = &(pHalData->EfuseHal);
pu2Byte ptr;
#define INIT_EFUSE(var,value) ptr = (pu2Byte)&var; *ptr = value
RTW_INFO("====> %s \n", __func__);
@ -4833,7 +4833,7 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8* val)
rtw_write8(Adapter,REG_BCN_CTRL_1, 0x11);//disable atim wnd and disable beacon function
//rtw_write8(Adapter,REG_BCN_CTRL_1, 0x18);
}
else if((mode == _HW_STATE_ADHOC_) /*|| (mode == _HW_STATE_AP_)*/)
else if (mode == _HW_STATE_ADHOC_) /*|| (mode == _HW_STATE_AP_)*/
{
#ifdef RTL8814AE_SW_BCN
/*Beacon is polled to TXBUF*/
@ -4957,7 +4957,7 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8* val)
rtw_write8(Adapter,REG_BCN_CTRL, 0x19);//disable atim wnd
//rtw_write8(Adapter,REG_BCN_CTRL, 0x18);
}
else if((mode == _HW_STATE_ADHOC_) /*|| (mode == _HW_STATE_AP_)*/)
else if (mode == _HW_STATE_ADHOC_) /*|| (mode == _HW_STATE_AP_)*/
{
#ifdef RTL8814AE_SW_BCN
rtw_write16(Adapter, REG_CR, rtw_read16(Adapter, REG_CR)|BIT(8));

View File

@ -472,7 +472,7 @@ u8 rtw_cfg80211_ch_switch_notify(_adapter *adapter, u8 ch, u8 bw, u8 offset,
if (!rtw_cfg80211_allow_ch_switch_notify(adapter))
goto exit;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0);
#else
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
@ -5227,7 +5227,7 @@ static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *nd
return ret;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev, unsigned int link_id)
#else
static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
@ -6104,7 +6104,7 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, unsigned int link_id, struct cfg80211_chan_def *chandef){
#else
static int cfg80211_rtw_get_channel(struct wiphy *wiphy, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef){
@ -10413,7 +10413,7 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
if (wdev->links[0].client.current_bss) {
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19, 2))
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 2))
if (wdev->connected) {
#else
if (wdev->current_bss) {

View File

@ -213,7 +213,11 @@ const int drv_proc_hdls_num = sizeof(drv_proc_hdls) / sizeof(struct rtw_proc_hdl
static int rtw_drv_proc_open(struct inode *inode, struct file *file)
{
/* struct net_device *dev = proc_get_parent_data(inode); */
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(inode);
#else
ssize_t index = (ssize_t)inode->i_private;
#endif
const struct rtw_proc_hdl *hdl = drv_proc_hdls + index;
void *private = NULL;
@ -235,7 +239,11 @@ static int rtw_drv_proc_open(struct inode *inode, struct file *file)
static ssize_t rtw_drv_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#else
ssize_t index = (ssize_t)file_inode(file)->i_private;
#endif
const struct rtw_proc_hdl *hdl = drv_proc_hdls + index;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
@ -4155,7 +4163,11 @@ const int adapter_proc_hdls_num = sizeof(adapter_proc_hdls) / sizeof(struct rtw_
static int rtw_adapter_proc_open(struct inode *inode, struct file *file)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(inode);
#else
ssize_t index = (ssize_t)inode->i_private;
#endif
const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
void *private = proc_get_parent_data(inode);
@ -4177,7 +4189,11 @@ static int rtw_adapter_proc_open(struct inode *inode, struct file *file)
static ssize_t rtw_adapter_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#else
ssize_t index = (ssize_t)file_inode(file)->i_private;
#endif
const struct rtw_proc_hdl *hdl = adapter_proc_hdls + index;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
@ -4342,7 +4358,11 @@ const int odm_proc_hdls_num = sizeof(odm_proc_hdls) / sizeof(struct rtw_proc_hdl
static int rtw_odm_proc_open(struct inode *inode, struct file *file)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(inode);
#else
ssize_t index = (ssize_t)inode->i_private;
#endif
const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
void *private = proc_get_parent_data(inode);
@ -4364,7 +4384,11 @@ static int rtw_odm_proc_open(struct inode *inode, struct file *file)
static ssize_t rtw_odm_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#else
ssize_t index = (ssize_t)file_inode(file)->i_private;
#endif
const struct rtw_proc_hdl *hdl = odm_proc_hdls + index;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;
@ -4501,7 +4525,11 @@ const int mcc_proc_hdls_num = sizeof(mcc_proc_hdls) / sizeof(struct rtw_proc_hdl
static int rtw_mcc_proc_open(struct inode *inode, struct file *file)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(inode);
#else
ssize_t index = (ssize_t)inode->i_private;
#endif
const struct rtw_proc_hdl *hdl = mcc_proc_hdls + index;
void *private = proc_get_parent_data(inode);
@ -4523,7 +4551,11 @@ static int rtw_mcc_proc_open(struct inode *inode, struct file *file)
static ssize_t rtw_mcc_proc_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
#else
ssize_t index = (ssize_t)file_inode(file)->i_private;
#endif
const struct rtw_proc_hdl *hdl = mcc_proc_hdls + index;
ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *, void *) = hdl->write;