Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194128
b: refs/heads/master
c: 6ccbb92
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 31, 2010
1 parent 5ae4b3e commit 272ddd0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 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: e7942235f2496587cb4af86168e54d588ffcbd4f
refs/heads/master: 6ccbb92ead9379d7de2cc25cd950d15a8d22e0c9
18 changes: 14 additions & 4 deletions trunk/drivers/net/wireless/wl12xx/wl1271_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,21 +504,31 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl)
return ret;
}

int wl1271_acx_conn_monit_params(struct wl1271 *wl)
#define ACX_CONN_MONIT_DISABLE_VALUE 0xffffffff

int wl1271_acx_conn_monit_params(struct wl1271 *wl, bool enable)
{
struct acx_conn_monit_params *acx;
u32 threshold = ACX_CONN_MONIT_DISABLE_VALUE;
u32 timeout = ACX_CONN_MONIT_DISABLE_VALUE;
int ret;

wl1271_debug(DEBUG_ACX, "acx connection monitor parameters");
wl1271_debug(DEBUG_ACX, "acx connection monitor parameters: %s",
enable ? "enabled" : "disabled");

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

acx->synch_fail_thold = cpu_to_le32(wl->conf.conn.synch_fail_thold);
acx->bss_lose_timeout = cpu_to_le32(wl->conf.conn.bss_lose_timeout);
if (enable) {
threshold = wl->conf.conn.synch_fail_thold;
timeout = wl->conf.conn.bss_lose_timeout;
}

acx->synch_fail_thold = cpu_to_le32(threshold);
acx->bss_lose_timeout = cpu_to_le32(timeout);

ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
acx, sizeof(*acx));
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ int wl1271_acx_rts_threshold(struct wl1271 *wl, u16 rts_threshold);
int wl1271_acx_dco_itrim_params(struct wl1271 *wl);
int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter);
int wl1271_acx_beacon_filter_table(struct wl1271 *wl);
int wl1271_acx_conn_monit_params(struct wl1271 *wl);
int wl1271_acx_conn_monit_params(struct wl1271 *wl, bool enable);
int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable);
int wl1271_acx_sg_cfg(struct wl1271 *wl);
int wl1271_acx_cca_threshold(struct wl1271 *wl);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ int wl1271_hw_init(struct wl1271 *wl)
goto out_free_memmap;

/* Initialize connection monitoring thresholds */
ret = wl1271_acx_conn_monit_params(wl);
ret = wl1271_acx_conn_monit_params(wl, false);
if (ret < 0)
goto out_free_memmap;

Expand Down
12 changes: 11 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static int wl1271_plt_init(struct wl1271 *wl)
goto out_free_memmap;

/* Initialize connection monitoring thresholds */
ret = wl1271_acx_conn_monit_params(wl);
ret = wl1271_acx_conn_monit_params(wl, false);
if (ret < 0)
goto out_free_memmap;

Expand Down Expand Up @@ -1651,6 +1651,11 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
if (ret < 0)
goto out_sleep;

/* enable the connection monitoring feature */
ret = wl1271_acx_conn_monit_params(wl, true);
if (ret < 0)
goto out_sleep;

/* If we want to go in PSM but we're not there yet */
if (test_bit(WL1271_FLAG_PSM_REQUESTED, &wl->flags) &&
!test_bit(WL1271_FLAG_PSM, &wl->flags)) {
Expand All @@ -1663,6 +1668,11 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
/* use defaults when not associated */
clear_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags);
wl->aid = 0;

/* disable connection monitor features */
ret = wl1271_acx_conn_monit_params(wl, false);
if (ret < 0)
goto out_sleep;
}

}
Expand Down

0 comments on commit 272ddd0

Please sign in to comment.