Re: [PATCH] staging: rtl8712: switch to common ieee80211 headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pascal,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on next-20200602]
[cannot apply to v5.7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Pascal-Terjan/staging-rtl8712-switch-to-common-ieee80211-headers/20200602-042517
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 77f55d1305c11fb729b88f2c3f7881ba0831fa6f
config: i386-randconfig-a011-20200602 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>, old ones prefixed by <<):

ld: drivers/staging/rtl8712/rtl8712_recv.o: in function `amsdu_to_msdu':
>> drivers/staging/rtl8712/rtl8712_recv.c:377: undefined reference to `bridge_tunnel_header'
>> ld: drivers/staging/rtl8712/rtl8712_recv.c:375: undefined reference to `rfc1042_header'
>> ld: drivers/staging/rtl8712/rtl8712_recv.c:377: undefined reference to `bridge_tunnel_header'
>> ld: drivers/staging/rtl8712/rtl8712_recv.c:375: undefined reference to `rfc1042_header'
ld: drivers/staging/rtl8712/rtl871x_recv.o: in function `r8712_wlanhdr_to_ethhdr':
>> drivers/staging/rtl8712/rtl871x_recv.c:603: undefined reference to `rfc1042_header'
>> ld: drivers/staging/rtl8712/rtl871x_recv.c:606: undefined reference to `bridge_tunnel_header'
>> ld: drivers/staging/rtl8712/rtl871x_recv.c:603: undefined reference to `rfc1042_header'
>> ld: drivers/staging/rtl8712/rtl871x_recv.c:606: undefined reference to `bridge_tunnel_header'

vim +377 drivers/staging/rtl8712/rtl8712_recv.c

2865d42c78a912 Larry Finger        2010-08-20  314  
fc898688aa37c0 Nishka Dasgupta     2019-08-08  315  static void amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
2865d42c78a912 Larry Finger        2010-08-20  316  {
2865d42c78a912 Larry Finger        2010-08-20  317  	int	a_len, padding_len;
2865d42c78a912 Larry Finger        2010-08-20  318  	u16	eth_type, nSubframe_Length;
2865d42c78a912 Larry Finger        2010-08-20  319  	u8	nr_subframes, i;
b952f4dff27512 yuan linyu          2017-06-18  320  	unsigned char *pdata;
2865d42c78a912 Larry Finger        2010-08-20  321  	struct rx_pkt_attrib *pattrib;
2865d42c78a912 Larry Finger        2010-08-20  322  	_pkt *sub_skb, *subframes[MAX_SUBFRAME_COUNT];
2865d42c78a912 Larry Finger        2010-08-20  323  	struct recv_priv *precvpriv = &padapter->recvpriv;
2865d42c78a912 Larry Finger        2010-08-20  324  	struct  __queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
2865d42c78a912 Larry Finger        2010-08-20  325  
2865d42c78a912 Larry Finger        2010-08-20  326  	nr_subframes = 0;
2865d42c78a912 Larry Finger        2010-08-20  327  	pattrib = &prframe->u.hdr.attrib;
2865d42c78a912 Larry Finger        2010-08-20  328  	recvframe_pull(prframe, prframe->u.hdr.attrib.hdrlen);
2865d42c78a912 Larry Finger        2010-08-20  329  	if (prframe->u.hdr.attrib.iv_len > 0)
2865d42c78a912 Larry Finger        2010-08-20  330  		recvframe_pull(prframe, prframe->u.hdr.attrib.iv_len);
2865d42c78a912 Larry Finger        2010-08-20  331  	a_len = prframe->u.hdr.len;
2865d42c78a912 Larry Finger        2010-08-20  332  	pdata = prframe->u.hdr.rx_data;
2865d42c78a912 Larry Finger        2010-08-20  333  	while (a_len > ETH_HLEN) {
2865d42c78a912 Larry Finger        2010-08-20  334  		/* Offset 12 denote 2 mac address */
2865d42c78a912 Larry Finger        2010-08-20  335  		nSubframe_Length = *((u16 *)(pdata + 12));
2865d42c78a912 Larry Finger        2010-08-20  336  		/*==m==>change the length order*/
2865d42c78a912 Larry Finger        2010-08-20  337  		nSubframe_Length = (nSubframe_Length >> 8) +
2865d42c78a912 Larry Finger        2010-08-20  338  				   (nSubframe_Length << 8);
2865d42c78a912 Larry Finger        2010-08-20  339  		if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
87a573ada017b4 Przemo Firszt       2012-12-10  340  			netdev_warn(padapter->pnetdev, "r8712u: nRemain_Length is %d and nSubframe_Length is: %d\n",
2865d42c78a912 Larry Finger        2010-08-20  341  				    a_len, nSubframe_Length);
2865d42c78a912 Larry Finger        2010-08-20  342  			goto exit;
2865d42c78a912 Larry Finger        2010-08-20  343  		}
2865d42c78a912 Larry Finger        2010-08-20  344  		/* move the data point to data content */
2865d42c78a912 Larry Finger        2010-08-20  345  		pdata += ETH_HLEN;
2865d42c78a912 Larry Finger        2010-08-20  346  		a_len -= ETH_HLEN;
2865d42c78a912 Larry Finger        2010-08-20  347  		/* Allocate new skb for releasing to upper layer */
2865d42c78a912 Larry Finger        2010-08-20  348  		sub_skb = dev_alloc_skb(nSubframe_Length + 12);
5ca136a0cb96aa Larry Finger        2012-08-28  349  		if (!sub_skb)
5ca136a0cb96aa Larry Finger        2012-08-28  350  			break;
2865d42c78a912 Larry Finger        2010-08-20  351  		skb_reserve(sub_skb, 12);
b952f4dff27512 yuan linyu          2017-06-18  352  		skb_put_data(sub_skb, pdata, nSubframe_Length);
2865d42c78a912 Larry Finger        2010-08-20  353  		subframes[nr_subframes++] = sub_skb;
2865d42c78a912 Larry Finger        2010-08-20  354  		if (nr_subframes >= MAX_SUBFRAME_COUNT) {
87a573ada017b4 Przemo Firszt       2012-12-10  355  			netdev_warn(padapter->pnetdev, "r8712u: ParseSubframe(): Too many Subframes! Packets dropped!\n");
2865d42c78a912 Larry Finger        2010-08-20  356  			break;
2865d42c78a912 Larry Finger        2010-08-20  357  		}
2865d42c78a912 Larry Finger        2010-08-20  358  		pdata += nSubframe_Length;
2865d42c78a912 Larry Finger        2010-08-20  359  		a_len -= nSubframe_Length;
2865d42c78a912 Larry Finger        2010-08-20  360  		if (a_len != 0) {
2865d42c78a912 Larry Finger        2010-08-20  361  			padding_len = 4 - ((nSubframe_Length + ETH_HLEN) & 3);
2865d42c78a912 Larry Finger        2010-08-20  362  			if (padding_len == 4)
2865d42c78a912 Larry Finger        2010-08-20  363  				padding_len = 0;
2865d42c78a912 Larry Finger        2010-08-20  364  			if (a_len < padding_len)
2865d42c78a912 Larry Finger        2010-08-20  365  				goto exit;
2865d42c78a912 Larry Finger        2010-08-20  366  			pdata += padding_len;
2865d42c78a912 Larry Finger        2010-08-20  367  			a_len -= padding_len;
2865d42c78a912 Larry Finger        2010-08-20  368  		}
2865d42c78a912 Larry Finger        2010-08-20  369  	}
2865d42c78a912 Larry Finger        2010-08-20  370  	for (i = 0; i < nr_subframes; i++) {
2865d42c78a912 Larry Finger        2010-08-20  371  		sub_skb = subframes[i];
2865d42c78a912 Larry Finger        2010-08-20  372  		/* convert hdr + possible LLC headers into Ethernet header */
2865d42c78a912 Larry Finger        2010-08-20  373  		eth_type = (sub_skb->data[6] << 8) | sub_skb->data[7];
2865d42c78a912 Larry Finger        2010-08-20  374  		if (sub_skb->len >= 8 &&
2865d42c78a912 Larry Finger        2010-08-20 @375  		    ((!memcmp(sub_skb->data, rfc1042_header, SNAP_SIZE) &&
2865d42c78a912 Larry Finger        2010-08-20  376  		      eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
2865d42c78a912 Larry Finger        2010-08-20 @377  		     !memcmp(sub_skb->data, bridge_tunnel_header, SNAP_SIZE))) {
2865d42c78a912 Larry Finger        2010-08-20  378  			/* remove RFC1042 or Bridge-Tunnel encapsulation and
bef611a92ee2d1 Raphaël Beamonte    2016-09-09  379  			 * replace EtherType
bef611a92ee2d1 Raphaël Beamonte    2016-09-09  380  			 */
2865d42c78a912 Larry Finger        2010-08-20  381  			skb_pull(sub_skb, SNAP_SIZE);
2865d42c78a912 Larry Finger        2010-08-20  382  			memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src,
2865d42c78a912 Larry Finger        2010-08-20  383  			       ETH_ALEN);
2865d42c78a912 Larry Finger        2010-08-20  384  			memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst,
2865d42c78a912 Larry Finger        2010-08-20  385  			       ETH_ALEN);
2865d42c78a912 Larry Finger        2010-08-20  386  		} else {
16b8852fa32106 Jannik Becher       2016-12-20  387  			__be16 len;
2865d42c78a912 Larry Finger        2010-08-20  388  			/* Leave Ethernet header part of hdr and full payload */
2865d42c78a912 Larry Finger        2010-08-20  389  			len = htons(sub_skb->len);
2865d42c78a912 Larry Finger        2010-08-20  390  			memcpy(skb_push(sub_skb, 2), &len, 2);
2865d42c78a912 Larry Finger        2010-08-20  391  			memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->src,
2865d42c78a912 Larry Finger        2010-08-20  392  			       ETH_ALEN);
2865d42c78a912 Larry Finger        2010-08-20  393  			memcpy(skb_push(sub_skb, ETH_ALEN), pattrib->dst,
2865d42c78a912 Larry Finger        2010-08-20  394  			       ETH_ALEN);
2865d42c78a912 Larry Finger        2010-08-20  395  		}
2865d42c78a912 Larry Finger        2010-08-20  396  		/* Indicate the packets to upper layer */
2865d42c78a912 Larry Finger        2010-08-20  397  		if (sub_skb) {
2865d42c78a912 Larry Finger        2010-08-20  398  			sub_skb->protocol =
2865d42c78a912 Larry Finger        2010-08-20  399  				 eth_type_trans(sub_skb, padapter->pnetdev);
2865d42c78a912 Larry Finger        2010-08-20  400  			sub_skb->dev = padapter->pnetdev;
2865d42c78a912 Larry Finger        2010-08-20  401  			if ((pattrib->tcpchk_valid == 1) &&
2865d42c78a912 Larry Finger        2010-08-20  402  			    (pattrib->tcp_chkrpt == 1)) {
2865d42c78a912 Larry Finger        2010-08-20  403  				sub_skb->ip_summed = CHECKSUM_UNNECESSARY;
168a2c10288d78 Luis de Bethencourt 2015-10-19  404  			} else {
2865d42c78a912 Larry Finger        2010-08-20  405  				sub_skb->ip_summed = CHECKSUM_NONE;
168a2c10288d78 Luis de Bethencourt 2015-10-19  406  			}
2865d42c78a912 Larry Finger        2010-08-20  407  			netif_rx(sub_skb);
2865d42c78a912 Larry Finger        2010-08-20  408  		}
2865d42c78a912 Larry Finger        2010-08-20  409  	}
2865d42c78a912 Larry Finger        2010-08-20  410  exit:
2865d42c78a912 Larry Finger        2010-08-20  411  	prframe->u.hdr.len = 0;
2865d42c78a912 Larry Finger        2010-08-20  412  	r8712_free_recvframe(prframe, pfree_recv_queue);
2865d42c78a912 Larry Finger        2010-08-20  413  }
2865d42c78a912 Larry Finger        2010-08-20  414  

:::::: The code at line 377 was first introduced by commit
:::::: 2865d42c78a9121caad52cb02d1fbb7f5cdbc4ef staging: r8712u: Add the new driver to the mainline kernel

:::::: TO: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
:::::: CC: Larry Finger <Larry.Finger@xxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux