Commit c0235e38 authored by Vihas Makwana's avatar Vihas Makwana Committed by Greg Kroah-Hartman

staging: r8188eu: drop redundant if check

The check for ETH_P_IP is already performed in the outer if block
and inner if check is redundant. So drop the check.
Signed-off-by: default avatarVihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220508182400.22433-1-makvihas@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 073d44ea
......@@ -448,14 +448,12 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
_rtw_pktfile_read(&pktfile, &tmp[0], 24);
pattrib->dhcp_pkt = 0;
if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */
if (ETH_P_IP == pattrib->ether_type) {/* IP header */
if (((tmp[21] == 68) && (tmp[23] == 67)) ||
((tmp[21] == 67) && (tmp[23] == 68))) {
/* 68 : UDP BOOTP client */
/* 67 : UDP BOOTP server */
/* Use low rate to send DHCP packet. */
pattrib->dhcp_pkt = 1;
}
if (((tmp[21] == 68) && (tmp[23] == 67)) ||
((tmp[21] == 67) && (tmp[23] == 68))) {
/* 68 : UDP BOOTP client */
/* 67 : UDP BOOTP server */
/* Use low rate to send DHCP packet. */
pattrib->dhcp_pkt = 1;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment