Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8723au: portctrl(): Remove a pile of unnecessary clutter

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jes Sorensen and committed by
Greg Kroah-Hartman
a0c5ff0b 848ad5d3

+4 -36
+4 -36
drivers/staging/rtl8723au/core/rtw_recv.c
··· 568 568 ("########portctrl:adapter->securitypriv.dot11AuthAlgrthm =" 569 569 "%d\n", adapter->securitypriv.dot11AuthAlgrthm)); 570 570 571 + prtnframe = precv_frame; 572 + 571 573 if (auth_alg == dot11AuthAlgrthm_8021X) { 572 574 /* get ether_type */ 573 575 ptr = pfhdr->pkt->data + pfhdr->attrib.hdrlen; 574 576 575 577 ether_type = (ptr[6] << 8) | ptr[7]; 576 578 577 - if ((psta != NULL) && (psta->ieee8021x_blocked)) { 579 + if (psta && psta->ieee8021x_blocked) { 578 580 /* blocked */ 579 581 /* only accept EAPOL frame */ 580 582 RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, 581 583 ("########portctrl:psta->ieee8021x_blocked ==" 582 584 "1\n")); 583 585 584 - if (ether_type == eapol_type) { 585 - prtnframe = precv_frame; 586 - } else { 586 + if (ether_type != eapol_type) { 587 587 /* free this frame */ 588 588 rtw_free_recvframe23a(precv_frame); 589 589 prtnframe = NULL; 590 590 } 591 - } else { 592 - /* allowed */ 593 - /* check decryption status, and decrypt the frame if needed */ 594 - RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, 595 - ("########portctrl:psta->ieee8021x_blocked ==" 596 - "0\n")); 597 - RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, 598 - ("portctrl:precv_frame->hdr.attrib.privacy =" 599 - "%x\n", precv_frame->attrib.privacy)); 600 - 601 - if (pattrib->bdecrypted == 0) { 602 - RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, 603 - ("portctrl:prxstat->decrypted =%x\n", 604 - pattrib->bdecrypted)); 605 - } 606 - 607 - prtnframe = precv_frame; 608 - /* check is the EAPOL frame or not (Rekey) */ 609 - if (ether_type == eapol_type) { 610 - RT_TRACE(_module_rtl871x_recv_c_, _drv_notice_, 611 - ("########portctrl:ether_type == " 612 - "0x888e\n")); 613 - /* check Rekey */ 614 - 615 - prtnframe = precv_frame; 616 - } else { 617 - RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, 618 - ("########portctrl:ether_type = 0x%04x" 619 - "\n", ether_type)); 620 - } 621 591 } 622 - } else { 623 - prtnframe = precv_frame; 624 592 } 625 593 626 594 return prtnframe;