We are using our custom board with TMIO SD/MMC/SDIO controller it has got 4 channels and in one-of the channel TI WL1281Q wifi adopter chip connected.
We have TMIO controller enbaled with DMA and it works well with SD cards as well as Wifi SDIO card (Ti-Wl1281Q). But if we do a calibration with the same environment i am getting an error "command failed: Input/output error (-5)" .
Linux version : 2.6.35
Test procedure we used to calibrate Tx_count
#/bin/sh insmod compat.ko
insmod cfg80211.ko
insmod mac80211.ko
insmod wl12xx.ko
insmod wl12xx_sdio.ko
echo "calibrator wlan0 plt power_mode on" calibrator wlan0 plt power_mode on sleep 3 echo "calibrator wlan0 plt tune_channel 0 13" calibrator wlan0 plt tune_channel 0 13 sleep 3 echo "calibrator wlan0 plt tx_cont----------------------" calibrator wlan0 plt tx_cont 200000 2 2048 0 2000 0 3 0 0 0 0 0 1 0 18:87:96:50:A1:9B sleep 100 echo "calibrator wlan0 plt tx_stop" calibrator wlan0 plt tx_stop sleep 3
Error output log:
wl12xx: firmware booted in PLT mode (PLT 7.3.9.0.117)
**** calibrator plt tune .. ***
**** calibrator wlan0 plt tx_conwl12xx: ERROR command execute failure 2
------------[ cut here ]------------
WARNING: at /home/ashish/Aisin_WiFi/Aisin_WiFi_2/compat-wireless/drivers/net/wireless/wl12xx/main.c:1279 wl12xx_qu)
Modules linked in: compat cfg80211 mac80211 wl12xx wl12xx_sdio
[<c003e470>] (unwind_backtrace+0x0/0xf0) from [<c03bb33c>] (dump_stack+0x20/0x24)
[<c03bb33c>] (dump_stack+0x20/0x24) from [<c005afe4>] (warn_slowpath_common+0x5c/0x74)
[<c005afe4>] (warn_slowpath_common+0x5c/0x74) from [<c005b028>] (warn_slowpath_null+0x2c/0x34)
[<c005b028>] (warn_slowpath_null+0x2c/0x34) from [<bf0c3d04>] (wl12xx_queue_recovery_work+0x34/0x64 [wl12xx])
[<bf0c3d04>] (wl12xx_queue_recovery_work+0x34/0x64 [wl12xx]) from [<bf0c74e4>] (wl1271_cmd_send+0x460/0x48c [wl12x)
[<bf0c74e4>] (wl1271_cmd_send+0x460/0x48c [wl12xx]) from [<bf0c9a80>] (wl1271_cmd_test+0x40/0x60 [wl12xx])
[<bf0c9a80>] (wl1271_cmd_test+0x40/0x60 [wl12xx]) from [<bf0dc988>] (wl1271_tm_cmd+0xf4/0x4c8 [wl12xx])
[<bf0dc988>] (wl1271_tm_cmd+0xf4/0x4c8 [wl12xx]) from [<bf061598>] (ieee80211_testmode_cmd+0x44/0x4c [mac80211])
[<bf061598>] (ieee80211_testmode_cmd+0x44/0x4c [mac80211]) from [<bf016d00>] (nl80211_testmode_do+0x64/0x70 [cfg80)
[<bf016d00>] (nl80211_testmode_do+0x64/0x70 [cfg80211]) from [<bf0012c0>] (nl_doit_wrapper+0x118/0x150 [compat])
[<bf0012c0>] (nl_doit_wrapper+0x118/0x150 [compat]) from [<c031a964>] (genl_rcv_msg+0x158/0x17c)
[<c031a964>] (genl_rcv_msg+0x158/0x17c) from [<c0319088>] (netlink_rcv_skb+0x5c/0xc0)
[<c0319088>] (netlink_rcv_skb+0x5c/0xc0) from [<c031a800>] (genl_rcv+0x28/0x34)
[<c031a800>] (genl_rcv+0x28/0x34) from [<c0318ce8>] (netlink_unicast+0x254/0x328)
[<c0318ce8>] (netlink_unicast+0x254/0x328) from [<c03196d4>] (netlink_sendmsg+0x298/0x2ac)
[<c03196d4>] (netlink_sendmsg+0x298/0x2ac) from [<c02ee134>] (sock_sendmsg+0xac/0x150)
[<c02ee134>] (sock_sendmsg+0xac/0x150) from [<c02ee7a8>] (sys_sendmsg+0x1c0/0x21c)
[<c02ee7a8>] (sys_sendmsg+0x1c0/0x21c) from [<c00372c0>] (ret_fast_syscall+0x0/0x3c)
---[ end trace 3a8457c9fac79816 ]---
wl12xx: WARNING TEST command failed
wl12xx: WARNING testmode cmd test failed: -5
t .. ***
00:01:02:03:04:05
command failed: Input/output error (-5)
Observation:
1. Found that the part of code which causes the failure is from drivers/net/wireless/wl12xx/cmd.c
status = le16_to_cpu(cmd->status);
if (status != CMD_STATUS_SUCCESS) {
wl1271_error("command execute failure %d", status);
ret = -EIO;
goto fail;
}
From the output log captured above we can see that the value of status= 2 which evaluates to "CMD_STATUS_UNKNOWN_CMD" as coded in drivers/net/wireless/wl12xx/cmd.h.
If i do not consider this check i mean if i by-pass this check as
if (status != CMD_STATUS_SUCCESS && status != CMD_STATUS_UNKNOWN_CMD ) {
it seems working fine,
2. But one strange is that it works well with PIO mode wihout any change. I am worried why with DMA such kind of error("CMD_STATUS_UNKNOWN_CMD") is reported.
and why in this code snippet its returned with -EIO for CMD_STATUS_UNKNOWN_CMD, is it correct?
3. I cannot say its DMA problem since the DMA is working well with this Wifi card and i am able to ping with other PC without any failure.
Any valuable feedback would reply help us.
