Commit f7567e20 authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman

staging: rtl8192e: Decrease nesting of rtllib_rx_auth_resp()

Return from rtllib_rx_auth_resp() if auth_parse() fails.
Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e8f05b0b
......@@ -2322,7 +2322,18 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
bool bSupportNmode = true, bHalfSupportNmode = false;
errcode = auth_parse(skb, &challenge, &chlen);
if (0 == errcode) {
if (errcode) {
ieee->softmac_stats.rx_auth_rs_err++;
RTLLIB_DEBUG_MGMT("Authentication respose status code 0x%x",
errcode);
netdev_info(ieee->dev,
"Authentication respose status code 0x%x", errcode);
rtllib_associate_abort(ieee);
return;
}
if (ieee->open_wep || !challenge) {
ieee->state = RTLLIB_ASSOCIATING_AUTHENTICATED;
ieee->softmac_stats.rx_auth_rs_ok++;
......@@ -2364,16 +2375,6 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
rtllib_auth_challenge(ieee, challenge,
chlen);
}
} else {
ieee->softmac_stats.rx_auth_rs_err++;
RTLLIB_DEBUG_MGMT("Authentication respose status code 0x%x",
errcode);
netdev_info(ieee->dev,
"Authentication respose status code 0x%x",
errcode);
rtllib_associate_abort(ieee);
}
}
inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
......
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