mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
staging: r8188eu: remove duplicate psta check
We do not need the psta check in the while loop of rtw_xmitframe_coalesce. psta is already checked near the start of the function and is not modified afterwards. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a8dce6b4ad
commit
6dd8420d4b
|
|
@ -1009,25 +1009,23 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
|||
|
||||
/* adding icv, if necessary... */
|
||||
if (pattrib->iv_len) {
|
||||
if (psta) {
|
||||
switch (pattrib->encrypt) {
|
||||
case _WEP40_:
|
||||
case _WEP104_:
|
||||
WEP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
break;
|
||||
case _TKIP_:
|
||||
if (bmcst)
|
||||
TKIP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
else
|
||||
TKIP_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||
break;
|
||||
case _AES_:
|
||||
if (bmcst)
|
||||
AES_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
else
|
||||
AES_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||
break;
|
||||
}
|
||||
switch (pattrib->encrypt) {
|
||||
case _WEP40_:
|
||||
case _WEP104_:
|
||||
WEP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
break;
|
||||
case _TKIP_:
|
||||
if (bmcst)
|
||||
TKIP_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
else
|
||||
TKIP_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||
break;
|
||||
case _AES_:
|
||||
if (bmcst)
|
||||
AES_IV(pattrib->iv, psta->dot11txpn, pattrib->key_idx);
|
||||
else
|
||||
AES_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user