提交 14108510 编写于 作者: A Ana Rey 提交者: Greg Kroah-Hartman

staging: rtl8192u: Convert from printk into netdev_err or netdev_info

Convert from printk functions into netdev_err or netdev_info in
ieee80211/dot11d.c

Fix checkpatch.pl warning:
WARNING: printk() should include KERN_ facility level
WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
Signed-off-by: NAna Rey <anarey@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 db11196e
...@@ -14,7 +14,7 @@ void Dot11d_Init(struct ieee80211_device *ieee) ...@@ -14,7 +14,7 @@ void Dot11d_Init(struct ieee80211_device *ieee)
memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1); memset(pDot11dInfo->MaxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER+1);
RESET_CIE_WATCHDOG(ieee); RESET_CIE_WATCHDOG(ieee);
printk("Dot11d_Init()\n"); netdev_info(ieee->dev, "Dot11d_Init()\n");
} }
EXPORT_SYMBOL(Dot11d_Init); EXPORT_SYMBOL(Dot11d_Init);
...@@ -65,14 +65,14 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr, ...@@ -65,14 +65,14 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
/* It is not in a monotonically increasing order, so /* It is not in a monotonically increasing order, so
* stop processing. * stop processing.
*/ */
printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n"); netdev_err(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
return; return;
} }
if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) { if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + pTriple->NumChnls)) {
/* It is not a valid set of channel id, so stop /* It is not a valid set of channel id, so stop
* processing. * processing.
*/ */
printk("Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n"); netdev_err(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
return; return;
} }
...@@ -84,11 +84,11 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr, ...@@ -84,11 +84,11 @@ void Dot11d_UpdateCountryIe(struct ieee80211_device *dev, u8 *pTaddr,
pTriple = (PCHNL_TXPOWER_TRIPLE)((u8 *)pTriple + 3); pTriple = (PCHNL_TXPOWER_TRIPLE)((u8 *)pTriple + 3);
} }
printk("Channel List:"); netdev_info(dev->dev, "Channel List:");
for (i = 1; i <= MAX_CHANNEL_NUMBER; i++) for (i = 1; i <= MAX_CHANNEL_NUMBER; i++)
if (pDot11dInfo->channel_map[i] > 0) if (pDot11dInfo->channel_map[i] > 0)
printk(" %d", i); netdev_info(dev->dev, " %d", i);
printk("\n"); netdev_info(dev->dev, "\n");
UPDATE_CIE_SRC(dev, pTaddr); UPDATE_CIE_SRC(dev, pTaddr);
...@@ -104,7 +104,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel) ...@@ -104,7 +104,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct ieee80211_device *dev, u8 Channel)
u8 MaxTxPwrInDbm = 255; u8 MaxTxPwrInDbm = 255;
if (MAX_CHANNEL_NUMBER < Channel) { if (MAX_CHANNEL_NUMBER < Channel) {
printk("DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n"); netdev_err(dev->dev, "DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");
return MaxTxPwrInDbm; return MaxTxPwrInDbm;
} }
if (pDot11dInfo->channel_map[Channel]) if (pDot11dInfo->channel_map[Channel])
...@@ -140,7 +140,7 @@ int IsLegalChannel(struct ieee80211_device *dev, u8 channel) ...@@ -140,7 +140,7 @@ int IsLegalChannel(struct ieee80211_device *dev, u8 channel)
PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev); PRT_DOT11D_INFO pDot11dInfo = GET_DOT11D_INFO(dev);
if (MAX_CHANNEL_NUMBER < channel) { if (MAX_CHANNEL_NUMBER < channel) {
printk("IsLegalChannel(): Invalid Channel\n"); netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
return 0; return 0;
} }
if (pDot11dInfo->channel_map[channel] > 0) if (pDot11dInfo->channel_map[channel] > 0)
...@@ -163,7 +163,7 @@ int ToLegalChannel(struct ieee80211_device *dev, u8 channel) ...@@ -163,7 +163,7 @@ int ToLegalChannel(struct ieee80211_device *dev, u8 channel)
} }
if (MAX_CHANNEL_NUMBER < channel) { if (MAX_CHANNEL_NUMBER < channel) {
printk("IsLegalChannel(): Invalid Channel\n"); netdev_err(dev->dev, "IsLegalChannel(): Invalid Channel\n");
return default_chn; return default_chn;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册