From 0be109a759ca8f945f07ee805c1ed8de15dddc6d Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Wed, 21 Jan 2009 22:00:40 +0100 Subject: Staging: wlan-ng: Remove use of __WLAN_ATTRIB_PACK__ Replace all ocurrances of the __WLAN_ATTRIB_PACK__ from wlan_compat.h by __attribute__((packed)) and remove it afterwards. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211hdr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/staging/wlan-ng/p80211hdr.h') diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index 72f12aff3900..f4a1a34ff0a7 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -229,7 +229,7 @@ typedef struct p80211_hdr_a3 u8 a2[WLAN_ADDR_LEN]; u8 a3[WLAN_ADDR_LEN]; u16 seq; -} __WLAN_ATTRIB_PACK__ p80211_hdr_a3_t; +} __attribute__((packed)) p80211_hdr_a3_t; typedef struct p80211_hdr_a4 { @@ -240,13 +240,13 @@ typedef struct p80211_hdr_a4 u8 a3[WLAN_ADDR_LEN]; u16 seq; u8 a4[WLAN_ADDR_LEN]; -} __WLAN_ATTRIB_PACK__ p80211_hdr_a4_t; +} __attribute__((packed)) p80211_hdr_a4_t; typedef union p80211_hdr { p80211_hdr_a3_t a3; p80211_hdr_a4_t a4; -} __WLAN_ATTRIB_PACK__ p80211_hdr_t; +} __attribute__((packed)) p80211_hdr_t; /*================================================================*/ -- cgit v1.2.3 From 4e5411b91740d4afd7383844b4a908441a0b13e7 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Wed, 21 Jan 2009 22:00:41 +0100 Subject: Staging: wlan-ng: Remove use of WLAN_ADDR_LEN Replace the driver local WLAN_ADDR_LEN constant through the kernel-wide ETH_ALEN definiton. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x.h | 32 +++++++++++++++++--------------- drivers/staging/wlan-ng/p80211conv.c | 18 +++++++++--------- drivers/staging/wlan-ng/p80211hdr.h | 19 ++++++++++--------- drivers/staging/wlan-ng/p80211netdev.c | 7 ++++--- drivers/staging/wlan-ng/p80211wext.c | 5 +++-- drivers/staging/wlan-ng/prism2sta.c | 21 +++++++++++---------- 6 files changed, 54 insertions(+), 48 deletions(-) (limited to 'drivers/staging/wlan-ng/p80211hdr.h') diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index f7d69e084e65..b88bfe437822 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -61,6 +61,8 @@ #define HFA384x_LEVEL_TO_dBm(v) (0x100 + (v) * 100 / 255 - 100) +#include + /*------ Constants --------------------------------------------*/ /*--- Mins & Maxs -----------------------------------*/ #define HFA384x_CMD_ALLOC_LEN_MIN ((u16)4) @@ -450,7 +452,7 @@ Configuration RID Lengths: Network Param, Dynamic Config Entities include the len or code fields) --------------------------------------------------------------------*/ /* TODO: fill in the rest of these */ -#define HFA384x_RID_GROUPADDR_LEN ((u16)16 * WLAN_ADDR_LEN) +#define HFA384x_RID_GROUPADDR_LEN ((u16)16 * ETH_ALEN) #define HFA384x_RID_CREATEIBSS_LEN ((u16)0) #define HFA384x_RID_FRAGTHRESH_LEN ((u16)0) #define HFA384x_RID_RTSTHRESH_LEN ((u16)0) @@ -1130,7 +1132,7 @@ typedef struct hfa384x_JoinRequest_data /*-- Configuration Record: authenticateStation (data portion only) --*/ typedef struct hfa384x_authenticateStation_data { - u8 address[WLAN_ADDR_LEN]; + u8 address[ETH_ALEN]; u16 status; u16 algorithm; } __attribute__((packed)) hfa384x_authenticateStation_data_t; @@ -1138,7 +1140,7 @@ typedef struct hfa384x_authenticateStation_data /*-- Configuration Record: associateStation (data portion only) --*/ typedef struct hfa384x_associateStation_data { - u8 address[WLAN_ADDR_LEN]; + u8 address[ETH_ALEN]; u16 status; u16 type; } __attribute__((packed)) hfa384x_associateStation_data_t; @@ -1153,7 +1155,7 @@ typedef struct hfa384x_ChannelInfoRequest_data /*-- Configuration Record: WEPKeyMapping (data portion only) --*/ typedef struct hfa384x_WEPKeyMapping { - u8 address[WLAN_ADDR_LEN]; + u8 address[ETH_ALEN]; u16 key_index; u8 key[16]; u8 mic_transmit_key[4]; @@ -1880,9 +1882,9 @@ typedef struct hfa384x_LinkStatus typedef struct hfa384x_AssocStatus { u16 assocstatus; - u8 sta_addr[WLAN_ADDR_LEN]; + u8 sta_addr[ETH_ALEN]; /* old_ap_addr is only valid if assocstatus == 2 */ - u8 old_ap_addr[WLAN_ADDR_LEN]; + u8 old_ap_addr[ETH_ALEN]; u16 reason; u16 reserved; } __attribute__((packed)) hfa384x_AssocStatus_t; @@ -1891,7 +1893,7 @@ typedef struct hfa384x_AssocStatus typedef struct hfa384x_AuthRequest { - u8 sta_addr[WLAN_ADDR_LEN]; + u8 sta_addr[ETH_ALEN]; u16 algorithm; } __attribute__((packed)) hfa384x_AuthReq_t; @@ -1899,7 +1901,7 @@ typedef struct hfa384x_AuthRequest typedef struct hfa384x_AssocRequest { - u8 sta_addr[WLAN_ADDR_LEN]; + u8 sta_addr[ETH_ALEN]; u16 type; u8 wpa_data[80]; } __attribute__((packed)) hfa384x_AssocReq_t; @@ -1912,8 +1914,8 @@ typedef struct hfa384x_AssocRequest typedef struct hfa384x_MicFailure { - u8 sender[WLAN_ADDR_LEN]; - u8 dest[WLAN_ADDR_LEN]; + u8 sender[ETH_ALEN]; + u8 dest[ETH_ALEN]; } __attribute__((packed)) hfa384x_MicFailure_t; /*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/ @@ -1925,7 +1927,7 @@ typedef struct hfa384x_PSUserCount typedef struct hfa384x_KeyIDChanged { - u8 sta_addr[WLAN_ADDR_LEN]; + u8 sta_addr[ETH_ALEN]; u16 keyid; } __attribute__((packed)) hfa384x_KeyIDChanged_t; @@ -2460,7 +2462,7 @@ typedef struct hfa484x_metacmd typedef struct prism2sta_authlist { unsigned int cnt; - u8 addr[WLAN_AUTH_MAX][WLAN_ADDR_LEN]; + u8 addr[WLAN_AUTH_MAX][ETH_ALEN]; u8 assoc[WLAN_AUTH_MAX]; } prism2sta_authlist_t; @@ -2468,9 +2470,9 @@ typedef struct prism2sta_accesslist { unsigned int modify; unsigned int cnt; - u8 addr[WLAN_ACCESS_MAX][WLAN_ADDR_LEN]; + u8 addr[WLAN_ACCESS_MAX][ETH_ALEN]; unsigned int cnt1; - u8 addr1[WLAN_ACCESS_MAX][WLAN_ADDR_LEN]; + u8 addr1[WLAN_ACCESS_MAX][ETH_ALEN]; } prism2sta_accesslist_t; typedef struct hfa384x @@ -2552,7 +2554,7 @@ typedef struct hfa384x /* Group Addresses - right now, there are up to a total of MAX_GRP_ADDR group addresses */ - u8 dot11_grp_addr[MAX_GRP_ADDR][WLAN_ADDR_LEN]; + u8 dot11_grp_addr[MAX_GRP_ADDR][ETH_ALEN]; unsigned int dot11_grpcnt; /* Component Identities */ diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index dfc7b3a1e9c9..342715af82d7 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -198,21 +198,21 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb switch ( wlandev->macmode ) { case WLAN_MACMODE_IBSS_STA: - memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, WLAN_ADDR_LEN); - memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, WLAN_ADDR_LEN); - memcpy(p80211_hdr->a3.a3, wlandev->bssid, WLAN_ADDR_LEN); + memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, ETH_ALEN); + memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, ETH_ALEN); + memcpy(p80211_hdr->a3.a3, wlandev->bssid, ETH_ALEN); break; case WLAN_MACMODE_ESS_STA: fc |= host2ieee16(WLAN_SET_FC_TODS(1)); - memcpy(p80211_hdr->a3.a1, wlandev->bssid, WLAN_ADDR_LEN); - memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, WLAN_ADDR_LEN); - memcpy(p80211_hdr->a3.a3, &e_hdr.daddr, WLAN_ADDR_LEN); + memcpy(p80211_hdr->a3.a1, wlandev->bssid, ETH_ALEN); + memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, ETH_ALEN); + memcpy(p80211_hdr->a3.a3, &e_hdr.daddr, ETH_ALEN); break; case WLAN_MACMODE_ESS_AP: fc |= host2ieee16(WLAN_SET_FC_FROMDS(1)); - memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, WLAN_ADDR_LEN); - memcpy(p80211_hdr->a3.a2, wlandev->bssid, WLAN_ADDR_LEN); - memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, WLAN_ADDR_LEN); + memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, ETH_ALEN); + memcpy(p80211_hdr->a3.a2, wlandev->bssid, ETH_ALEN); + memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, ETH_ALEN); break; default: WLAN_LOG_ERROR("Error: Converting eth to wlan in unknown mode.\n"); diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index f4a1a34ff0a7..0a7163fdfcdc 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -63,6 +63,8 @@ /*================================================================*/ /* System Includes */ +#include + /*================================================================*/ /* Project Includes */ @@ -75,7 +77,6 @@ /* Constants */ /*--- Sizes -----------------------------------------------*/ -#define WLAN_ADDR_LEN 6 #define WLAN_CRC_LEN 4 #define WLAN_BSSID_LEN 6 #define WLAN_BSS_TS_LEN 8 @@ -225,9 +226,9 @@ typedef struct p80211_hdr_a3 { u16 fc; u16 dur; - u8 a1[WLAN_ADDR_LEN]; - u8 a2[WLAN_ADDR_LEN]; - u8 a3[WLAN_ADDR_LEN]; + u8 a1[ETH_ALEN]; + u8 a2[ETH_ALEN]; + u8 a3[ETH_ALEN]; u16 seq; } __attribute__((packed)) p80211_hdr_a3_t; @@ -235,11 +236,11 @@ typedef struct p80211_hdr_a4 { u16 fc; u16 dur; - u8 a1[WLAN_ADDR_LEN]; - u8 a2[WLAN_ADDR_LEN]; - u8 a3[WLAN_ADDR_LEN]; + u8 a1[ETH_ALEN]; + u8 a2[ETH_ALEN]; + u8 a3[ETH_ALEN]; u16 seq; - u8 a4[WLAN_ADDR_LEN]; + u8 a4[ETH_ALEN]; } __attribute__((packed)) p80211_hdr_a4_t; typedef union p80211_hdr @@ -282,7 +283,7 @@ inline static u16 p80211_headerlen(u16 fctl) case WLAN_FTYPE_DATA: hdrlen = WLAN_HDR_A3_LEN; if ( WLAN_GET_FC_TODS(fctl) && WLAN_GET_FC_FROMDS(fctl) ) { - hdrlen += WLAN_ADDR_LEN; + hdrlen += ETH_ALEN; } break; case WLAN_FTYPE_CTL: diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 59e5ad10dbda..8081058ebe9a 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include @@ -347,7 +348,7 @@ static void p80211netdev_rx_bh(unsigned long arg) /* perform mcast filtering */ if (wlandev->netdev->flags & IFF_ALLMULTI) { /* allow my local address through */ - if (memcmp(hdr->a1, wlandev->netdev->dev_addr, WLAN_ADDR_LEN) != 0) { + if (memcmp(hdr->a1, wlandev->netdev->dev_addr, ETH_ALEN) != 0) { /* but reject anything else that isn't multicast */ if (!(hdr->a1[0] & 0x01)) { dev_kfree_skb(skb); @@ -728,8 +729,8 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) macaddr->did = DIDmib_dot11mac_dot11OperationTable_dot11MACAddress; macaddr->status = P80211ENUM_msgitem_status_data_ok; macaddr->len = sizeof(macaddr->data); - macaddr->data.len = WLAN_ADDR_LEN; - memcpy(&macaddr->data.data, new_addr->sa_data, WLAN_ADDR_LEN); + macaddr->data.len = ETH_ALEN; + memcpy(&macaddr->data.data, new_addr->sa_data, ETH_ALEN); /* Set up the resultcode argument */ resultcode->did = DIDmsg_dot11req_mibset_resultcode; diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 0d570f1f378c..f817fe4c16f5 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -51,6 +51,7 @@ #include #include #include +#include /*================================================================*/ /* Project Includes */ @@ -1805,9 +1806,9 @@ int p80211wext_event_associated(wlandevice_t *wlandev, int assoc) /* Send the association state first */ data.ap_addr.sa_family = ARPHRD_ETHER; if (assoc) { - memcpy(data.ap_addr.sa_data, wlandev->bssid, WLAN_ADDR_LEN); + memcpy(data.ap_addr.sa_data, wlandev->bssid, ETH_ALEN); } else { - memset(data.ap_addr.sa_data, 0, WLAN_ADDR_LEN); + memset(data.ap_addr.sa_data, 0, ETH_ALEN); } if (wlan_wext_write) diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index b279c97cbc02..a871cbb158d8 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -70,6 +70,7 @@ #include #include #include +#include #include "wlan_compat.h" @@ -920,7 +921,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) /* Collect the MAC address */ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR, - wlandev->netdev->dev_addr, WLAN_ADDR_LEN); + wlandev->netdev->dev_addr, ETH_ALEN); if ( result != 0 ) { WLAN_LOG_ERROR("Failed to retrieve mac address\n"); goto failed; @@ -1588,7 +1589,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, */ for (i = 0; i < hw->authlist.cnt; i++) - if (memcmp(rec.sta_addr, hw->authlist.addr[i], WLAN_ADDR_LEN) == 0) + if (memcmp(rec.sta_addr, hw->authlist.addr[i], ETH_ALEN) == 0) break; if (i >= hw->authlist.cnt) { @@ -1662,7 +1663,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, ** authentication. */ - memcpy(rec.address, inf->info.authreq.sta_addr, WLAN_ADDR_LEN); + memcpy(rec.address, inf->info.authreq.sta_addr, ETH_ALEN); rec.status = P80211ENUM_status_unspec_failure; /* @@ -1679,7 +1680,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, for (i = 0; i < hw->authlist.cnt; i++) if (memcmp(rec.address, hw->authlist.addr[i], - WLAN_ADDR_LEN) == 0) { + ETH_ALEN) == 0) { rec.status = P80211ENUM_status_successful; break; } @@ -1715,8 +1716,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, addr = hw->allow.addr1[0]; } - for (i = 0; i < cnt; i++, addr += WLAN_ADDR_LEN) - if (memcmp(rec.address, addr, WLAN_ADDR_LEN) == 0) { + for (i = 0; i < cnt; i++, addr += ETH_ALEN) + if (memcmp(rec.address, addr, ETH_ALEN) == 0) { rec.status = P80211ENUM_status_successful; break; } @@ -1745,8 +1746,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, rec.status = P80211ENUM_status_successful; - for (i = 0; i < cnt; i++, addr += WLAN_ADDR_LEN) - if (memcmp(rec.address, addr, WLAN_ADDR_LEN) == 0) { + for (i = 0; i < cnt; i++, addr += ETH_ALEN) + if (memcmp(rec.address, addr, ETH_ALEN) == 0) { rec.status = P80211ENUM_status_unspec_failure; break; } @@ -1767,7 +1768,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, if (rec.status == P80211ENUM_status_successful) { for (i = 0; i < hw->authlist.cnt; i++) - if (memcmp(rec.address, hw->authlist.addr[i], WLAN_ADDR_LEN) == 0) + if (memcmp(rec.address, hw->authlist.addr[i], ETH_ALEN) == 0) break; if (i >= hw->authlist.cnt) { @@ -1775,7 +1776,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, rec.status = P80211ENUM_status_ap_full; } else { memcpy(hw->authlist.addr[hw->authlist.cnt], - rec.address, WLAN_ADDR_LEN); + rec.address, ETH_ALEN); hw->authlist.cnt++; added = 1; } -- cgit v1.2.3 From fa8312f1140ad0bc1a67d6cb16e5891cc0337ffe Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Wed, 21 Jan 2009 22:00:42 +0100 Subject: Staging: wlan-ng: Remove stray comments in header files The header files contain a few comments, which describe the function of the header element. Remove them where not needed. Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211conv.h | 3 --- drivers/staging/wlan-ng/p80211hdr.h | 4 ---- drivers/staging/wlan-ng/p80211ioctl.h | 4 ---- drivers/staging/wlan-ng/p80211meta.h | 15 --------------- drivers/staging/wlan-ng/p80211metamib.h | 28 ---------------------------- drivers/staging/wlan-ng/p80211metamsg.h | 28 ---------------------------- drivers/staging/wlan-ng/p80211mgmt.h | 8 -------- drivers/staging/wlan-ng/p80211msg.h | 6 ------ drivers/staging/wlan-ng/p80211netdev.h | 3 --- drivers/staging/wlan-ng/p80211req.h | 12 ------------ drivers/staging/wlan-ng/p80211types.h | 4 ---- drivers/staging/wlan-ng/prism2mgmt.h | 15 --------------- 12 files changed, 130 deletions(-) (limited to 'drivers/staging/wlan-ng/p80211hdr.h') diff --git a/drivers/staging/wlan-ng/p80211conv.h b/drivers/staging/wlan-ng/p80211conv.h index d5e880679137..8dd9f883b407 100644 --- a/drivers/staging/wlan-ng/p80211conv.h +++ b/drivers/staging/wlan-ng/p80211conv.h @@ -168,9 +168,6 @@ typedef struct wlan_snap /* Circular include trick */ struct wlandevice; -/*================================================================*/ -/* Externs */ - /*================================================================*/ /*Function Declarations */ diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index 0a7163fdfcdc..8ddc825e0ae1 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -250,10 +250,6 @@ typedef union p80211_hdr } __attribute__((packed)) p80211_hdr_t; -/*================================================================*/ -/* Extern Declarations */ - - /*================================================================*/ /* Function Declarations */ diff --git a/drivers/staging/wlan-ng/p80211ioctl.h b/drivers/staging/wlan-ng/p80211ioctl.h index e9795a5a56f7..d964d411cc7d 100644 --- a/drivers/staging/wlan-ng/p80211ioctl.h +++ b/drivers/staging/wlan-ng/p80211ioctl.h @@ -90,10 +90,6 @@ #define P80211_NL_MCAST_GRP_SNIFF BIT1 /* Sniffer messages */ #define P80211_NL_MCAST_GRP_DIST BIT2 /* Distribution system messages */ -/*================================================================*/ -/* Macros */ - - /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211meta.h b/drivers/staging/wlan-ng/p80211meta.h index 8b61e5fc292b..e56a84823ba5 100644 --- a/drivers/staging/wlan-ng/p80211meta.h +++ b/drivers/staging/wlan-ng/p80211meta.h @@ -57,9 +57,6 @@ #ifndef _P80211META_H #define _P80211META_H -/*================================================================*/ -/* System Includes */ - /*================================================================*/ /* Project Includes */ @@ -67,12 +64,6 @@ #include "wlan_compat.h" #endif -/*================================================================*/ -/* Constants */ - -/*----------------------------------------------------------------*/ -/* */ - /*================================================================*/ /* Macros */ @@ -139,12 +130,6 @@ typedef struct catlistitem grplistitem_t *grplist; } catlistitem_t; -/*================================================================*/ -/* Extern Declarations */ - -/*----------------------------------------------------------------*/ -/* */ - /*================================================================*/ /* Function Declarations */ diff --git a/drivers/staging/wlan-ng/p80211metamib.h b/drivers/staging/wlan-ng/p80211metamib.h index 9cd72ede441c..444f8e05b072 100644 --- a/drivers/staging/wlan-ng/p80211metamib.h +++ b/drivers/staging/wlan-ng/p80211metamib.h @@ -57,9 +57,6 @@ #ifndef _P80211METAMIB_H #define _P80211METAMIB_H -/*================================================================*/ -/* System Includes */ - /*================================================================*/ /* Project Includes */ @@ -67,24 +64,6 @@ #include "wlan_compat.h" #endif -/*================================================================*/ -/* Constants */ - -/*----------------------------------------------------------------*/ -/* */ - -/*================================================================*/ -/* Macros */ - -/*----------------------------------------------------------------*/ -/* */ - -/*================================================================*/ -/* Types */ - -/*----------------------------------------------------------------*/ -/* */ - /*================================================================*/ /* Extern Declarations */ @@ -95,11 +74,4 @@ extern catlistitem_t mib_catlist[]; extern u32 mib_catlist_size; - -/*================================================================*/ -/* Function Declarations */ - -/*----------------------------------------------------------------*/ -/* */ - #endif /* _P80211METAMIB_H */ diff --git a/drivers/staging/wlan-ng/p80211metamsg.h b/drivers/staging/wlan-ng/p80211metamsg.h index 6e659eae8afc..979b01dafb6a 100644 --- a/drivers/staging/wlan-ng/p80211metamsg.h +++ b/drivers/staging/wlan-ng/p80211metamsg.h @@ -57,9 +57,6 @@ #ifndef _P80211METAMSG_H #define _P80211METAMSG_H -/*================================================================*/ -/* System Includes */ - /*================================================================*/ /* Project Includes */ @@ -67,24 +64,6 @@ #include "wlan_compat.h" #endif -/*================================================================*/ -/* Constants */ - -/*----------------------------------------------------------------*/ -/* */ - -/*================================================================*/ -/* Macros */ - -/*----------------------------------------------------------------*/ -/* */ - -/*================================================================*/ -/* Types */ - -/*----------------------------------------------------------------*/ -/* */ - /*================================================================*/ /* Extern Declarations */ @@ -95,11 +74,4 @@ extern catlistitem_t msg_catlist[]; extern u32 msg_catlist_size; - -/*================================================================*/ -/* Function Declarations */ - -/*----------------------------------------------------------------*/ -/* */ - #endif /* _P80211METAMSG_H */ diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index ae46e8c4295a..15da83e54ff4 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -100,9 +100,6 @@ #ifndef _P80211MGMT_H #define _P80211MGMT_H -/*================================================================*/ -/* System Includes */ - /*================================================================*/ /* Project Includes */ @@ -542,11 +539,6 @@ typedef struct wlan_fr_deauthen } wlan_fr_deauthen_t; - -/*================================================================*/ -/* Extern Declarations */ - - /*================================================================*/ /* Function Declarations */ diff --git a/drivers/staging/wlan-ng/p80211msg.h b/drivers/staging/wlan-ng/p80211msg.h index 0281ddca2bf1..7f83d99d9cdf 100644 --- a/drivers/staging/wlan-ng/p80211msg.h +++ b/drivers/staging/wlan-ng/p80211msg.h @@ -48,9 +48,6 @@ #ifndef _P80211MSG_H #define _P80211MSG_H -/*================================================================*/ -/* System Includes */ - /*================================================================*/ /* Project Includes */ @@ -64,9 +61,6 @@ #define MSG_BUFF_LEN 4000 #define WLAN_DEVNAMELEN_MAX 16 -/*================================================================*/ -/* Macros */ - /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index 940146fba9c1..845c02807976 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -104,9 +104,6 @@ #define P80211_NSDCAP_AUTOJOIN 0x100 /* nsd does autojoin */ #define P80211_NSDCAP_NOSCAN 0x200 /* nsd can scan */ -/*================================================================*/ -/* Macros */ - /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211req.h b/drivers/staging/wlan-ng/p80211req.h index 497a4d6eb59a..a277381f2337 100644 --- a/drivers/staging/wlan-ng/p80211req.h +++ b/drivers/staging/wlan-ng/p80211req.h @@ -48,18 +48,6 @@ #ifndef _LINUX_P80211REQ_H #define _LINUX_P80211REQ_H -/*================================================================*/ -/* Constants */ - -/*================================================================*/ -/* Macros */ - -/*================================================================*/ -/* Types */ - -/*================================================================*/ -/* Externs */ - /*================================================================*/ /* Function Declarations */ diff --git a/drivers/staging/wlan-ng/p80211types.h b/drivers/staging/wlan-ng/p80211types.h index 122e74b7a2d0..b2591f700496 100644 --- a/drivers/staging/wlan-ng/p80211types.h +++ b/drivers/staging/wlan-ng/p80211types.h @@ -57,10 +57,6 @@ #ifndef _P80211TYPES_H #define _P80211TYPES_H -/*================================================================*/ -/* System Includes */ -/*================================================================*/ - /*================================================================*/ /* Project Includes */ /*================================================================*/ diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h index caf808d57966..88e8bd041810 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.h +++ b/drivers/staging/wlan-ng/prism2mgmt.h @@ -61,15 +61,6 @@ #define _PRISM2MGMT_H -/*=============================================================*/ -/*------ Constants --------------------------------------------*/ - -/*=============================================================*/ -/*------ Macros -----------------------------------------------*/ - -/*=============================================================*/ -/*------ Types and their related constants --------------------*/ - /*=============================================================*/ /*------ Static variable externs ------------------------------*/ @@ -146,10 +137,4 @@ void prism2sta_processing_defer(struct work_struct *data); void prism2sta_commsqual_defer(struct work_struct *data); void prism2sta_commsqual_timer(unsigned long data); -/*=============================================================*/ -/*--- Inline Function Definitions (if supported) --------------*/ -/*=============================================================*/ - - - #endif -- cgit v1.2.3 From fb2f541bb40939314ef40e0d3abb9beb1e396570 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:54:55 +0100 Subject: Staging: wlan-ng: Replace BITx with the generic BIT(x) Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x.h | 176 ++++++++++++++++----------------- drivers/staging/wlan-ng/p80211hdr.h | 28 +++--- drivers/staging/wlan-ng/p80211ioctl.h | 6 +- drivers/staging/wlan-ng/p80211mgmt.h | 16 +-- drivers/staging/wlan-ng/p80211netdev.h | 10 +- drivers/staging/wlan-ng/p80211wext.c | 3 +- drivers/staging/wlan-ng/prism2mgmt.c | 11 ++- drivers/staging/wlan-ng/prism2mib.c | 17 ++-- drivers/staging/wlan-ng/prism2sta.c | 5 +- drivers/staging/wlan-ng/wlan_compat.h | 38 ------- 10 files changed, 138 insertions(+), 172 deletions(-) (limited to 'drivers/staging/wlan-ng/p80211hdr.h') diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index b88bfe437822..d3f3cce76eee 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -97,17 +97,17 @@ #define HFA384x_PORTTYPE_WDS ((u16)2) #define HFA384x_PORTTYPE_PSUEDOIBSS ((u16)3) #define HFA384x_PORTTYPE_HOSTAP ((u16)6) -#define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT0) -#define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT1) -#define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT4) -#define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT7) -#define HFA384x_WEPFLAGS_DISALLOW_MIXED ((u16)BIT11) +#define HFA384x_WEPFLAGS_PRIVINVOKED ((u16)BIT(0)) +#define HFA384x_WEPFLAGS_EXCLUDE ((u16)BIT(1)) +#define HFA384x_WEPFLAGS_DISABLE_TXCRYPT ((u16)BIT(4)) +#define HFA384x_WEPFLAGS_DISABLE_RXCRYPT ((u16)BIT(7)) +#define HFA384x_WEPFLAGS_DISALLOW_MIXED ((u16)BIT(11)) #define HFA384x_WEPFLAGS_IV_intERVAL1 ((u16)0) -#define HFA384x_WEPFLAGS_IV_intERVAL10 ((u16)BIT5) -#define HFA384x_WEPFLAGS_IV_intERVAL50 ((u16)BIT6) -#define HFA384x_WEPFLAGS_IV_intERVAL100 ((u16)(BIT5 | BIT6)) -#define HFA384x_WEPFLAGS_FIRMWARE_WPA ((u16)BIT8) -#define HFA384x_WEPFLAGS_HOST_MIC ((u16)BIT9) +#define HFA384x_WEPFLAGS_IV_intERVAL10 ((u16)BIT(5)) +#define HFA384x_WEPFLAGS_IV_intERVAL50 ((u16)BIT(6)) +#define HFA384x_WEPFLAGS_IV_intERVAL100 ((u16)(BIT(5) | BIT(6))) +#define HFA384x_WEPFLAGS_FIRMWARE_WPA ((u16)BIT(8)) +#define HFA384x_WEPFLAGS_HOST_MIC ((u16)BIT(9)) #define HFA384x_ROAMMODE_FWSCAN_FWROAM ((u16)1) #define HFA384x_ROAMMODE_FWSCAN_HOSTROAM ((u16)2) #define HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM ((u16)3) @@ -248,59 +248,59 @@ #define HFA384x_PCI_M1_CTL_OFF (0xac) /*--- Register Field Masks --------------------------*/ -#define HFA384x_CMD_BUSY ((u16)BIT15) -#define HFA384x_CMD_AINFO ((u16)(BIT14 | BIT13 | BIT12 | BIT11 | BIT10 | BIT9 | BIT8)) -#define HFA384x_CMD_MACPORT ((u16)(BIT10 | BIT9 | BIT8)) -#define HFA384x_CMD_RECL ((u16)BIT8) -#define HFA384x_CMD_WRITE ((u16)BIT8) -#define HFA384x_CMD_PROGMODE ((u16)(BIT9 | BIT8)) -#define HFA384x_CMD_CMDCODE ((u16)(BIT5 | BIT4 | BIT3 | BIT2 | BIT1 | BIT0)) - -#define HFA384x_STATUS_RESULT ((u16)(BIT14 | BIT13 | BIT12 | BIT11 | BIT10 | BIT9 | BIT8)) -#define HFA384x_STATUS_CMDCODE ((u16)(BIT5 | BIT4 | BIT3 | BIT2 | BIT1 | BIT0)) - -#define HFA384x_OFFSET_BUSY ((u16)BIT15) -#define HFA384x_OFFSET_ERR ((u16)BIT14) -#define HFA384x_OFFSET_DATAOFF ((u16)(BIT11 | BIT10 | BIT9 | BIT8 | BIT7 | BIT6 | BIT5 | BIT4 | BIT3 | BIT2 | BIT1)) - -#define HFA384x_EVSTAT_TICK ((u16)BIT15) -#define HFA384x_EVSTAT_WTERR ((u16)BIT14) -#define HFA384x_EVSTAT_INFDROP ((u16)BIT13) -#define HFA384x_EVSTAT_INFO ((u16)BIT7) -#define HFA384x_EVSTAT_DTIM ((u16)BIT5) -#define HFA384x_EVSTAT_CMD ((u16)BIT4) -#define HFA384x_EVSTAT_ALLOC ((u16)BIT3) -#define HFA384x_EVSTAT_TXEXC ((u16)BIT2) -#define HFA384x_EVSTAT_TX ((u16)BIT1) -#define HFA384x_EVSTAT_RX ((u16)BIT0) +#define HFA384x_CMD_BUSY ((u16)BIT(15)) +#define HFA384x_CMD_AINFO ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_CMD_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_CMD_RECL ((u16)BIT(8)) +#define HFA384x_CMD_WRITE ((u16)BIT(8)) +#define HFA384x_CMD_PROGMODE ((u16)(BIT(9) | BIT(8))) +#define HFA384x_CMD_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0))) + +#define HFA384x_STATUS_RESULT ((u16)(BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_STATUS_CMDCODE ((u16)(BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1) | BIT(0))) + +#define HFA384x_OFFSET_BUSY ((u16)BIT(15)) +#define HFA384x_OFFSET_ERR ((u16)BIT(14)) +#define HFA384x_OFFSET_DATAOFF ((u16)(BIT(11) | BIT(10) | BIT(9) | BIT(8) | BIT(7) | BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2) | BIT(1))) + +#define HFA384x_EVSTAT_TICK ((u16)BIT(15)) +#define HFA384x_EVSTAT_WTERR ((u16)BIT(14)) +#define HFA384x_EVSTAT_INFDROP ((u16)BIT(13)) +#define HFA384x_EVSTAT_INFO ((u16)BIT(7)) +#define HFA384x_EVSTAT_DTIM ((u16)BIT(5)) +#define HFA384x_EVSTAT_CMD ((u16)BIT(4)) +#define HFA384x_EVSTAT_ALLOC ((u16)BIT(3)) +#define HFA384x_EVSTAT_TXEXC ((u16)BIT(2)) +#define HFA384x_EVSTAT_TX ((u16)BIT(1)) +#define HFA384x_EVSTAT_RX ((u16)BIT(0) #define HFA384x_int_BAP_OP (HFA384x_EVSTAT_INFO|HFA384x_EVSTAT_RX|HFA384x_EVSTAT_TX|HFA384x_EVSTAT_TXEXC) #define HFA384x_int_NORMAL (HFA384x_EVSTAT_INFO|HFA384x_EVSTAT_RX|HFA384x_EVSTAT_TX|HFA384x_EVSTAT_TXEXC|HFA384x_EVSTAT_INFDROP|HFA384x_EVSTAT_ALLOC|HFA384x_EVSTAT_DTIM) -#define HFA384x_intEN_TICK ((u16)BIT15) -#define HFA384x_intEN_WTERR ((u16)BIT14) -#define HFA384x_intEN_INFDROP ((u16)BIT13) -#define HFA384x_intEN_INFO ((u16)BIT7) -#define HFA384x_intEN_DTIM ((u16)BIT5) -#define HFA384x_intEN_CMD ((u16)BIT4) -#define HFA384x_intEN_ALLOC ((u16)BIT3) -#define HFA384x_intEN_TXEXC ((u16)BIT2) -#define HFA384x_intEN_TX ((u16)BIT1) -#define HFA384x_intEN_RX ((u16)BIT0) - -#define HFA384x_EVACK_TICK ((u16)BIT15) -#define HFA384x_EVACK_WTERR ((u16)BIT14) -#define HFA384x_EVACK_INFDROP ((u16)BIT13) -#define HFA384x_EVACK_INFO ((u16)BIT7) -#define HFA384x_EVACK_DTIM ((u16)BIT5) -#define HFA384x_EVACK_CMD ((u16)BIT4) -#define HFA384x_EVACK_ALLOC ((u16)BIT3) -#define HFA384x_EVACK_TXEXC ((u16)BIT2) -#define HFA384x_EVACK_TX ((u16)BIT1) -#define HFA384x_EVACK_RX ((u16)BIT0) - -#define HFA384x_CONTROL_AUXEN ((u16)(BIT15 | BIT14)) +#define HFA384x_intEN_TICK ((u16)BIT(15)) +#define HFA384x_intEN_WTERR ((u16)BIT(14)) +#define HFA384x_intEN_INFDROP ((u16)BIT(13)) +#define HFA384x_intEN_INFO ((u16)BIT(7)) +#define HFA384x_intEN_DTIM ((u16)BIT(5)) +#define HFA384x_intEN_CMD ((u16)BIT(4)) +#define HFA384x_intEN_ALLOC ((u16)BIT(3)) +#define HFA384x_intEN_TXEXC ((u16)BIT(2)) +#define HFA384x_intEN_TX ((u16)BIT(1)) +#define HFA384x_intEN_RX ((u16)BIT(0) + +#define HFA384x_EVACK_TICK ((u16)BIT(15)) +#define HFA384x_EVACK_WTERR ((u16)BIT(14)) +#define HFA384x_EVACK_INFDROP ((u16)BIT(13)) +#define HFA384x_EVACK_INFO ((u16)BIT(7)) +#define HFA384x_EVACK_DTIM ((u16)BIT(5)) +#define HFA384x_EVACK_CMD ((u16)BIT(4)) +#define HFA384x_EVACK_ALLOC ((u16)BIT(3)) +#define HFA384x_EVACK_TXEXC ((u16)BIT(2)) +#define HFA384x_EVACK_TX ((u16)BIT(1)) +#define HFA384x_EVACK_RX ((u16)BIT(0) + +#define HFA384x_CONTROL_AUXEN ((u16)(BIT(15) | BIT(14))) /*--- Command Code Constants --------------------------*/ @@ -883,11 +883,11 @@ PD Record codes /*=============================================================*/ /*------ Types and their related constants --------------------*/ -#define HFA384x_HOSTAUTHASSOC_HOSTAUTH BIT0 -#define HFA384x_HOSTAUTHASSOC_HOSTASSOC BIT1 +#define HFA384x_HOSTAUTHASSOC_HOSTAUTH BIT(0) +#define HFA384x_HOSTAUTHASSOC_HOSTASSOC BIT(1) #define HFA384x_WHAHANDLING_DISABLED 0 -#define HFA384x_WHAHANDLING_PASSTHROUGH BIT1 +#define HFA384x_WHAHANDLING_PASSTHROUGH BIT(1) /*-------------------------------------------------------------*/ /* Commonly used basic types */ @@ -1518,11 +1518,11 @@ typedef struct hfa384x_LFOStatus u16 VRHFOResult; } __attribute__((packed)) hfa384x_LFOStatus_t; -#define HFA384x_TESTRESULT_ALLPASSED BIT0 -#define HFA384x_TESTRESULT_LFO_FAIL BIT1 -#define HFA384x_TESTRESULT_VR_HF0_FAIL BIT2 -#define HFA384x_HOST_FIRM_COORDINATE BIT7 -#define HFA384x_TESTRESULT_COORDINATE BIT15 +#define HFA384x_TESTRESULT_ALLPASSED BIT(0) +#define HFA384x_TESTRESULT_LFO_FAIL BIT(1) +#define HFA384x_TESTRESULT_VR_HF0_FAIL BIT(2) +#define HFA384x_HOST_FIRM_COORDINATE BIT(7) +#define HFA384x_TESTRESULT_COORDINATE BIT(15) /*-- Information Record: LEDControl --*/ typedef struct hfa384x_LEDControl @@ -1606,20 +1606,20 @@ typedef struct hfa384x_tx_frame Communication Frames: Field Masks for Transmit Frames --------------------------------------------------------------------*/ /*-- Status Field --*/ -#define HFA384x_TXSTATUS_ACKERR ((u16)BIT5) -#define HFA384x_TXSTATUS_FORMERR ((u16)BIT3) -#define HFA384x_TXSTATUS_DISCON ((u16)BIT2) -#define HFA384x_TXSTATUS_AGEDERR ((u16)BIT1) -#define HFA384x_TXSTATUS_RETRYERR ((u16)BIT0) +#define HFA384x_TXSTATUS_ACKERR ((u16)BIT(5)) +#define HFA384x_TXSTATUS_FORMERR ((u16)BIT(3)) +#define HFA384x_TXSTATUS_DISCON ((u16)BIT(2)) +#define HFA384x_TXSTATUS_AGEDERR ((u16)BIT(1)) +#define HFA384x_TXSTATUS_RETRYERR ((u16)BIT(0)) /*-- Transmit Control Field --*/ -#define HFA384x_TX_CFPOLL ((u16)BIT12) -#define HFA384x_TX_PRST ((u16)BIT11) -#define HFA384x_TX_MACPORT ((u16)(BIT10 | BIT9 | BIT8)) -#define HFA384x_TX_NOENCRYPT ((u16)BIT7) -#define HFA384x_TX_RETRYSTRAT ((u16)(BIT6 | BIT5)) -#define HFA384x_TX_STRUCTYPE ((u16)(BIT4 | BIT3)) -#define HFA384x_TX_TXEX ((u16)BIT2) -#define HFA384x_TX_TXOK ((u16)BIT1) +#define HFA384x_TX_CFPOLL ((u16)BIT(12)) +#define HFA384x_TX_PRST ((u16)BIT(11)) +#define HFA384x_TX_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_TX_NOENCRYPT ((u16)BIT(7)) +#define HFA384x_TX_RETRYSTRAT ((u16)(BIT(6) | BIT(5))) +#define HFA384x_TX_STRUCTYPE ((u16)(BIT(4) | BIT(3))) +#define HFA384x_TX_TXEX ((u16)BIT(2)) +#define HFA384x_TX_TXOK ((u16)BIT(1)) /*-------------------------------------------------------------------- Communication Frames: Test/Get/Set Field Values for Transmit Frames --------------------------------------------------------------------*/ @@ -1695,10 +1695,10 @@ Communication Frames: Field Masks for Receive Frames #define HFA384x_RX_DATA_OFF ((u16)60) /*-- Status Fields --*/ -#define HFA384x_RXSTATUS_MSGTYPE ((u16)(BIT15 | BIT14 | BIT13)) -#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT10 | BIT9 | BIT8)) -#define HFA384x_RXSTATUS_UNDECR ((u16)BIT1) -#define HFA384x_RXSTATUS_FCSERR ((u16)BIT0) +#define HFA384x_RXSTATUS_MSGTYPE ((u16)(BIT(15) | BIT(14) | BIT(13))) +#define HFA384x_RXSTATUS_MACPORT ((u16)(BIT(10) | BIT(9) | BIT(8))) +#define HFA384x_RXSTATUS_UNDECR ((u16)BIT(1)) +#define HFA384x_RXSTATUS_FCSERR ((u16)BIT(0)) /*-------------------------------------------------------------------- Communication Frames: Test/Get/Set Field Values for Receive Frames --------------------------------------------------------------------*/ @@ -1822,8 +1822,8 @@ typedef struct hfa384x_ChInfoResultSub u16 active; } __attribute__((packed)) hfa384x_ChInfoResultSub_t; -#define HFA384x_CHINFORESULT_BSSACTIVE BIT0 -#define HFA384x_CHINFORESULT_PCFACTIVE BIT1 +#define HFA384x_CHINFORESULT_BSSACTIVE BIT(0) +#define HFA384x_CHINFORESULT_PCFACTIVE BIT(1) typedef struct hfa384x_ChInfoResult { @@ -2444,9 +2444,9 @@ typedef struct hfa484x_metacmd #define MAX_GRP_ADDR 32 #define WLAN_COMMENT_MAX 80 /* Max. length of user comment string. */ -#define MM_SAT_PCF (BIT14) -#define MM_GCSD_PCF (BIT15) -#define MM_GCSD_PCF_EB (BIT14 | BIT15) +#define MM_SAT_PCF (BIT(14)) +#define MM_GCSD_PCF (BIT(15)) +#define MM_GCSD_PCF_EB (BIT(14) | BIT(15)) #define WLAN_STATE_STOPPED 0 /* Network is not active. */ #define WLAN_STATE_STARTED 1 /* Network has been started. */ diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index 8ddc825e0ae1..edcfbc6b493a 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -167,17 +167,17 @@ /* SET_FC_FSTYPE(WLAN_FSTYPE_RTS) ); */ /*------------------------------------------------------------*/ -#define WLAN_GET_FC_PVER(n) (((u16)(n)) & (BIT0 | BIT1)) -#define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT2 | BIT3)) >> 2) -#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4) -#define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT8)) >> 8) -#define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT9)) >> 9) -#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT10)) >> 10) -#define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT11)) >> 11) -#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT12)) >> 12) -#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT13)) >> 13) -#define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT14)) >> 14) -#define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT15)) >> 15) +#define WLAN_GET_FC_PVER(n) (((u16)(n)) & (BIT(0) | BIT(1))) +#define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT(2) | BIT(3))) >> 2) +#define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT(4)|BIT(5)|BIT(6)|BIT(7))) >> 4) +#define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT(8))) >> 8) +#define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT(9))) >> 9) +#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT(10))) >> 10) +#define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT(11))) >> 11) +#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT(12))) >> 12) +#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT(13))) >> 13) +#define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT(14))) >> 14) +#define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT(15))) >> 15) #define WLAN_SET_FC_PVER(n) ((u16)(n)) #define WLAN_SET_FC_FTYPE(n) (((u16)(n)) << 2) @@ -202,8 +202,8 @@ /* Macros to get/set the bitfields of the Sequence Control */ /* Field. */ /*------------------------------------------------------------*/ -#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT0|BIT1|BIT2|BIT3)) -#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4) +#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT(0)|BIT(1)|BIT(2)|BIT(3))) +#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT(0)|BIT(1)|BIT(2)|BIT(3)))) >> 4) /*--- Data ptr macro -----------------------------------------*/ /* Creates a u8* to the data portion of a frame */ @@ -212,7 +212,7 @@ #define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN) #define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN) -#define DOT11_RATE5_ISBASIC_GET(r) (((u8)(r)) & BIT7) +#define DOT11_RATE5_ISBASIC_GET(r) (((u8)(r)) & BIT(7)) /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211ioctl.h b/drivers/staging/wlan-ng/p80211ioctl.h index d964d411cc7d..7b0f3e09c0ba 100644 --- a/drivers/staging/wlan-ng/p80211ioctl.h +++ b/drivers/staging/wlan-ng/p80211ioctl.h @@ -86,9 +86,9 @@ /*----------------------------------------------------------------*/ /* Netlink multicast bits for different types of messages */ -#define P80211_NL_MCAST_GRP_MLME BIT0 /* Local station messages */ -#define P80211_NL_MCAST_GRP_SNIFF BIT1 /* Sniffer messages */ -#define P80211_NL_MCAST_GRP_DIST BIT2 /* Distribution system messages */ +#define P80211_NL_MCAST_GRP_MLME BIT(0) /* Local station messages */ +#define P80211_NL_MCAST_GRP_SNIFF BIT(1) /* Sniffer messages */ +#define P80211_NL_MCAST_GRP_DIST BIT(2) /* Distribution system messages */ /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index 15da83e54ff4..0450fd301c58 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -213,15 +213,15 @@ /* Macros */ /*-- Capability Field ---------------------------*/ -#define WLAN_GET_MGMT_CAP_INFO_ESS(n) ((n) & BIT0) -#define WLAN_GET_MGMT_CAP_INFO_IBSS(n) (((n) & BIT1) >> 1) -#define WLAN_GET_MGMT_CAP_INFO_CFPOLLABLE(n) (((n) & BIT2) >> 2) -#define WLAN_GET_MGMT_CAP_INFO_CFPOLLREQ(n) (((n) & BIT3) >> 3) -#define WLAN_GET_MGMT_CAP_INFO_PRIVACY(n) (((n) & BIT4) >> 4) +#define WLAN_GET_MGMT_CAP_INFO_ESS(n) ((n) & BIT(0)) +#define WLAN_GET_MGMT_CAP_INFO_IBSS(n) (((n) & BIT(1)) >> 1) +#define WLAN_GET_MGMT_CAP_INFO_CFPOLLABLE(n) (((n) & BIT(2)) >> 2) +#define WLAN_GET_MGMT_CAP_INFO_CFPOLLREQ(n) (((n) & BIT(3)) >> 3) +#define WLAN_GET_MGMT_CAP_INFO_PRIVACY(n) (((n) & BIT(4)) >> 4) /* p80211b additions */ -#define WLAN_GET_MGMT_CAP_INFO_SHORT(n) (((n) & BIT5) >> 5) -#define WLAN_GET_MGMT_CAP_INFO_PBCC(n) (((n) & BIT6) >> 6) -#define WLAN_GET_MGMT_CAP_INFO_AGILITY(n) (((n) & BIT7) >> 7) +#define WLAN_GET_MGMT_CAP_INFO_SHORT(n) (((n) & BIT(5)) >> 5) +#define WLAN_GET_MGMT_CAP_INFO_PBCC(n) (((n) & BIT(6)) >> 6) +#define WLAN_GET_MGMT_CAP_INFO_AGILITY(n) (((n) & BIT(7)) >> 7) #define WLAN_SET_MGMT_CAP_INFO_ESS(n) (n) #define WLAN_SET_MGMT_CAP_INFO_IBSS(n) ((n) << 1) diff --git a/drivers/staging/wlan-ng/p80211netdev.h b/drivers/staging/wlan-ng/p80211netdev.h index 456f1d351aa1..40785ae8d575 100644 --- a/drivers/staging/wlan-ng/p80211netdev.h +++ b/drivers/staging/wlan-ng/p80211netdev.h @@ -158,11 +158,11 @@ int p80211wext_event_associated(struct wlandevice *wlandev, int assoc); #define NUM_WEPKEYS 4 #define MAX_KEYLEN 32 -#define HOSTWEP_DEFAULTKEY_MASK (BIT1|BIT0) -#define HOSTWEP_DECRYPT BIT4 -#define HOSTWEP_ENCRYPT BIT5 -#define HOSTWEP_PRIVACYINVOKED BIT6 -#define HOSTWEP_EXCLUDEUNENCRYPTED BIT7 +#define HOSTWEP_DEFAULTKEY_MASK (BIT(1)|BIT(0)) +#define HOSTWEP_DECRYPT BIT(4) +#define HOSTWEP_ENCRYPT BIT(5) +#define HOSTWEP_PRIVACYINVOKED BIT(6) +#define HOSTWEP_EXCLUDEUNENCRYPTED BIT(7) extern int wlan_watchdog; extern int wlan_wext_write; diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 9c4c934731f3..062826b58b77 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -52,6 +52,7 @@ #include #include #include +#include /*================================================================*/ /* Project Includes */ @@ -126,7 +127,7 @@ static const long p80211wext_channel_freq[] = { #define NUM_CHANNELS ARRAY_SIZE(p80211wext_channel_freq) /* steal a spare bit to store the shared/opensystems state. should default to open if not set */ -#define HOSTWEP_SHAREDKEY BIT3 +#define HOSTWEP_SHAREDKEY BIT(3) /** function declarations =============== */ diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index b1055af8c249..6f0d39f2ea68 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -76,6 +76,7 @@ #include #include #include +#include #include "wlan_compat.h" @@ -94,10 +95,10 @@ #include "prism2mgmt.h" /* Converts 802.11 format rate specifications to prism2 */ -#define p80211rate_to_p2bit(n) ((((n)&~BIT7) == 2) ? BIT0 : \ - (((n)&~BIT7) == 4) ? BIT1 : \ - (((n)&~BIT7) == 11) ? BIT2 : \ - (((n)&~BIT7) == 22) ? BIT3 : 0) +#define p80211rate_to_p2bit(n) ((((n)&~BIT(7)) == 2) ? BIT(0) : \ + (((n)&~BIT(7)) == 4) ? BIT(1) : \ + (((n)&~BIT(7)) == 11) ? BIT(2) : \ + (((n)&~BIT(7)) == 22) ? BIT(3) : 0) /*---------------------------------------------------------------- * prism2mgmt_scan @@ -196,7 +197,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp) for (i = 0; i < msg->channellist.data.len; i++) { u8 channel = msg->channellist.data.data[i]; if (channel > 14) continue; - /* channel 1 is BIT0 ... channel 14 is BIT13 */ + /* channel 1 is BIT 0 ... channel 14 is BIT 13 */ word |= (1 << (channel-1)); } scanreq.channelList = host2hfa384x_16(word); diff --git a/drivers/staging/wlan-ng/prism2mib.c b/drivers/staging/wlan-ng/prism2mib.c index 873b29f1944a..99c6792eb03b 100644 --- a/drivers/staging/wlan-ng/prism2mib.c +++ b/drivers/staging/wlan-ng/prism2mib.c @@ -67,6 +67,7 @@ #include #include #include +#include /*================================================================*/ /* Project Includes */ @@ -996,28 +997,28 @@ void prism2mgmt_get_oprateset(u16 *rate, p80211pstrd_t *pstr) datarate = pstr->data; /* 1 Mbps */ - if ( BIT0 & (*rate) ) { + if ( BIT(0) & (*rate) ) { len += (u8)1; *datarate = (u8)2; datarate++; } /* 2 Mbps */ - if ( BIT1 & (*rate) ) { + if ( BIT(1) & (*rate) ) { len += (u8)1; *datarate = (u8)4; datarate++; } /* 5.5 Mbps */ - if ( BIT2 & (*rate) ) { + if ( BIT(2) & (*rate) ) { len += (u8)1; *datarate = (u8)11; datarate++; } /* 11 Mbps */ - if ( BIT3 & (*rate) ) { + if ( BIT(3) & (*rate) ) { len += (u8)1; *datarate = (u8)22; datarate++; @@ -1055,16 +1056,16 @@ void prism2mgmt_set_oprateset(u16 *rate, p80211pstrd_t *pstr) for ( i=0; i < pstr->len; i++, datarate++ ) { switch (*datarate) { case 2: /* 1 Mbps */ - *rate |= BIT0; + *rate |= BIT(0); break; case 4: /* 2 Mbps */ - *rate |= BIT1; + *rate |= BIT(1); break; case 11: /* 5.5 Mbps */ - *rate |= BIT2; + *rate |= BIT(2); break; case 22: /* 11 Mbps */ - *rate |= BIT3; + *rate |= BIT(3); break; default: WLAN_LOG_DEBUG(1, "Unrecoginzed Rate of %d\n", diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index 45d4455f11d7..8b9a80f3e9e7 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -72,6 +72,7 @@ #include #include #include +#include #include "wlan_compat.h" @@ -713,8 +714,8 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) hw->ident_sta_fw.minor = hfa384x2host_16(hw->ident_sta_fw.minor); /* strip out the 'special' variant bits */ - hw->mm_mods = hw->ident_sta_fw.variant & (BIT14 | BIT15); - hw->ident_sta_fw.variant &= ~((u16)(BIT14 | BIT15)); + hw->mm_mods = hw->ident_sta_fw.variant & (BIT(14) | BIT(15)); + hw->ident_sta_fw.variant &= ~((u16)(BIT(14) | BIT(15))); if ( hw->ident_sta_fw.id == 0x1f ) { WLAN_LOG_INFO( diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h index cd7bcae689de..d33548a0cb49 100644 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ b/drivers/staging/wlan-ng/wlan_compat.h @@ -48,43 +48,6 @@ #ifndef _WLAN_COMPAT_H #define _WLAN_COMPAT_H -/*=============================================================*/ -/*------ Bit settings -----------------------------------------*/ -/*=============================================================*/ - -#define BIT0 0x00000001 -#define BIT1 0x00000002 -#define BIT2 0x00000004 -#define BIT3 0x00000008 -#define BIT4 0x00000010 -#define BIT5 0x00000020 -#define BIT6 0x00000040 -#define BIT7 0x00000080 -#define BIT8 0x00000100 -#define BIT9 0x00000200 -#define BIT10 0x00000400 -#define BIT11 0x00000800 -#define BIT12 0x00001000 -#define BIT13 0x00002000 -#define BIT14 0x00004000 -#define BIT15 0x00008000 -#define BIT16 0x00010000 -#define BIT17 0x00020000 -#define BIT18 0x00040000 -#define BIT19 0x00080000 -#define BIT20 0x00100000 -#define BIT21 0x00200000 -#define BIT22 0x00400000 -#define BIT23 0x00800000 -#define BIT24 0x01000000 -#define BIT25 0x02000000 -#define BIT26 0x04000000 -#define BIT27 0x08000000 -#define BIT28 0x10000000 -#define BIT29 0x20000000 -#define BIT30 0x40000000 -#define BIT31 0x80000000 - /*=============================================================*/ /*------ OS Portability Macros --------------------------------*/ /*=============================================================*/ @@ -165,4 +128,3 @@ extern int wlan_debug; #endif #endif /* _WLAN_COMPAT_H */ - -- cgit v1.2.3 From 73110e61acbacd9af27a5facd21436c567e6b712 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 25 Jan 2009 21:55:04 +0100 Subject: Staging: wlan-ng: Remove dead/unused code from p80211hdr.h Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211hdr.h | 55 +------------------------------------ 1 file changed, 1 insertion(+), 54 deletions(-) (limited to 'drivers/staging/wlan-ng/p80211hdr.h') diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index edcfbc6b493a..21b26d04104a 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -79,28 +79,10 @@ /*--- Sizes -----------------------------------------------*/ #define WLAN_CRC_LEN 4 #define WLAN_BSSID_LEN 6 -#define WLAN_BSS_TS_LEN 8 #define WLAN_HDR_A3_LEN 24 #define WLAN_HDR_A4_LEN 30 #define WLAN_SSID_MAXLEN 32 #define WLAN_DATA_MAXLEN 2312 -#define WLAN_A3FR_MAXLEN (WLAN_HDR_A3_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) -#define WLAN_A4FR_MAXLEN (WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) -#define WLAN_BEACON_FR_MAXLEN (WLAN_HDR_A3_LEN + 334) -#define WLAN_ATIM_FR_MAXLEN (WLAN_HDR_A3_LEN + 0) -#define WLAN_DISASSOC_FR_MAXLEN (WLAN_HDR_A3_LEN + 2) -#define WLAN_ASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 48) -#define WLAN_ASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16) -#define WLAN_REASSOCREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 54) -#define WLAN_REASSOCRESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 16) -#define WLAN_PROBEREQ_FR_MAXLEN (WLAN_HDR_A3_LEN + 44) -#define WLAN_PROBERESP_FR_MAXLEN (WLAN_HDR_A3_LEN + 78) -#define WLAN_AUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 261) -#define WLAN_DEAUTHEN_FR_MAXLEN (WLAN_HDR_A3_LEN + 2) -#define WLAN_WEP_NKEYS 4 -#define WLAN_WEP_MAXKEYLEN 13 -#define WLAN_CHALLENGE_IE_LEN 130 -#define WLAN_CHALLENGE_LEN 128 #define WLAN_WEP_IV_LEN 4 #define WLAN_WEP_ICV_LEN 4 @@ -167,59 +149,23 @@ /* SET_FC_FSTYPE(WLAN_FSTYPE_RTS) ); */ /*------------------------------------------------------------*/ -#define WLAN_GET_FC_PVER(n) (((u16)(n)) & (BIT(0) | BIT(1))) #define WLAN_GET_FC_FTYPE(n) ((((u16)(n)) & (BIT(2) | BIT(3))) >> 2) #define WLAN_GET_FC_FSTYPE(n) ((((u16)(n)) & (BIT(4)|BIT(5)|BIT(6)|BIT(7))) >> 4) #define WLAN_GET_FC_TODS(n) ((((u16)(n)) & (BIT(8))) >> 8) #define WLAN_GET_FC_FROMDS(n) ((((u16)(n)) & (BIT(9))) >> 9) -#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT(10))) >> 10) -#define WLAN_GET_FC_RETRY(n) ((((u16)(n)) & (BIT(11))) >> 11) -#define WLAN_GET_FC_PWRMGT(n) ((((u16)(n)) & (BIT(12))) >> 12) -#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT(13))) >> 13) #define WLAN_GET_FC_ISWEP(n) ((((u16)(n)) & (BIT(14))) >> 14) -#define WLAN_GET_FC_ORDER(n) ((((u16)(n)) & (BIT(15))) >> 15) -#define WLAN_SET_FC_PVER(n) ((u16)(n)) #define WLAN_SET_FC_FTYPE(n) (((u16)(n)) << 2) #define WLAN_SET_FC_FSTYPE(n) (((u16)(n)) << 4) #define WLAN_SET_FC_TODS(n) (((u16)(n)) << 8) #define WLAN_SET_FC_FROMDS(n) (((u16)(n)) << 9) -#define WLAN_SET_FC_MOREFRAG(n) (((u16)(n)) << 10) -#define WLAN_SET_FC_RETRY(n) (((u16)(n)) << 11) -#define WLAN_SET_FC_PWRMGT(n) (((u16)(n)) << 12) -#define WLAN_SET_FC_MOREDATA(n) (((u16)(n)) << 13) #define WLAN_SET_FC_ISWEP(n) (((u16)(n)) << 14) -#define WLAN_SET_FC_ORDER(n) (((u16)(n)) << 15) - -/*--- Duration Macros ----------------------------------------*/ -/* Macros to get/set the bitfields of the Duration Field */ -/* - the duration value is only valid when bit15 is zero */ -/* - the firmware handles these values, so I'm not going */ -/* these macros right now. */ -/*------------------------------------------------------------*/ - -/*--- Sequence Control Macros -------------------------------*/ -/* Macros to get/set the bitfields of the Sequence Control */ -/* Field. */ -/*------------------------------------------------------------*/ -#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT(0)|BIT(1)|BIT(2)|BIT(3))) -#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT(0)|BIT(1)|BIT(2)|BIT(3)))) >> 4) - -/*--- Data ptr macro -----------------------------------------*/ -/* Creates a u8* to the data portion of a frame */ -/* Assumes you're passing in a ptr to the beginning of the hdr*/ -/*------------------------------------------------------------*/ -#define WLAN_HDR_A3_DATAP(p) (((u8*)(p)) + WLAN_HDR_A3_LEN) -#define WLAN_HDR_A4_DATAP(p) (((u8*)(p)) + WLAN_HDR_A4_LEN) #define DOT11_RATE5_ISBASIC_GET(r) (((u8)(r)) & BIT(7)) /*================================================================*/ /* Types */ -/* BSS Timestamp */ -typedef u8 wlan_bss_ts_t[WLAN_BSS_TS_LEN]; - /* Generic 802.11 Header types */ typedef struct p80211_hdr_a3 @@ -294,3 +240,4 @@ inline static u16 p80211_headerlen(u16 fctl) } #endif /* _P80211HDR_H */ + -- cgit v1.2.3 From 8f08df1ea2b1c3980be553c21307e71ce67a494d Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Sun, 8 Feb 2009 02:20:54 +0100 Subject: Staging: wlan-ng: p80211hdr.h: Coding style cleanups Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/p80211hdr.h | 69 ++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 39 deletions(-) (limited to 'drivers/staging/wlan-ng/p80211hdr.h') diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index 21b26d04104a..bf4737f66f10 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -126,7 +126,6 @@ #define WLAN_FSTYPE_CFPOLL 0x06 #define WLAN_FSTYPE_CFACK_CFPOLL 0x07 - /*================================================================*/ /* Macros */ @@ -168,38 +167,32 @@ /* Generic 802.11 Header types */ -typedef struct p80211_hdr_a3 -{ - u16 fc; - u16 dur; - u8 a1[ETH_ALEN]; - u8 a2[ETH_ALEN]; - u8 a3[ETH_ALEN]; - u16 seq; -} __attribute__((packed)) p80211_hdr_a3_t; - -typedef struct p80211_hdr_a4 -{ - u16 fc; - u16 dur; - u8 a1[ETH_ALEN]; - u8 a2[ETH_ALEN]; - u8 a3[ETH_ALEN]; - u16 seq; - u8 a4[ETH_ALEN]; -} __attribute__((packed)) p80211_hdr_a4_t; - -typedef union p80211_hdr -{ - p80211_hdr_a3_t a3; - p80211_hdr_a4_t a4; -} __attribute__((packed)) p80211_hdr_t; - - -/*================================================================*/ -/* Function Declarations */ - -/* Frame and header lenght macros */ +typedef struct p80211_hdr_a3 { + u16 fc; + u16 dur; + u8 a1[ETH_ALEN]; + u8 a2[ETH_ALEN]; + u8 a3[ETH_ALEN]; + u16 seq; +} __attribute__ ((packed)) p80211_hdr_a3_t; + +typedef struct p80211_hdr_a4 { + u16 fc; + u16 dur; + u8 a1[ETH_ALEN]; + u8 a2[ETH_ALEN]; + u8 a3[ETH_ALEN]; + u16 seq; + u8 a4[ETH_ALEN]; +} __attribute__ ((packed)) p80211_hdr_a4_t; + +typedef union p80211_hdr { + p80211_hdr_a3_t a3; + p80211_hdr_a4_t a4; +} __attribute__ ((packed)) p80211_hdr_t; + + +/* Frame and header length macros */ #define WLAN_CTL_FRAMELEN(fstype) (\ (fstype) == WLAN_FSTYPE_BLOCKACKREQ ? 24 : \ @@ -214,23 +207,22 @@ typedef union p80211_hdr #define WLAN_FCS_LEN 4 /* ftcl in HOST order */ -inline static u16 p80211_headerlen(u16 fctl) +static inline u16 p80211_headerlen(u16 fctl) { u16 hdrlen = 0; - switch ( WLAN_GET_FC_FTYPE(fctl) ) { + 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) ) { + if (WLAN_GET_FC_TODS(fctl) && WLAN_GET_FC_FROMDS(fctl)) hdrlen += ETH_ALEN; - } break; case WLAN_FTYPE_CTL: hdrlen = WLAN_CTL_FRAMELEN(WLAN_GET_FC_FSTYPE(fctl)) - - WLAN_FCS_LEN; + WLAN_FCS_LEN; break; default: hdrlen = WLAN_HDR_A3_LEN; @@ -240,4 +232,3 @@ inline static u16 p80211_headerlen(u16 fctl) } #endif /* _P80211HDR_H */ - -- cgit v1.2.3 From 3b8eda9d8086b05192a4b1ec9b2752b221e5e304 Mon Sep 17 00:00:00 2001 From: Moritz Muehlenhoff Date: Mon, 9 Feb 2009 19:33:44 +0100 Subject: Staging: wlan-ng: Remove the now empty wlan_compat.h Signed-off-by: Moritz Muehlenhoff Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 -- drivers/staging/wlan-ng/p80211conv.c | 2 -- drivers/staging/wlan-ng/p80211hdr.h | 3 -- drivers/staging/wlan-ng/p80211meta.h | 3 -- drivers/staging/wlan-ng/p80211mgmt.h | 3 -- drivers/staging/wlan-ng/p80211msg.h | 3 -- drivers/staging/wlan-ng/p80211netdev.c | 1 - drivers/staging/wlan-ng/p80211req.c | 2 -- drivers/staging/wlan-ng/p80211types.h | 3 -- drivers/staging/wlan-ng/p80211wep.c | 2 -- drivers/staging/wlan-ng/p80211wext.c | 2 -- drivers/staging/wlan-ng/prism2mgmt.c | 2 -- drivers/staging/wlan-ng/prism2sta.c | 2 -- drivers/staging/wlan-ng/wlan_compat.h | 51 ---------------------------------- 14 files changed, 81 deletions(-) delete mode 100644 drivers/staging/wlan-ng/wlan_compat.h (limited to 'drivers/staging/wlan-ng/p80211hdr.h') diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index dd1e1d949969..b986a6f817a2 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -128,8 +128,6 @@ #include #include -#include "wlan_compat.h" - #define SUBMIT_URB(u,f) usb_submit_urb(u,f) /*================================================================*/ diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 123cb9a2b31d..2abce0c34444 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c @@ -65,8 +65,6 @@ #include -#include "wlan_compat.h" - #include "p80211types.h" #include "p80211hdr.h" #include "p80211conv.h" diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index bf4737f66f10..ded477517690 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h @@ -68,9 +68,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif /*================================================================*/ diff --git a/drivers/staging/wlan-ng/p80211meta.h b/drivers/staging/wlan-ng/p80211meta.h index 9cd36dcc2de4..2f3c9fc3358c 100644 --- a/drivers/staging/wlan-ng/p80211meta.h +++ b/drivers/staging/wlan-ng/p80211meta.h @@ -60,9 +60,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif /*================================================================*/ /* Types */ diff --git a/drivers/staging/wlan-ng/p80211mgmt.h b/drivers/staging/wlan-ng/p80211mgmt.h index da2de78ac3c3..6235fe7f235c 100644 --- a/drivers/staging/wlan-ng/p80211mgmt.h +++ b/drivers/staging/wlan-ng/p80211mgmt.h @@ -103,9 +103,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif #ifndef _P80211HDR_H #include "p80211hdr.h" diff --git a/drivers/staging/wlan-ng/p80211msg.h b/drivers/staging/wlan-ng/p80211msg.h index 42eb4c6f6cdd..f15a5d921f3c 100644 --- a/drivers/staging/wlan-ng/p80211msg.h +++ b/drivers/staging/wlan-ng/p80211msg.h @@ -51,9 +51,6 @@ /*================================================================*/ /* Project Includes */ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif #define WLAN_DEVNAMELEN_MAX 16 diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 0fc71710dd43..50fa8d6d6576 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c @@ -80,7 +80,6 @@ /*================================================================*/ /* Project Includes */ -#include "wlan_compat.h" #include "p80211types.h" #include "p80211hdr.h" #include "p80211conv.h" diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c index fac235f6e519..15ecba6e4693 100644 --- a/drivers/staging/wlan-ng/p80211req.c +++ b/drivers/staging/wlan-ng/p80211req.c @@ -62,8 +62,6 @@ #include #include -#include "wlan_compat.h" - #include "p80211types.h" #include "p80211hdr.h" #include "p80211mgmt.h" diff --git a/drivers/staging/wlan-ng/p80211types.h b/drivers/staging/wlan-ng/p80211types.h index f35ff3041b9c..a22437ceddca 100644 --- a/drivers/staging/wlan-ng/p80211types.h +++ b/drivers/staging/wlan-ng/p80211types.h @@ -61,9 +61,6 @@ /* Project Includes */ /*================================================================*/ -#ifndef _WLAN_COMPAT_H -#include "wlan_compat.h" -#endif /*----------------------------------------------------------------*/ /* The following constants are indexes into the Mib Category List */ diff --git a/drivers/staging/wlan-ng/p80211wep.c b/drivers/staging/wlan-ng/p80211wep.c index 51f3af84f9cb..405ce89e4e6e 100644 --- a/drivers/staging/wlan-ng/p80211wep.c +++ b/drivers/staging/wlan-ng/p80211wep.c @@ -57,8 +57,6 @@ #include #include -#include "wlan_compat.h" - // #define WEP_DEBUG /*================================================================*/ diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 2d35093ba63b..96078b0ea6aa 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c @@ -57,8 +57,6 @@ /*================================================================*/ /* Project Includes */ -#include "wlan_compat.h" - #include "p80211types.h" #include "p80211hdr.h" #include "p80211conv.h" diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 8a36c09694da..7dce05de1531 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -73,8 +73,6 @@ #include #include -#include "wlan_compat.h" - /*================================================================*/ /* Project Includes */ diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index c3ab31ef703a..fcafed975aa2 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c @@ -71,8 +71,6 @@ #include #include -#include "wlan_compat.h" - /*================================================================*/ /* Project Includes */ diff --git a/drivers/staging/wlan-ng/wlan_compat.h b/drivers/staging/wlan-ng/wlan_compat.h deleted file mode 100644 index 9867bc496cd3..000000000000 --- a/drivers/staging/wlan-ng/wlan_compat.h +++ /dev/null @@ -1,51 +0,0 @@ -/* wlan_compat.h -* -* Types and macros to aid in portability -* -* Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved. -* -------------------------------------------------------------------- -* -* linux-wlan -* -* The contents of this file are subject to the Mozilla Public -* License Version 1.1 (the "License"); you may not use this file -* except in compliance with the License. You may obtain a copy of -* the License at http://www.mozilla.org/MPL/ -* -* Software distributed under the License is distributed on an "AS -* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -* implied. See the License for the specific language governing -* rights and limitations under the License. -* -* Alternatively, the contents of this file may be used under the -* terms of the GNU Public License version 2 (the "GPL"), in which -* case the provisions of the GPL are applicable instead of the -* above. If you wish to allow the use of your version of this file -* only under the terms of the GPL and not to allow others to use -* your version of this file under the MPL, indicate your decision -* by deleting the provisions above and replace them with the notice -* and other provisions required by the GPL. If you do not delete -* the provisions above, a recipient may use your version of this -* file under either the MPL or the GPL. -* -* -------------------------------------------------------------------- -* -* Inquiries regarding the linux-wlan Open Source project can be -* made directly to: -* -* AbsoluteValue Systems Inc. -* info@linux-wlan.com -* http://www.linux-wlan.com -* -* -------------------------------------------------------------------- -* -* Portions of the development of this software were funded by -* Intersil Corporation as part of PRISM(R) chipset product development. -* -* -------------------------------------------------------------------- -*/ - -#ifndef _WLAN_COMPAT_H -#define _WLAN_COMPAT_H - -#endif /* _WLAN_COMPAT_H */ -- cgit v1.2.3