Skip to content

Commit

Permalink
mac80211: Keep skb->piority for relayed frames in AP mode
Browse files Browse the repository at this point in the history
When mac80211 relays a frame from STA1 to STA2 in AP mode it will get
re-classified in the tx path. Unfortunately the frame protocol field
is always set to ETH_P_8023 while the classification only kicks in
for ETH_P_IP. Hence, a high priority frame from STA1 will be send to
STA2 as best effort.

Instead of running classification on the frame just use the same
priority as STA1 did. Do this by adding 256 to the skb->priority
to allow cfg80211_classify8021d to shortcut frame classification.

Signed-off-by: Helmut Schaa <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
helmut-jacob authored and linvjw committed Dec 21, 2011
1 parent 3aebee0 commit aef6c92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,12 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
}

if (xmit_skb) {
/* send to wireless media */
/*
* Send to wireless media and increase priority by 256 to
* keep the received priority instead of reclassifying
* the frame (see cfg80211_classify8021d).
*/
xmit_skb->priority += 256;
xmit_skb->protocol = htons(ETH_P_802_3);
skb_reset_network_header(xmit_skb);
skb_reset_mac_header(xmit_skb);
Expand Down

0 comments on commit aef6c92

Please sign in to comment.