linux/drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c

// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
 * Copyright (C) 2005-2014, 2020-2021 Intel Corporation
 * Copyright (C) 2016 Intel Deutschland GmbH
 */
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/export.h>

#include "iwl-drv.h"
#include "iwl-phy-db.h"
#include "iwl-debug.h"
#include "iwl-op-mode.h"
#include "iwl-trans.h"

struct iwl_phy_db_entry {};

/**
 * struct iwl_phy_db - stores phy configuration and calibration data.
 *
 * @cfg: phy configuration.
 * @calib_nch: non channel specific calibration data.
 * @n_group_papd: number of entries in papd channel group.
 * @calib_ch_group_papd: calibration data related to papd channel group.
 * @n_group_txp: number of entries in tx power channel group.
 * @calib_ch_group_txp: calibration data related to tx power chanel group.
 * @trans: transport layer
 */
struct iwl_phy_db {};

enum iwl_phy_db_section_type {};

#define PHY_DB_CMD

/* for parsing of tx power channel group data that comes from the firmware*/
struct iwl_phy_db_chg_txp {} __packed;

struct iwl_phy_db *iwl_phy_db_init(struct iwl_trans *trans)
{}
IWL_EXPORT_SYMBOL(iwl_phy_db_init);

/*
 * get phy db section: returns a pointer to a phy db section specified by
 * type and channel group id.
 */
static struct iwl_phy_db_entry *
iwl_phy_db_get_section(struct iwl_phy_db *phy_db,
		       enum iwl_phy_db_section_type type,
		       u16 chg_id)
{}

static void iwl_phy_db_free_section(struct iwl_phy_db *phy_db,
				    enum iwl_phy_db_section_type type,
				    u16 chg_id)
{}

void iwl_phy_db_free(struct iwl_phy_db *phy_db)
{}
IWL_EXPORT_SYMBOL(iwl_phy_db_free);

int iwl_phy_db_set_section(struct iwl_phy_db *phy_db,
			   struct iwl_rx_packet *pkt)
{}
IWL_EXPORT_SYMBOL(iwl_phy_db_set_section);

static int is_valid_channel(u16 ch_id)
{}

static u8 ch_id_to_ch_index(u16 ch_id)
{}


static u16 channel_id_to_papd(u16 ch_id)
{}

static u16 channel_id_to_txp(struct iwl_phy_db *phy_db, u16 ch_id)
{}
static
int iwl_phy_db_get_section_data(struct iwl_phy_db *phy_db,
				u32 type, u8 **data, u16 *size, u16 ch_id)
{}

static int iwl_send_phy_db_cmd(struct iwl_phy_db *phy_db, u16 type,
			       u16 length, void *data)
{}

static int iwl_phy_db_send_all_channel_groups(
					struct iwl_phy_db *phy_db,
					enum iwl_phy_db_section_type type,
					u8 max_ch_groups)
{}

int iwl_send_phy_db_data(struct iwl_phy_db *phy_db)
{}
IWL_EXPORT_SYMBOL(iwl_send_phy_db_data);