Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8f05b0b authored by Mateusz Kulikowski's avatar Mateusz Kulikowski Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192e: Divide rtllib_rx_auth()



Move authentication response processing to rtllib_rx_auth_resp() function.
No logic is affected.

Signed-off-by: default avatarMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 61dbdf36
Loading
Loading
Loading
Loading
+58 −54
Original line number Original line Diff line number Diff line
@@ -2314,19 +2314,13 @@ inline int rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
	return 0;
	return 0;
}
}


inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
			  struct rtllib_rx_stats *rx_stats)
{
{
	u16 errcode;
	u16 errcode;
	u8 *challenge;
	u8 *challenge;
	int chlen = 0;
	int chlen = 0;
	bool bSupportNmode = true, bHalfSupportNmode = false;
	bool bSupportNmode = true, bHalfSupportNmode = false;


	if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) {
		if (ieee->state == RTLLIB_ASSOCIATING_AUTHENTICATING &&
		    (ieee->iw_mode == IW_MODE_INFRA)) {
			RTLLIB_DEBUG_MGMT("Received authentication response");

	errcode = auth_parse(skb, &challenge, &chlen);
	errcode = auth_parse(skb, &challenge, &chlen);
	if (0 == errcode) {
	if (0 == errcode) {
		if (ieee->open_wep || !challenge) {
		if (ieee->open_wep || !challenge) {
@@ -2380,7 +2374,17 @@ inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
			    errcode);
			    errcode);
		rtllib_associate_abort(ieee);
		rtllib_associate_abort(ieee);
	}
	}
}


inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
			  struct rtllib_rx_stats *rx_stats)
{

	if (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) {
		if (ieee->state == RTLLIB_ASSOCIATING_AUTHENTICATING &&
		    (ieee->iw_mode == IW_MODE_INFRA)) {
			RTLLIB_DEBUG_MGMT("Received authentication response");
			rtllib_rx_auth_resp(ieee, skb);
		} else if (ieee->iw_mode == IW_MODE_MASTER) {
		} else if (ieee->iw_mode == IW_MODE_MASTER) {
			rtllib_rx_auth_rq(ieee, skb);
			rtllib_rx_auth_rq(ieee, skb);
		}
		}