mirror of
https://github.com/suyu-emu/horinux.git
synced 2026-09-21 14:15:21 -07:00
mac80211: synchronously reserve TID per station
In TDLS (e.g., TDLS off-channel) there is a requirement for some drivers to supply an unused TID between the AP and the device to the FW, to allow sending PTI requests and to allow the FW to aggregate on a specific TID for better throughput. To ensure that the allocated TID is indeed unused, this patch introduces an API for blocking the driver from TXing on that TID. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
4f9610d528
commit
b6da911b3c
@@ -53,6 +53,36 @@ static int wme_downgrade_ac(struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ieee80211_fix_reserved_tid - return the TID to use if this one is reserved
|
||||
* @tid: the assumed-reserved TID
|
||||
*
|
||||
* Returns: the alternative TID to use, or 0 on error
|
||||
*/
|
||||
static inline u8 ieee80211_fix_reserved_tid(u8 tid)
|
||||
{
|
||||
switch (tid) {
|
||||
case 0:
|
||||
return 3;
|
||||
case 1:
|
||||
return 2;
|
||||
case 2:
|
||||
return 1;
|
||||
case 3:
|
||||
return 0;
|
||||
case 4:
|
||||
return 5;
|
||||
case 5:
|
||||
return 4;
|
||||
case 6:
|
||||
return 7;
|
||||
case 7:
|
||||
return 6;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u16 ieee80211_downgrade_queue(struct ieee80211_sub_if_data *sdata,
|
||||
struct sta_info *sta, struct sk_buff *skb)
|
||||
{
|
||||
@@ -77,6 +107,10 @@ static u16 ieee80211_downgrade_queue(struct ieee80211_sub_if_data *sdata,
|
||||
}
|
||||
}
|
||||
|
||||
/* Check to see if this is a reserved TID */
|
||||
if (sta && sta->reserved_tid == skb->priority)
|
||||
skb->priority = ieee80211_fix_reserved_tid(skb->priority);
|
||||
|
||||
/* look up which queue to use for frames with this 1d tag */
|
||||
return ieee802_1d_to_ac[skb->priority];
|
||||
}
|
||||
@@ -143,6 +177,11 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
|
||||
break;
|
||||
#endif
|
||||
case NL80211_IFTYPE_STATION:
|
||||
/* might be a TDLS station */
|
||||
sta = sta_info_get(sdata, skb->data);
|
||||
if (sta)
|
||||
qos = sta->sta.wme;
|
||||
|
||||
ra = sdata->u.mgd.bssid;
|
||||
break;
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
|
||||
Reference in New Issue
Block a user