From: Sam Muhammed Date: Thu, 26 Mar 2020 15:02:37 +0000 (-0400) Subject: Staging: rtl8192u: ieee80211: Use netdev_info() with network devices. X-Git-Tag: v5.10.7~2990^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33677b4890fdc721c56708fe964ca93e68248c0a;p=platform%2Fkernel%2Flinux-rpi.git Staging: rtl8192u: ieee80211: Use netdev_info() with network devices. netdev_info() should be used instead of printk(KERN_INFO ...) since it's specific to and preferable for printing messages for network devices. Signed-off-by: Sam Muhammed Link: https://lore.kernel.org/r/ce20980cc1947255b8a2de3c1f1364c11c163b9e.1585233434.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 90692db..1e79bc7 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1270,14 +1270,15 @@ static void ieee80211_associate_step2(struct ieee80211_device *ieee) static void ieee80211_associate_complete_wq(struct work_struct *work) { struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq); - printk(KERN_INFO "Associated successfully\n"); + + netdev_info(ieee->dev, "Associated successfully\n"); if (ieee80211_is_54g(&ieee->current_network) && (ieee->modulation & IEEE80211_OFDM_MODULATION)) { ieee->rate = 108; - printk(KERN_INFO"Using G rates:%d\n", ieee->rate); + netdev_info(ieee->dev, "Using G rates:%d\n", ieee->rate); } else { ieee->rate = 22; - printk(KERN_INFO"Using B rates:%d\n", ieee->rate); + netdev_info(ieee->dev, "Using B rates:%d\n", ieee->rate); } if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT) { printk("Successfully associated, ht enabled\n"); @@ -1391,12 +1392,13 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee strncpy(ieee->current_network.ssid, tmp_ssid, IW_ESSID_MAX_SIZE); ieee->current_network.ssid_len = tmp_ssid_len; - printk(KERN_INFO"Linking with %s,channel:%d, qos:%d, myHT:%d, networkHT:%d\n", - ieee->current_network.ssid, - ieee->current_network.channel, - ieee->current_network.qos_data.supported, - ieee->pHTInfo->bEnableHT, - ieee->current_network.bssht.bdSupportHT); + netdev_info(ieee->dev, + "Linking with %s,channel:%d, qos:%d, myHT:%d, networkHT:%d\n", + ieee->current_network.ssid, + ieee->current_network.channel, + ieee->current_network.qos_data.supported, + ieee->pHTInfo->bEnableHT, + ieee->current_network.bssht.bdSupportHT); //ieee->pHTInfo->IOTAction = 0; HTResetIOTSetting(ieee->pHTInfo); @@ -1421,11 +1423,13 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee (ieee->modulation & IEEE80211_OFDM_MODULATION)) { ieee->rate = 108; ieee->SetWirelessMode(ieee->dev, IEEE_G); - printk(KERN_INFO"Using G rates\n"); + netdev_info(ieee->dev, + "Using G rates\n"); } else { ieee->rate = 22; ieee->SetWirelessMode(ieee->dev, IEEE_B); - printk(KERN_INFO"Using B rates\n"); + netdev_info(ieee->dev, + "Using B rates\n"); } memset(ieee->dot11HTOperationalRateSet, 0, 16); //HTSetConnectBwMode(ieee, HT_CHANNEL_WIDTH_20, HT_EXTCHNL_OFFSET_NO_EXT); @@ -1622,7 +1626,7 @@ ieee80211_rx_assoc_rq(struct ieee80211_device *ieee, struct sk_buff *skb) if (assoc_rq_parse(skb, dest) != -1) ieee80211_resp_to_assoc_rq(ieee, dest); - printk(KERN_INFO"New client associated: %pM\n", dest); + netdev_info(ieee->dev, "New client associated: %pM\n", dest); //FIXME } diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c index b1baaa1..f434a26 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c @@ -459,8 +459,8 @@ int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee, else ieee->raw_tx = 0; - printk(KERN_INFO"raw TX is %s\n", - ieee->raw_tx ? "enabled" : "disabled"); + netdev_info(ieee->dev, "raw TX is %s\n", + ieee->raw_tx ? "enabled" : "disabled"); if (ieee->iw_mode == IW_MODE_MONITOR) { if (prev == 0 && ieee->raw_tx) { diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c index 44684b7..0ee054d8 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c @@ -203,8 +203,8 @@ int ieee80211_encrypt_fragment( atomic_dec(&crypt->refcnt); if (res < 0) { - printk(KERN_INFO "%s: Encryption failed: len=%d.\n", - ieee->dev->name, frag->len); + netdev_info(ieee->dev, "Encryption failed: len=%d.\n", + frag->len); ieee->ieee_stats.tx_discards++; return -1; }