Update to 5.8.7.1

This commit is contained in:
Rin Cat
2020-08-02 05:12:24 -04:00
parent 314b662331
commit e3b09b28f7
449 changed files with 106089 additions and 83748 deletions

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2017 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2017 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2017 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2017 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2017 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2017 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2017 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2017 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
@@ -460,6 +460,15 @@ static enum halmac_ret_status
chk_pinmux_valid_8822b(struct halmac_adapter *adapter,
enum halmac_gpio_func gpio_func);
static enum halmac_ret_status
pinmux_switch_8822b(struct halmac_adapter *adapter,
const struct halmac_gpio_pimux_list *list, u32 size,
u32 gpio_id, enum halmac_gpio_func gpio_func);
static enum halmac_ret_status
pinmux_record_8822b(struct halmac_adapter *adapter,
enum halmac_gpio_func gpio_func, u8 val);
/**
* pinmux_get_func_8822b() -get current gpio status
* @adapter : the adapter of halmac
@@ -559,12 +568,12 @@ pinmux_set_func_8822b(struct halmac_adapter *adapter,
if (status != HALMAC_RET_SUCCESS)
return status;
status = pinmux_switch_88xx(adapter, list, list_size, gpio_id,
gpio_func);
status = pinmux_switch_8822b(adapter, list, list_size, gpio_id,
gpio_func);
if (status != HALMAC_RET_SUCCESS)
return status;
status = pinmux_record_88xx(adapter, gpio_func, 1);
status = pinmux_record_8822b(adapter, gpio_func, 1);
if (status != HALMAC_RET_SUCCESS)
return status;
@@ -646,6 +655,13 @@ pinmux_free_func_8822b(struct halmac_adapter *adapter,
case HALMAC_GPIO_FUNC_SW_IO_15:
info->sw_io_15 = 0;
break;
case HALMAC_GPIO_FUNC_S0_PAPE:
case HALMAC_GPIO_FUNC_S0_TRSW:
case HALMAC_GPIO_FUNC_S0_TRSWB:
case HALMAC_GPIO_FUNC_S1_PAPE:
case HALMAC_GPIO_FUNC_S1_TRSW:
case HALMAC_GPIO_FUNC_S1_TRSWB:
return HALMAC_RET_PINMUX_NOT_SUPPORT;
default:
return HALMAC_RET_SWITCH_CASE_ERROR;
}
@@ -747,6 +763,13 @@ get_pinmux_list_8822b(struct halmac_adapter *adapter,
*list_size = ARRAY_SIZE(PINMUX_LIST_GPIO15_8822B);
*gpio_id = HALMAC_GPIO15;
break;
case HALMAC_GPIO_FUNC_S0_PAPE:
case HALMAC_GPIO_FUNC_S0_TRSW:
case HALMAC_GPIO_FUNC_S0_TRSWB:
case HALMAC_GPIO_FUNC_S1_PAPE:
case HALMAC_GPIO_FUNC_S1_TRSW:
case HALMAC_GPIO_FUNC_S1_TRSWB:
return HALMAC_RET_PINMUX_NOT_SUPPORT;
default:
return HALMAC_RET_SWITCH_CASE_ERROR;
}
@@ -842,6 +865,13 @@ chk_pinmux_valid_8822b(struct halmac_adapter *adapter,
if (info->sw_io_15 == 1)
status = HALMAC_RET_PINMUX_USED;
break;
case HALMAC_GPIO_FUNC_S0_PAPE:
case HALMAC_GPIO_FUNC_S0_TRSW:
case HALMAC_GPIO_FUNC_S0_TRSWB:
case HALMAC_GPIO_FUNC_S1_PAPE:
case HALMAC_GPIO_FUNC_S1_TRSW:
case HALMAC_GPIO_FUNC_S1_TRSWB:
return HALMAC_RET_PINMUX_NOT_SUPPORT;
default:
return HALMAC_RET_SWITCH_CASE_ERROR;
}
@@ -852,4 +882,171 @@ chk_pinmux_valid_8822b(struct halmac_adapter *adapter,
return status;
}
static enum halmac_ret_status
pinmux_switch_8822b(struct halmac_adapter *adapter,
const struct halmac_gpio_pimux_list *list, u32 size,
u32 gpio_id, enum halmac_gpio_func gpio_func)
{
u32 i;
u8 value8;
u16 switch_func;
const struct halmac_gpio_pimux_list *cur_list = list;
enum halmac_gpio_cfg_state *state;
struct halmac_api *api = (struct halmac_api *)adapter->halmac_api;
state = &adapter->halmac_state.gpio_cfg_state;
if (*state == HALMAC_GPIO_CFG_STATE_BUSY)
return HALMAC_RET_BUSY_STATE;
switch (gpio_func) {
case HALMAC_GPIO_FUNC_WL_LED:
switch_func = HALMAC_WL_LED;
break;
case HALMAC_GPIO_FUNC_SDIO_INT:
switch_func = HALMAC_SDIO_INT;
break;
case HALMAC_GPIO_FUNC_BT_HOST_WAKE1:
case HALMAC_GPIO_FUNC_BT_DEV_WAKE1:
switch_func = HALMAC_GPIO13_14_WL_CTRL_EN;
break;
case HALMAC_GPIO_FUNC_SW_IO_0:
case HALMAC_GPIO_FUNC_SW_IO_1:
case HALMAC_GPIO_FUNC_SW_IO_2:
case HALMAC_GPIO_FUNC_SW_IO_3:
case HALMAC_GPIO_FUNC_SW_IO_4:
case HALMAC_GPIO_FUNC_SW_IO_5:
case HALMAC_GPIO_FUNC_SW_IO_6:
case HALMAC_GPIO_FUNC_SW_IO_7:
case HALMAC_GPIO_FUNC_SW_IO_8:
case HALMAC_GPIO_FUNC_SW_IO_9:
case HALMAC_GPIO_FUNC_SW_IO_10:
case HALMAC_GPIO_FUNC_SW_IO_11:
case HALMAC_GPIO_FUNC_SW_IO_12:
case HALMAC_GPIO_FUNC_SW_IO_13:
case HALMAC_GPIO_FUNC_SW_IO_14:
case HALMAC_GPIO_FUNC_SW_IO_15:
switch_func = HALMAC_SW_IO;
break;
default:
return HALMAC_RET_SWITCH_CASE_ERROR;
}
for (i = 0; i < size; i++) {
if (gpio_id != cur_list->id) {
PLTFM_MSG_ERR("[ERR]offset:%X, value:%X, func:%X\n",
cur_list->offset, cur_list->value,
cur_list->func);
PLTFM_MSG_ERR("[ERR]id1 : %X, id2 : %X\n",
gpio_id, cur_list->id);
return HALMAC_RET_GET_PINMUX_ERR;
}
if (switch_func == cur_list->func)
break;
cur_list++;
}
if (i == size) {
PLTFM_MSG_ERR("[ERR]gpio func error:%X %X\n",
gpio_id, cur_list->id);
return HALMAC_RET_GET_PINMUX_ERR;
}
*state = HALMAC_GPIO_CFG_STATE_BUSY;
cur_list = list;
for (i = 0; i < size; i++) {
value8 = HALMAC_REG_R8(cur_list->offset);
value8 &= ~(cur_list->msk);
if (switch_func == cur_list->func) {
value8 |= (cur_list->value & cur_list->msk);
HALMAC_REG_W8(cur_list->offset, value8);
break;
}
value8 |= (~cur_list->value & cur_list->msk);
HALMAC_REG_W8(cur_list->offset, value8);
cur_list++;
}
*state = HALMAC_GPIO_CFG_STATE_IDLE;
return HALMAC_RET_SUCCESS;
}
static enum halmac_ret_status
pinmux_record_8822b(struct halmac_adapter *adapter,
enum halmac_gpio_func gpio_func, u8 val)
{
switch (gpio_func) {
case HALMAC_GPIO_FUNC_WL_LED:
adapter->pinmux_info.wl_led = val;
break;
case HALMAC_GPIO_FUNC_SDIO_INT:
adapter->pinmux_info.sdio_int = val;
break;
case HALMAC_GPIO_FUNC_BT_HOST_WAKE1:
adapter->pinmux_info.bt_host_wake = val;
break;
case HALMAC_GPIO_FUNC_BT_DEV_WAKE1:
adapter->pinmux_info.bt_dev_wake = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_0:
adapter->pinmux_info.sw_io_0 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_1:
adapter->pinmux_info.sw_io_1 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_2:
adapter->pinmux_info.sw_io_2 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_3:
adapter->pinmux_info.sw_io_3 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_4:
adapter->pinmux_info.sw_io_4 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_5:
adapter->pinmux_info.sw_io_5 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_6:
adapter->pinmux_info.sw_io_6 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_7:
adapter->pinmux_info.sw_io_7 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_8:
adapter->pinmux_info.sw_io_8 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_9:
adapter->pinmux_info.sw_io_9 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_10:
adapter->pinmux_info.sw_io_10 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_11:
adapter->pinmux_info.sw_io_11 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_12:
adapter->pinmux_info.sw_io_12 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_13:
adapter->pinmux_info.sw_io_13 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_14:
adapter->pinmux_info.sw_io_14 = val;
break;
case HALMAC_GPIO_FUNC_SW_IO_15:
adapter->pinmux_info.sw_io_15 = val;
break;
default:
return HALMAC_RET_GET_PINMUX_ERR;
}
return HALMAC_RET_SUCCESS;
}
#endif /* HALMAC_8822B_SUPPORT */

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
@@ -359,6 +359,8 @@ mount_api_8822b(struct halmac_adapter *adapter)
if (adapter->intf == HALMAC_INTERFACE_SDIO) {
#if HALMAC_SDIO_SUPPORT
api->halmac_init_interface_cfg = init_sdio_cfg_8822b;
api->halmac_init_sdio_cfg = init_sdio_cfg_8822b;
api->halmac_mac_power_switch = mac_pwr_switch_sdio_8822b;
api->halmac_phy_cfg = phy_cfg_sdio_8822b;
api->halmac_pcie_switch = pcie_switch_sdio_8822b;
@@ -417,6 +419,8 @@ init_trx_cfg_8822b(struct halmac_adapter *adapter, enum halmac_trx_mode mode)
u8 value8;
struct halmac_api *api = (struct halmac_api *)adapter->halmac_api;
enum halmac_ret_status status = HALMAC_RET_SUCCESS;
u8 en_fwff;
u16 value16;
adapter->trx_mode = mode;
@@ -428,10 +432,22 @@ init_trx_cfg_8822b(struct halmac_adapter *adapter, enum halmac_trx_mode mode)
return status;
}
en_fwff = HALMAC_REG_R8(REG_WMAC_FWPKT_CR) & BIT_FWEN;
if (en_fwff) {
HALMAC_REG_W8_CLR(REG_WMAC_FWPKT_CR, BIT_FWEN);
if (fwff_is_empty_88xx(adapter) != HALMAC_RET_SUCCESS)
PLTFM_MSG_ERR("[ERR]fwff is not empty\n");
}
value8 = 0;
HALMAC_REG_W8(REG_CR, value8);
value16 = HALMAC_REG_R16(REG_FWFF_PKT_INFO);
HALMAC_REG_W16(REG_FWFF_CTRL, value16);
value8 = MAC_TRX_ENABLE;
HALMAC_REG_W8(REG_CR, value8);
if (en_fwff)
HALMAC_REG_W8_SET(REG_WMAC_FWPKT_CR, BIT_FWEN);
HALMAC_REG_W32(REG_H2CQ_CSR, BIT(31));
status = priority_queue_cfg_8822b(adapter, mode);
@@ -701,13 +717,15 @@ init_system_cfg_8822b(struct halmac_adapter *adapter)
struct halmac_api *api = (struct halmac_api *)adapter->halmac_api;
u32 tmp = 0;
u32 value32;
u8 value8;
PLTFM_MSG_TRACE("[TRACE]%s ===>\n", __func__);
value32 = HALMAC_REG_R32(REG_CPU_DMEM_CON) | BIT_WL_PLATFORM_RST;
HALMAC_REG_W32(REG_CPU_DMEM_CON, value32);
HALMAC_REG_W8(REG_SYS_FUNC_EN + 1, SYS_FUNC_EN);
value8 = HALMAC_REG_R8(REG_SYS_FUNC_EN + 1) | SYS_FUNC_EN;
HALMAC_REG_W8(REG_SYS_FUNC_EN + 1, value8);
/*disable boot-from-flash for driver's DL FW*/
tmp = HALMAC_REG_R32(REG_MCUFW_CTRL);
@@ -890,6 +908,10 @@ init_wmac_cfg_8822b(struct halmac_adapter *adapter)
HALMAC_REG_W8(REG_TCR + 2, WLAN_TX_FUNC_CFG2);
HALMAC_REG_W8(REG_TCR + 1, WLAN_TX_FUNC_CFG1);
HALMAC_REG_W8_SET(REG_WMAC_TRXPTCL_CTL + 4, BIT(1));
HALMAC_REG_W8_SET(REG_SND_PTCL_CTRL, BIT_R_DISABLE_CHECK_VHTSIGB_CRC);
HALMAC_REG_W32(REG_WMAC_OPTION_FUNCTION + 8, WLAN_MAC_OPT_FUNC2);
if (adapter->hw_cfg_info.trx_mode == HALMAC_TRNSFER_NORMAL)

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
@@ -42,7 +42,7 @@ struct halmac_intf_phy_para usb2_phy_param_8822b[] = {
{0xFFFF, 0x00,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_ALL,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
};
struct halmac_intf_phy_para usb3_phy_param_8822b[] = {
@@ -50,11 +50,11 @@ struct halmac_intf_phy_para usb3_phy_param_8822b[] = {
{0x0001, 0xA841,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_D,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0xFFFF, 0x0000,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_ALL,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
};
struct halmac_intf_phy_para pcie_gen1_phy_param_8822b[] = {
@@ -62,47 +62,51 @@ struct halmac_intf_phy_para pcie_gen1_phy_param_8822b[] = {
{0x0001, 0xA841,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0002, 0x60C6,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0008, 0x3596,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0009, 0x321C,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x000A, 0x9623,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x001B, 0xE029,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_ALL,
HALMAC_INTF_PHY_PLATFORM_ASUS},
{0x0020, 0x94FF,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0021, 0xFFCF,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0026, 0xC006,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0029, 0xFF0E,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x002A, 0x1840,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0xFFFF, 0x0000,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_ALL,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
};
struct halmac_intf_phy_para pcie_gen2_phy_param_8822b[] = {
@@ -110,47 +114,47 @@ struct halmac_intf_phy_para pcie_gen2_phy_param_8822b[] = {
{0x0001, 0xA841,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0002, 0x60C6,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0008, 0x3597,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0009, 0x321C,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x000A, 0x9623,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0020, 0x94FF,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0021, 0xFFCF,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0026, 0xC006,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x0029, 0xFF0E,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0x002A, 0x3040,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_C,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
{0xFFFF, 0x0000,
HALMAC_IP_INTF_PHY,
HALMAC_INTF_PHY_CUT_ALL,
HALMAC_INTF_PHY_PLATFORM_ALL},
HALMAC_INTF_PHY_PLATFORM_FOR_ALL},
};
#endif /* HALMAC_8822B_SUPPORT */

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
@@ -58,6 +58,16 @@ static struct halmac_wlan_pwr_cfg TRANS_CARDDIS_TO_CARDEMU_8822B[] = {
static struct halmac_wlan_pwr_cfg TRANS_CARDEMU_TO_ACT_8822B[] = {
/* { offset, cut_msk, interface_msk, base|cmd, msk, value } */
{0xFF0A,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_USB_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0},
{0xFF0B,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_USB_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0},
{0x0012,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_ALL_MSK,
@@ -440,16 +450,6 @@ static struct halmac_wlan_pwr_cfg TRANS_CARDEMU_TO_SUS_8822B[] = {
static struct halmac_wlan_pwr_cfg TRANS_SUS_TO_CARDEMU_8822B[] = {
/* { offset, cut_msk, interface_msk, base|cmd, msk, value } */
{0xFF0A,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_USB_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0},
{0xFF0B,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_USB_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0},
{0x0005,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_ALL_MSK,
@@ -690,32 +690,32 @@ static struct halmac_wlan_pwr_cfg TRANS_ACT_TO_DEEP_LPS_8822B[] = {
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_PCI_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0xDE},
HALMAC_PWR_CMD_WRITE, 0xFF, 0xDC},
{0x0092,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_PCI_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0x60},
HALMAC_PWR_CMD_WRITE, 0xFF, 0x20},
{0x0093,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_USB_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0x9B},
HALMAC_PWR_CMD_WRITE, 0xFF, 0x8},
{0x0092,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_USB_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0x60},
HALMAC_PWR_CMD_WRITE, 0xFF, 0x20},
{0x0093,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_SDIO_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0xA},
HALMAC_PWR_CMD_WRITE, 0xFF, 0x8},
{0x0092,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_SDIO_MSK,
HALMAC_PWR_ADDR_MAC,
HALMAC_PWR_CMD_WRITE, 0xFF, 0x60},
HALMAC_PWR_CMD_WRITE, 0xFF, 0x20},
{0x0090,
HALMAC_PWR_CUT_ALL_MSK,
HALMAC_PWR_INTF_ALL_MSK,

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
@@ -21,7 +21,7 @@
#if HALMAC_8822B_SUPPORT
#define HALMAC_8822B_PWR_SEQ_VER "V30"
#define HALMAC_8822B_PWR_SEQ_VER "V31"
extern struct halmac_wlan_pwr_cfg *card_en_flow_8822b[];
extern struct halmac_wlan_pwr_cfg *card_dis_flow_8822b[];

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
@@ -38,7 +38,7 @@ mac_pwr_switch_usb_8822b(struct halmac_adapter *adapter,
PLTFM_MSG_TRACE("[TRACE]%s\n", __func__);
PLTFM_MSG_TRACE("[TRACE]%x\n", pwr);
PLTFM_MSG_TRACE("[TRACE]8821C pwr seq ver = %s\n",
PLTFM_MSG_TRACE("[TRACE]8822B pwr seq ver = %s\n",
HALMAC_8822B_PWR_SEQ_VER);
adapter->rpwm = HALMAC_REG_R8(0xFE58);

View File

@@ -1,6 +1,6 @@
/******************************************************************************
*
* Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
* Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as