Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314842
b: refs/heads/master
c: b0b09e3
h: refs/heads/master
v: v3
  • Loading branch information
Yair Shapira authored and Luciano Coelho committed Jun 13, 2012
1 parent 8edfa72 commit 1522e83
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05f48d45747e422dba0baaaf96ae2ea103791bce
refs/heads/master: b0b09e312ad36993a9ae51993b73448c1e38fc14
21 changes: 21 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,4 +652,25 @@ struct wl12xx_cmd_stop_channel_switch {
struct wl1271_cmd_header header;
} __packed;

/* Used to check radio status after calibration */
#define MAX_TLV_LENGTH 500
#define TEST_CMD_P2G_CAL 2 /* TX BiP */

struct wl1271_cmd_cal_p2g {
struct wl1271_cmd_header header;

struct wl1271_cmd_test_header test;

__le32 ver;
__le16 len;
u8 buf[MAX_TLV_LENGTH];
u8 type;
u8 padding;

__le16 radio_status;

u8 sub_band_mask;
u8 padding2;
} __packed;

#endif /* __WL1271_CMD_H__ */
14 changes: 14 additions & 0 deletions trunk/drivers/net/wireless/ti/wlcore/testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1522e83

Please sign in to comment.