linux/drivers/net/wireless/ti/wlcore/wlcore_i.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * This file is part of wl1271
 *
 * Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
 * Copyright (C) 2008-2009 Nokia Corporation
 *
 * Contact: Luciano Coelho <[email protected]>
 */

#ifndef __WLCORE_I_H__
#define __WLCORE_I_H__

#include <linux/mutex.h>
#include <linux/completion.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/bitops.h>
#include <net/mac80211.h>

#include "conf.h"
#include "ini.h"

struct wilink_family_data {};

#define WL1271_TX_SECURITY_LO16(s)
#define WL1271_TX_SECURITY_HI32(s)
#define WL1271_TX_SQN_POST_RECOVERY_PADDING
/* Use smaller padding for GEM, as some  APs have issues when it's too big */
#define WL1271_TX_SQN_POST_RECOVERY_PADDING_GEM


#define WL1271_CIPHER_SUITE_GEM

#define WL1271_BUSY_WORD_CNT
#define WL1271_BUSY_WORD_LEN

#define WL1271_ELP_HW_STATE_ASLEEP
#define WL1271_ELP_HW_STATE_IRQ

#define WL1271_DEFAULT_BEACON_INT
#define WL1271_DEFAULT_DTIM_PERIOD

#define WL12XX_MAX_ROLES
#define WL12XX_INVALID_ROLE_ID
#define WL12XX_INVALID_LINK_ID

/*
 * max number of links allowed by all HWs.
 * this is NOT the actual max links supported by the current hw.
 */
#define WLCORE_MAX_LINKS

/* the driver supports the 2.4Ghz and 5Ghz bands */
#define WLCORE_NUM_BANDS

#define WL12XX_MAX_RATE_POLICIES
#define WLCORE_MAX_KLV_TEMPLATES

/* Defined by FW as 0. Will not be freed or allocated. */
#define WL12XX_SYSTEM_HLID

/*
 * When in AP-mode, we allow (at least) this number of packets
 * to be transmitted to FW for a STA in PS-mode. Only when packets are
 * present in the FW buffers it will wake the sleeping STA. We want to put
 * enough packets for the driver to transmit all of its buffered data before
 * the STA goes to sleep again. But we don't want to take too much memory
 * as it might hurt the throughput of active STAs.
 */
#define WL1271_PS_STA_MAX_PACKETS

#define WL1271_AP_BSS_INDEX
#define WL1271_AP_DEF_BEACON_EXP

enum wlcore_state {};

enum wl12xx_fw_type {};

struct wl1271;

enum {};

struct wl1271_chip {};

#define NUM_TX_QUEUES

struct wl_fw_status {};

#define WL1271_MAX_CHANNELS
struct wl1271_scan {};

struct wl1271_if_operations {};

struct wlcore_platdev_data {};

#define MAX_NUM_KEYS
#define MAX_KEY_SIZE

struct wl1271_ap_key {};

enum wl12xx_flags {};

enum wl12xx_vif_flags {};

struct wl12xx_vif;

struct wl1271_link {};

#define WL1271_MAX_RX_FILTERS
#define WL1271_RX_FILTER_MAX_FIELDS

#define WL1271_RX_FILTER_ETH_HEADER_SIZE
#define WL1271_RX_FILTER_MAX_FIELDS_SIZE
#define RX_FILTER_FIELD_OVERHEAD
#define WL1271_RX_FILTER_MAX_PATTERN_SIZE

#define WL1271_RX_FILTER_FLAG_MASK
#define WL1271_RX_FILTER_FLAG_IP_HEADER
#define WL1271_RX_FILTER_FLAG_ETHERNET_HEADER

enum rx_filter_action {};

enum plt_mode {};

struct wl12xx_rx_filter_field {} __packed;

struct wl12xx_rx_filter {};

struct wl1271_station {};

static inline struct wl1271_station *wl1271_station(struct ieee80211_sta *sta)
{}

struct wl12xx_vif {};

static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif)
{}

static inline
struct ieee80211_vif *wl12xx_wlvif_to_vif(struct wl12xx_vif *wlvif)
{}

static inline bool wlcore_is_p2p_mgmt(struct wl12xx_vif *wlvif)
{}

#define wl12xx_for_each_wlvif(wl, wlvif)

#define wl12xx_for_each_wlvif_continue(wl, wlvif)

#define wl12xx_for_each_wlvif_bss_type(wl, wlvif, _bss_type)

#define wl12xx_for_each_wlvif_sta(wl, wlvif)

#define wl12xx_for_each_wlvif_ap(wl, wlvif)

int wl1271_plt_start(struct wl1271 *wl, const enum plt_mode plt_mode);
int wl1271_plt_stop(struct wl1271 *wl);
int wl1271_recalc_rx_streaming(struct wl1271 *wl, struct wl12xx_vif *wlvif);
void wl12xx_queue_recovery_work(struct wl1271 *wl);
size_t wl12xx_copy_fwlog(struct wl1271 *wl, u8 *memblock, size_t maxlen);
int wl1271_rx_filter_alloc_field(struct wl12xx_rx_filter *filter,
				 u16 offset, u8 flags,
				 const u8 *pattern, u8 len);
void wl1271_rx_filter_free(struct wl12xx_rx_filter *filter);
struct wl12xx_rx_filter *wl1271_rx_filter_alloc(void);
int wl1271_rx_filter_get_fields_size(struct wl12xx_rx_filter *filter);
void wl1271_rx_filter_flatten_fields(struct wl12xx_rx_filter *filter,
				     u8 *buf);

#define JOIN_TIMEOUT

#define SESSION_COUNTER_MAX
#define SESSION_COUNTER_INVALID

#define WL1271_DEFAULT_POWER_LEVEL

#define WL1271_TX_QUEUE_LOW_WATERMARK
#define WL1271_TX_QUEUE_HIGH_WATERMARK

#define WL1271_DEFERRED_QUEUE_LIMIT

/* WL1271 needs a 200ms sleep after power on, and a 20ms sleep before power
   on in case is has been shut down shortly before */
#define WL1271_PRE_POWER_ON_SLEEP
#define WL1271_POWER_ON_SLEEP

/* Macros to handle wl1271.sta_rate_set */
#define HW_BG_RATES_MASK
#define HW_HT_RATES_OFFSET
#define HW_MIMO_RATES_OFFSET

#endif /* __WLCORE_I_H__ */