Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225505
b: refs/heads/master
c: 1721284
h: refs/heads/master
i:
  225503: 3b70a2b
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Dec 22, 2010
1 parent 772110a commit 36b67f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 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: db7ec38d8e99f449856c11ffaef363a8eb5af90f
refs/heads/master: 172128468f61e16e1427238278b9ad775584aa89
20 changes: 6 additions & 14 deletions trunk/net/mac80211/wme.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,22 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_local *local = sdata->local;
struct sta_info *sta = NULL;
u32 sta_flags = 0;
const u8 *ra = NULL;
bool qos = false;

if (local->hw.queues < 4 || skb->len < 6) {
skb->priority = 0; /* required for correct WPA/11i MIC */
return min_t(u16, local->hw.queues - 1,
ieee802_1d_to_ac[skb->priority]);
return min_t(u16, local->hw.queues - 1, IEEE80211_AC_BE);
}

rcu_read_lock();
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP_VLAN:
rcu_read_lock();
sta = rcu_dereference(sdata->u.vlan.sta);
if (sta)
sta_flags = get_sta_flags(sta);
rcu_read_unlock();
if (sta)
if (sta) {
qos = get_sta_flags(sta) & WLAN_STA_WME;
break;
}
case NL80211_IFTYPE_AP:
ra = skb->data;
break;
Expand Down Expand Up @@ -107,17 +103,13 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
if (!sta && ra && !is_multicast_ether_addr(ra)) {
sta = sta_info_get(sdata, ra);
if (sta)
sta_flags = get_sta_flags(sta);
qos = get_sta_flags(sta) & WLAN_STA_WME;
}

if (sta_flags & WLAN_STA_WME)
qos = true;

rcu_read_unlock();

if (!qos) {
skb->priority = 0; /* required for correct WPA/11i MIC */
return ieee802_1d_to_ac[skb->priority];
return IEEE80211_AC_BE;
}

/* use the data classifier to determine what 802.1d tag the
Expand Down

0 comments on commit 36b67f6

Please sign in to comment.