linux/drivers/staging/vt6655/baseband.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
 * All rights reserved.
 *
 * Purpose: Implement functions to access baseband
 *
 * Author: Jerry Chen
 *
 * Date: Jun. 5, 2002
 *
 */

#ifndef __BASEBAND_H__
#define __BASEBAND_H__

#include "device.h"

/*
 * Registers in the BASEBAND
 */
#define BB_MAX_CONTEXT_SIZE

/*
 * Baseband RF pair definition in eeprom (Bits 6..0)
 */

#define PREAMBLE_LONG
#define PREAMBLE_SHORT

#define F5G
#define F2_4G

#define TOP_RATE_54M
#define TOP_RATE_48M
#define TOP_RATE_36M
#define TOP_RATE_24M
#define TOP_RATE_18M
#define TOP_RATE_12M
#define TOP_RATE_11M
#define TOP_RATE_9M
#define TOP_RATE_6M
#define TOP_RATE_55M
#define TOP_RATE_2M
#define TOP_RATE_1M

unsigned int bb_get_frame_time(unsigned char preamble_type,
			       unsigned char by_pkt_type,
			       unsigned int cb_frame_length,
			       unsigned short w_rate);

void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
		       u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy);

bool bb_read_embedded(struct vnt_private *priv, unsigned char by_bb_addr,
		      unsigned char *pby_data);
bool bb_write_embedded(struct vnt_private *priv, unsigned char by_bb_addr,
		       unsigned char by_data);

void bb_set_short_slot_time(struct vnt_private *priv);
void bb_set_vga_gain_offset(struct vnt_private *priv, unsigned char by_data);

/* VT3253 Baseband */
bool bb_vt3253_init(struct vnt_private *priv);
void bb_software_reset(struct vnt_private *priv);
void bb_set_tx_antenna_mode(struct vnt_private *priv,
			    unsigned char by_antenna_mode);
void bb_set_rx_antenna_mode(struct vnt_private *priv,
			    unsigned char by_antenna_mode);
void bb_set_deep_sleep(struct vnt_private *priv, unsigned char by_local_id);

#endif /* __BASEBAND_H__ */