0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-04-12 22:13:07 +00:00

orangepi-4-lts: fix build and add ethernet support (#1764)

This commit is contained in:
David Lawson
2022-10-18 00:45:30 +01:00
committed by Tomáš Kelemen (vudiq)
parent c16def7032
commit cef3425619
9 changed files with 20 additions and 215776 deletions

@ -1,9 +1,9 @@
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-orangepi-4-lts.dts b/arch/arm64/boot/dts/rockchip/rk3399-orangepi-4-lts.dts
new file mode 100644
index 00000000000..e0490aaa7ba
index 000000000000..b3d1fdae30f0
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-orangepi-4-lts.dts
@@ -0,0 +1,1257 @@
@@ -0,0 +1,1149 @@
+/*
+ * SPDX-License-Identifier: (GPL-2.0+ or MIT)
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
@ -17,7 +17,6 @@ index 00000000000..e0490aaa7ba
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/usb/pd.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/usb/pd.h>
+#include "rk3399.dtsi"
+#include "rk3399-opp.dtsi"
+
@ -365,7 +364,7 @@ index 00000000000..e0490aaa7ba
+ wl-wake-host-gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>;
+ bt-wake-host-gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
+ sdio-ext-int-gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
+ unisoc,btwf-file-name = "/lib/firmware/uwe5622/wcnmodem-38222.bin";
+ unisoc,btwf-file-name = "/lib/firmware/wcnmodem.bin";
+ data-irq;
+ blksz-512;
+ keep-power-on;
@ -786,63 +785,12 @@ index 00000000000..e0490aaa7ba
+ clock-frequency = <400000>;
+
+ fusb0: fusb30x@22 {
+ compatible = "fcs,fusb302";
+ compatible = "fairchild,fusb302";
+ reg = <0x22>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&fusb0_int>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
+ vbus-supply = <&vbus_typec>;
+ int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+
+ connector {
+ compatible = "usb-c-connector";
+ data-role = "dual";
+ label = "USB-C";
+ op-sink-microwatt = <1000000>;
+ power-role = "dual";
+ sink-pdos =
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
+ source-pdos =
+ <PDO_FIXED(5000, 1400, PDO_FIXED_USB_COMM)>;
+ try-power-role = "sink";
+
+ extcon-cables = <1 2 5 6 9 10 12 44>;
+ typec-altmodes = <0xff01 1 0x001c0000 1>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ usbc_hs: endpoint {
+ remote-endpoint =
+ <&u2phy0_typec_hs>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ usbc_ss: endpoint {
+ remote-endpoint =
+ <&tcphy0_typec_ss>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ usbc_dp: endpoint {
+ remote-endpoint =
+ <&tcphy0_typec_dp>;
+ };
+ };
+ };
+ };
+
+ };
+
+ ft5x06_ts@38 {
@ -874,17 +822,6 @@ index 00000000000..e0490aaa7ba
+ #sound-dai-cells = <0>;
+};
+
+&i2s0 {
+ assigned-clocks = <&cru SCLK_I2SOUT_SRC>;
+ assigned-clock-parents = <&cru SCLK_I2S0_8CH>;
+ resets = <&cru SRST_I2S0_8CH>, <&cru SRST_H_I2S0_8CH>;
+ reset-names = "reset-m", "reset-h";
+ rockchip,playback-channels = <2>;
+ rockchip,capture-channels = <2>;
+ status = "okay";
+ #sound-dai-cells = <0>;
+};
+
+&i2s2 {
+ #sound-dai-cells = <0>;
+ status = "okay";
@ -932,7 +869,7 @@ index 00000000000..e0490aaa7ba
+
+&pwm2 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-names = "active";
+ pinctrl-0 = <&pwm2_pin_pull_down>;
+};
+
@ -1002,28 +939,13 @@ index 00000000000..e0490aaa7ba
+ status = "okay";
+};
+
+&tcphy0_dp {
+ port {
+ tcphy0_typec_dp: endpoint {
+ remote-endpoint = <&usbc_dp>;
+ };
+ };
+};
+
+&tcphy0_usb3 {
+ port {
+ tcphy0_typec_ss: endpoint {
+ remote-endpoint = <&usbc_ss>;
+ };
+ };
+};
+
+&tcphy1 {
+ status = "okay";
+};
+
+&u2phy0 {
+ status = "okay";
+ extcon = <&fusb0>;
+
+ u2phy0_otg: otg-port {
+ status = "okay";
@ -1033,13 +955,6 @@ index 00000000000..e0490aaa7ba
+ phy-supply = <&usb3_vbus>;
+ status = "okay";
+ };
+
+ port {
+ u2phy0_typec_hs: endpoint {
+ remote-endpoint = <&usbc_hs>;
+ };
+ };
+
+};
+
+&u2phy1 {
@ -1089,26 +1004,7 @@ index 00000000000..e0490aaa7ba
+ status = "okay";
+};
+
+&sdmmc_bus4 {
+ rockchip,pins =
+ <4 RK_PB0 1 &pcfg_pull_up_12ma>,
+ <4 RK_PB1 1 &pcfg_pull_up_12ma>,
+ <4 RK_PB2 1 &pcfg_pull_up_12ma>,
+ <4 RK_PB3 1 &pcfg_pull_up_12ma>;
+};
+
+&sdmmc_cmd {
+ rockchip,pins =
+ <4 RK_PB5 1 &pcfg_pull_up_12ma>;
+};
+
+&pinctrl {
+
+ pcfg_pull_up_12ma: pcfg-pull-up-12ma {
+ bias-pull-up;
+ drive-strength = <12>;
+ };
+
+ pcie {
+ pcie_drv: pcie-drv {
+ rockchip,pins =
@ -1250,10 +1146,6 @@ index 00000000000..e0490aaa7ba
+ status = "okay";
+};
+
+&hdmi_in_vopl {
+ status = "disable";
+};
+
+&dp_in_vopb {
+ status = "disable";
+};

@ -0,0 +1,12 @@
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 26661c7b736b..c25a32f55313 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -31,6 +31,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-neo4.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi-4-lts.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb

@ -1,45 +0,0 @@
From 01b579a527b5c77e6adfbb2c277fb2c7cc158b8b Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Thu, 10 Feb 2022 21:30:54 +0000
Subject: [PATCH] add broadcom bcm43342 chip id
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 ++
drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 8effeb7a726..f45c1056e42 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -611,6 +611,7 @@ BRCMF_FW_DEF(4329, "brcmfmac4329-sdio");
BRCMF_FW_DEF(4330, "brcmfmac4330-sdio");
BRCMF_FW_DEF(4334, "brcmfmac4334-sdio");
BRCMF_FW_DEF(43340, "brcmfmac43340-sdio");
+BRCMF_FW_DEF(43342, "brcmfmac43342-sdio");
BRCMF_FW_DEF(4335, "brcmfmac4335-sdio");
BRCMF_FW_DEF(43362, "brcmfmac43362-sdio");
BRCMF_FW_DEF(4339, "brcmfmac4339-sdio");
@@ -644,6 +645,7 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
BRCMF_FW_ENTRY(BRCM_CC_4334_CHIP_ID, 0xFFFFFFFF, 4334),
BRCMF_FW_ENTRY(BRCM_CC_43340_CHIP_ID, 0xFFFFFFFF, 43340),
BRCMF_FW_ENTRY(BRCM_CC_43341_CHIP_ID, 0xFFFFFFFF, 43340),
+ BRCMF_FW_ENTRY(BRCM_CC_43342_CHIP_ID, 0xFFFFFFFF, 43342),
BRCMF_FW_ENTRY(BRCM_CC_4335_CHIP_ID, 0xFFFFFFFF, 4335),
BRCMF_FW_ENTRY(BRCM_CC_43362_CHIP_ID, 0xFFFFFFFE, 43362),
BRCMF_FW_ENTRY(BRCM_CC_4339_CHIP_ID, 0xFFFFFFFF, 4339),
diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
index 9d81320164c..71de0dce4f4 100644
--- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
@@ -27,6 +27,7 @@
#define BRCM_CC_4334_CHIP_ID 0x4334
#define BRCM_CC_43340_CHIP_ID 43340
#define BRCM_CC_43341_CHIP_ID 43341
+#define BRCM_CC_43342_CHIP_ID 43342
#define BRCM_CC_43362_CHIP_ID 43362
#define BRCM_CC_4335_CHIP_ID 0x4335
#define BRCM_CC_4339_CHIP_ID 0x4339
--
2.30.2

File diff suppressed because it is too large Load Diff

@ -1,61 +0,0 @@
From 682121f340fe0b8ec885f9b628e754d2298a32a2 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Thu, 16 Jun 2022 19:52:20 +0000
Subject: [PATCH] fix spreadtrum (sprd) broken bluetooth park link status
---
drivers/bluetooth/hci_ldisc.c | 6 ++++++
include/net/bluetooth/hci.h | 6 ++++++
net/bluetooth/hci_sync.c | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index f537673ede1..a3222cb727e 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -655,6 +655,12 @@ static int hci_uart_register_dev(struct hci_uart *hu)
hdev->setup = hci_uart_setup;
SET_HCIDEV_DEV(hdev, hu->tty->dev);
+ // Set the broken Park link status quirk, specific for spreadtrum (sprd)
+ // bluetooth devices
+ if (hdev->manufacturer == 0xffff && hu->tty->driver &&
+ strncmp(hu->tty->driver->name, "ttyBT", 5) == 0)
+ set_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks);
+
if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags))
set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks);
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 656b609cb68..d2dc448501c 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -281,6 +281,12 @@ enum {
* during the hdev->setup vendor callback.
*/
HCI_QUIRK_BROKEN_ENHANCED_SETUP_SYNC_CONN,
+
+ /*
+ * Device declares that support Park link status, but it really
+ * does not support it and fails to initialize
+ */
+ HCI_QUIRK_BROKEN_PARK_LINK_STATUS,
};
/* HCI device flags */
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 13600bf120b..a6437cd0935 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -3171,7 +3171,7 @@ static int hci_setup_link_policy_sync(struct hci_dev *hdev)
link_policy |= HCI_LP_HOLD;
if (lmp_sniff_capable(hdev))
link_policy |= HCI_LP_SNIFF;
- if (lmp_park_capable(hdev))
+ if (lmp_park_capable(hdev) && !test_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks))
link_policy |= HCI_LP_PARK;
cp.policy = cpu_to_le16(link_policy);
--
2.30.2

@ -1,201 +0,0 @@
From b758478655da935b50a973b0aa2ddbc20893b789 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sun, 12 Jun 2022 14:33:59 +0000
Subject: [PATCH] uwe5622: various warning and firmware path fixes
---
drivers/net/wireless/uwe5622/Makefile | 2 +-
.../uwe5622/unisocwcn/platform/rdc_debug.c | 4 +-
.../uwe5622/unisocwcn/platform/wcn_boot.c | 2 -
.../unisocwcn/platform/wcn_parn_parser.c | 2 +-
.../uwe5622/unisocwcn/sdio/sdiohal_ctl.c | 42 ++++++-------------
.../wireless/uwe5622/unisocwifi/cfg80211.c | 4 --
6 files changed, 17 insertions(+), 39 deletions(-)
diff --git a/drivers/net/wireless/uwe5622/Makefile b/drivers/net/wireless/uwe5622/Makefile
index 71c863c1017..d2210439f3c 100644
--- a/drivers/net/wireless/uwe5622/Makefile
+++ b/drivers/net/wireless/uwe5622/Makefile
@@ -6,5 +6,5 @@ UNISOCWCN_DIR := $(shell cd $(src)/unisocwcn/ && /bin/pwd)
UNISOC_BSP_INCLUDE := $(UNISOCWCN_DIR)/include
export UNISOC_BSP_INCLUDE
-UNISOC_FW_PATH_CONFIG := "/lib/firmware/"
+UNISOC_FW_PATH_CONFIG := "/lib/firmware/uwe5622/"
export UNISOC_FW_PATH_CONFIG
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c
index 86fa3b103ad..1343cb98362 100755
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/rdc_debug.c
@@ -41,13 +41,13 @@ static unsigned int wcn_cp2_file_max_num = UNISOC_DBG_FILENUM_DEFAULT;
*/
static unsigned int wcn_cp2_log_cover_old = 1;
/* path of config file unisoc_cp2log_config.txt */
-#define WCN_DEBUG_CFG_MAX_PATH_NUM 0
+#define WCN_DEBUG_CFG_MAX_PATH_NUM 2
static char *wcn_cp2_config_path[WCN_DEBUG_CFG_MAX_PATH_NUM] = {
"/data/unisoc_cp2log_config.txt",
"/vendor/etc/wifi/unisoc_cp2log_config.txt"
};
/* path of cp2 log and mem files. */
-#define WCN_UNISOC_DBG_MAX_PATH_NUM 0
+#define WCN_UNISOC_DBG_MAX_PATH_NUM 3
static char *wcn_unisoc_dbg_path[WCN_UNISOC_DBG_MAX_PATH_NUM] = {
UNISOC_DBG_PATH_DEFAULT,/* most of projects */
"/data", /* amlogic s905w... */
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
index d82f56357f3..58b9d290f23 100755
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_boot.c
@@ -325,8 +325,6 @@ static struct regmap *reg_map;
#define AFC_CALI_READ_FINISH 0x12121212
#define WCN_AFC_CALI_PATH "/productinfo/wcn/tsx_bt_data.txt"
-#define BIT(nr) (1UL << (nr))
-
#ifdef CONFIG_WCN_DOWNLOAD_FIRMWARE_FROM_HEX
#define POWER_WQ_DELAYED_MS 0
#else
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
index 9abcd326972..c1557dcce3f 100755
--- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_parn_parser.c
@@ -183,7 +183,7 @@ int parse_firmware_path(char *firmware_path)
continue;
}
memset(fstab_name, 0, sizeof(fstab_name));
- strncpy(fstab_name, fstab_dir[loop], sizeof(fstab_dir[loop]));
+ strncpy(fstab_name, fstab_dir[loop], sizeof(fstab_name));
if (strlen(fstab_name) > 1)
fstab_name[strlen(fstab_name)] = '/';
iterate_dir(file1, &ctx);
diff --git a/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c b/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c
index b426bf89cd9..8000bfea378 100755
--- a/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c
+++ b/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_ctl.c
@@ -9,6 +9,7 @@
#include <linux/uaccess.h>
#include <linux/version.h>
#include <linux/vmalloc.h>
+#include <linux/ktime.h>
#include <wcn_bus.h>
#include "sdiohal.h"
@@ -96,8 +97,10 @@ char *tp_tx_buf[TP_TX_BUF_CNT];
struct mchn_ops_t at_tx_ops;
struct mchn_ops_t at_rx_ops;
-struct timeval tp_tx_start_time;
-struct timeval tp_tx_stop_time;
+ktime_t tp_tx_start_time;
+ktime_t tp_tx_stop_time;
+ktime_t tp_rx_start_time;
+ktime_t tp_rx_stop_time;
int tp_tx_cnt;
int tp_tx_flag;
int tp_tx_buf_cnt = TP_TX_BUF_CNT;
@@ -222,7 +225,6 @@ static int sdiohal_throughput_tx(void)
static void sdiohal_throughput_tx_compute_time(void)
{
static signed long long times_count;
- struct timespec64 now;
if (tp_tx_flag != 1)
return;
@@ -230,17 +232,12 @@ static void sdiohal_throughput_tx_compute_time(void)
/* throughput test */
tp_tx_cnt++;
if (tp_tx_cnt % 500 == 0) {
- getnstimeofday(&now);
- tp_tx_stop_time.tv_sec = now.tv_sec;
- tp_tx_stop_time.tv_usec = now.tv_nsec/1000;
- times_count = timeval_to_ns(&tp_tx_stop_time) -
- timeval_to_ns(&tp_tx_start_time);
+ tp_tx_stop_time = ktime_get();
+ times_count = tp_tx_stop_time - tp_tx_start_time;
sdiohal_info("tx->times(500c) is %lldns, tx %d, rx %d\n",
times_count, tp_tx_cnt, rx_pop_cnt);
tp_tx_cnt = 0;
- getnstimeofday(&now);
- tp_tx_start_time.tv_sec = now.tv_sec;
- tp_tx_start_time.tv_usec = now.tv_nsec/1000;
+ tp_tx_start_time = ktime_get();
}
sdiohal_throughput_tx();
}
@@ -544,14 +541,10 @@ int at_list_tx_pop(int channel, struct mbuf_t *head,
}
int tp_rx_cnt;
-struct timeval tp_rx_start_time;
-struct timeval tp_rx_stop_time;
-struct timespec tp_tm_begin;
int at_list_rx_pop(int channel, struct mbuf_t *head,
struct mbuf_t *tail, int num)
{
- static signed long long times_count;
- struct timespec64 now;
+ ktime_t times_count;
sdiohal_debug("%s channel:%d head:%p tail:%p num:%d\n",
__func__, channel, head, tail, num);
@@ -568,19 +561,13 @@ int at_list_rx_pop(int channel, struct mbuf_t *head,
/* throughput test */
tp_rx_cnt += num;
if (tp_rx_cnt / (500*64) == 1) {
- getnstimeofday(&now);
- tp_rx_stop_time.tv_sec = now.tv_sec;
- tp_rx_stop_time.tv_usec = now.tv_nsec/1000;
- times_count = timeval_to_ns(&tp_rx_stop_time)
- - timeval_to_ns(&tp_rx_start_time);
+ tp_rx_stop_time = ktime_get();
+ times_count = tp_rx_stop_time - tp_rx_start_time;
sdiohal_info("rx->times(%dc) is %lldns, tx %d, rx %d\n",
tp_rx_cnt, times_count, tp_tx_cnt, rx_pop_cnt);
tp_rx_cnt = 0;
- getnstimeofday(&now);
- tp_rx_start_time.tv_sec = now.tv_sec;
- tp_rx_start_time.tv_usec = now.tv_nsec/1000;
+ tp_rx_start_time = ktime_get();
}
- getnstimeofday(&tp_tm_begin);
return 0;
}
@@ -834,7 +821,6 @@ static ssize_t at_cmd_write(struct file *filp,
long int long_data;
int ret;
unsigned char *send_buf = NULL;
- struct timespec64 now;
if (count > SDIOHAL_WRITE_SIZE) {
sdiohal_err("%s write size > %d\n",
@@ -1127,9 +1113,7 @@ static ssize_t at_cmd_write(struct file *filp,
__func__, tp_tx_buf_cnt, tp_tx_buf_len);
tp_tx_flag = 1;
tp_tx_cnt = 0;
- getnstimeofday(&now);
- tp_tx_start_time.tv_sec = now.tv_sec;
- tp_tx_start_time.tv_usec = now.tv_nsec/1000;
+ tp_tx_start_time = ktime_get();
if ((tp_tx_buf_cnt <= TP_TX_BUF_CNT) &&
(tp_tx_buf_len <= TP_TX_BUF_LEN)) {
sprdwcn_bus_chn_deinit(&at_tx_ops);
diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
index 5d86a5cc435..f26113c08af 100755
--- a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
+++ b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c
@@ -1747,10 +1747,6 @@ static int sprdwl_cfg80211_disconnect(struct wiphy *wiphy,
struct sprdwl_vif *vif = netdev_priv(ndev);
enum sm_state old_state = vif->sm_state;
int ret;
-#ifdef SYNC_DISCONNECT
- u32 msec;
- ktime_t kt;
-#endif
#ifdef STA_SOFTAP_SCC_MODE
struct sprdwl_intf *intf = (struct sprdwl_intf *)vif->priv->hw_priv;
intf->sta_home_channel = 0;
--
2.30.2

@ -1,37 +0,0 @@
From a7451e5b9003df20defc0bb44b340bb5c3bdb0e2 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Thu, 9 Jun 2022 16:29:12 +0000
Subject: [PATCH] makefile uwe5622
---
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/Makefile | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 69b324914c9..01059193fda 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -46,6 +46,7 @@ source "drivers/net/wireless/rtl8189fs/Kconfig"
source "drivers/net/wireless/rtl8189es/Kconfig"
source "drivers/net/wireless/zydas/Kconfig"
source "drivers/net/wireless/quantenna/Kconfig"
+source "drivers/net/wireless/uwe5622/Kconfig"
config PCMCIA_RAYCS
tristate "Aviator/Raytheon 2.4GHz wireless support"
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index ef463da4b6a..f9a48ef07ff 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
obj-$(CONFIG_HFLPS170) += hflps170/
obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/
+obj-$(CONFIG_SPARD_WLAN_SUPPORT) += uwe5622/
# 16-bit wireless PCMCIA client drivers
obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
--
2.30.2

@ -323,7 +323,7 @@ devices = \
},
'orangepi-4-lts': {
'dtb': 'rk3399-orangepi-4-lts.dtb',
'config': 'evb-rk3399_defconfig'
'config': 'orangepi-rk3399_defconfig',
},
'rock960': {
'dtb': 'rk3399-rock960.dtb',