Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215105
b: refs/heads/master
c: 4b34d43
h: refs/heads/master
i:
  215103: 6622945
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Oct 7, 2010
1 parent 486f339 commit 2d480b4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 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: edbe4073a84713c1c01a3f37fb880f151d0a5b68
refs/heads/master: 4b34d432b0fcff422304de4eb49d6da861fe335c
21 changes: 17 additions & 4 deletions trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
int wl1271_cmd_general_parms(struct wl1271 *wl)
{
struct wl1271_general_parms_cmd *gen_parms;
struct wl1271_ini_general_params *gp = &wl->nvs->general_params;
bool answer = false;
int ret;

if (!wl->nvs)
Expand All @@ -119,13 +121,24 @@ int wl1271_cmd_general_parms(struct wl1271 *wl)

gen_parms->test.id = TEST_CMD_INI_FILE_GENERAL_PARAM;

memcpy(&gen_parms->general_params, &wl->nvs->general_params,
sizeof(struct wl1271_ini_general_params));
memcpy(&gen_parms->general_params, gp, sizeof(*gp));

ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), 0);
if (ret < 0)
if (gp->tx_bip_fem_auto_detect)
answer = true;

ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer);
if (ret < 0) {
wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed");
goto out;
}

gp->tx_bip_fem_manufacturer =
gen_parms->general_params.tx_bip_fem_manufacturer;

wl1271_debug(DEBUG_CMD, "FEM autodetect: %s, manufacturer: %d\n",
answer ? "auto" : "manual", gp->tx_bip_fem_manufacturer);

out:
kfree(gen_parms);
return ret;
}
Expand Down

0 comments on commit 2d480b4

Please sign in to comment.