Skip to content

Commit

Permalink
mac80211: TDLS: fix skb queue/priority assignment
Browse files Browse the repository at this point in the history
If the TDLS setup happens over a connection to an AP that
doesn't have QoS, we nevertheless assign a non-zero TID
(skb->priority) and queue mapping, which may confuse us or
drivers later.

Fix it by just assigning the special skb->priority and then
using ieee80211_select_queue() just like other data frames
would go through.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Sep 10, 2018
1 parent 119f94a commit cb59bc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/mac80211/tdls.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "ieee80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "wme.h"

/* give usermode some time for retries in setting up the TDLS session */
#define TDLS_PEER_SETUP_TIMEOUT (15 * HZ)
Expand Down Expand Up @@ -1010,14 +1011,13 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,
switch (action_code) {
case WLAN_TDLS_SETUP_REQUEST:
case WLAN_TDLS_SETUP_RESPONSE:
skb_set_queue_mapping(skb, IEEE80211_AC_BK);
skb->priority = 2;
skb->priority = 256 + 2;
break;
default:
skb_set_queue_mapping(skb, IEEE80211_AC_VI);
skb->priority = 5;
skb->priority = 256 + 5;
break;
}
skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, skb));

/*
* Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress.
Expand Down

0 comments on commit cb59bc1

Please sign in to comment.