Commit 1e661086 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: remove usage of packet section macros

Removed include construction used to solve compiler differences
related to packed structure types. Now GNUC variant of packed
structure is used explicitly.
Reviewed-by: default avatarBrett Rudley <brudley@broadcom.com>
Reviewed-by: default avatarHenry Ptasinski <henryp@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarDowan Kim <dowan@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 35af8764
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
#ifndef _D11_H #ifndef _D11_H
#define _D11_H #define _D11_H
/* This marks the start of a packed structure section. */
#include <packed_section_start.h>
#ifndef WL_RSSI_ANT_MAX #ifndef WL_RSSI_ANT_MAX
#define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */ #define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
#elif WL_RSSI_ANT_MAX != 4 #elif WL_RSSI_ANT_MAX != 4
...@@ -625,11 +622,11 @@ typedef volatile struct _d11regs { ...@@ -625,11 +622,11 @@ typedef volatile struct _d11regs {
/* 802.11a PLCP header def */ /* 802.11a PLCP header def */
typedef struct ofdm_phy_hdr ofdm_phy_hdr_t; typedef struct ofdm_phy_hdr ofdm_phy_hdr_t;
BWL_PRE_PACKED_STRUCT struct ofdm_phy_hdr { struct ofdm_phy_hdr {
u8 rlpt[3]; /* rate, length, parity, tail */ u8 rlpt[3]; /* rate, length, parity, tail */
u16 service; u16 service;
u8 pad; u8 pad;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define D11A_PHY_HDR_GRATE(phdr) ((phdr)->rlpt[0] & 0x0f) #define D11A_PHY_HDR_GRATE(phdr) ((phdr)->rlpt[0] & 0x0f)
#define D11A_PHY_HDR_GRES(phdr) (((phdr)->rlpt[0] >> 4) & 0x01) #define D11A_PHY_HDR_GRES(phdr) (((phdr)->rlpt[0] >> 4) & 0x01)
...@@ -660,12 +657,12 @@ BWL_PRE_PACKED_STRUCT struct ofdm_phy_hdr { ...@@ -660,12 +657,12 @@ BWL_PRE_PACKED_STRUCT struct ofdm_phy_hdr {
/* 802.11b PLCP header def */ /* 802.11b PLCP header def */
typedef struct cck_phy_hdr cck_phy_hdr_t; typedef struct cck_phy_hdr cck_phy_hdr_t;
BWL_PRE_PACKED_STRUCT struct cck_phy_hdr { struct cck_phy_hdr {
u8 signal; u8 signal;
u8 service; u8 service;
u16 length; u16 length;
u16 crc; u16 crc;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define D11B_PHY_HDR_LEN 6 #define D11B_PHY_HDR_LEN 6
...@@ -706,7 +703,7 @@ BWL_PRE_PACKED_STRUCT struct cck_phy_hdr { ...@@ -706,7 +703,7 @@ BWL_PRE_PACKED_STRUCT struct cck_phy_hdr {
/* TX DMA buffer header */ /* TX DMA buffer header */
typedef struct d11txh d11txh_t; typedef struct d11txh d11txh_t;
BWL_PRE_PACKED_STRUCT struct d11txh { struct d11txh {
u16 MacTxControlLow; /* 0x0 */ u16 MacTxControlLow; /* 0x0 */
u16 MacTxControlHigh; /* 0x1 */ u16 MacTxControlHigh; /* 0x1 */
u16 MacFrameControl; /* 0x2 */ u16 MacFrameControl; /* 0x2 */
...@@ -741,7 +738,7 @@ BWL_PRE_PACKED_STRUCT struct d11txh { ...@@ -741,7 +738,7 @@ BWL_PRE_PACKED_STRUCT struct d11txh {
u8 RTSPhyHeader[D11_PHY_HDR_LEN]; /* 0x2c - 0x2e */ u8 RTSPhyHeader[D11_PHY_HDR_LEN]; /* 0x2c - 0x2e */
struct dot11_rts_frame rts_frame; /* 0x2f - 0x36 */ struct dot11_rts_frame rts_frame; /* 0x2f - 0x36 */
u16 PAD; /* 0x37 */ u16 PAD; /* 0x37 */
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define D11_TXH_LEN 112 /* bytes */ #define D11_TXH_LEN 112 /* bytes */
...@@ -850,7 +847,7 @@ BWL_PRE_PACKED_STRUCT struct d11txh { ...@@ -850,7 +847,7 @@ BWL_PRE_PACKED_STRUCT struct d11txh {
/* tx status packet */ /* tx status packet */
typedef struct tx_status tx_status_t; typedef struct tx_status tx_status_t;
BWL_PRE_PACKED_STRUCT struct tx_status { struct tx_status {
u16 framelen; u16 framelen;
u16 PAD; u16 PAD;
u16 frameid; u16 frameid;
...@@ -859,7 +856,7 @@ BWL_PRE_PACKED_STRUCT struct tx_status { ...@@ -859,7 +856,7 @@ BWL_PRE_PACKED_STRUCT struct tx_status {
u16 sequence; u16 sequence;
u16 phyerr; u16 phyerr;
u16 ackphyrxsh; u16 ackphyrxsh;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define TXSTATUS_LEN 16 #define TXSTATUS_LEN 16
...@@ -1243,7 +1240,7 @@ BWL_PRE_PACKED_STRUCT struct tx_status { ...@@ -1243,7 +1240,7 @@ BWL_PRE_PACKED_STRUCT struct tx_status {
#define MIMO_ANTSEL_OVERRIDE 0x8000 /* flag */ #define MIMO_ANTSEL_OVERRIDE 0x8000 /* flag */
typedef struct shm_acparams shm_acparams_t; typedef struct shm_acparams shm_acparams_t;
BWL_PRE_PACKED_STRUCT struct shm_acparams { struct shm_acparams {
u16 txop; u16 txop;
u16 cwmin; u16 cwmin;
u16 cwmax; u16 cwmax;
...@@ -1253,7 +1250,7 @@ BWL_PRE_PACKED_STRUCT struct shm_acparams { ...@@ -1253,7 +1250,7 @@ BWL_PRE_PACKED_STRUCT struct shm_acparams {
u16 reggap; u16 reggap;
u16 status; u16 status;
u16 rsvd[8]; u16 rsvd[8];
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define M_EDCF_QLEN (16 * 2) #define M_EDCF_QLEN (16 * 2)
#define WME_STATUS_NEWAC (1 << 8) #define WME_STATUS_NEWAC (1 << 8)
...@@ -1302,7 +1299,7 @@ BWL_PRE_PACKED_STRUCT struct shm_acparams { ...@@ -1302,7 +1299,7 @@ BWL_PRE_PACKED_STRUCT struct shm_acparams {
/* Receive Frame Data Header for 802.11b DCF-only frames */ /* Receive Frame Data Header for 802.11b DCF-only frames */
typedef struct d11rxhdr d11rxhdr_t; typedef struct d11rxhdr d11rxhdr_t;
BWL_PRE_PACKED_STRUCT struct d11rxhdr { struct d11rxhdr {
u16 RxFrameSize; /* Actual byte length of the frame data received */ u16 RxFrameSize; /* Actual byte length of the frame data received */
u16 PAD; u16 PAD;
u16 PhyRxStatus_0; /* PhyRxStatus 15:0 */ u16 PhyRxStatus_0; /* PhyRxStatus 15:0 */
...@@ -1315,13 +1312,13 @@ BWL_PRE_PACKED_STRUCT struct d11rxhdr { ...@@ -1315,13 +1312,13 @@ BWL_PRE_PACKED_STRUCT struct d11rxhdr {
u16 RxStatus2; /* extended MAC Rx status */ u16 RxStatus2; /* extended MAC Rx status */
u16 RxTSFTime; /* RxTSFTime time of first MAC symbol + M_PHY_PLCPRX_DLY */ u16 RxTSFTime; /* RxTSFTime time of first MAC symbol + M_PHY_PLCPRX_DLY */
u16 RxChan; /* gain code, channel radio code, and phy type */ u16 RxChan; /* gain code, channel radio code, and phy type */
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define RXHDR_LEN 24 /* sizeof d11rxhdr_t */ #define RXHDR_LEN 24 /* sizeof d11rxhdr_t */
#define FRAMELEN(h) ((h)->RxFrameSize) #define FRAMELEN(h) ((h)->RxFrameSize)
typedef struct wlc_d11rxhdr wlc_d11rxhdr_t; typedef struct wlc_d11rxhdr wlc_d11rxhdr_t;
BWL_PRE_PACKED_STRUCT struct wlc_d11rxhdr { struct wlc_d11rxhdr {
d11rxhdr_t rxhdr; d11rxhdr_t rxhdr;
u32 tsf_l; /* TSF_L reading */ u32 tsf_l; /* TSF_L reading */
s8 rssi; /* computed instanteneous rssi in BMAC */ s8 rssi; /* computed instanteneous rssi in BMAC */
...@@ -1329,7 +1326,7 @@ BWL_PRE_PACKED_STRUCT struct wlc_d11rxhdr { ...@@ -1329,7 +1326,7 @@ BWL_PRE_PACKED_STRUCT struct wlc_d11rxhdr {
s8 rxpwr1; /* obsoleted, place holder for legacy ROM code. use rxpwr[] */ s8 rxpwr1; /* obsoleted, place holder for legacy ROM code. use rxpwr[] */
s8 do_rssi_ma; /* do per-pkt sampling for per-antenna ma in HIGH */ s8 do_rssi_ma; /* do per-pkt sampling for per-antenna ma in HIGH */
s8 rxpwr[WL_RSSI_ANT_MAX]; /* rssi for supported antennas */ s8 rxpwr[WL_RSSI_ANT_MAX]; /* rssi for supported antennas */
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
/* PhyRxStatus_0: */ /* PhyRxStatus_0: */
#define PRXS0_FT_MASK 0x0003 /* NPHY only: CCK, OFDM, preN, N */ #define PRXS0_FT_MASK 0x0003 /* NPHY only: CCK, OFDM, preN, N */
...@@ -1762,9 +1759,6 @@ typedef struct macstat { ...@@ -1762,9 +1759,6 @@ typedef struct macstat {
#define TST_TXTEST_RATE_11MBPS 3 #define TST_TXTEST_RATE_11MBPS 3
#define TST_TXTEST_RATE_SHIFT 3 #define TST_TXTEST_RATE_SHIFT 3
/* This marks the end of a packed structure section. */
#include <packed_section_end.h>
#define SHM_BYT_CNT 0x2 /* IHR location */ #define SHM_BYT_CNT 0x2 /* IHR location */
#define MAX_BYT_CNT 0x600 /* Maximum frame len */ #define MAX_BYT_CNT 0x600 /* Maximum frame len */
......
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
#ifndef _dhdioctl_h_ #ifndef _dhdioctl_h_
#define _dhdioctl_h_ #define _dhdioctl_h_
/* require default structure packing */
#define BWL_DEFAULT_PACKING
#include <packed_section_start.h>
/* Linux network driver ioctl encoding */ /* Linux network driver ioctl encoding */
typedef struct dhd_ioctl { typedef struct dhd_ioctl {
uint cmd; /* common ioctl definition */ uint cmd; /* common ioctl definition */
...@@ -101,7 +97,4 @@ typedef struct dhd_pktgen { ...@@ -101,7 +97,4 @@ typedef struct dhd_pktgen {
#define DHD_IDLE_STOP (-1) /* Request SD clock be stopped #define DHD_IDLE_STOP (-1) /* Request SD clock be stopped
(and use SD1 mode) */ (and use SD1 mode) */
/* require default structure packing */
#include <packed_section_end.h>
#endif /* _dhdioctl_h_ */ #endif /* _dhdioctl_h_ */
...@@ -17,13 +17,10 @@ ...@@ -17,13 +17,10 @@
#ifndef _MSGTRACE_H #ifndef _MSGTRACE_H
#define _MSGTRACE_H #define _MSGTRACE_H
/* This marks the start of a packed structure section. */
#include <packed_section_start.h>
#define MSGTRACE_VERSION 1 #define MSGTRACE_VERSION 1
/* Message trace header */ /* Message trace header */
typedef BWL_PRE_PACKED_STRUCT struct msgtrace_hdr { typedef struct msgtrace_hdr {
u8 version; u8 version;
u8 spare; u8 spare;
u16 len; /* Len of the trace */ u16 len; /* Len of the trace */
...@@ -36,7 +33,7 @@ typedef BWL_PRE_PACKED_STRUCT struct msgtrace_hdr { ...@@ -36,7 +33,7 @@ typedef BWL_PRE_PACKED_STRUCT struct msgtrace_hdr {
trace overflow */ trace overflow */
u32 discarded_printf; /* Number of discarded printf u32 discarded_printf; /* Number of discarded printf
because of trace overflow */ because of trace overflow */
} BWL_POST_PACKED_STRUCT msgtrace_hdr_t; } __attribute__((packed)) msgtrace_hdr_t;
#define MSGTRACE_HDRLEN sizeof(msgtrace_hdr_t) #define MSGTRACE_HDRLEN sizeof(msgtrace_hdr_t)
...@@ -61,7 +58,4 @@ extern void msgtrace_put(char *buf, int count); ...@@ -61,7 +58,4 @@ extern void msgtrace_put(char *buf, int count);
extern void msgtrace_init(void *hdl1, void *hdl2, extern void msgtrace_init(void *hdl1, void *hdl2,
msgtrace_func_send_t func_send); msgtrace_func_send_t func_send);
/* This marks the end of a packed structure section. */
#include <packed_section_end.h>
#endif /* _MSGTRACE_H */ #endif /* _MSGTRACE_H */
/*
* Copyright (c) 2010 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* Error check - BWL_PACKED_SECTION is defined in packed_section_start.h
* and undefined in packed_section_end.h. If it is NOT defined at this
* point, then there is a missing include of packed_section_start.h.
*/
#ifdef BWL_PACKED_SECTION
#undef BWL_PACKED_SECTION
#else
#error "BWL_PACKED_SECTION is NOT defined!"
#endif
/* Compiler-specific directives for structure packing are declared in
* packed_section_start.h. This marks the end of the structure packing section,
* so, undef them here.
*/
#undef BWL_PRE_PACKED_STRUCT
#undef BWL_POST_PACKED_STRUCT
/*
* Copyright (c) 2010 Broadcom Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* Error check - BWL_PACKED_SECTION is defined in packed_section_start.h
* and undefined in packed_section_end.h. If it is already defined at this
* point, then there is a missing include of packed_section_end.h.
*/
#ifdef BWL_PACKED_SECTION
#error "BWL_PACKED_SECTION is already defined!"
#else
#define BWL_PACKED_SECTION
#endif
/* Declare compiler-specific directives for structure packing. */
#if defined(__GNUC__)
#define BWL_PRE_PACKED_STRUCT
#define BWL_POST_PACKED_STRUCT __attribute__((packed))
#elif defined(__CC_ARM)
#define BWL_PRE_PACKED_STRUCT __packed
#define BWL_POST_PACKED_STRUCT
#else
#error "Unknown compiler!"
#endif
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#define _802_11_H_ #define _802_11_H_
#include <proto/ethernet.h> #include <proto/ethernet.h>
#include <packed_section_start.h>
#define DOT11_A3_HDR_LEN 24 #define DOT11_A3_HDR_LEN 24
#define DOT11_A4_HDR_LEN 30 #define DOT11_A4_HDR_LEN 30
...@@ -45,7 +44,7 @@ ...@@ -45,7 +44,7 @@
#define DOT11_OUI_LEN 3 #define DOT11_OUI_LEN 3
BWL_PRE_PACKED_STRUCT struct dot11_header { struct dot11_header {
u16 fc; u16 fc;
u16 durid; u16 durid;
struct ether_addr a1; struct ether_addr a1;
...@@ -53,14 +52,14 @@ BWL_PRE_PACKED_STRUCT struct dot11_header { ...@@ -53,14 +52,14 @@ BWL_PRE_PACKED_STRUCT struct dot11_header {
struct ether_addr a3; struct ether_addr a3;
u16 seq; u16 seq;
struct ether_addr a4; struct ether_addr a4;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
BWL_PRE_PACKED_STRUCT struct dot11_rts_frame { struct dot11_rts_frame {
u16 fc; u16 fc;
u16 durid; u16 durid;
struct ether_addr ra; struct ether_addr ra;
struct ether_addr ta; struct ether_addr ta;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define DOT11_RTS_LEN 16 #define DOT11_RTS_LEN 16
#define DOT11_CTS_LEN 10 #define DOT11_CTS_LEN 10
...@@ -69,21 +68,21 @@ BWL_PRE_PACKED_STRUCT struct dot11_rts_frame { ...@@ -69,21 +68,21 @@ BWL_PRE_PACKED_STRUCT struct dot11_rts_frame {
#define DOT11_BA_BITMAP_LEN 128 #define DOT11_BA_BITMAP_LEN 128
#define DOT11_BA_LEN 4 #define DOT11_BA_LEN 4
BWL_PRE_PACKED_STRUCT struct dot11_management_header { struct dot11_management_header {
u16 fc; u16 fc;
u16 durid; u16 durid;
struct ether_addr da; struct ether_addr da;
struct ether_addr sa; struct ether_addr sa;
struct ether_addr bssid; struct ether_addr bssid;
u16 seq; u16 seq;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define DOT11_MGMT_HDR_LEN 24 #define DOT11_MGMT_HDR_LEN 24
BWL_PRE_PACKED_STRUCT struct dot11_bcn_prb { struct dot11_bcn_prb {
u32 timestamp[2]; u32 timestamp[2];
u16 beacon_interval; u16 beacon_interval;
u16 capability; u16 capability;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
#define DOT11_BCN_PRB_LEN 12 #define DOT11_BCN_PRB_LEN 12
#define WME_OUI "\x00\x50\xf2" #define WME_OUI "\x00\x50\xf2"
...@@ -102,14 +101,14 @@ typedef u8 ac_bitmap_t; ...@@ -102,14 +101,14 @@ typedef u8 ac_bitmap_t;
#define AC_BITMAP_ALL 0xf #define AC_BITMAP_ALL 0xf
#define AC_BITMAP_TST(ab, ac) (((ab) & (1 << (ac))) != 0) #define AC_BITMAP_TST(ab, ac) (((ab) & (1 << (ac))) != 0)
BWL_PRE_PACKED_STRUCT struct edcf_acparam { struct edcf_acparam {
u8 ACI; u8 ACI;
u8 ECW; u8 ECW;
u16 TXOP; u16 TXOP;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
typedef struct edcf_acparam edcf_acparam_t; typedef struct edcf_acparam edcf_acparam_t;
BWL_PRE_PACKED_STRUCT struct wme_param_ie { struct wme_param_ie {
u8 oui[3]; u8 oui[3];
u8 type; u8 type;
u8 subtype; u8 subtype;
...@@ -117,7 +116,7 @@ BWL_PRE_PACKED_STRUCT struct wme_param_ie { ...@@ -117,7 +116,7 @@ BWL_PRE_PACKED_STRUCT struct wme_param_ie {
u8 qosinfo; u8 qosinfo;
u8 rsvd; u8 rsvd;
edcf_acparam_t acparam[AC_COUNT]; edcf_acparam_t acparam[AC_COUNT];
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
typedef struct wme_param_ie wme_param_ie_t; typedef struct wme_param_ie wme_param_ie_t;
#define WME_PARAM_IE_LEN 24 #define WME_PARAM_IE_LEN 24
...@@ -253,14 +252,14 @@ typedef struct d11cnt { ...@@ -253,14 +252,14 @@ typedef struct d11cnt {
#define MCSSET_LEN 16 #define MCSSET_LEN 16
BWL_PRE_PACKED_STRUCT struct ht_cap_ie { struct ht_cap_ie {
u16 cap; u16 cap;
u8 params; u8 params;
u8 supp_mcs[MCSSET_LEN]; u8 supp_mcs[MCSSET_LEN];
u16 ext_htcap; u16 ext_htcap;
u32 txbf_cap; u32 txbf_cap;
u8 as_cap; u8 as_cap;
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
typedef struct ht_cap_ie ht_cap_ie_t; typedef struct ht_cap_ie ht_cap_ie_t;
#define HT_CAP_IE_LEN 26 #define HT_CAP_IE_LEN 26
...@@ -317,6 +316,5 @@ typedef struct ht_cap_ie ht_cap_ie_t; ...@@ -317,6 +316,5 @@ typedef struct ht_cap_ie ht_cap_ie_t;
#define AES_KEY_SIZE 16 #define AES_KEY_SIZE 16
#define BRCM_OUI "\x00\x10\x18" #define BRCM_OUI "\x00\x10\x18"
#include <packed_section_end.h>
#endif /* _802_11_H_ */ #endif /* _802_11_H_ */
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#ifndef _BCMETH_H_ #ifndef _BCMETH_H_
#define _BCMETH_H_ #define _BCMETH_H_
#include <packed_section_start.h>
#define BCMILCP_SUBTYPE_RATE 1 #define BCMILCP_SUBTYPE_RATE 1
#define BCMILCP_SUBTYPE_LINK 2 #define BCMILCP_SUBTYPE_LINK 2
#define BCMILCP_SUBTYPE_CSA 3 #define BCMILCP_SUBTYPE_CSA 3
...@@ -35,14 +33,12 @@ ...@@ -35,14 +33,12 @@
#define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8 #define BCMILCP_BCM_SUBTYPEHDR_MINLENGTH 8
#define BCMILCP_BCM_SUBTYPEHDR_VERSION 0 #define BCMILCP_BCM_SUBTYPEHDR_VERSION 0
typedef BWL_PRE_PACKED_STRUCT struct bcmeth_hdr { typedef struct bcmeth_hdr {
u16 subtype; u16 subtype;
u16 length; u16 length;
u8 version; u8 version;
u8 oui[3]; u8 oui[3];
u16 usr_subtype; u16 usr_subtype;
} BWL_POST_PACKED_STRUCT bcmeth_hdr_t; } __attribute__((packed)) bcmeth_hdr_t;
#include <packed_section_end.h>
#endif /* _BCMETH_H_ */ #endif /* _BCMETH_H_ */
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#ifndef _BCMEVENT_H_ #ifndef _BCMEVENT_H_
#define _BCMEVENT_H_ #define _BCMEVENT_H_
#include <packed_section_start.h>
#define BCM_EVENT_MSG_VERSION 1 #define BCM_EVENT_MSG_VERSION 1
#define BCM_MSG_IFNAME_MAX 16 #define BCM_MSG_IFNAME_MAX 16
...@@ -26,7 +24,7 @@ ...@@ -26,7 +24,7 @@
#define WLC_EVENT_MSG_FLUSHTXQ 0x02 #define WLC_EVENT_MSG_FLUSHTXQ 0x02
#define WLC_EVENT_MSG_GROUP 0x04 #define WLC_EVENT_MSG_GROUP 0x04
typedef BWL_PRE_PACKED_STRUCT struct { typedef struct {
u16 version; u16 version;
u16 flags; u16 flags;
u32 event_type; u32 event_type;
...@@ -36,14 +34,14 @@ typedef BWL_PRE_PACKED_STRUCT struct { ...@@ -36,14 +34,14 @@ typedef BWL_PRE_PACKED_STRUCT struct {
u32 datalen; u32 datalen;
struct ether_addr addr; struct ether_addr addr;
char ifname[BCM_MSG_IFNAME_MAX]; char ifname[BCM_MSG_IFNAME_MAX];
} BWL_POST_PACKED_STRUCT wl_event_msg_t; } __attribute__((packed)) wl_event_msg_t;
#ifdef BRCM_FULLMAC #ifdef BRCM_FULLMAC
typedef BWL_PRE_PACKED_STRUCT struct bcm_event { typedef struct bcm_event {
struct ethhdr eth; struct ethhdr eth;
bcmeth_hdr_t bcm_hdr; bcmeth_hdr_t bcm_hdr;
wl_event_msg_t event; wl_event_msg_t event;
} BWL_POST_PACKED_STRUCT bcm_event_t; } __attribute__((packed)) bcm_event_t;
#endif #endif
#define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - \ #define BCM_MSG_LEN (sizeof(bcm_event_t) - sizeof(bcmeth_hdr_t) - \
sizeof(struct ether_header)) sizeof(struct ether_header))
...@@ -212,6 +210,4 @@ typedef struct wl_event_data_if { ...@@ -212,6 +210,4 @@ typedef struct wl_event_data_if {
#define WLC_E_LINK_ASSOC_REC 3 #define WLC_E_LINK_ASSOC_REC 3
#define WLC_E_LINK_BSSCFG_DIS 4 #define WLC_E_LINK_BSSCFG_DIS 4
#include <packed_section_end.h>
#endif /* _BCMEVENT_H_ */ #endif /* _BCMEVENT_H_ */
...@@ -19,15 +19,11 @@ ...@@ -19,15 +19,11 @@
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <packed_section_start.h>
struct ether_addr {
BWL_PRE_PACKED_STRUCT struct ether_addr {
u8 octet[ETH_ALEN]; u8 octet[ETH_ALEN];
} BWL_POST_PACKED_STRUCT; } __attribute__((packed));
static const struct ether_addr ether_bcast = { {255, 255, 255, 255, 255, 255} }; static const struct ether_addr ether_bcast = { {255, 255, 255, 255, 255, 255} };
#include <packed_section_end.h>
#endif /* _NET_ETHERNET_H_ */ #endif /* _NET_ETHERNET_H_ */
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
#ifndef _sdiovar_h_ #ifndef _sdiovar_h_
#define _sdiovar_h_ #define _sdiovar_h_
/* require default structure packing */
#define BWL_DEFAULT_PACKING
#include <packed_section_start.h>
typedef struct sdreg { typedef struct sdreg {
int func; int func;
int offset; int offset;
...@@ -39,6 +35,4 @@ typedef struct sdreg { ...@@ -39,6 +35,4 @@ typedef struct sdreg {
#define NUM_PREV_TRANSACTIONS 16 #define NUM_PREV_TRANSACTIONS 16
#include <packed_section_end.h>
#endif /* _sdiovar_h_ */ #endif /* _sdiovar_h_ */
...@@ -30,10 +30,6 @@ ...@@ -30,10 +30,6 @@
#define INTF_NAME_SIZ 16 #define INTF_NAME_SIZ 16
#endif #endif
/* require default structure packing */
#define BWL_DEFAULT_PACKING
#include <packed_section_start.h>
#ifdef BRCM_FULLMAC #ifdef BRCM_FULLMAC
#define WL_BSS_INFO_VERSION 108 /* current ver of wl_bss_info struct */ #define WL_BSS_INFO_VERSION 108 /* current ver of wl_bss_info struct */
...@@ -1669,9 +1665,6 @@ typedef struct wl_pkt_filter_enable { ...@@ -1669,9 +1665,6 @@ typedef struct wl_pkt_filter_enable {
#define WLC_RSSI_INVALID 0 /* invalid RSSI value */ #define WLC_RSSI_INVALID 0 /* invalid RSSI value */
/* require default structure packing */
#include <packed_section_end.h>
/* n-mode support capability */ /* n-mode support capability */
/* 2x2 includes both 1x1 & 2x2 devices /* 2x2 includes both 1x1 & 2x2 devices
* reserved #define 2 for future when we want to separate 1x1 & 2x2 and * reserved #define 2 for future when we want to separate 1x1 & 2x2 and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment