diff options
author | Yair Shapira <yair.shapira@ti.com> | 2012-06-13 17:14:22 +0300 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-13 21:56:37 +0300 |
commit | b0b09e312ad36993a9ae51993b73448c1e38fc14 (patch) | |
tree | 25642c7e73736405448a00515069eaae6c9d7443 /drivers/net/wireless/ti/wlcore/testmode.c | |
parent | wlcore/wl12xx: add support for HP and SKW FEM radio manufacturers (diff) | |
download | linux-dev-b0b09e312ad36993a9ae51993b73448c1e38fc14.tar.xz linux-dev-b0b09e312ad36993a9ae51993b73448c1e38fc14.zip |
wlcore: add print logs of radio_status in case of BIP calibration
FEM BIP calibration may fail with fw/phy radio status. In order to
recognize these failures a log is added to the calibration answer
(TEST_CMD_P2G_CAL)
Signed-off-by: Yair Shapira <yair.shapira@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/testmode.c')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/testmode.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/testmode.c b/drivers/net/wireless/ti/wlcore/testmode.c index 0e59ea2cdd39..eeb339d61d1e 100644 --- a/drivers/net/wireless/ti/wlcore/testmode.c +++ b/drivers/net/wireless/ti/wlcore/testmode.c @@ -108,6 +108,20 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[]) } if (answer) { + /* If we got bip calibration answer print radio status */ + struct wl1271_cmd_cal_p2g *params = + (struct wl1271_cmd_cal_p2g *) buf; + + s16 radio_status = (s16) le16_to_cpu(params->radio_status); + + if (params->test.id == TEST_CMD_P2G_CAL && + radio_status < 0) + wl1271_warning("testmode cmd: radio status=%d", + radio_status); + else + wl1271_info("testmode cmd: radio status=%d", + radio_status); + len = nla_total_size(buf_len); skb = cfg80211_testmode_alloc_reply_skb(wl->hw->wiphy, len); if (!skb) { |