Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135225
b: refs/heads/master
c: 0eeb59f
h: refs/heads/master
i:
  135223: 5923e32
v: v3
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Mar 16, 2009
1 parent cd09a44 commit 6a14a54
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 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: 2bfc5cb57b55ed2204bca7668e082f7bf485760a
refs/heads/master: 0eeb59fe2cd84b62f374874a59e62402e13f48b3
24 changes: 10 additions & 14 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,36 +417,33 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,

memset(&params, 0, sizeof(params));

if (!local->ops->conf_tx)
return;

local->wmm_acm = 0;
for (; left >= 4; left -= 4, pos += 4) {
int aci = (pos[0] >> 5) & 0x03;
int acm = (pos[0] >> 4) & 0x01;
int queue;

switch (aci) {
case 1:
case 1: /* AC_BK */
queue = 3;
if (acm)
local->wmm_acm |= BIT(0) | BIT(3);
local->wmm_acm |= BIT(1) | BIT(2); /* BK/- */
break;
case 2:
case 2: /* AC_VI */
queue = 1;
if (acm)
local->wmm_acm |= BIT(4) | BIT(5);
local->wmm_acm |= BIT(4) | BIT(5); /* CL/VI */
break;
case 3:
case 3: /* AC_VO */
queue = 0;
if (acm)
local->wmm_acm |= BIT(6) | BIT(7);
local->wmm_acm |= BIT(6) | BIT(7); /* VO/NC */
break;
case 0:
case 0: /* AC_BE */
default:
queue = 2;
if (acm)
local->wmm_acm |= BIT(1) | BIT(2);
local->wmm_acm |= BIT(0) | BIT(3); /* BE/EE */
break;
}

Expand All @@ -460,9 +457,8 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
local->mdev->name, queue, aci, acm, params.aifs, params.cw_min,
params.cw_max, params.txop);
#endif
/* TODO: handle ACM (block TX, fallback to next lowest allowed
* AC for now) */
if (local->ops->conf_tx(local_to_hw(local), queue, &params)) {
if (local->ops->conf_tx &&
local->ops->conf_tx(local_to_hw(local), queue, &params)) {
printk(KERN_DEBUG "%s: failed to set TX queue "
"parameters for queue %d\n", local->mdev->name, queue);
}
Expand Down
9 changes: 6 additions & 3 deletions trunk/net/mac80211/wme.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ static u16 classify80211(struct ieee80211_local *local, struct sk_buff *skb)
/* in case we are a client verify acm is not set for this ac */
while (unlikely(local->wmm_acm & BIT(skb->priority))) {
if (wme_downgrade_ac(skb)) {
/* The old code would drop the packet in this
* case.
/*
* This should not really happen. The AP has marked all
* lower ACs to require admission control which is not
* a reasonable configuration. Allow the frame to be
* transmitted using AC_BK as a workaround.
*/
return 0;
break;
}
}

Expand Down

0 comments on commit 6a14a54

Please sign in to comment.