Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Side by Side Diff: chromeos/compat-wireless/net/mac80211/rx.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Fixes for !ACK handling, missing local changes, log message fixes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2002-2005, Instant802 Networks, Inc. 2 * Copyright 2002-2005, Instant802 Networks, Inc.
3 * Copyright 2005-2006, Devicescape Software, Inc. 3 * Copyright 2005-2006, Devicescape Software, Inc.
4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
5 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> 5 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 struct ieee80211_radiotap_header hdr; 2192 struct ieee80211_radiotap_header hdr;
2193 u8 flags; 2193 u8 flags;
2194 u8 rate_or_pad; 2194 u8 rate_or_pad;
2195 __le16 chan_freq; 2195 __le16 chan_freq;
2196 __le16 chan_flags; 2196 __le16 chan_flags;
2197 } __packed *rthdr; 2197 } __packed *rthdr;
2198 struct sk_buff *skb = rx->skb, *skb2; 2198 struct sk_buff *skb = rx->skb, *skb2;
2199 struct net_device *prev_dev = NULL; 2199 struct net_device *prev_dev = NULL;
2200 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); 2200 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
2201 2201
2202 if (status->flag & RX_FLAG_INTERNAL_CMTR)
2203 goto out_free_skb;
2204
2205 if (skb_headroom(skb) < sizeof(*rthdr) && 2202 if (skb_headroom(skb) < sizeof(*rthdr) &&
2206 pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC)) 2203 pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
2207 goto out_free_skb; 2204 goto out_free_skb;
2208 2205
2209 rthdr = (void *)skb_push(skb, sizeof(*rthdr)); 2206 rthdr = (void *)skb_push(skb, sizeof(*rthdr));
2210 memset(rthdr, 0, sizeof(*rthdr)); 2207 memset(rthdr, 0, sizeof(*rthdr));
2211 rthdr->hdr.it_len = cpu_to_le16(sizeof(*rthdr)); 2208 rthdr->hdr.it_len = cpu_to_le16(sizeof(*rthdr));
2212 rthdr->hdr.it_present = 2209 rthdr->hdr.it_present =
2213 cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | 2210 cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) |
2214 (1 << IEEE80211_RADIOTAP_CHANNEL)); 2211 (1 << IEEE80211_RADIOTAP_CHANNEL));
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 sdata->dev->stats.rx_bytes += skb->len; 2250 sdata->dev->stats.rx_bytes += skb->len;
2254 } 2251 }
2255 2252
2256 if (prev_dev) { 2253 if (prev_dev) {
2257 skb->dev = prev_dev; 2254 skb->dev = prev_dev;
2258 netif_receive_skb(skb); 2255 netif_receive_skb(skb);
2259 skb = NULL; 2256 skb = NULL;
2260 } else 2257 } else
2261 goto out_free_skb; 2258 goto out_free_skb;
2262 2259
2263 status->flag |= RX_FLAG_INTERNAL_CMTR;
2264 return; 2260 return;
2265 2261
2266 out_free_skb: 2262 out_free_skb:
2267 dev_kfree_skb(skb); 2263 dev_kfree_skb(skb);
2268 } 2264 }
2269 2265
2270 2266
2271 static void ieee80211_invoke_rx_handlers(struct ieee80211_sub_if_data *sdata, 2267 static void ieee80211_invoke_rx_handlers(struct ieee80211_sub_if_data *sdata,
2272 struct ieee80211_rx_data *rx, 2268 struct ieee80211_rx_data *rx,
2273 struct sk_buff *skb, 2269 struct sk_buff *skb,
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 { 2675 {
2680 struct ieee80211_local *local = hw_to_local(hw); 2676 struct ieee80211_local *local = hw_to_local(hw);
2681 2677
2682 BUILD_BUG_ON(sizeof(struct ieee80211_rx_status) > sizeof(skb->cb)); 2678 BUILD_BUG_ON(sizeof(struct ieee80211_rx_status) > sizeof(skb->cb));
2683 2679
2684 skb->pkt_type = IEEE80211_RX_MSG; 2680 skb->pkt_type = IEEE80211_RX_MSG;
2685 skb_queue_tail(&local->skb_queue, skb); 2681 skb_queue_tail(&local->skb_queue, skb);
2686 tasklet_schedule(&local->tasklet); 2682 tasklet_schedule(&local->tasklet);
2687 } 2683 }
2688 EXPORT_SYMBOL(ieee80211_rx_irqsafe); 2684 EXPORT_SYMBOL(ieee80211_rx_irqsafe);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698