Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184458
b: refs/heads/master
c: 243eeb5
h: refs/heads/master
v: v3
  • Loading branch information
Kalle Valo authored and John W. Linville committed Feb 19, 2010
1 parent 41c1466 commit fd37175
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 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: 30240fc76a57e37a4bb42976ff7162b5e45e6117
refs/heads/master: 243eeb51eaa0a33caeff3e2275b2460eea5579ec
31 changes: 14 additions & 17 deletions trunk/drivers/net/wireless/wl12xx/wl1271_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,12 +830,14 @@ int wl1271_acx_rate_policies(struct wl1271 *wl)
return ret;
}

int wl1271_acx_ac_cfg(struct wl1271 *wl)
int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
u8 aifsn, u16 txop)
{
struct acx_ac_cfg *acx;
int i, ret = 0;
int ret = 0;

wl1271_debug(DEBUG_ACX, "acx access category config");
wl1271_debug(DEBUG_ACX, "acx ac cfg %d cw_ming %d cw_max %d "
"aifs %d txop %d", ac, cw_min, cw_max, aifsn, txop);

acx = kzalloc(sizeof(*acx), GFP_KERNEL);

Expand All @@ -844,21 +846,16 @@ int wl1271_acx_ac_cfg(struct wl1271 *wl)
goto out;
}

for (i = 0; i < wl->conf.tx.ac_conf_count; i++) {
struct conf_tx_ac_category *c = &(wl->conf.tx.ac_conf[i]);
acx->ac = c->ac;
acx->cw_min = c->cw_min;
acx->cw_max = cpu_to_le16(c->cw_max);
acx->aifsn = c->aifsn;
acx->reserved = 0;
acx->tx_op_limit = cpu_to_le16(c->tx_op_limit);
acx->ac = ac;
acx->cw_min = cw_min;
acx->cw_max = cpu_to_le16(cw_max);
acx->aifsn = aifsn;
acx->tx_op_limit = cpu_to_le16(txop);

ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("Setting of access category "
"config: %d", ret);
goto out;
}
ret = wl1271_cmd_configure(wl, ACX_AC_CFG, acx, sizeof(*acx));
if (ret < 0) {
wl1271_warning("acx ac cfg failed: %d", ret);
goto out;
}

out:
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,8 @@ int wl1271_acx_cts_protect(struct wl1271 *wl,
enum acx_ctsprotect_type ctsprotect);
int wl1271_acx_statistics(struct wl1271 *wl, struct acx_statistics *stats);
int wl1271_acx_rate_policies(struct wl1271 *wl);
int wl1271_acx_ac_cfg(struct wl1271 *wl);
int wl1271_acx_ac_cfg(struct wl1271 *wl, u8 ac, u8 cw_min, u16 cw_max,
u8 aifsn, u16 txop);
int wl1271_acx_tid_cfg(struct wl1271 *wl);
int wl1271_acx_frag_threshold(struct wl1271 *wl);
int wl1271_acx_tx_config_options(struct wl1271 *wl);
Expand Down
14 changes: 10 additions & 4 deletions trunk/drivers/net/wireless/wl12xx/wl1271_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ static int wl1271_init_beacon_broadcast(struct wl1271 *wl)

int wl1271_hw_init(struct wl1271 *wl)
{
int ret;
struct conf_tx_ac_category *conf_ac;
int ret, i;

ret = wl1271_cmd_general_parms(wl);
if (ret < 0)
Expand Down Expand Up @@ -279,9 +280,14 @@ int wl1271_hw_init(struct wl1271 *wl)
goto out_free_memmap;

/* Default AC configuration */
ret = wl1271_acx_ac_cfg(wl);
if (ret < 0)
goto out_free_memmap;
for (i = 0; i < wl->conf.tx.ac_conf_count; i++) {
conf_ac = &wl->conf.tx.ac_conf[i];
ret = wl1271_acx_ac_cfg(wl, conf_ac->ac, conf_ac->cw_min,
conf_ac->cw_max, conf_ac->aifsn,
conf_ac->tx_op_limit);
if (ret < 0)
goto out_free_memmap;
}

/* Configure TX rate classes */
ret = wl1271_acx_rate_policies(wl);
Expand Down

0 comments on commit fd37175

Please sign in to comment.