Re: [PATCH 3/3 v2] staging: rtl8712: Drop get_recvframe_data()

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

 



Hi Kees,

I love your patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Kees-Cook/staging-rtl-Check-for-NULL-header-value/20220115-122817
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git fa783154524a71ab74e293cd8251155e5971952b
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220115/202201151447.WZ02BFf7-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/190b2c80a0e1844b5e38a9311830227d27533471
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Kees-Cook/staging-rtl-Check-for-NULL-header-value/20220115-122817
        git checkout 190b2c80a0e1844b5e38a9311830227d27533471
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/staging/

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

All errors (new ones prefixed by >>):

   drivers/staging/rtl8712/rtl871x_recv.c: In function 'r8712_portctrl':
>> drivers/staging/rtl8712/rtl871x_recv.c:237:8: error: 'precvframe' undeclared (first use in this function); did you mean 'precv_frame'?
     237 |  ptr = precvframe->u.hdr.rx_data;
         |        ^~~~~~~~~~
         |        precv_frame
   drivers/staging/rtl8712/rtl871x_recv.c:237:8: note: each undeclared identifier is reported only once for each function it appears in


vim +237 drivers/staging/rtl8712/rtl871x_recv.c

   223	
   224	/*###set the security information in the recv_frame */
   225	union recv_frame *r8712_portctrl(struct _adapter *adapter,
   226					 union recv_frame *precv_frame)
   227	{
   228		u8 *psta_addr, *ptr;
   229		uint auth_alg;
   230		struct recv_frame_hdr *pfhdr;
   231		struct sta_info *psta;
   232		struct	sta_priv *pstapriv;
   233		union recv_frame *prtnframe;
   234		u16 ether_type;
   235	
   236		pstapriv = &adapter->stapriv;
 > 237		ptr = precvframe->u.hdr.rx_data;
   238		pfhdr = &precv_frame->u.hdr;
   239		psta_addr = pfhdr->attrib.ta;
   240		psta = r8712_get_stainfo(pstapriv, psta_addr);
   241		auth_alg = adapter->securitypriv.AuthAlgrthm;
   242		if (auth_alg == 2) {
   243			/* get ether_type */
   244			ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
   245			ether_type = get_unaligned_be16(ptr);
   246	
   247			if (psta && psta->ieee8021x_blocked) {
   248				/* blocked
   249				 * only accept EAPOL frame
   250				 */
   251				if (ether_type == 0x888e) {
   252					prtnframe = precv_frame;
   253				} else {
   254					/*free this frame*/
   255					r8712_free_recvframe(precv_frame,
   256							     &adapter->recvpriv.free_recv_queue);
   257					prtnframe = NULL;
   258				}
   259			} else {
   260				/* allowed
   261				 * check decryption status, and decrypt the
   262				 * frame if needed
   263				 */
   264				prtnframe = precv_frame;
   265				/* check is the EAPOL frame or not (Rekey) */
   266				if (ether_type == 0x888e) {
   267					/* check Rekey */
   268					prtnframe = precv_frame;
   269				}
   270			}
   271		} else {
   272			prtnframe = precv_frame;
   273		}
   274		return prtnframe;
   275	}
   276	

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




[Index of Archives]     [Linux Driver Development]     [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