diff options
author | Felix N. Kimbu <felixkimbu1@gmail.com> | 2024-03-13 07:45:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-25 21:08:01 +0300 |
commit | bf812e0a36f775ea77e4e6455f0b3a1ab1a61961 (patch) | |
tree | 803ccfeb85866abebdd777dbbb27b2523d8c93ac /drivers/staging/wlan-ng | |
parent | ab8e210d16b10e01b40fedde18de413434310784 (diff) | |
download | linux-bf812e0a36f775ea77e4e6455f0b3a1ab1a61961.tar.xz |
staging: wlan-ng: Rename 'foo' to 'rc' in p80211conv.c
Rename identifier 'foo' to 'rc' in skb_p80211_to_ether() and
skb_ether_to_p80211() to match the common kernel coding style.
Signed-off-by: Felix N. Kimbu <felixkimbu1@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ZfEvTF7qwYZORGsY@MOLeToid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/p80211conv.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index 8336435eccc2..7401a6cacb7f 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 rc; 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) { + rc = wep_encrypt(wlandev, skb->data, p80211_wep->data, + skb->len, + wlandev->hostwep & HOSTWEP_DEFAULTKEY_MASK, + p80211_wep->iv, p80211_wep->icv); + if (rc) { netdev_warn(wlandev->netdev, "Host en-WEP failed, dropping frame (%d).\n", - foo); + rc); 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 rc; 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) { + rc = wep_decrypt(wlandev, skb->data + payload_offset + 4, + payload_length - 8, -1, + skb->data + payload_offset, + skb->data + payload_offset + + payload_length - 4); + if (rc) { /* de-wep failed, drop skb. */ netdev_dbg(netdev, "Host de-WEP failed, dropping frame (%d).\n", - foo); + rc); wlandev->rx.decrypt_err++; return 2; } |