Path: blob/main/sys/contrib/dev/broadcom/brcm80211/brcmsmac/scb.h
178665 views
/*1* Copyright (c) 2010 Broadcom Corporation2*3* Permission to use, copy, modify, and/or distribute this software for any4* purpose with or without fee is hereby granted, provided that the above5* copyright notice and this permission notice appear in all copies.6*7* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES8* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF9* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY10* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES11* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION12* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN13* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.14*/1516#ifndef _BRCM_SCB_H_17#define _BRCM_SCB_H_1819#include <linux/if_ether.h>20#include <brcmu_utils.h>21#include <defs.h>22#include "types.h"2324#define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */2526#define AMPDU_MAX_SCB_TID NUMPRIO2728/* scb flags */29#define SCB_WMECAP 0x004030#define SCB_HTCAP 0x10000 /* HT (MIMO) capable device */31#define SCB_IS40 0x80000 /* 40MHz capable */32#define SCB_STBCCAP 0x40000000 /* STBC Capable */3334#define SCB_MAGIC 0xbeefcafe3536/* structure to store per-tid state for the ampdu initiator */37struct scb_ampdu_tid_ini {38/* tx retry count; indexed by seq modulo */39u8 txretry[AMPDU_TX_BA_MAX_WSIZE];40};4142struct scb_ampdu {43u8 max_pdu; /* max pdus allowed in ampdu */44u8 release; /* # of mpdus released at a time */45u32 max_rx_ampdu_bytes; /* max ampdu rcv length; 8k, 16k, 32k, 64k */4647/*48* This could easily be a ini[] pointer and we keep this info in wl49* itself instead of having mac80211 hold it for us. Also could be made50* dynamic per tid instead of static.51*/52/* initiator info - per tid (NUMPRIO): */53struct scb_ampdu_tid_ini ini[AMPDU_MAX_SCB_TID];54};5556/* station control block - one per remote MAC address */57struct scb {58u32 magic;59u32 flags; /* various bit flags as defined below */60u16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */61u16 seqnum[NUMPRIO];/* WME: driver maintained sw seqnum per priority */6263struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */64};6566#endif /* _BRCM_SCB_H_ */676869