Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278425
b: refs/heads/master
c: d3c1597
h: refs/heads/master
i:
  278423: 3893c3e
v: v3
  • Loading branch information
Thomas Pedersen authored and John W. Linville committed Nov 28, 2011
1 parent 80d8d8c commit d77160a
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 22 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: 3c26f1f68e24d087cd3481aeb68a6274e6e0b30b
refs/heads/master: d3c1597b8d1ba0447ce858c7c385eabcf69f2c8f
15 changes: 1 addition & 14 deletions trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev,
struct ieee80211_local *local = sdata->local;
struct ieee80211_hdr *hdr;
struct ieee80211_radiotap_header *rtap = (void *)skb->data;
u8 *p;

if (local->hw.queues < 4)
return 0;
Expand All @@ -683,19 +682,7 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev,

hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len));

if (!ieee80211_is_data(hdr->frame_control)) {
skb->priority = 7;
return ieee802_1d_to_ac[skb->priority];
}
if (!ieee80211_is_data_qos(hdr->frame_control)) {
skb->priority = 0;
return ieee802_1d_to_ac[skb->priority];
}

p = ieee80211_get_qos_ctl(hdr);
skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK;

return ieee80211_downgrade_queue(local, skb);
return ieee80211_select_queue_80211(local, skb, hdr);
}

static const struct net_device_ops ieee80211_monitorif_ops = {
Expand Down
15 changes: 8 additions & 7 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
struct ieee80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
u16 q;

hdr = (struct ieee80211_hdr *) skb->data;
hdrlen = ieee80211_hdrlen(hdr->frame_control);
Expand All @@ -1917,12 +1918,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
/* illegal frame */
return RX_DROP_MONITOR;

if (ieee80211_queue_stopped(&local->hw, skb_get_queue_mapping(skb))) {
IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
dropped_frames_congestion);
return RX_DROP_MONITOR;
}

if (mesh_hdr->flags & MESH_FLAGS_AE) {
struct mesh_path *mppath;
char *proxied_addr;
Expand Down Expand Up @@ -1954,7 +1949,13 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
compare_ether_addr(sdata->vif.addr, hdr->addr3) == 0)
return RX_CONTINUE;

skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb));
q = ieee80211_select_queue_80211(local, skb, hdr);
if (ieee80211_queue_stopped(&local->hw, q)) {
IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
dropped_frames_congestion);
return RX_DROP_MONITOR;
}
skb_set_queue_mapping(skb, q);
mesh_hdr->ttl--;

if (status->rx_flags & IEEE80211_RX_RA_MATCH) {
Expand Down
24 changes: 24 additions & 0 deletions trunk/net/mac80211/wme.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ static int wme_downgrade_ac(struct sk_buff *skb)
}
}

/* Indicate which queue to use for this fully formed 802.11 frame */
u16 ieee80211_select_queue_80211(struct ieee80211_local *local,
struct sk_buff *skb,
struct ieee80211_hdr *hdr)
{
u8 *p;

if (local->hw.queues < 4)
return 0;

if (!ieee80211_is_data(hdr->frame_control)) {
skb->priority = 7;
return ieee802_1d_to_ac[skb->priority];
}
if (!ieee80211_is_data_qos(hdr->frame_control)) {
skb->priority = 0;
return ieee802_1d_to_ac[skb->priority];
}

p = ieee80211_get_qos_ctl(hdr);
skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK;

return ieee80211_downgrade_queue(local, skb);
}

/* Indicate which queue to use. */
u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/mac80211/wme.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

extern const int ieee802_1d_to_ac[8];

u16 ieee80211_select_queue_80211(struct ieee80211_local *local,
struct sk_buff *skb,
struct ieee80211_hdr *hdr);
u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
Expand Down

0 comments on commit d77160a

Please sign in to comment.