aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2007-06-04 21:04:29 -0400
committerGuido Guenther <agx@sigxcpu.org>2007-06-05 08:59:35 +0200
commitb9a4ce95821b9d50ac8d3817d78ac12b52869d62 (patch)
tree93ab0c3696cbfe8bd16d2198bb522055bd9e0e98
parentdbed28afc848bd4364823e9960c4c88a95f35d92 (diff)
[PATCH] Remove at76_ieee80211_fixup(), it's not used
Perhaps it was intended for some kind of "fixed up" monitor mode, but the code has no chance to be executed since the monitor mode consumes the packets before this point. Signed-off-by: Pavel Roskin <proski@gnu.org>
-rw-r--r--at76_usb.c62
1 files changed, 1 insertions, 61 deletions
diff --git a/at76_usb.c b/at76_usb.c
index ce6904a..71d5fd8 100644
--- a/at76_usb.c
+++ b/at76_usb.c
@@ -5531,62 +5531,6 @@ static inline void skb_reset_mac_header(struct sk_buff *skb)
#endif
-/* Adjust the skb to trim the hardware header and CRC, and set up skb->mac,
- * skb->protocol, etc.
- */
-static void at76_ieee80211_fixup(struct sk_buff *skb, int iw_mode)
-{
- struct ieee80211_hdr_3addr *i802_11_hdr;
- struct ethhdr *eth_hdr_p;
- u8 *src_addr;
- u8 *dest_addr;
- __be16 proto = 0;
-
- skb_reset_mac_header(skb);
- i802_11_hdr = (struct ieee80211_hdr_3addr *)skb->data;
- skb_pull(skb, sizeof(struct ieee80211_hdr_3addr));
-
- src_addr = iw_mode == IW_MODE_ADHOC ? i802_11_hdr->addr2
- : i802_11_hdr->addr3;
- dest_addr = i802_11_hdr->addr1;
-
- eth_hdr_p = (struct ethhdr *)skb->data;
- if (!compare_ether_addr(eth_hdr_p->h_source, src_addr) &&
- !compare_ether_addr(eth_hdr_p->h_dest, dest_addr)) {
- /* There's an ethernet header encapsulated within the data
- * portion, count it as part of the hardware header */
- skb_pull(skb, sizeof(struct ethhdr));
- proto = eth_hdr_p->h_proto;
- } else if (!memcmp(skb->data, snapsig, sizeof(snapsig))) {
- /* SNAP frame - collapse it */
- /* RFC1042/802.1h encapsulated packet. Treat the SNAP header
- * as part of the HW header and note the protocol. */
- /* NOTE: prism2 doesn't collapse Appletalk frames (why?). */
- skb_pull(skb, sizeof(rfc1042sig) + 2);
- proto = *(__be16 *)(skb->data - 2);
- }
-
- if (ntohs(proto) > 1518) {
- skb->protocol = proto;
- } else {
-#ifdef IEEE_STANDARD
- /* According to all standards, we should assume the data
- * portion contains 802.2 LLC information */
- skb->protocol = htons(ETH_P_802_2);
-#else /* IEEE_STANDARD */
- /* Unfortunately, it appears no actual 802.11 implementations
- * follow any standards specs. They all appear to put a
- * 16-bit ethertype after the 802.11 header instead, so we'll
- * use that (and consider it part of the hardware header). */
- /* Note that this means we can never support non-SNAP 802.2
- * frames (because we can't tell when we get one) */
- skb->protocol = *(__be16 *)skb->data;
- skb_pull(skb, 2);
-#endif /* IEEE_STANDARD */
- }
-}
-
-
/* check for fragmented data in priv->rx_skb. If the packet was no fragment
or it was the last of a fragment set a skb containing the whole packet
is returned for further processing. Otherwise we get NULL and are
@@ -5852,11 +5796,7 @@ static void at76_rx_data(struct at76_priv *priv)
skb->pkt_type = PACKET_OTHERHOST;
}
- if (netdev->type == ARPHRD_ETHER) {
- at76_ieee80211_to_eth(skb, priv->iw_mode);
- } else {
- at76_ieee80211_fixup(skb, priv->iw_mode);
- }
+ at76_ieee80211_to_eth(skb, priv->iw_mode);
netdev->last_rx = jiffies;
netif_rx(skb);