Ticket #1315: madwifi-0.9.3_Linux-2.6.22-rc1.diff
| File madwifi-0.9.3_Linux-2.6.22-rc1.diff, 3.6 kB (added by GrimRC, 5 years ago) |
|---|
-
madwifi-0.9.3/ath/if_ath_pci.c
old new 207 207 208 208 pci_set_drvdata(pdev, dev); 209 209 210 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 211 if (request_irq(dev->irq, ath_intr, IRQF_SHARED, dev->name, dev)) { 212 #else 210 213 if (request_irq(dev->irq, ath_intr, SA_SHIRQ, dev->name, dev)) { 214 #endif 215 211 216 printk(KERN_WARNING "%s: request_irq failed\n", dev->name); 212 217 goto bad3; 213 218 } -
madwifi-0.9.3/net80211/ieee80211_input.c
old new 1127 1127 } 1128 1128 if (skb1 != NULL) { 1129 1129 skb1->dev = dev; 1130 1131 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 1132 skb1->mac_header = skb1->data; 1133 skb1->network_header = skb1->data + sizeof(struct ether_header); 1134 #else 1130 1135 skb1->mac.raw = skb1->data; 1131 1136 skb1->nh.raw = skb1->data + sizeof(struct ether_header); 1137 #endif 1138 1132 1139 skb1->protocol = __constant_htons(ETH_P_802_2); 1133 1140 /* XXX insert vlan tag before queue it? */ 1134 1141 dev_queue_xmit(skb1); … … 2250 2257 if (skb1 == NULL) 2251 2258 return; 2252 2259 skb1->dev = dev; 2260 2261 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 2262 skb1->mac_header = skb1->data; 2263 #else 2253 2264 skb1->mac.raw = skb1->data; 2265 #endif 2266 2254 2267 skb1->ip_summed = CHECKSUM_NONE; 2255 2268 skb1->pkt_type = PACKET_OTHERHOST; 2256 2269 skb1->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */ … … 2525 2538 2526 2539 skb->dev = dev; 2527 2540 skb->protocol = eth_type_trans(skb, dev); 2541 2542 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 2543 skb->mac_header = skb->data; 2544 #else 2528 2545 skb->mac.raw = skb->data; 2546 #endif 2547 2529 2548 ieee80211_deliver_data(ni, skb); 2530 2549 return; 2531 2550 } … … 3690 3709 ath_eth_type_trans(struct sk_buff *skb, struct net_device *dev) 3691 3710 { 3692 3711 struct ethhdr *eth; 3693 3694 skb->mac.raw=skb->data; 3712 3713 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 3714 skb->mac_header = skb->data; 3715 #else 3716 skb->mac.raw = skb->data; 3717 #endif 3718 3695 3719 skb_pull(skb, ETH_HLEN); 3696 3720 /* 3697 3721 * NB: mac.ethernet is replaced in 2.6.9 by eth_hdr but 3698 3722 * since that's an inline and not a define there's 3699 3723 * no easy way to do this cleanly. 3700 3724 */ 3725 3726 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 3727 eth = (struct ethhdr *)skb->mac_header; 3728 #else 3701 3729 eth = (struct ethhdr *)skb->mac.raw; 3730 #endif 3702 3731 3703 3732 if (*eth->h_dest & 1) 3704 3733 if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) -
madwifi-0.9.3/net80211/ieee80211_monitor.c
old new 373 373 if (vap->iv_monitor_txf_len && tx) { 374 374 /* truncate transmit feedback packets */ 375 375 skb_trim(skb1, vap->iv_monitor_txf_len); 376 377 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 378 skb1->network_header = skb1->data; 379 #else 376 380 skb1->nh.raw = skb1->data; 381 #endif 382 377 383 } 378 384 switch (vap->iv_dev->type) { 379 385 case ARPHRD_IEEE80211: … … 555 561 skb_trim(skb1, skb1->len - IEEE80211_CRC_LEN); 556 562 } 557 563 skb1->dev = dev; /* NB: deliver to wlanX */ 564 565 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) 566 skb1->mac_header = skb1->data; 567 #else 558 568 skb1->mac.raw = skb1->data; 569 #endif 570 559 571 skb1->ip_summed = CHECKSUM_NONE; 560 572 skb1->pkt_type = pkttype; 561 573 skb1->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
