2009-06-13 11:38:31 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
|
|
|
* File: rxtx.h
|
|
|
|
*
|
|
|
|
* Purpose:
|
|
|
|
*
|
|
|
|
* Author: Jerry Chen
|
|
|
|
*
|
|
|
|
* Date: Jun. 27, 2002
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __RXTX_H__
|
|
|
|
#define __RXTX_H__
|
|
|
|
|
|
|
|
#include "device.h"
|
|
|
|
#include "wcmd.h"
|
2013-08-20 21:52:30 +00:00
|
|
|
#include "baseband.h"
|
2009-06-13 11:38:31 +00:00
|
|
|
|
staging: vt6656: desc.h Remove typedef struct tagSMICHDRHead to new structure in rxtx.h
To new structure.
typedef struct tagSMICHDRHead -> struct vnt_mic_hdr
This is only needed by rxtc.c so moved to rxtx.h
The new structure is the same size as the old but
contains the members as pointer referenced in
rxtx.c s_vFillTxKey
u8 id
*pMICHDR = 0x59;
u8 tx_priority;
*((u8 *)(pMICHDR+1)) = 0; // TxPriority
u8 mic_addr2[6];
memcpy(pMICHDR+2, &(pMACHeader->addr2[0]), 6);
__be32 tsc_47_16;
pMICHDR+8 = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16));
pMICHDR+9 = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16));
pMICHDR+10 = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16));
pMICHDR+11 = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16));
__be16 tsc_15_0;
pMICHDR+12 = HIBYTE(pTransmitKey->wTSC15_0);
pMICHDR+13 = LOBYTE(pTransmitKey->wTSC15_0);
__be16 payload_len;
pMICHDR+14 = HIBYTE(wPayloadLen);
pMICHDR+15 = LOBYTE(wPayloadLen);
__be16 hlen;
pMICHDR+16 = 0; // HLEN[15:8]
pMICHDR+17 = 28; // HLEN[7:0]
__le16 frame_control;
memcpy(pMICHDR+18, (u8 *)&wValue, 2); // MSKFRACTL
u8 addr1[6];
memcpy(pMICHDR+20, &(pMACHeader->addr1[0]), 6);
u8 addr2[6];
memcpy(pMICHDR+26, &(pMACHeader->addr2[0]), 6);
u8 addr3[6];
memcpy(pMICHDR+32, &(pMACHeader->addr3[0]), 6);
__le16 seq_ctrl;
memcpy(pMICHDR+38, (u8 *)&wValue, 2); // MSKSEQCTL
u8 addr4[6];
memcpy(pMICHDR+40, &(pMACHeader->addr4[0]), 6);
u16 packing; /* packing to 48 bytes */
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 13:33:55 +00:00
|
|
|
/* MIC HDR data header */
|
|
|
|
struct vnt_mic_hdr {
|
|
|
|
u8 id;
|
|
|
|
u8 tx_priority;
|
|
|
|
u8 mic_addr2[6];
|
|
|
|
__be32 tsc_47_16;
|
|
|
|
__be16 tsc_15_0;
|
|
|
|
__be16 payload_len;
|
|
|
|
__be16 hlen;
|
|
|
|
__le16 frame_control;
|
|
|
|
u8 addr1[6];
|
|
|
|
u8 addr2[6];
|
|
|
|
u8 addr3[6];
|
|
|
|
__le16 seq_ctrl;
|
|
|
|
u8 addr4[6];
|
|
|
|
u16 packing; /* packing to 48 bytes */
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-16 20:26:55 +00:00
|
|
|
/* RsvTime buffer header */
|
|
|
|
struct vnt_rrv_time_rts {
|
|
|
|
u16 wRTSTxRrvTime_ba;
|
|
|
|
u16 wRTSTxRrvTime_aa;
|
|
|
|
u16 wRTSTxRrvTime_bb;
|
|
|
|
u16 wReserved;
|
|
|
|
u16 wTxRrvTime_b;
|
|
|
|
u16 wTxRrvTime_a;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-16 22:38:57 +00:00
|
|
|
struct vnt_rrv_time_cts {
|
|
|
|
u16 wCTSTxRrvTime_ba;
|
|
|
|
u16 wReserved;
|
|
|
|
u16 wTxRrvTime_b;
|
|
|
|
u16 wTxRrvTime_a;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-16 22:44:04 +00:00
|
|
|
struct vnt_rrv_time_ab {
|
|
|
|
u16 wRTSTxRrvTime;
|
|
|
|
u16 wTxRrvTime;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-16 22:48:03 +00:00
|
|
|
/* TX data header */
|
|
|
|
struct vnt_tx_datahead_g {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field b;
|
|
|
|
struct vnt_phy_field a;
|
2013-08-16 22:48:03 +00:00
|
|
|
u16 wDuration_b;
|
|
|
|
u16 wDuration_a;
|
|
|
|
u16 wTimeStampOff_b;
|
|
|
|
u16 wTimeStampOff_a;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-16 22:49:15 +00:00
|
|
|
struct vnt_tx_datahead_g_fb {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field b;
|
|
|
|
struct vnt_phy_field a;
|
2013-08-16 22:49:15 +00:00
|
|
|
u16 wDuration_b;
|
|
|
|
u16 wDuration_a;
|
|
|
|
u16 wDuration_a_f0;
|
|
|
|
u16 wDuration_a_f1;
|
|
|
|
u16 wTimeStampOff_b;
|
|
|
|
u16 wTimeStampOff_a;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-16 22:50:32 +00:00
|
|
|
struct vnt_tx_datahead_ab {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field ab;
|
2013-08-16 22:50:32 +00:00
|
|
|
u16 wDuration;
|
|
|
|
u16 wTimeStampOff;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-16 22:51:38 +00:00
|
|
|
struct vnt_tx_datahead_a_fb {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field a;
|
2013-08-16 22:51:38 +00:00
|
|
|
u16 wDuration;
|
|
|
|
u16 wTimeStampOff;
|
|
|
|
u16 wDuration_f0;
|
|
|
|
u16 wDuration_f1;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-15 20:23:25 +00:00
|
|
|
/* RTS buffer header */
|
|
|
|
struct vnt_rts_g {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field b;
|
|
|
|
struct vnt_phy_field a;
|
2013-08-15 20:23:25 +00:00
|
|
|
u16 wDuration_ba;
|
|
|
|
u16 wDuration_aa;
|
|
|
|
u16 wDuration_bb;
|
|
|
|
u16 wReserved;
|
|
|
|
struct ieee80211_rts data;
|
2013-10-01 14:52:16 +00:00
|
|
|
struct vnt_tx_datahead_g data_head;
|
2013-08-15 20:23:25 +00:00
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct vnt_rts_g_fb {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field b;
|
|
|
|
struct vnt_phy_field a;
|
2013-08-15 20:23:25 +00:00
|
|
|
u16 wDuration_ba;
|
|
|
|
u16 wDuration_aa;
|
|
|
|
u16 wDuration_bb;
|
|
|
|
u16 wReserved;
|
|
|
|
u16 wRTSDuration_ba_f0;
|
|
|
|
u16 wRTSDuration_aa_f0;
|
|
|
|
u16 wRTSDuration_ba_f1;
|
|
|
|
u16 wRTSDuration_aa_f1;
|
|
|
|
struct ieee80211_rts data;
|
2013-10-01 14:54:56 +00:00
|
|
|
struct vnt_tx_datahead_g_fb data_head;
|
2013-08-15 20:23:25 +00:00
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct vnt_rts_ab {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field ab;
|
2013-08-15 20:23:25 +00:00
|
|
|
u16 wDuration;
|
|
|
|
u16 wReserved;
|
|
|
|
struct ieee80211_rts data;
|
2013-10-01 15:00:20 +00:00
|
|
|
struct vnt_tx_datahead_ab data_head;
|
2013-08-15 20:23:25 +00:00
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct vnt_rts_a_fb {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field a;
|
2013-08-15 20:23:25 +00:00
|
|
|
u16 wDuration;
|
|
|
|
u16 wReserved;
|
|
|
|
u16 wRTSDuration_f0;
|
|
|
|
u16 wRTSDuration_f1;
|
|
|
|
struct ieee80211_rts data;
|
2013-10-01 14:56:48 +00:00
|
|
|
struct vnt_tx_datahead_a_fb data_head;
|
2013-08-15 20:23:25 +00:00
|
|
|
} __packed;
|
|
|
|
|
2013-08-15 20:27:22 +00:00
|
|
|
/* CTS buffer header */
|
|
|
|
struct vnt_cts {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field b;
|
2013-08-15 20:27:22 +00:00
|
|
|
u16 wDuration_ba;
|
|
|
|
u16 wReserved;
|
|
|
|
struct ieee80211_cts data;
|
|
|
|
u16 reserved2;
|
2013-10-01 14:52:16 +00:00
|
|
|
struct vnt_tx_datahead_g data_head;
|
2013-08-15 20:27:22 +00:00
|
|
|
} __packed;
|
|
|
|
|
|
|
|
struct vnt_cts_fb {
|
2013-08-20 21:52:30 +00:00
|
|
|
struct vnt_phy_field b;
|
2013-08-15 20:27:22 +00:00
|
|
|
u16 wDuration_ba;
|
|
|
|
u16 wReserved;
|
|
|
|
u16 wCTSDuration_ba_f0;
|
|
|
|
u16 wCTSDuration_ba_f1;
|
|
|
|
struct ieee80211_cts data;
|
|
|
|
u16 reserved2;
|
2013-10-01 14:54:56 +00:00
|
|
|
struct vnt_tx_datahead_g_fb data_head;
|
2013-08-15 20:27:22 +00:00
|
|
|
} __packed;
|
|
|
|
|
2013-08-26 10:17:52 +00:00
|
|
|
union vnt_tx_data_head {
|
|
|
|
/* rts g */
|
|
|
|
struct vnt_rts_g rts_g;
|
|
|
|
struct vnt_rts_g_fb rts_g_fb;
|
|
|
|
/* rts a/b */
|
|
|
|
struct vnt_rts_ab rts_ab;
|
|
|
|
struct vnt_rts_a_fb rts_a_fb;
|
|
|
|
/* cts g */
|
|
|
|
struct vnt_cts cts_g;
|
|
|
|
struct vnt_cts_fb cts_g_fb;
|
2013-10-01 14:58:54 +00:00
|
|
|
/* no rts/cts */
|
|
|
|
struct vnt_tx_datahead_a_fb data_head_a_fb;
|
2013-10-01 15:03:40 +00:00
|
|
|
struct vnt_tx_datahead_ab data_head_ab;
|
2013-08-26 10:17:52 +00:00
|
|
|
};
|
|
|
|
|
2013-09-26 17:49:44 +00:00
|
|
|
struct vnt_tx_mic_hdr {
|
|
|
|
struct vnt_mic_hdr hdr;
|
|
|
|
union vnt_tx_data_head head;
|
|
|
|
} __packed;
|
|
|
|
|
|
|
|
union vnt_tx {
|
|
|
|
struct vnt_tx_mic_hdr mic;
|
|
|
|
union vnt_tx_data_head head;
|
|
|
|
};
|
|
|
|
|
2013-09-26 17:47:25 +00:00
|
|
|
union vnt_tx_head {
|
2013-09-26 17:49:44 +00:00
|
|
|
struct {
|
|
|
|
struct vnt_rrv_time_rts rts;
|
|
|
|
union vnt_tx tx;
|
|
|
|
} __packed tx_rts;
|
|
|
|
struct {
|
|
|
|
struct vnt_rrv_time_cts cts;
|
|
|
|
union vnt_tx tx;
|
|
|
|
} __packed tx_cts;
|
|
|
|
struct {
|
|
|
|
struct vnt_rrv_time_ab ab;
|
|
|
|
union vnt_tx tx;
|
|
|
|
} __packed tx_ab;
|
2013-09-26 17:47:25 +00:00
|
|
|
};
|
|
|
|
|
2013-09-17 18:54:35 +00:00
|
|
|
struct vnt_tx_fifo_head {
|
2012-11-11 15:34:51 +00:00
|
|
|
u32 adwTxKey[4];
|
2013-08-15 18:34:37 +00:00
|
|
|
u16 wFIFOCtl;
|
|
|
|
u16 wTimeStamp;
|
|
|
|
u16 wFragCtl;
|
|
|
|
u16 wReserved;
|
|
|
|
} __packed;
|
2009-06-13 11:38:31 +00:00
|
|
|
|
2013-09-17 18:54:35 +00:00
|
|
|
struct vnt_tx_buffer {
|
|
|
|
u8 byType;
|
|
|
|
u8 byPKTNO;
|
|
|
|
u16 wTxByteCount;
|
|
|
|
struct vnt_tx_fifo_head fifo_head;
|
2013-09-26 17:47:25 +00:00
|
|
|
union vnt_tx_head tx_head;
|
2013-09-17 18:54:35 +00:00
|
|
|
} __packed;
|
|
|
|
|
2013-11-24 13:25:25 +00:00
|
|
|
struct vnt_tx_short_buf_head {
|
|
|
|
u16 fifo_ctl;
|
|
|
|
u16 time_stamp;
|
|
|
|
struct vnt_phy_field ab;
|
|
|
|
u16 duration;
|
|
|
|
u16 time_stamp_off;
|
|
|
|
} __packed;
|
|
|
|
|
2013-08-15 18:40:08 +00:00
|
|
|
struct vnt_beacon_buffer {
|
|
|
|
u8 byType;
|
|
|
|
u8 byPKTNO;
|
|
|
|
u16 wTxByteCount;
|
2013-11-24 13:25:25 +00:00
|
|
|
struct vnt_tx_short_buf_head short_head;
|
2013-11-24 13:27:32 +00:00
|
|
|
struct ieee80211_hdr hdr;
|
2013-08-15 18:40:08 +00:00
|
|
|
} __packed;
|
2009-06-13 11:38:31 +00:00
|
|
|
|
2013-01-17 23:15:22 +00:00
|
|
|
void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
|
|
|
|
int nsDMA_tx_packet(struct vnt_private *, u32 uDMAIdx, struct sk_buff *skb);
|
|
|
|
CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
|
|
|
|
CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
|
|
|
|
int bRelayPacketSend(struct vnt_private *, u8 *pbySkbData, u32 uDataLen,
|
|
|
|
u32 uNodeIndex);
|
2009-06-13 11:38:31 +00:00
|
|
|
|
2010-05-01 22:12:26 +00:00
|
|
|
#endif /* __RXTX_H__ */
|