Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171861
b: refs/heads/master
c: 474c48c
h: refs/heads/master
i:
  171859: 35bb757
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Nov 18, 2009
1 parent 800e41e commit 1130d6b
Show file tree
Hide file tree
Showing 4 changed files with 46 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: 15295380f45aa0d35665f6e5596ac98c081d95b9
refs/heads/master: 474c48c9f2118e637477b3b1c70003cb5cbda983
29 changes: 29 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,35 @@ int wl1251_acx_beacon_filter_table(struct wl1251 *wl)
return ret;
}

int wl1251_acx_conn_monit_params(struct wl1251 *wl)
{
struct acx_conn_monit_params *acx;
int ret;

wl1251_debug(DEBUG_ACX, "acx connection monitor parameters");

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

acx->synch_fail_thold = SYNCH_FAIL_DEFAULT_THRESHOLD;
acx->bss_lose_timeout = NO_BEACON_DEFAULT_TIMEOUT;

ret = wl1251_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
acx, sizeof(*acx));
if (ret < 0) {
wl1251_warning("failed to set connection monitor "
"parameters: %d", ret);
goto out;
}

out:
kfree(acx);
return ret;
}

int wl1251_acx_sg_enable(struct wl1251 *wl)
{
struct acx_bt_wlan_coex *pta;
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251_acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,16 @@ struct acx_beacon_filter_ie_table {
u8 pad[3];
} __attribute__ ((packed));

#define SYNCH_FAIL_DEFAULT_THRESHOLD 5 /* number of beacons */
#define NO_BEACON_DEFAULT_TIMEOUT (100) /* TU */

struct acx_conn_monit_params {
struct acx_header header;

u32 synch_fail_thold; /* number of beacons missed */
u32 bss_lose_timeout; /* number of TU's from synch fail */
};

enum {
SG_ENABLE = 0,
SG_DISABLE,
Expand Down Expand Up @@ -1275,6 +1285,7 @@ int wl1251_acx_service_period_timeout(struct wl1251 *wl);
int wl1251_acx_rts_threshold(struct wl1251 *wl, u16 rts_threshold);
int wl1251_acx_beacon_filter_opt(struct wl1251 *wl);
int wl1251_acx_beacon_filter_table(struct wl1251 *wl);
int wl1251_acx_conn_monit_params(struct wl1251 *wl);
int wl1251_acx_sg_enable(struct wl1251 *wl);
int wl1251_acx_sg_cfg(struct wl1251 *wl);
int wl1251_acx_cca_threshold(struct wl1251 *wl);
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@ int wl1251_hw_init(struct wl1251 *wl)
if (ret < 0)
goto out_free_data_path;

/* Initialize connection monitoring thresholds */
ret = wl1251_acx_conn_monit_params(wl);
if (ret < 0)
goto out_free_data_path;

/* Beacon filtering */
ret = wl1251_hw_init_beacon_filter(wl);
if (ret < 0)
Expand Down

0 comments on commit 1130d6b

Please sign in to comment.