소스 검색

brcmfmac: remove code and comment for older kernel support

In the code of the receive path some code was dealing with how
things were done in older kernels. Not really needed for an
upstream driver.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel 12 년 전
부모
커밋
cc1b546394
1개의 변경된 파일2개의 추가작업 그리고 27개의 파일을 삭제
  1. 2 27
      drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c

+ 2 - 27
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c

@@ -281,8 +281,6 @@ void brcmf_txflowblock(struct device *dev, bool state)
 
 
 void brcmf_rx_frames(struct device *dev, struct sk_buff_head *skb_list)
 void brcmf_rx_frames(struct device *dev, struct sk_buff_head *skb_list)
 {
 {
-	unsigned char *eth;
-	uint len;
 	struct sk_buff *skb, *pnext;
 	struct sk_buff *skb, *pnext;
 	struct brcmf_if *ifp;
 	struct brcmf_if *ifp;
 	struct brcmf_bus *bus_if = dev_get_drvdata(dev);
 	struct brcmf_bus *bus_if = dev_get_drvdata(dev);
@@ -306,33 +304,12 @@ void brcmf_rx_frames(struct device *dev, struct sk_buff_head *skb_list)
 			continue;
 			continue;
 		}
 		}
 
 
-		/* Get the protocol, maintain skb around eth_type_trans()
-		 * The main reason for this hack is for the limitation of
-		 * Linux 2.4 where 'eth_type_trans' uses the
-		 * 'net->hard_header_len'
-		 * to perform skb_pull inside vs ETH_HLEN. Since to avoid
-		 * coping of the packet coming from the network stack to add
-		 * BDC, Hardware header etc, during network interface
-		 * registration
-		 * we set the 'net->hard_header_len' to ETH_HLEN + extra space
-		 * required
-		 * for BDC, Hardware header etc. and not just the ETH_HLEN
-		 */
-		eth = skb->data;
-		len = skb->len;
-
 		skb->dev = ifp->ndev;
 		skb->dev = ifp->ndev;
 		skb->protocol = eth_type_trans(skb, skb->dev);
 		skb->protocol = eth_type_trans(skb, skb->dev);
 
 
 		if (skb->pkt_type == PACKET_MULTICAST)
 		if (skb->pkt_type == PACKET_MULTICAST)
 			ifp->stats.multicast++;
 			ifp->stats.multicast++;
 
 
-		skb->data = eth;
-		skb->len = len;
-
-		/* Strip header, count, deliver upward */
-		skb_pull(skb, ETH_HLEN);
-
 		/* Process special event packets */
 		/* Process special event packets */
 		brcmf_fweh_process_skb(drvr, skb);
 		brcmf_fweh_process_skb(drvr, skb);
 
 
@@ -348,10 +325,8 @@ void brcmf_rx_frames(struct device *dev, struct sk_buff_head *skb_list)
 			netif_rx(skb);
 			netif_rx(skb);
 		else
 		else
 			/* If the receive is not processed inside an ISR,
 			/* If the receive is not processed inside an ISR,
-			 * the softirqd must be woken explicitly to service
-			 * the NET_RX_SOFTIRQ.  In 2.6 kernels, this is handled
-			 * by netif_rx_ni(), but in earlier kernels, we need
-			 * to do it manually.
+			 * the softirqd must be woken explicitly to service the
+			 * NET_RX_SOFTIRQ. This is handled by netif_rx_ni().
 			 */
 			 */
 			netif_rx_ni(skb);
 			netif_rx_ni(skb);
 	}
 	}