diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-11-27 17:13:38 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-05 09:32:59 -0500 |
commit | 007e5ddddfed4ba039899754936e89b27d5cb551 (patch) | |
tree | 80b99e46a0a3b82be8dc87701512a738d0142f79 /drivers/net/wireless/ipw2x00/ipw2200.c | |
parent | e11602b7813502bf363c40cdb5a8c4b96d4bbc96 (diff) |
wireless: clean up radiotap a bit
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>
Diffstat (limited to 'drivers/net/wireless/ipw2x00/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index d2a2b7586d08..48fa6df3a774 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -7797,15 +7797,6 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, | |||
7797 | memmove(rxb->skb->data + sizeof(struct ipw_rt_hdr), | 7797 | memmove(rxb->skb->data + sizeof(struct ipw_rt_hdr), |
7798 | rxb->skb->data + IPW_RX_FRAME_SIZE, len); | 7798 | rxb->skb->data + IPW_RX_FRAME_SIZE, len); |
7799 | 7799 | ||
7800 | /* Zero the radiotap static buffer ... We only need to zero the bytes NOT | ||
7801 | * part of our real header, saves a little time. | ||
7802 | * | ||
7803 | * No longer necessary since we fill in all our data. Purge before merging | ||
7804 | * patch officially. | ||
7805 | * memset(rxb->skb->data + sizeof(struct ipw_rt_hdr), 0, | ||
7806 | * IEEE80211_RADIOTAP_HDRLEN - sizeof(struct ipw_rt_hdr)); | ||
7807 | */ | ||
7808 | |||
7809 | ipw_rt = (struct ipw_rt_hdr *)rxb->skb->data; | 7800 | ipw_rt = (struct ipw_rt_hdr *)rxb->skb->data; |
7810 | 7801 | ||
7811 | ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; | 7802 | ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; |
@@ -8013,15 +8004,6 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv, | |||
8013 | 8004 | ||
8014 | memcpy(ipw_rt->payload, hdr, len); | 8005 | memcpy(ipw_rt->payload, hdr, len); |
8015 | 8006 | ||
8016 | /* Zero the radiotap static buffer ... We only need to zero the bytes | ||
8017 | * NOT part of our real header, saves a little time. | ||
8018 | * | ||
8019 | * No longer necessary since we fill in all our data. Purge before | ||
8020 | * merging patch officially. | ||
8021 | * memset(rxb->skb->data + sizeof(struct ipw_rt_hdr), 0, | ||
8022 | * IEEE80211_RADIOTAP_HDRLEN - sizeof(struct ipw_rt_hdr)); | ||
8023 | */ | ||
8024 | |||
8025 | ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; | 8007 | ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; |
8026 | ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ | 8008 | ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ |
8027 | ipw_rt->rt_hdr.it_len = cpu_to_le16(sizeof(*ipw_rt)); /* total header+data */ | 8009 | 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, | |||
10409 | } else | 10391 | } else |
10410 | len = src->len; | 10392 | len = src->len; |
10411 | 10393 | ||
10412 | dst = alloc_skb( | 10394 | dst = alloc_skb(len + sizeof(*rt_hdr), GFP_ATOMIC); |
10413 | len + IEEE80211_RADIOTAP_HDRLEN, GFP_ATOMIC); | 10395 | if (!dst) |
10414 | if (!dst) continue; | 10396 | continue; |
10415 | 10397 | ||
10416 | rt_hdr = (void *)skb_put(dst, sizeof(*rt_hdr)); | 10398 | rt_hdr = (void *)skb_put(dst, sizeof(*rt_hdr)); |
10417 | 10399 | ||