Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203514
b: refs/heads/master
c: ab2807e
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Jul 8, 2010
1 parent 09d39cd commit a0b9b12
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 105 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3473187d2459a078e00e5fac8aafc30af69c57fa
refs/heads/master: ab2807efcfd2dd646a2ca8d71585e26cda3fc0c1
104 changes: 0 additions & 104 deletions trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,100 +104,6 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
return ret;
}

static int wl1271_cmd_cal_channel_tune(struct wl1271 *wl)
{
struct wl1271_cmd_cal_channel_tune *cmd;
int ret = 0;

cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd)
return -ENOMEM;

cmd->test.id = TEST_CMD_CHANNEL_TUNE;

cmd->band = WL1271_CHANNEL_TUNE_BAND_2_4;
/* set up any channel, 7 is in the middle of the range */
cmd->channel = 7;

ret = wl1271_cmd_test(wl, cmd, sizeof(*cmd), 0);
if (ret < 0)
wl1271_warning("TEST_CMD_CHANNEL_TUNE failed");

kfree(cmd);
return ret;
}

static int wl1271_cmd_cal_update_ref_point(struct wl1271 *wl)
{
struct wl1271_cmd_cal_update_ref_point *cmd;
int ret = 0;

cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd)
return -ENOMEM;

cmd->test.id = TEST_CMD_UPDATE_PD_REFERENCE_POINT;

/* FIXME: still waiting for the correct values */
cmd->ref_power = 0;
cmd->ref_detector = 0;

cmd->sub_band = WL1271_PD_REFERENCE_POINT_BAND_B_G;

ret = wl1271_cmd_test(wl, cmd, sizeof(*cmd), 0);
if (ret < 0)
wl1271_warning("TEST_CMD_UPDATE_PD_REFERENCE_POINT failed");

kfree(cmd);
return ret;
}

static int wl1271_cmd_cal_p2g(struct wl1271 *wl)
{
struct wl1271_cmd_cal_p2g *cmd;
int ret = 0;

cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd)
return -ENOMEM;

cmd->test.id = TEST_CMD_P2G_CAL;

cmd->sub_band_mask = WL1271_CAL_P2G_BAND_B_G;

ret = wl1271_cmd_test(wl, cmd, sizeof(*cmd), 0);
if (ret < 0)
wl1271_warning("TEST_CMD_P2G_CAL failed");

kfree(cmd);
return ret;
}

static int wl1271_cmd_cal(struct wl1271 *wl)
{
/*
* FIXME: we must make sure that we're not sleeping when calibration
* is done
*/
int ret;

wl1271_notice("performing tx calibration");

ret = wl1271_cmd_cal_channel_tune(wl);
if (ret < 0)
return ret;

ret = wl1271_cmd_cal_update_ref_point(wl);
if (ret < 0)
return ret;

ret = wl1271_cmd_cal_p2g(wl);
if (ret < 0)
return ret;

return ret;
}

int wl1271_cmd_general_parms(struct wl1271 *wl)
{
struct wl1271_general_parms_cmd *gen_parms;
Expand Down Expand Up @@ -295,20 +201,10 @@ static int wl1271_cmd_wait_for_event(struct wl1271 *wl, u32 mask)

int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type)
{
static bool do_cal = true;
struct wl1271_cmd_join *join;
int ret, i;
u8 *bssid;

/* FIXME: remove when we get calibration from the factory */
if (do_cal) {
ret = wl1271_cmd_cal(wl);
if (ret < 0)
wl1271_warning("couldn't calibrate");
else
do_cal = false;
}

join = kzalloc(sizeof(*join), GFP_KERNEL);
if (!join) {
ret = -ENOMEM;
Expand Down

0 comments on commit a0b9b12

Please sign in to comment.