Changeset 51
- Timestamp:
- 03/15/03 19:32:10 (6 years ago)
- Files:
-
- cvs-import/trunk/wlan/if_ieee80211subr.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cvs-import/trunk/wlan/if_ieee80211subr.c
r49 r51 44 44 #include <linux/skbuff.h> 45 45 #include <linux/netdevice.h> 46 #include <linux/etherdevice.h> 46 47 #include <linux/random.h> 47 48 … … 694 695 if (skb != NULL) { 695 696 skb->dev = dev; 696 skb->mac.raw = skb->data; 697 skb_pull(skb, sizeof(struct ether_header)); 698 skb->pkt_type = PACKET_OTHERHOST; 699 skb->protocol = __constant_htons(ETH_P_802_2); 697 skb->protocol = eth_type_trans(skb, dev); 700 698 netif_rx(skb); 701 699 } … … 847 845 * the frame separately and use s/g support in the hardware. 848 846 */ 849 if (skb_headroom(skb) < sizeof(struct ieee80211_frame)) { 850 struct sk_buff *skb2; 851 skb2 = skb_realloc_headroom(skb, sizeof(struct ieee80211_frame)); 847 if (skb_headroom(skb) < sizeof(struct ieee80211_frame) && 848 pskb_expand_head(skb, sizeof(*wh), 0, GFP_ATOMIC)) { 852 849 dev_kfree_skb(skb); 853 if (skb2 == NULL) 854 return skb2; 855 skb = skb2; 850 return NULL; 856 851 } 857 852 wh = (struct ieee80211_frame *) skb_push(skb, sizeof(struct ieee80211_frame));
