linux/drivers/net/wireless/purelifi/plfxlc/mac.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2021 pureLiFi
 */

#ifndef PLFXLC_MAC_H
#define PLFXLC_MAC_H

#include <linux/kernel.h>
#include <net/mac80211.h>

#include "chip.h"

#define PURELIFI_CCK
#define PURELIFI_OFDM
#define PURELIFI_CCK_PREA_SHORT

#define PURELIFI_OFDM_PLCP_RATE_6M
#define PURELIFI_OFDM_PLCP_RATE_9M
#define PURELIFI_OFDM_PLCP_RATE_12M
#define PURELIFI_OFDM_PLCP_RATE_18M
#define PURELIFI_OFDM_PLCP_RATE_24M
#define PURELIFI_OFDM_PLCP_RATE_36M
#define PURELIFI_OFDM_PLCP_RATE_48M
#define PURELIFI_OFDM_PLCP_RATE_54M

#define PURELIFI_CCK_RATE_1M
#define PURELIFI_CCK_RATE_2M
#define PURELIFI_CCK_RATE_5_5M
#define PURELIFI_CCK_RATE_11M
#define PURELIFI_OFDM_RATE_6M
#define PURELIFI_OFDM_RATE_9M
#define PURELIFI_OFDM_RATE_12M
#define PURELIFI_OFDM_RATE_18M
#define PURELIFI_OFDM_RATE_24M
#define PURELIFI_OFDM_RATE_36M
#define PURELIFI_OFDM_RATE_48M
#define PURELIFI_OFDM_RATE_54M

#define PURELIFI_RX_ERROR
#define PURELIFI_RX_CRC32_ERROR

#define PLF_REGDOMAIN_FCC
#define PLF_REGDOMAIN_IC
#define PLF_REGDOMAIN_ETSI
#define PLF_REGDOMAIN_SPAIN
#define PLF_REGDOMAIN_FRANCE
#define PLF_REGDOMAIN_JAPAN_2
#define PLF_REGDOMAIN_JAPAN
#define PLF_REGDOMAIN_JAPAN_3

#define PLF_RX_ERROR
#define PLF_RX_CRC32_ERROR

enum {};

#define plfxlc_mac_dev(mac)

#define PURELIFI_MAC_STATS_BUFFER_SIZE
#define PURELIFI_MAC_MAX_ACK_WAITERS

struct plfxlc_ctrlset {} __packed;

/* overlay */
struct plfxlc_header {} __packed;

struct tx_status {} __packed;

struct beacon {};

enum plfxlc_device_flags {};

struct plfxlc_mac {};

static inline struct plfxlc_mac *
plfxlc_hw_mac(struct ieee80211_hw *hw)
{}

static inline struct plfxlc_mac *
plfxlc_chip_to_mac(struct plfxlc_chip *chip)
{}

static inline struct plfxlc_mac *
plfxlc_usb_to_mac(struct plfxlc_usb *usb)
{}

static inline u8 *plfxlc_mac_get_perm_addr(struct plfxlc_mac *mac)
{}

struct ieee80211_hw *plfxlc_mac_alloc_hw(struct usb_interface *intf);
void plfxlc_mac_release(struct plfxlc_mac *mac);

int plfxlc_mac_preinit_hw(struct ieee80211_hw *hw, const u8 *hw_address);
int plfxlc_mac_init_hw(struct ieee80211_hw *hw);

int plfxlc_mac_rx(struct ieee80211_hw *hw, const u8 *buffer,
		  unsigned int length);
void plfxlc_mac_tx_failed(struct urb *urb);
void plfxlc_mac_tx_to_dev(struct sk_buff *skb, int error);
int plfxlc_op_start(struct ieee80211_hw *hw);
void plfxlc_op_stop(struct ieee80211_hw *hw, bool suspend);
int plfxlc_restore_settings(struct plfxlc_mac *mac);

#endif /* PLFXLC_MAC_H */