Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183385
b: refs/heads/master
c: 38ad2d8
h: refs/heads/master
i:
  183383: c2180a6
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Dec 28, 2009
1 parent af89b4a commit 109dadd
Show file tree
Hide file tree
Showing 6 changed files with 64 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: 71449f8d7059b69e6e45063997d225d8202221a2
refs/heads/master: 38ad2d87d42ba847c100ef132e8e363513982c8b
28 changes: 28 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,3 +1118,31 @@ int wl1271_acx_arp_ip_filter(struct wl1271 *wl, bool enable, u8 *address,
kfree(acx);
return ret;
}

int wl1271_acx_pm_config(struct wl1271 *wl)
{
struct wl1271_acx_pm_config *acx = NULL;
struct conf_pm_config_settings *c = &wl->conf.pm_config;
int ret = 0;

wl1271_debug(DEBUG_ACX, "acx pm config");

acx = kzalloc(sizeof(*acx), GFP_KERNEL);
if (!acx) {
ret = -ENOMEM;
goto out;
}

acx->host_clk_settling_time = cpu_to_le32(c->host_clk_settling_time);
acx->host_fast_wakeup_support = c->host_fast_wakeup_support;

ret = wl1271_cmd_configure(wl, ACX_PM_CONFIG, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("acx pm config failed: %d", ret);
goto out;
}

out:
kfree(acx);
return ret;
}
9 changes: 9 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,13 @@ struct wl1271_acx_arp_filter {
used. */
} __attribute__((packed));

struct wl1271_acx_pm_config {
struct acx_header header;

__le32 host_clk_settling_time;
u8 host_fast_wakeup_support;
u8 padding[3];
} __attribute__ ((packed));

enum {
ACX_WAKE_UP_CONDITIONS = 0x0002,
Expand Down Expand Up @@ -1025,6 +1032,7 @@ enum {
DOT11_RX_DOT11_MODE = 0x1012,
DOT11_RTS_THRESHOLD = 0x1013,
DOT11_GROUP_ADDRESS_TBL = 0x1014,
ACX_PM_CONFIG = 0x1016,

MAX_DOT11_IE = DOT11_GROUP_ADDRESS_TBL,

Expand Down Expand Up @@ -1073,5 +1081,6 @@ int wl1271_acx_smart_reflex(struct wl1271 *wl);
int wl1271_acx_bet_enable(struct wl1271 *wl, bool enable);
int wl1271_acx_arp_ip_filter(struct wl1271 *wl, bool enable, u8 *address,
u8 version);
int wl1271_acx_pm_config(struct wl1271 *wl);

#endif /* __WL1271_ACX_H__ */
17 changes: 17 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -904,13 +904,30 @@ struct conf_itrim_settings {
u32 timeout;
};

struct conf_pm_config_settings {
/*
* Host clock settling time
*
* Range: 0 - 30000 us
*/
u32 host_clk_settling_time;

/*
* Host fast wakeup support
*
* Range: true, false
*/
bool host_fast_wakeup_support;
};

struct conf_drv_settings {
struct conf_sg_settings sg;
struct conf_rx_settings rx;
struct conf_tx_settings tx;
struct conf_conn_settings conn;
struct conf_init_settings init;
struct conf_itrim_settings itrim;
struct conf_pm_config_settings pm_config;
};

#endif
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ int wl1271_hw_init(struct wl1271 *wl)
if (ret < 0)
goto out_free_memmap;

/* configure PM */
ret = wl1271_acx_pm_config(wl);
if (ret < 0)
goto out_free_memmap;

return 0;

out_free_memmap:
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ static struct conf_drv_settings default_conf = {
.itrim = {
.enable = false,
.timeout = 50000,
},
.pm_config = {
.host_clk_settling_time = 5000,
.host_fast_wakeup_support = false
}
};

Expand Down

0 comments on commit 109dadd

Please sign in to comment.