linux/drivers/net/wireless/broadcom/b43legacy/xmit.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef B43legacy_XMIT_H_
#define B43legacy_XMIT_H_

#include "main.h"


#define _b43legacy_declare_plcp_hdr

/* struct b43legacy_plcp_hdr4 */
_b43legacy_declare_plcp_hdr} ;
/* struct b43legacy_plcp_hdr6 */
_b43legacy_declare_plcp_hdr} ;

#undef _b43legacy_declare_plcp_hdr


/* TX header for v3 firmware */
struct b43legacy_txhdr_fw3 {} __packed;

/* MAC TX control */
#define B43legacy_TX4_MAC_KEYIDX
#define B43legacy_TX4_MAC_KEYIDX_SHIFT
#define B43legacy_TX4_MAC_KEYALG
#define B43legacy_TX4_MAC_KEYALG_SHIFT
#define B43legacy_TX4_MAC_LIFETIME
#define B43legacy_TX4_MAC_FRAMEBURST
#define B43legacy_TX4_MAC_SENDCTS
#define B43legacy_TX4_MAC_AMPDU
#define B43legacy_TX4_MAC_AMPDU_SHIFT
#define B43legacy_TX4_MAC_CTSFALLBACKOFDM
#define B43legacy_TX4_MAC_FALLBACKOFDM
#define B43legacy_TX4_MAC_5GHZ
#define B43legacy_TX4_MAC_IGNPMQ
#define B43legacy_TX4_MAC_HWSEQ
#define B43legacy_TX4_MAC_STMSDU
#define B43legacy_TX4_MAC_SENDRTS
#define B43legacy_TX4_MAC_LONGFRAME
#define B43legacy_TX4_MAC_ACK

/* Extra Frame Types */
#define B43legacy_TX4_EFT_FBOFDM
#define B43legacy_TX4_EFT_RTSOFDM
#define B43legacy_TX4_EFT_RTSFBOFDM

/* PHY TX control word */
#define B43legacy_TX4_PHY_ENC
#define B43legacy_TX4_PHY_ENC_CCK
#define B43legacy_TX4_PHY_ENC_OFDM
#define B43legacy_TX4_PHY_SHORTPRMBL
#define B43legacy_TX4_PHY_ANT
#define B43legacy_TX4_PHY_ANT0
#define B43legacy_TX4_PHY_ANT1
#define B43legacy_TX4_PHY_ANTLAST



int b43legacy_generate_txhdr(struct b43legacy_wldev *dev,
			      u8 *txhdr,
			      const unsigned char *fragment_data,
			      unsigned int fragment_len,
			      struct ieee80211_tx_info *info,
			      u16 cookie);


/* Transmit Status */
struct b43legacy_txstatus {};

/* txstatus supp_reason values */
enum {};

/* Transmit Status as received through DMA/PIO on old chips */
struct b43legacy_hwtxstatus {} __packed;


/* Receive header for v3 firmware. */
struct b43legacy_rxhdr_fw3 {} __packed;


/* PHY RX Status 0 */
#define B43legacy_RX_PHYST0_GAINCTL
#define B43legacy_RX_PHYST0_PLCPHCF
#define B43legacy_RX_PHYST0_PLCPFV
#define B43legacy_RX_PHYST0_SHORTPRMBL
#define B43legacy_RX_PHYST0_LCRS
#define B43legacy_RX_PHYST0_ANT
#define B43legacy_RX_PHYST0_UNSRATE
#define B43legacy_RX_PHYST0_CLIP
#define B43legacy_RX_PHYST0_CLIP_SHIFT
#define B43legacy_RX_PHYST0_FTYPE
#define B43legacy_RX_PHYST0_CCK
#define B43legacy_RX_PHYST0_OFDM
#define B43legacy_RX_PHYST0_PRE_N
#define B43legacy_RX_PHYST0_STD_N

/* PHY RX Status 2 */
#define B43legacy_RX_PHYST2_LNAG
#define B43legacy_RX_PHYST2_LNAG_SHIFT
#define B43legacy_RX_PHYST2_PNAG
#define B43legacy_RX_PHYST2_PNAG_SHIFT
#define B43legacy_RX_PHYST2_FOFF

/* PHY RX Status 3 */
#define B43legacy_RX_PHYST3_DIGG
#define B43legacy_RX_PHYST3_DIGG_SHIFT
#define B43legacy_RX_PHYST3_TRSTATE

/* MAC RX Status */
#define B43legacy_RX_MAC_BEACONSENT
#define B43legacy_RX_MAC_KEYIDX
#define B43legacy_RX_MAC_KEYIDX_SHIFT
#define B43legacy_RX_MAC_DECERR
#define B43legacy_RX_MAC_DEC
#define B43legacy_RX_MAC_PADDING
#define B43legacy_RX_MAC_RESP
#define B43legacy_RX_MAC_FCSERR

/* RX channel */
#define B43legacy_RX_CHAN_GAIN
#define B43legacy_RX_CHAN_GAIN_SHIFT
#define B43legacy_RX_CHAN_ID
#define B43legacy_RX_CHAN_ID_SHIFT
#define B43legacy_RX_CHAN_PHYTYPE



u8 b43legacy_plcp_get_ratecode_cck(const u8 bitrate);
u8 b43legacy_plcp_get_ratecode_ofdm(const u8 bitrate);

void b43legacy_generate_plcp_hdr(struct b43legacy_plcp_hdr4 *plcp,
			       const u16 octets, const u8 bitrate);

void b43legacy_rx(struct b43legacy_wldev *dev,
		struct sk_buff *skb,
		const void *_rxhdr);

void b43legacy_handle_txstatus(struct b43legacy_wldev *dev,
			       const struct b43legacy_txstatus *status);

void b43legacy_handle_hwtxstatus(struct b43legacy_wldev *dev,
				 const struct b43legacy_hwtxstatus *hw);

void b43legacy_tx_suspend(struct b43legacy_wldev *dev);
void b43legacy_tx_resume(struct b43legacy_wldev *dev);


#define B43legacy_NR_QOSPARMS
enum {};

void b43legacy_qos_init(struct b43legacy_wldev *dev);


/* Helper functions for converting the key-table index from "firmware-format"
 * to "raw-format" and back. The firmware API changed for this at some revision.
 * We need to account for that here. */
static inline
int b43legacy_new_kidx_api(struct b43legacy_wldev *dev)
{}
static inline
u8 b43legacy_kidx_to_fw(struct b43legacy_wldev *dev, u8 raw_kidx)
{}
static inline
u8 b43legacy_kidx_to_raw(struct b43legacy_wldev *dev, u8 firmware_kidx)
{}

#endif /* B43legacy_XMIT_H_ */