rtl8188eu: Update logging

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-05-25 18:35:42 -05:00
parent d597e07a9e
commit 96adb823b9
54 changed files with 2268 additions and 2272 deletions

View file

@ -156,7 +156,7 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t
DHD_INFO(("%s: command=%s, len=%d\n", __func__, command, total_len));
if (total_len < (strlen(CMD_PNOSETUP_SET) + sizeof(cmd_tlv_t))) {
DBG_871X("%s argument=%d less min size\n", __func__, total_len);
DBG_88E("%s argument=%d less min size\n", __func__, total_len);
goto exit_proc;
}
@ -183,11 +183,11 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t
if ((nssid = wl_iw_parse_ssid_list_tlv(&str_ptr, ssids_local,
MAX_PFN_LIST_COUNT, &tlv_size_left)) <= 0) {
DBG_871X("SSID is not presented or corrupted ret=%d\n", nssid);
DBG_88E("SSID is not presented or corrupted ret=%d\n", nssid);
goto exit_proc;
} else {
if ((str_ptr[0] != PNO_TLV_TYPE_TIME) || (tlv_size_left <= 1)) {
DBG_871X("%s scan duration corrupted field size %d\n",
DBG_88E("%s scan duration corrupted field size %d\n",
__func__, tlv_size_left);
goto exit_proc;
}
@ -197,7 +197,7 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t
if (str_ptr[0] != 0) {
if ((str_ptr[0] != PNO_TLV_FREQ_REPEAT)) {
DBG_871X("%s pno repeat : corrupted field\n",
DBG_88E("%s pno repeat : corrupted field\n",
__func__);
goto exit_proc;
}
@ -205,7 +205,7 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t
pno_repeat = simple_strtoul(str_ptr, &str_ptr, 16);
DHD_INFO(("%s :got pno_repeat=%d\n", __func__, pno_repeat));
if (str_ptr[0] != PNO_TLV_FREQ_EXPO_MAX) {
DBG_871X("%s FREQ_EXPO_MAX corrupted field size\n",
DBG_88E("%s FREQ_EXPO_MAX corrupted field size\n",
__func__);
goto exit_proc;
}
@ -216,7 +216,7 @@ static int wl_android_set_pno_setup(struct net_device *dev, char *command, int t
}
}
} else {
DBG_871X("%s get wrong TLV command\n", __func__);
DBG_88E("%s get wrong TLV command\n", __func__);
goto exit_proc;
}
@ -346,17 +346,17 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
//DBG_871X("%s priv_cmd.buf=%p priv_cmd.total_len=%d priv_cmd.used_len=%d\n",__func__,priv_cmd.buf,priv_cmd.total_len,priv_cmd.used_len);
//DBG_88E("%s priv_cmd.buf=%p priv_cmd.total_len=%d priv_cmd.used_len=%d\n",__func__,priv_cmd.buf,priv_cmd.total_len,priv_cmd.used_len);
command = kmalloc(priv_cmd.total_len, GFP_KERNEL);
if (!command)
{
DBG_871X("%s: failed to allocate memory\n", __func__);
DBG_88E("%s: failed to allocate memory\n", __func__);
ret = -ENOMEM;
goto exit;
}
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)){
DBG_871X("%s: failed to access memory\n", __func__);
DBG_88E("%s: failed to access memory\n", __func__);
ret = -EFAULT;
goto exit;
}
@ -365,7 +365,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
DBG_871X("%s: Android private cmd \"%s\" on %s\n"
DBG_88E("%s: Android private cmd \"%s\" on %s\n"
, __func__, command, ifr->ifr_name);
cmd_num = rtw_android_cmdstr_to_num(command);
@ -379,7 +379,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
}
if (!g_wifi_on) {
DBG_871X("%s: Ignore private cmd \"%s\" - iface %s is down\n"
DBG_88E("%s: Ignore private cmd \"%s\" - iface %s is down\n"
,__func__, command, ifr->ifr_name);
ret = 0;
goto exit;
@ -548,7 +548,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
}
#endif
default:
DBG_871X("Unknown PRIVATE command %s - ignored\n", command);
DBG_88E("Unknown PRIVATE command %s - ignored\n", command);
snprintf(command, 3, "OK");
bytes_written = strlen("OK");
}
@ -558,14 +558,14 @@ response:
if ((bytes_written == 0) && (priv_cmd.total_len > 0))
command[0] = '\0';
if (bytes_written >= priv_cmd.total_len) {
DBG_871X("%s: bytes_written = %d\n", __func__, bytes_written);
DBG_88E("%s: bytes_written = %d\n", __func__, bytes_written);
bytes_written = priv_cmd.total_len;
} else {
bytes_written++;
}
priv_cmd.used_len = bytes_written;
if (copy_to_user((void *)priv_cmd.buf, command, bytes_written)) {
DBG_871X("%s: failed to copy data to user buffer\n", __func__);
DBG_88E("%s: failed to copy data to user buffer\n", __func__);
ret = -EFAULT;
}
}
@ -603,7 +603,7 @@ int rtw_android_wifictrl_func_add(void)
ret = wifi_add_dev();
if (ret) {
DBG_871X("%s: platform_driver_register failed\n", __func__);
DBG_88E("%s: platform_driver_register failed\n", __func__);
return ret;
}
g_wifidev_registered = 1;
@ -611,7 +611,7 @@ int rtw_android_wifictrl_func_add(void)
/* Waiting callback after platform_driver_register is done or exit with error */
if (down_timeout(&wifi_control_sem, msecs_to_jiffies(1000)) != 0) {
ret = -EINVAL;
DBG_871X("%s: platform_driver_register timeout\n", __func__);
DBG_88E("%s: platform_driver_register timeout\n", __func__);
}
return ret;
@ -632,14 +632,14 @@ void *wl_android_prealloc(int section, unsigned long size)
if (wifi_control_data && wifi_control_data->mem_prealloc) {
alloc_ptr = wifi_control_data->mem_prealloc(section, size);
if (alloc_ptr) {
DBG_871X("success alloc section %d\n", section);
DBG_88E("success alloc section %d\n", section);
if (size != 0L)
memset(alloc_ptr, 0, size);
return alloc_ptr;
}
}
DBG_871X("can't alloc section %d\n", section);
DBG_88E("can't alloc section %d\n", section);
return NULL;
}
@ -658,7 +658,7 @@ int wifi_get_irq_number(unsigned long *irq_flags_ptr)
int wifi_set_power(int on, unsigned long msec)
{
DBG_871X("%s = %d\n", __func__, on);
DBG_88E("%s = %d\n", __func__, on);
if (wifi_control_data && wifi_control_data->set_power) {
wifi_control_data->set_power(on);
}
@ -670,7 +670,7 @@ int wifi_set_power(int on, unsigned long msec)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))
int wifi_get_mac_addr(unsigned char *buf)
{
DBG_871X("%s\n", __func__);
DBG_88E("%s\n", __func__);
if (!buf)
return -EINVAL;
if (wifi_control_data && wifi_control_data->get_mac_addr) {
@ -683,7 +683,7 @@ int wifi_get_mac_addr(unsigned char *buf)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)) || defined(COMPAT_KERNEL_RELEASE)
void *wifi_get_country_code(char *ccode)
{
DBG_871X("%s\n", __func__);
DBG_88E("%s\n", __func__);
if (!ccode)
return NULL;
if (wifi_control_data && wifi_control_data->get_country_code) {
@ -695,7 +695,7 @@ void *wifi_get_country_code(char *ccode)
static int wifi_set_carddetect(int on)
{
DBG_871X("%s = %d\n", __func__, on);
DBG_88E("%s = %d\n", __func__, on);
if (wifi_control_data && wifi_control_data->set_carddetect) {
wifi_control_data->set_carddetect(on);
}
@ -707,7 +707,7 @@ static int wifi_probe(struct platform_device *pdev)
struct wifi_platform_data *wifi_ctrl =
(struct wifi_platform_data *)(pdev->dev.platform_data);
DBG_871X("## %s\n", __func__);
DBG_88E("## %s\n", __func__);
wifi_irqres = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "bcmdhd_wlan_irq");
if (wifi_irqres == NULL)
wifi_irqres = platform_get_resource_byname(pdev,
@ -726,7 +726,7 @@ static int wifi_remove(struct platform_device *pdev)
struct wifi_platform_data *wifi_ctrl =
(struct wifi_platform_data *)(pdev->dev.platform_data);
DBG_871X("## %s\n", __func__);
DBG_88E("## %s\n", __func__);
wifi_control_data = wifi_ctrl;
wifi_set_power(0, 0); /* Power Off */
@ -738,7 +738,7 @@ static int wifi_remove(struct platform_device *pdev)
static int wifi_suspend(struct platform_device *pdev, pm_message_t state)
{
DBG_871X("##> %s\n", __func__);
DBG_88E("##> %s\n", __func__);
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY)
bcmsdh_oob_intr_set(0);
#endif
@ -747,7 +747,7 @@ static int wifi_suspend(struct platform_device *pdev, pm_message_t state)
static int wifi_resume(struct platform_device *pdev)
{
DBG_871X("##> %s\n", __func__);
DBG_88E("##> %s\n", __func__);
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 39)) && defined(OOB_INTR_ONLY)
if (dhd_os_check_if_up(bcmsdh_get_drvdata()))
bcmsdh_oob_intr_set(1);
@ -778,7 +778,7 @@ static struct platform_driver wifi_device_legacy = {
static int wifi_add_dev(void)
{
DBG_871X("## Calling platform_driver_register\n");
DBG_88E("## Calling platform_driver_register\n");
platform_driver_register(&wifi_device);
platform_driver_register(&wifi_device_legacy);
return 0;
@ -786,7 +786,7 @@ static int wifi_add_dev(void)
static void wifi_del_dev(void)
{
DBG_871X("## Unregister platform_driver_register\n");
DBG_88E("## Unregister platform_driver_register\n");
platform_driver_unregister(&wifi_device);
platform_driver_unregister(&wifi_device_legacy);
}