diff options
author | Vihas Makwana <makvihas@gmail.com> | 2022-05-08 21:24:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-19 18:41:06 +0300 |
commit | c0235e384e8d036bc1c990e7f465c03967a96252 (patch) | |
tree | b2311184d0b432274e00603ca58733c39a4e569e /drivers/staging | |
parent | 073d44eaccf07ffbc48e941c62ccd95324df93bf (diff) | |
download | linux-c0235e384e8d036bc1c990e7f465c03967a96252.tar.xz |
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: Vihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220508182400.22433-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_xmit.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index d086812f8c0e..9a99aa5e84ac 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -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; } } } |