]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
wireless: clean up radiotap a bit
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 27 Nov 2008 22:13:38 +0000 (23:13 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 5 Dec 2008 14:32:59 +0000 (09:32 -0500)
No need to pad the header so no constant needed for that,
no need to carry any version number from netbsd nor CVS
IDs from them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/libertas/radiotap.h
include/net/ieee80211_radiotap.h

index d2a2b7586d08b8ca8c59029747b00bbd33f06c06..48fa6df3a774fa8a4976118c8ca830578ec09fa5 100644 (file)
@@ -7797,15 +7797,6 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv,
        memmove(rxb->skb->data + sizeof(struct ipw_rt_hdr),
                rxb->skb->data + IPW_RX_FRAME_SIZE, len);
 
-       /* Zero the radiotap static buffer  ...  We only need to zero the bytes NOT
-        * part of our real header, saves a little time.
-        *
-        * No longer necessary since we fill in all our data.  Purge before merging
-        * patch officially.
-        * memset(rxb->skb->data + sizeof(struct ipw_rt_hdr), 0,
-        *        IEEE80211_RADIOTAP_HDRLEN - sizeof(struct ipw_rt_hdr));
-        */
-
        ipw_rt = (struct ipw_rt_hdr *)rxb->skb->data;
 
        ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION;
@@ -8013,15 +8004,6 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
 
        memcpy(ipw_rt->payload, hdr, len);
 
-       /* Zero the radiotap static buffer  ...  We only need to zero the bytes
-        * NOT part of our real header, saves a little time.
-        *
-        * No longer necessary since we fill in all our data.  Purge before
-        * merging patch officially.
-        * memset(rxb->skb->data + sizeof(struct ipw_rt_hdr), 0,
-        *        IEEE80211_RADIOTAP_HDRLEN - sizeof(struct ipw_rt_hdr));
-        */
-
        ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION;
        ipw_rt->rt_hdr.it_pad = 0;      /* always good to zero */
        ipw_rt->rt_hdr.it_len = cpu_to_le16(sizeof(*ipw_rt));   /* total header+data */
@@ -10409,9 +10391,9 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
                } else
                        len = src->len;
 
-               dst = alloc_skb(
-                       len + IEEE80211_RADIOTAP_HDRLEN, GFP_ATOMIC);
-               if (!dst) continue;
+               dst = alloc_skb(len + sizeof(*rt_hdr), GFP_ATOMIC);
+               if (!dst)
+                       continue;
 
                rt_hdr = (void *)skb_put(dst, sizeof(*rt_hdr));
 
index 5d118f40cfbc43206369ec77082e220822318f11..f8eb9097ff0a013b06aa61d76033c622488f6a1b 100644 (file)
@@ -6,9 +6,6 @@ struct tx_radiotap_hdr {
        u8 txpower;
        u8 rts_retries;
        u8 data_retries;
-#if 0
-       u8 pad[IEEE80211_RADIOTAP_HDRLEN - 12];
-#endif
 } __attribute__ ((packed));
 
 #define TX_RADIOTAP_PRESENT (                          \
index d364fd594ea4d7f2b3f088f460e2e2bc09ae6697..384698cb773a81b2667a4e7dea8c2c8e763de4d5 100644 (file)
@@ -1,7 +1,4 @@
-/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05 sam Exp $ */
-/* $NetBSD: ieee80211_radiotap.h,v 1.11 2005/06/22 06:16:02 dyoung Exp $ */
-
-/*-
+/*
  * Copyright (c) 2003, 2004 David Young.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,8 +39,6 @@
 #include <linux/kernel.h>
 #include <asm/unaligned.h>
 
-/* Radiotap header version (from official NetBSD feed) */
-#define IEEE80211RADIOTAP_VERSION      "1.5"
 /* Base version of the radiotap packet header data */
 #define PKTHDR_RADIOTAP_VERSION                0
 
  * readers.
  */
 
-/* XXX tcpdump/libpcap do not tolerate variable-length headers,
- * yet, so we pad every radiotap header to 64 bytes. Ugh.
- */
-#define IEEE80211_RADIOTAP_HDRLEN      64
-
-/* The radio capture header precedes the 802.11 header.
+/*
+ * The radio capture header precedes the 802.11 header.
  * All data in the header is little endian on all platforms.
  */
 struct ieee80211_radiotap_header {