lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ze9Ie67PCSvBU+og@MOLeToid>
Date: Mon, 11 Mar 2024 19:07:55 +0100
From: "Felix N. Kimbu" <felixkimbu1@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc: outreachy@...ts.linux.dev
Subject: [PATCH] staging: p80211conv: Rename local foo to decrypt_check

This change renames the local variable foo to decrypt_check in functions
skb_ether_to_p80211(...) and skb_p80211_to_ether(...), giving intuitive
meaning to the identifier.

It also indents the parameters to match the the opening parentheses.

Signed-off-by: Felix N. Kimbu <felixkimbu1@...il.com>
---
 drivers/staging/wlan-ng/p80211conv.c | 30 ++++++++++++++--------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c
index 8336435eccc2..a0413928a843 100644
--- a/drivers/staging/wlan-ng/p80211conv.c
+++ b/drivers/staging/wlan-ng/p80211conv.c
@@ -93,7 +93,7 @@ int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv,
 	struct wlan_ethhdr e_hdr;
 	struct wlan_llc *e_llc;
 	struct wlan_snap *e_snap;
-	int foo;
+	int decrypt_check;
 
 	memcpy(&e_hdr, skb->data, sizeof(e_hdr));
 
@@ -185,14 +185,14 @@ int skb_ether_to_p80211(struct wlandevice *wlandev, u32 ethconv,
 		p80211_wep->data = kmalloc(skb->len, GFP_ATOMIC);
 		if (!p80211_wep->data)
 			return -ENOMEM;
-		foo = wep_encrypt(wlandev, skb->data, p80211_wep->data,
-				  skb->len,
-				  wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK,
-				  p80211_wep->iv, p80211_wep->icv);
-		if (foo) {
+		decrypt_check = wep_encrypt(wlandev, skb->data, p80211_wep->data,
+				  					skb->len,
+									wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK,
+									p80211_wep->iv, p80211_wep->icv);
+		if (decrypt_check) {
 			netdev_warn(wlandev->netdev,
 				    "Host en-WEP failed, dropping frame (%d).\n",
-				    foo);
+				    decrypt_check);
 			kfree(p80211_wep->data);
 			return 2;
 		}
@@ -265,7 +265,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
 	struct wlan_llc *e_llc;
 	struct wlan_snap *e_snap;
 
-	int foo;
+	int decrypt_check;
 
 	payload_length = skb->len - WLAN_HDR_A3_LEN - WLAN_CRC_LEN;
 	payload_offset = WLAN_HDR_A3_LEN;
@@ -305,15 +305,15 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
 				   "WEP frame too short (%u).\n", skb->len);
 			return 1;
 		}
-		foo = wep_decrypt(wlandev, skb->data + payload_offset + 4,
-				  payload_length - 8, -1,
-				  skb->data + payload_offset,
-				  skb->data + payload_offset +
-				  payload_length - 4);
-		if (foo) {
+		decrypt_check = wep_decrypt(wlandev, skb->data + payload_offset + 4,
+									payload_length - 8, -1,
+									skb->data + payload_offset,
+									skb->data + payload_offset +
+									payload_length - 4);
+		if (decrypt_check) {
 			/* de-wep failed, drop skb. */
 			netdev_dbg(netdev, "Host de-WEP failed, dropping frame (%d).\n",
-				   foo);
+				   decrypt_check);
 			wlandev->rx.decrypt_err++;
 			return 2;
 		}
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ