mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-19 10:23:03 +00:00
This series is based on * 2020-07-10 ipq6018-ilq-11-0_qca_oem-034672b0676c37b1f4519e5720e18e95fe6236ef Add support for * qsdk kernel/v4.4 * qsdk ethernet subsystem * v5.7 ath11k backport + QualComm staging patches (wlan_ap_1.0) * ath11k-firmware * hostapd/iw/... Feature support * full boot, system detection * sysupgrade to nand * HE support via latest hostapd * driver support for usb, crypto, hwmon, cpufreq, ... Missing * NSS/HW flow offloading - FW blob is not redistributable Using the qsdk v4.4 is an intermediate solution while the vanilla is being tested. Vanilla kernel is almost on feature par. Work has already started to upstream the ethernet and switch drivers. Once complete the target will be fully upstream. Signed-off-by: John Crispin <john@phrozen.org>
82 lines
2.6 KiB
Diff
82 lines
2.6 KiB
Diff
From d600dcd1def54993d1de9fe675c4b63420275936 Mon Sep 17 00:00:00 2001
|
|
From: Anilkumar Kolli <akolli@codeaurora.org>
|
|
Date: Mon, 23 Mar 2020 13:12:35 +0530
|
|
Subject: [PATCH 152/164] ath11k: Add drv private for bus opaque struct
|
|
|
|
Add drv private opaque structure to have bus level
|
|
structure for multibus support.
|
|
|
|
Signed-off-by: Govind Singh <govinds@codeaurora.org>
|
|
Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
|
|
---
|
|
drivers/net/wireless/ath/ath11k/ahb.c | 2 +-
|
|
drivers/net/wireless/ath/ath11k/core.c | 5 +++--
|
|
drivers/net/wireless/ath/ath11k/core.h | 7 +++++--
|
|
drivers/net/wireless/ath/ath11k/hw.h | 5 +++++
|
|
4 files changed, 14 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/ahb.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
|
|
@@ -959,7 +959,7 @@ static int ath11k_ahb_probe(struct platf
|
|
return ret;
|
|
}
|
|
|
|
- ab = ath11k_core_alloc(&pdev->dev);
|
|
+ ab = ath11k_core_alloc(&pdev->dev, 0, ATH11K_BUS_AHB);
|
|
if (!ab) {
|
|
dev_err(&pdev->dev, "failed to allocate ath11k base\n");
|
|
return -ENOMEM;
|
|
--- a/drivers/net/wireless/ath/ath11k/core.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/core.c
|
|
@@ -935,11 +935,12 @@ void ath11k_core_free(struct ath11k_base
|
|
kfree(ab);
|
|
}
|
|
|
|
-struct ath11k_base *ath11k_core_alloc(struct device *dev)
|
|
+struct ath11k_base *ath11k_core_alloc(struct device *dev, size_t priv_size,
|
|
+ enum ath11k_bus bus)
|
|
{
|
|
struct ath11k_base *ab;
|
|
|
|
- ab = kzalloc(sizeof(*ab), GFP_KERNEL);
|
|
+ ab = kzalloc(sizeof(*ab) + priv_size, GFP_KERNEL);
|
|
if (!ab)
|
|
return NULL;
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/core.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/core.h
|
|
@@ -798,6 +798,9 @@ struct ath11k_base {
|
|
|
|
/* Round robbin based TCL ring selector */
|
|
atomic_t tcl_ring_selector;
|
|
+
|
|
+ /* must be last */
|
|
+ u8 drv_priv[0] __aligned(sizeof(void *));
|
|
};
|
|
|
|
struct ath11k_fw_stats_pdev {
|
|
@@ -934,7 +937,8 @@ struct ath11k_peer *ath11k_peer_find_by_
|
|
int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab);
|
|
int ath11k_core_init(struct ath11k_base *ath11k);
|
|
void ath11k_core_deinit(struct ath11k_base *ath11k);
|
|
-struct ath11k_base *ath11k_core_alloc(struct device *dev);
|
|
+struct ath11k_base *ath11k_core_alloc(struct device *dev, size_t priv_size,
|
|
+ enum ath11k_bus bus);
|
|
void ath11k_core_free(struct ath11k_base *ath11k);
|
|
int ath11k_core_fetch_bdf(struct ath11k_base *ath11k,
|
|
struct ath11k_board_data *bd);
|
|
--- a/drivers/net/wireless/ath/ath11k/hw.h
|
|
+++ b/drivers/net/wireless/ath/ath11k/hw.h
|
|
@@ -109,6 +109,11 @@ struct ath11k_hw_ops {
|
|
u8 (*get_hw_mac_from_pdev_id)(struct ath11k_base *ab, int pdev_id);
|
|
};
|
|
|
|
+enum ath11k_bus {
|
|
+ ATH11K_BUS_AHB,
|
|
+ ATH11K_BUS_PCI,
|
|
+};
|
|
+
|
|
struct ath11k_hw_params {
|
|
const char *name;
|
|
u16 dev_id;
|