]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - drivers/staging/vt6655/card.h
UBUNTU: Ubuntu-4.13.0-45.50
[mirror_ubuntu-artful-kernel.git] / drivers / staging / vt6655 / card.h
CommitLineData
5449c685
FB
1/*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
5449c685
FB
15 * File: card.h
16 *
17 * Purpose: Provide functions to setup NIC operation mode
18 *
19 * Author: Tevin Chen
20 *
21 * Date: May 21, 1996
22 *
23 */
24
5449c685
FB
25#ifndef __CARD_H__
26#define __CARD_H__
27
7b6a0013 28#include <linux/types.h>
a9873673 29#include <linux/nl80211.h>
5449c685 30
79bffc53
NC
31/*
32 * Loopback mode
33 *
34 * LOBYTE is MAC LB mode, HIBYTE is MII LB mode
35 */
5449c685 36#define CARD_LB_NONE MAKEWORD(MAC_LB_NONE, 0)
5150d01e
KH
37/* PHY must ISO, avoid MAC loopback packet go out */
38#define CARD_LB_MAC MAKEWORD(MAC_LB_INTERNAL, 0)
5449c685
FB
39#define CARD_LB_PHY MAKEWORD(MAC_LB_EXT, 0)
40
79bffc53
NC
41#define DEFAULT_MSDU_LIFETIME 512 /* ms */
42#define DEFAULT_MSDU_LIFETIME_RES_64us 8000 /* 64us */
5449c685 43
79bffc53
NC
44#define DEFAULT_MGN_LIFETIME 8 /* ms */
45#define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */
5449c685
FB
46
47#define CB_MAX_CHANNEL_24G 14
7745bd68 48#define CB_MAX_CHANNEL_5G 42
bee80f29 49#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G + CB_MAX_CHANNEL_5G)
5449c685 50
5449c685 51typedef enum _CARD_PKT_TYPE {
d4945f09
JP
52 PKT_TYPE_802_11_BCN,
53 PKT_TYPE_802_11_MNG,
54 PKT_TYPE_802_11_DATA,
55 PKT_TYPE_802_11_ALL
5449c685
FB
56} CARD_PKT_TYPE, *PCARD_PKT_TYPE;
57
58typedef enum _CARD_STATUS_TYPE {
d4945f09
JP
59 CARD_STATUS_MEDIA_CONNECT,
60 CARD_STATUS_MEDIA_DISCONNECT,
61 CARD_STATUS_PMKID
5449c685
FB
62} CARD_STATUS_TYPE, *PCARD_STATUS_TYPE;
63
d052270b
MP
64struct vnt_private;
65
e0f6aae8 66void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type);
24c8bd8f
DR
67void CARDvUpdateBasicTopRate(struct vnt_private *priv);
68bool CARDbIsOFDMinBasicRate(struct vnt_private *priv);
69void CARDvSetLoopbackMode(struct vnt_private *priv, unsigned short wLoopbackMode);
70bool CARDbSoftwareReset(struct vnt_private *priv);
71void CARDvSetFirstNextTBTT(struct vnt_private *priv,
5150d01e 72 unsigned short wBeaconInterval);
24c8bd8f 73void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF,
5150d01e 74 unsigned short wBeaconInterval);
24c8bd8f 75bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *pqwCurrTSF);
0fc2a76e
MP
76u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval);
77u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2);
24c8bd8f
DR
78unsigned char CARDbyGetPktType(struct vnt_private *priv);
79void CARDvSafeResetTx(struct vnt_private *priv);
80void CARDvSafeResetRx(struct vnt_private *priv);
81bool CARDbRadioPowerOff(struct vnt_private *priv);
82bool CARDbRadioPowerOn(struct vnt_private *priv);
83bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type);
84bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,
032ed34a 85 u64 qwBSSTimestamp);
24c8bd8f 86bool CARDbSetBeaconPeriod(struct vnt_private *priv, unsigned short wBeaconInterval);
5449c685 87
79bffc53 88#endif /* __CARD_H__ */