Skip to content

Commit 33677b4

Browse files
Sam Muhammedgregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/ce20980cc1947255b8a2de3c1f1364c11c163b9e.1585233434.git.jane.pnx9@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6a56933 commit 33677b4

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,14 +1270,15 @@ static void ieee80211_associate_step2(struct ieee80211_device *ieee)
12701270
static void ieee80211_associate_complete_wq(struct work_struct *work)
12711271
{
12721272
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
1273-
printk(KERN_INFO "Associated successfully\n");
1273+
1274+
netdev_info(ieee->dev, "Associated successfully\n");
12741275
if (ieee80211_is_54g(&ieee->current_network) &&
12751276
(ieee->modulation & IEEE80211_OFDM_MODULATION)) {
12761277
ieee->rate = 108;
1277-
printk(KERN_INFO"Using G rates:%d\n", ieee->rate);
1278+
netdev_info(ieee->dev, "Using G rates:%d\n", ieee->rate);
12781279
} else {
12791280
ieee->rate = 22;
1280-
printk(KERN_INFO"Using B rates:%d\n", ieee->rate);
1281+
netdev_info(ieee->dev, "Using B rates:%d\n", ieee->rate);
12811282
}
12821283
if (ieee->pHTInfo->bCurrentHTSupport && ieee->pHTInfo->bEnableHT) {
12831284
printk("Successfully associated, ht enabled\n");
@@ -1391,12 +1392,13 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
13911392

13921393
strncpy(ieee->current_network.ssid, tmp_ssid, IW_ESSID_MAX_SIZE);
13931394
ieee->current_network.ssid_len = tmp_ssid_len;
1394-
printk(KERN_INFO"Linking with %s,channel:%d, qos:%d, myHT:%d, networkHT:%d\n",
1395-
ieee->current_network.ssid,
1396-
ieee->current_network.channel,
1397-
ieee->current_network.qos_data.supported,
1398-
ieee->pHTInfo->bEnableHT,
1399-
ieee->current_network.bssht.bdSupportHT);
1395+
netdev_info(ieee->dev,
1396+
"Linking with %s,channel:%d, qos:%d, myHT:%d, networkHT:%d\n",
1397+
ieee->current_network.ssid,
1398+
ieee->current_network.channel,
1399+
ieee->current_network.qos_data.supported,
1400+
ieee->pHTInfo->bEnableHT,
1401+
ieee->current_network.bssht.bdSupportHT);
14001402

14011403
//ieee->pHTInfo->IOTAction = 0;
14021404
HTResetIOTSetting(ieee->pHTInfo);
@@ -1421,11 +1423,13 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
14211423
(ieee->modulation & IEEE80211_OFDM_MODULATION)) {
14221424
ieee->rate = 108;
14231425
ieee->SetWirelessMode(ieee->dev, IEEE_G);
1424-
printk(KERN_INFO"Using G rates\n");
1426+
netdev_info(ieee->dev,
1427+
"Using G rates\n");
14251428
} else {
14261429
ieee->rate = 22;
14271430
ieee->SetWirelessMode(ieee->dev, IEEE_B);
1428-
printk(KERN_INFO"Using B rates\n");
1431+
netdev_info(ieee->dev,
1432+
"Using B rates\n");
14291433
}
14301434
memset(ieee->dot11HTOperationalRateSet, 0, 16);
14311435
//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)
16221626
if (assoc_rq_parse(skb, dest) != -1)
16231627
ieee80211_resp_to_assoc_rq(ieee, dest);
16241628

1625-
printk(KERN_INFO"New client associated: %pM\n", dest);
1629+
netdev_info(ieee->dev, "New client associated: %pM\n", dest);
16261630
//FIXME
16271631
}
16281632

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee,
459459
else
460460
ieee->raw_tx = 0;
461461

462-
printk(KERN_INFO"raw TX is %s\n",
463-
ieee->raw_tx ? "enabled" : "disabled");
462+
netdev_info(ieee->dev, "raw TX is %s\n",
463+
ieee->raw_tx ? "enabled" : "disabled");
464464

465465
if (ieee->iw_mode == IW_MODE_MONITOR) {
466466
if (prev == 0 && ieee->raw_tx) {

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ int ieee80211_encrypt_fragment(
203203

204204
atomic_dec(&crypt->refcnt);
205205
if (res < 0) {
206-
printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
207-
ieee->dev->name, frag->len);
206+
netdev_info(ieee->dev, "Encryption failed: len=%d.\n",
207+
frag->len);
208208
ieee->ieee_stats.tx_discards++;
209209
return -1;
210210
}

0 commit comments

Comments
 (0)