Commit b6144dcd authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git patches for v6.7.

Major changes:

ath12k

* QCN9274: mesh support

ath11k

* firmware-2.bin support
parents 7d7b6f29 f5906540
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@ ath11k-y += core.o \
	    peer.o \
	    dbring.o \
	    hw.o \
	    pcic.o
	    pcic.o \
	    fw.o

ath11k-$(CONFIG_ATH11K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o
ath11k-$(CONFIG_NL80211_TESTMODE) += testmode.o
+2 −8
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/dma-mapping.h>
@@ -1084,19 +1085,12 @@ static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab)
static int ath11k_ahb_probe(struct platform_device *pdev)
{
	struct ath11k_base *ab;
	const struct of_device_id *of_id;
	const struct ath11k_hif_ops *hif_ops;
	const struct ath11k_pci_ops *pci_ops;
	enum ath11k_hw_rev hw_rev;
	int ret;

	of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev);
	if (!of_id) {
		dev_err(&pdev->dev, "failed to find matching device tree id\n");
		return -EINVAL;
	}

	hw_rev = (uintptr_t)of_id->data;
	hw_rev = (uintptr_t)device_get_match_data(&pdev->dev);

	switch (hw_rev) {
	case ATH11K_HW_IPQ8074:
+12 −3
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include "debug.h"
#include "hif.h"
#include "wow.h"
#include "fw.h"

unsigned int ath11k_debug_mask;
EXPORT_SYMBOL(ath11k_debug_mask);
@@ -1317,6 +1318,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
{
	char *boardname = NULL, *fallback_boardname = NULL, *chip_id_boardname = NULL;
	char *filename, filepath[100];
	int bd_api;
	int ret = 0;

	filename = ATH11K_BOARD_API2_FILE;
@@ -1332,7 +1334,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
		goto exit;
	}

	ab->bd_api = 2;
	bd_api = 2;
	ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname,
						 ATH11K_BD_IE_BOARD,
						 ATH11K_BD_IE_BOARD_NAME,
@@ -1381,7 +1383,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
	if (!ret)
		goto exit;

	ab->bd_api = 1;
	bd_api = 1;
	ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_DEFAULT_BOARD_FILE);
	if (ret) {
		ath11k_core_create_firmware_path(ab, filename,
@@ -1405,7 +1407,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
	kfree(chip_id_boardname);

	if (!ret)
		ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", ab->bd_api);
		ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", bd_api);

	return ret;
}
@@ -2071,6 +2073,12 @@ int ath11k_core_pre_init(struct ath11k_base *ab)
		return ret;
	}

	ret = ath11k_fw_pre_init(ab);
	if (ret) {
		ath11k_err(ab, "failed to pre init firmware: %d", ret);
		return ret;
	}

	return 0;
}
EXPORT_SYMBOL(ath11k_core_pre_init);
@@ -2101,6 +2109,7 @@ void ath11k_core_deinit(struct ath11k_base *ab)
	ath11k_hif_power_down(ab);
	ath11k_mac_destroy(ab);
	ath11k_core_soc_destroy(ab);
	ath11k_fw_destroy(ab);
}
EXPORT_SYMBOL(ath11k_core_deinit);

+20 −1
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
#include <linux/ctype.h>
#include <linux/rhashtable.h>
#include <linux/average.h>
#include <linux/firmware.h>

#include "qmi.h"
#include "htc.h"
#include "wmi.h"
@@ -29,6 +31,7 @@
#include "dbring.h"
#include "spectral.h"
#include "wow.h"
#include "fw.h"

#define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK)

@@ -906,7 +909,6 @@ struct ath11k_base {
	struct ath11k_targ_cap target_caps;
	u32 ext_service_bitmap[WMI_SERVICE_EXT_BM_SIZE];
	bool pdevs_macaddr_valid;
	int bd_api;

	struct ath11k_hw_params hw_params;

@@ -982,6 +984,18 @@ struct ath11k_base {
		const struct ath11k_pci_ops *ops;
	} pci;

	struct {
		u32 api_version;

		const struct firmware *fw;
		const u8 *amss_data;
		size_t amss_len;
		const u8 *m3_data;
		size_t m3_len;

		DECLARE_BITMAP(fw_features, ATH11K_FW_FEATURE_COUNT);
	} fw;

#ifdef CONFIG_NL80211_TESTMODE
	struct {
		u32 data_pos;
@@ -1223,6 +1237,11 @@ static inline struct ath11k_vif *ath11k_vif_to_arvif(struct ieee80211_vif *vif)
	return (struct ath11k_vif *)vif->drv_priv;
}

static inline struct ath11k_sta *ath11k_sta_to_arsta(struct ieee80211_sta *sta)
{
	return (struct ath11k_sta *)sta->drv_priv;
}

static inline struct ath11k *ath11k_ab_to_ar(struct ath11k_base *ab,
					     int mac_id)
{
+4 −4
Original line number Diff line number Diff line
@@ -1459,7 +1459,7 @@ static void ath11k_reset_peer_ps_duration(void *data,
					  struct ieee80211_sta *sta)
{
	struct ath11k *ar = data;
	struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
	struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);

	spin_lock_bh(&ar->data_lock);
	arsta->ps_total_duration = 0;
@@ -1510,7 +1510,7 @@ static void ath11k_peer_ps_state_disable(void *data,
					 struct ieee80211_sta *sta)
{
	struct ath11k *ar = data;
	struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
	struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);

	spin_lock_bh(&ar->data_lock);
	arsta->peer_ps_state = WMI_PEER_PS_STATE_DISABLED;
@@ -1591,10 +1591,10 @@ static const struct file_operations fops_ps_state_enable = {
int ath11k_debugfs_register(struct ath11k *ar)
{
	struct ath11k_base *ab = ar->ab;
	char pdev_name[5];
	char pdev_name[10];
	char buf[100] = {0};

	snprintf(pdev_name, sizeof(pdev_name), "%s%d", "mac", ar->pdev_idx);
	snprintf(pdev_name, sizeof(pdev_name), "%s%u", "mac", ar->pdev_idx);

	ar->debug.debugfs_pdev = debugfs_create_dir(pdev_name, ab->debugfs_soc);
	if (IS_ERR(ar->debug.debugfs_pdev))
Loading