68 lines · c
1/*2 * Copyright (c) 2010 Broadcom Corporation3 *4 * Permission to use, copy, modify, and/or distribute this software for any5 * purpose with or without fee is hereby granted, provided that the above6 * copyright notice and this permission notice appear in all copies.7 *8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.15 */16 17#ifndef _BRCM_SCB_H_18#define _BRCM_SCB_H_19 20#include <linux/if_ether.h>21#include <brcmu_utils.h>22#include <defs.h>23#include "types.h"24 25#define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */26 27#define AMPDU_MAX_SCB_TID NUMPRIO28 29/* scb flags */30#define SCB_WMECAP 0x004031#define SCB_HTCAP 0x10000 /* HT (MIMO) capable device */32#define SCB_IS40 0x80000 /* 40MHz capable */33#define SCB_STBCCAP 0x40000000 /* STBC Capable */34 35#define SCB_MAGIC 0xbeefcafe36 37/* structure to store per-tid state for the ampdu initiator */38struct scb_ampdu_tid_ini {39 /* tx retry count; indexed by seq modulo */40 u8 txretry[AMPDU_TX_BA_MAX_WSIZE];41};42 43struct scb_ampdu {44 u8 max_pdu; /* max pdus allowed in ampdu */45 u8 release; /* # of mpdus released at a time */46 u32 max_rx_ampdu_bytes; /* max ampdu rcv length; 8k, 16k, 32k, 64k */47 48 /*49 * This could easily be a ini[] pointer and we keep this info in wl50 * itself instead of having mac80211 hold it for us. Also could be made51 * dynamic per tid instead of static.52 */53 /* initiator info - per tid (NUMPRIO): */54 struct scb_ampdu_tid_ini ini[AMPDU_MAX_SCB_TID];55};56 57/* station control block - one per remote MAC address */58struct scb {59 u32 magic;60 u32 flags; /* various bit flags as defined below */61 u16 seqctl[NUMPRIO]; /* seqctl of last received frame (for dups) */62 u16 seqnum[NUMPRIO];/* WME: driver maintained sw seqnum per priority */63 64 struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */65};66 67#endif /* _BRCM_SCB_H_ */68