diff options
author | Sam Muhammed <jane.pnx9@gmail.com> | 2020-03-26 11:02:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-26 16:58:23 +0100 |
commit | 6a5693361a3ec0eb49e4f9ef022411b3c64d390e (patch) | |
tree | e280f43a25dd225b8b1aa39991df0e3dda733889 /drivers/staging | |
parent | ea7a10ea01aa5d740245db60448c9549ce6a5a1a (diff) | |
download | linux-6a5693361a3ec0eb49e4f9ef022411b3c64d390e.tar.bz2 |
Staging: rtl8192u: ieee80211: Use netdev_warn() for network devices.
Use netdev_warn() over printk().
netdev_warn() is specific for printing warning
messages for network devices, and preferable
over printk(KERN_WARNING ...).
Signed-off-by: Sam Muhammed <jane.pnx9@gmail.com>
Link: https://lore.kernel.org/r/02fe0666cb737a3b0581081c9e7c179bfb820cac.1585233434.git.jane.pnx9@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 3 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 17 | ||||
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 5 |
3 files changed, 10 insertions, 15 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c index aa9dab8a4ae8..a5a1b14f5a40 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c @@ -68,8 +68,7 @@ static inline int ieee80211_networks_allocate(struct ieee80211_device *ieee) sizeof(struct ieee80211_network), GFP_KERNEL); if (!ieee->networks) { - printk(KERN_WARNING "%s: Out of memory allocating beacons\n", - ieee->dev->name); + netdev_warn(ieee->dev, "Out of memory allocating beacons\n"); return -ENOMEM; } diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c index 95cea2f56149..44684b7fae72 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c @@ -556,16 +556,15 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) */ if ((!ieee->hard_start_xmit && !(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)) || ((!ieee->softmac_data_hard_start_xmit && (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) { - printk(KERN_WARNING "%s: No xmit handler.\n", - ieee->dev->name); + netdev_warn(ieee->dev, "No xmit handler.\n"); goto success; } if (likely(ieee->raw_tx == 0)) { if (unlikely(skb->len < SNAP_SIZE + sizeof(u16))) { - printk(KERN_WARNING "%s: skb too small (%d).\n", - ieee->dev->name, skb->len); + netdev_warn(ieee->dev, "skb too small (%d).\n", + skb->len); goto success; } @@ -684,8 +683,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) */ txb = ieee80211_alloc_txb(nr_frags, frag_size + ieee->tx_headroom, GFP_ATOMIC); if (unlikely(!txb)) { - printk(KERN_WARNING "%s: Could not allocate TXB\n", - ieee->dev->name); + netdev_warn(ieee->dev, "Could not allocate TXB\n"); goto failed; } txb->encrypted = encrypt; @@ -778,15 +776,14 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) } } else { if (unlikely(skb->len < sizeof(struct rtl_80211_hdr_3addr))) { - printk(KERN_WARNING "%s: skb too small (%d).\n", - ieee->dev->name, skb->len); + netdev_warn(ieee->dev, "skb too small (%d).\n", + skb->len); goto success; } txb = ieee80211_alloc_txb(1, skb->len, GFP_ATOMIC); if (!txb) { - printk(KERN_WARNING "%s: Could not allocate TXB\n", - ieee->dev->name); + netdev_warn(ieee->dev, "Could not allocate TXB\n"); goto failed; } diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index 17d9700dbf01..22373c0afebc 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -356,9 +356,8 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee, kfree(new_crypt); new_crypt = NULL; - printk(KERN_WARNING "%s: could not initialize WEP: " - "load module ieee80211_crypt_wep\n", - dev->name); + netdev_warn(dev, "could not initialize WEP: " + "load module ieee80211_crypt_wep\n"); return -EOPNOTSUPP; } *crypt = new_crypt; |