mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 17:41:55 +00:00
Purge warnings from prism2 drivers
This commit is contained in:
parent
77c1777b44
commit
e5950283ec
File diff suppressed because it is too large
Load Diff
@ -124,6 +124,8 @@
|
||||
#define WLAN_FSTYPE_DEAUTHEN 0x0c
|
||||
|
||||
/* Control */
|
||||
#define WLAN_FSTYPE_BLOCKACKREQ 0x8
|
||||
#define WLAN_FSTYPE_BLOCKACK 0x9
|
||||
#define WLAN_FSTYPE_PSPOLL 0x0a
|
||||
#define WLAN_FSTYPE_RTS 0x0b
|
||||
#define WLAN_FSTYPE_CTS 0x0c
|
||||
@ -218,35 +220,32 @@
|
||||
typedef UINT8 wlan_bss_ts_t[WLAN_BSS_TS_LEN];
|
||||
|
||||
/* Generic 802.11 Header types */
|
||||
__WLAN_PRAGMA_PACK1__
|
||||
|
||||
typedef struct p80211_hdr_a3
|
||||
{
|
||||
UINT16 fc __WLAN_ATTRIB_PACK__;
|
||||
UINT16 dur __WLAN_ATTRIB_PACK__;
|
||||
UINT8 a1[WLAN_ADDR_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT8 a2[WLAN_ADDR_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT8 a3[WLAN_ADDR_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT16 seq __WLAN_ATTRIB_PACK__;
|
||||
UINT16 fc;
|
||||
UINT16 dur;
|
||||
UINT8 a1[WLAN_ADDR_LEN];
|
||||
UINT8 a2[WLAN_ADDR_LEN];
|
||||
UINT8 a3[WLAN_ADDR_LEN];
|
||||
UINT16 seq;
|
||||
} __WLAN_ATTRIB_PACK__ p80211_hdr_a3_t;
|
||||
__WLAN_PRAGMA_PACKDFLT__
|
||||
|
||||
__WLAN_PRAGMA_PACK1__
|
||||
typedef struct p80211_hdr_a4
|
||||
{
|
||||
UINT16 fc __WLAN_ATTRIB_PACK__;
|
||||
UINT16 dur __WLAN_ATTRIB_PACK__;
|
||||
UINT8 a1[WLAN_ADDR_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT8 a2[WLAN_ADDR_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT8 a3[WLAN_ADDR_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT16 seq __WLAN_ATTRIB_PACK__;
|
||||
UINT8 a4[WLAN_ADDR_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT16 fc;
|
||||
UINT16 dur;
|
||||
UINT8 a1[WLAN_ADDR_LEN];
|
||||
UINT8 a2[WLAN_ADDR_LEN];
|
||||
UINT8 a3[WLAN_ADDR_LEN];
|
||||
UINT16 seq;
|
||||
UINT8 a4[WLAN_ADDR_LEN];
|
||||
} __WLAN_ATTRIB_PACK__ p80211_hdr_a4_t;
|
||||
__WLAN_PRAGMA_PACKDFLT__
|
||||
|
||||
typedef union p80211_hdr
|
||||
{
|
||||
p80211_hdr_a3_t a3 __WLAN_ATTRIB_PACK__;
|
||||
p80211_hdr_a4_t a4 __WLAN_ATTRIB_PACK__;
|
||||
p80211_hdr_a3_t a3;
|
||||
p80211_hdr_a4_t a4;
|
||||
} __WLAN_ATTRIB_PACK__ p80211_hdr_t;
|
||||
|
||||
|
||||
@ -257,6 +256,44 @@ typedef union p80211_hdr
|
||||
/*================================================================*/
|
||||
/* Function Declarations */
|
||||
|
||||
void p802addr_to_str( char *buf, UINT8 *addr);
|
||||
/* Frame and header lenght macros */
|
||||
|
||||
#define WLAN_CTL_FRAMELEN(fstype) (\
|
||||
(fstype) == WLAN_FSTYPE_BLOCKACKREQ ? 24 : \
|
||||
(fstype) == WLAN_FSTYPE_BLOCKACK ? 152 : \
|
||||
(fstype) == WLAN_FSTYPE_PSPOLL ? 20 : \
|
||||
(fstype) == WLAN_FSTYPE_RTS ? 20 : \
|
||||
(fstype) == WLAN_FSTYPE_CTS ? 14 : \
|
||||
(fstype) == WLAN_FSTYPE_ACK ? 14 : \
|
||||
(fstype) == WLAN_FSTYPE_CFEND ? 20 : \
|
||||
(fstype) == WLAN_FSTYPE_CFENDCFACK ? 20 : 4)
|
||||
|
||||
#define WLAN_FCS_LEN 4
|
||||
|
||||
/* ftcl in HOST order */
|
||||
inline static UINT16 p80211_headerlen(UINT16 fctl)
|
||||
{
|
||||
UINT16 hdrlen = 0;
|
||||
|
||||
switch ( WLAN_GET_FC_FTYPE(fctl) ) {
|
||||
case WLAN_FTYPE_MGMT:
|
||||
hdrlen = WLAN_HDR_A3_LEN;
|
||||
break;
|
||||
case WLAN_FTYPE_DATA:
|
||||
hdrlen = WLAN_HDR_A3_LEN;
|
||||
if ( WLAN_GET_FC_TODS(fctl) && WLAN_GET_FC_FROMDS(fctl) ) {
|
||||
hdrlen += WLAN_ADDR_LEN;
|
||||
}
|
||||
break;
|
||||
case WLAN_FTYPE_CTL:
|
||||
hdrlen = WLAN_CTL_FRAMELEN(WLAN_GET_FC_FSTYPE(fctl)) -
|
||||
WLAN_FCS_LEN;
|
||||
break;
|
||||
default:
|
||||
hdrlen = WLAN_HDR_A3_LEN;
|
||||
}
|
||||
|
||||
return hdrlen;
|
||||
}
|
||||
|
||||
#endif /* _P80211HDR_H */
|
||||
|
@ -13,8 +13,8 @@ $Id$
|
||||
* your option) any later version.
|
||||
*/
|
||||
|
||||
#include "etherboot.h"
|
||||
#include "nic.h"
|
||||
#include <etherboot.h>
|
||||
#include <nic.h>
|
||||
#include <gpxe/pci.h>
|
||||
#include <gpxe/ethernet.h>
|
||||
|
||||
@ -68,6 +68,11 @@ static const char hardcoded_ssid[] = "";
|
||||
#define __cpu_to_le16(x) (x)
|
||||
#define __cpu_to_le32(x) (x)
|
||||
|
||||
#define hfa384x2host_16(n) (__le16_to_cpu((UINT16)(n)))
|
||||
#define hfa384x2host_32(n) (__le32_to_cpu((UINT32)(n)))
|
||||
#define host2hfa384x_16(n) (__cpu_to_le16((UINT16)(n)))
|
||||
#define host2hfa384x_32(n) (__cpu_to_le32((UINT32)(n)))
|
||||
|
||||
/*
|
||||
* PLX9052 PCI register offsets
|
||||
* Taken from PLX9052 datasheet available from http://www.plxtech.com/download/9052/databook/9052db-20.pdf
|
||||
@ -135,19 +140,19 @@ static hfa384x_t hw_global = {
|
||||
|
||||
typedef struct wlan_llc
|
||||
{
|
||||
UINT8 dsap __WLAN_ATTRIB_PACK__;
|
||||
UINT8 ssap __WLAN_ATTRIB_PACK__;
|
||||
UINT8 ctl __WLAN_ATTRIB_PACK__;
|
||||
} __WLAN_ATTRIB_PACK__ wlan_llc_t;
|
||||
UINT8 dsap;
|
||||
UINT8 ssap;
|
||||
UINT8 ctl;
|
||||
} wlan_llc_t;
|
||||
|
||||
static const wlan_llc_t wlan_llc_snap = { 0xaa, 0xaa, 0x03 }; /* LLC header indicating SNAP (?) */
|
||||
|
||||
#define WLAN_IEEE_OUI_LEN 3
|
||||
typedef struct wlan_snap
|
||||
{
|
||||
UINT8 oui[WLAN_IEEE_OUI_LEN] __WLAN_ATTRIB_PACK__;
|
||||
UINT16 type __WLAN_ATTRIB_PACK__;
|
||||
} __WLAN_ATTRIB_PACK__ wlan_snap_t;
|
||||
UINT8 oui[WLAN_IEEE_OUI_LEN];
|
||||
UINT16 type;
|
||||
} wlan_snap_t;
|
||||
|
||||
typedef struct wlan_80211hdr
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ $Id$
|
||||
*/
|
||||
|
||||
#include <gpxe/pci.h>
|
||||
#include "nic.h"
|
||||
#include <nic.h>
|
||||
|
||||
#define WLAN_HOSTIF WLAN_PCI
|
||||
#include "prism2.c"
|
||||
|
@ -15,7 +15,7 @@ $Id$
|
||||
*/
|
||||
|
||||
#include <gpxe/pci.h>
|
||||
#include "nic.h"
|
||||
#include <nic.h>
|
||||
|
||||
#define WLAN_HOSTIF WLAN_PLX
|
||||
#include "prism2.c"
|
||||
|
Loading…
Reference in New Issue
Block a user