staging: wlan-ng: replace pr_debug() with netdev_dbg()
authorCalvince Otieno <calvncce@gmail.com>
Mon, 16 Oct 2023 09:20:37 +0000 (12:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Oct 2023 15:54:04 +0000 (17:54 +0200)
This patch replaces the usage of pr_debug() with netdev_dbg().
The change is made to enhance context-aware debugging,
improve code clarity, and maintain compatibility with established
network debugging practices. There were no functional code changes.

Signed-off-by: Calvince Otieno <calvncce@gmail.com>
Link: https://lore.kernel.org/r/ZS0AZahhusLoN4b/@lab-ubuntu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/p80211conv.c

index 048e1c3fe19b321758936613c2a41ecb69f60820..8336435eccc2109c7c1f5abe6b7cf678db43e59b 100644 (file)
@@ -312,8 +312,8 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
                                  payload_length - 4);
                if (foo) {
                        /* de-wep failed, drop skb. */
-                       pr_debug("Host de-WEP failed, dropping frame (%d).\n",
-                                foo);
+                       netdev_dbg(netdev, "Host de-WEP failed, dropping frame (%d).\n",
+                                  foo);
                        wlandev->rx.decrypt_err++;
                        return 2;
                }
@@ -340,7 +340,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
            (e_llc->dsap != 0xaa || e_llc->ssap != 0xaa) &&
            ((!ether_addr_equal_unaligned(daddr, e_hdr->daddr)) ||
             (!ether_addr_equal_unaligned(saddr, e_hdr->saddr)))) {
-               pr_debug("802.3 ENCAP len: %d\n", payload_length);
+               netdev_dbg(netdev, "802.3 ENCAP len: %d\n", payload_length);
                /* 802.3 Encapsulated */
                /* Test for an overlength frame */
                if (payload_length > (netdev->mtu + ETH_HLEN)) {
@@ -367,7 +367,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
                   (p80211_stt_findproto(be16_to_cpu(e_snap->type)))) ||
                   (memcmp(e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN) !=
                        0))) {
-               pr_debug("SNAP+RFC1042 len: %d\n", payload_length);
+               netdev_dbg(netdev, "SNAP+RFC1042 len: %d\n", payload_length);
                /* it's a SNAP + RFC1042 frame && protocol is in STT */
                /* build 802.3 + RFC1042 */
 
@@ -397,7 +397,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
                (e_llc->dsap == 0xaa) &&
                (e_llc->ssap == 0xaa) &&
                (e_llc->ctl == 0x03)) {
-               pr_debug("802.1h/RFC1042 len: %d\n", payload_length);
+               netdev_dbg(netdev, "802.1h/RFC1042 len: %d\n", payload_length);
                /* it's an 802.1h frame || (an RFC1042 && protocol not in STT)
                 * build a DIXII + RFC894
                 */
@@ -433,7 +433,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
                /* chop off the 802.11 CRC */
                skb_trim(skb, skb->len - WLAN_CRC_LEN);
        } else {
-               pr_debug("NON-ENCAP len: %d\n", payload_length);
+               netdev_dbg(netdev, "NON-ENCAP len: %d\n", payload_length);
                /* any NON-ENCAP */
                /* it's a generic 80211+LLC or IPX 'Raw 802.3' */
                /*  build an 802.3 frame */