Fix conflict with WLAN_EID macros, by removing them.
This allows the adding other definitions from the ieee80211 header.
Eventually the 80211mgr.h header will be removed.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/80211mgr.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/staging/vt6655/80211mgr.h b/drivers/staging/vt6655/80211mgr.h
index 94fb93d..d462a8a 100644
--- a/drivers/staging/vt6655/80211mgr.h
+++ b/drivers/staging/vt6655/80211mgr.h
@@ -32,6 +32,7 @@
#define __80211MGR_H__
#include <linux/types.h>
+#include "linux/ieee80211.h"
#include "ttype.h"
#include "80211hdr.h"
@@ -39,17 +40,10 @@
#define WLAN_MIN_ARRAY 1
/* Information Element ID value */
-#define WLAN_EID_SSID 0
-#define WLAN_EID_SUPP_RATES 1
#define WLAN_EID_FH_PARMS 2
#define WLAN_EID_DS_PARMS 3
#define WLAN_EID_CF_PARMS 4
-#define WLAN_EID_TIM 5
#define WLAN_EID_IBSS_PARMS 6
-#define WLAN_EID_COUNTRY 7
-#define WLAN_EID_CHALLENGE 16
-#define WLAN_EID_PWR_CONSTRAINT 32
-#define WLAN_EID_PWR_CAPABILITY 33
#define WLAN_EID_TPC_REQ 34
#define WLAN_EID_TPC_REP 35
#define WLAN_EID_SUPP_CH 36
@@ -60,7 +54,6 @@
#define WLAN_EID_IBSS_DFS 41
#define WLAN_EID_ERP 42
/* reference 802.11i 7.3.2 table 20 */
-#define WLAN_EID_RSN 48
#define WLAN_EID_EXTSUPP_RATES 50
/* reference WiFi WPA spec. */
#define WLAN_EID_RSN_WPA 221
--
1.9.1
ccmp_pn is the size of IEEE80211_CCMP_PN_LEN (6)
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/rxtx.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6655/rxtx.h b/drivers/staging/vt6655/rxtx.h
index 26baf3b..4accb78 100644
--- a/drivers/staging/vt6655/rxtx.h
+++ b/drivers/staging/vt6655/rxtx.h
@@ -44,7 +44,7 @@ struct vnt_mic_hdr {
u8 id;
u8 tx_priority;
u8 mic_addr2[ETH_ALEN];
- u8 ccmp_pn[6];
+ u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
__be16 payload_len;
__be16 hlen;
__le16 frame_control;
--
1.9.1
This is a merger of PSTxDataHead_ab and PSTxShortBufHead of which typedef struct tagSTxShortBufHead
is removed.
This is formed as fifo_ctl, time_stamp, struct vnt_phy_field, duration and time_stamp_off.
Replacing stuctures in csBeacon_xmit and doing endian correction where necessary.
Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6655/desc.h | 7 -------
drivers/staging/vt6655/rxtx.c | 37 ++++++++++++++++++++-----------------
drivers/staging/vt6655/rxtx.h | 8 ++++++++
3 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h
index 10bd564..b5730df 100644
--- a/drivers/staging/vt6655/desc.h
+++ b/drivers/staging/vt6655/desc.h
@@ -483,13 +483,6 @@ typedef struct tagSTxBufHead {
STxBufHead, *PSTxBufHead;
typedef const STxBufHead *PCSTxBufHead;
-typedef struct tagSTxShortBufHead {
- unsigned short wFIFOCtl;
- unsigned short wTimeStamp;
-} __attribute__ ((__packed__))
-STxShortBufHead, *PSTxShortBufHead;
-typedef const STxShortBufHead *PCSTxShortBufHead;
-
//
// Tx data header
//
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 04cf9e9..7493db1 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -2334,13 +2334,12 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, PSTxMgmtPacket pPacket)
unsigned char *pbyBuffer = (unsigned char *)pDevice->tx_beacon_bufs;
unsigned int cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN;
unsigned int cbHeaderSize = 0;
- unsigned short wTxBufSize = sizeof(STxShortBufHead);
- PSTxShortBufHead pTxBufHead = (PSTxShortBufHead) pbyBuffer;
- PSTxDataHead_ab pTxDataHead = (PSTxDataHead_ab) (pbyBuffer + wTxBufSize);
+ struct vnt_tx_short_buf_head *short_head =
+ (struct vnt_tx_short_buf_head *)pbyBuffer;
PS802_11Header pMACHeader;
unsigned short wCurrentRate;
- memset(pTxBufHead, 0, wTxBufSize);
+ memset(short_head, 0, sizeof(*short_head));
if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
wCurrentRate = RATE_6M;
@@ -2353,26 +2352,30 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, PSTxMgmtPacket pPacket)
//Set Preamble type always long
pDevice->byPreambleType = PREAMBLE_LONG;
- //Set FIFOCTL_GENINT
-
- pTxBufHead->wFIFOCtl |= FIFOCTL_GENINT;
+ /* Set FIFOCTL_GENINT */
+ short_head->fifo_ctl |= cpu_to_le16(FIFOCTL_GENINT);
- //Set packet type & Get Duration
+ /* Set packet type & Get Duration */
if (byPktType == PK_TYPE_11A) {//0000 0000 0000 0000
- pTxDataHead->wDuration = cpu_to_le16((unsigned short)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameSize, byPktType,
- wCurrentRate, false, 0, 0, 1, AUTO_FB_NONE));
+ short_head->duration =
+ cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A,
+ cbFrameSize, byPktType, wCurrentRate, false,
+ 0, 0, 1, AUTO_FB_NONE));
} else if (byPktType == PK_TYPE_11B) {//0000 0001 0000 0000
- pTxBufHead->wFIFOCtl |= FIFOCTL_11B;
- pTxDataHead->wDuration = cpu_to_le16((unsigned short)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameSize, byPktType,
- wCurrentRate, false, 0, 0, 1, AUTO_FB_NONE));
+ short_head->fifo_ctl |= cpu_to_le16(FIFOCTL_11B);
+
+ short_head->duration =
+ cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B,
+ cbFrameSize, byPktType, wCurrentRate, false,
+ 0, 0, 1, AUTO_FB_NONE));
}
vnt_get_phy_field(pDevice, cbFrameSize,
- wCurrentRate, byPktType, &pTxDataHead->ab);
+ wCurrentRate, byPktType, &short_head->ab);
- //Get TimeStampOff
- pTxDataHead->wTimeStampOff = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]);
- cbHeaderSize = wTxBufSize + sizeof(STxDataHead_ab);
+ /* Get TimeStampOff */
+ short_head->time_stamp_off = cpu_to_le16(wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]);
+ cbHeaderSize = sizeof(struct vnt_tx_short_buf_head);
//Generate Beacon Header
pMACHeader = (PS802_11Header)(pbyBuffer + cbHeaderSize);
diff --git a/drivers/staging/vt6655/rxtx.h b/drivers/staging/vt6655/rxtx.h
index 4accb78..789fae7 100644
--- a/drivers/staging/vt6655/rxtx.h
+++ b/drivers/staging/vt6655/rxtx.h
@@ -56,6 +56,14 @@ struct vnt_mic_hdr {
u16 packing; /* packing to 48 bytes */
} __packed;
+struct vnt_tx_short_buf_head {
+ __le16 fifo_ctl;
+ u16 time_stamp;
+ struct vnt_phy_field ab;
+ __le16 duration;
+ __le16 time_stamp_off;
+} __packed;
+
void
vGenerateMACHeader(
struct vnt_private *,
--
1.9.1