Lines Matching +full:use +full:- +full:case

1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright 2013-2014 Intel Mobile Communications GmbH
36 switch (skb->priority) { in wme_downgrade_ac()
37 case 6: in wme_downgrade_ac()
38 case 7: in wme_downgrade_ac()
39 skb->priority = 5; /* VO -> VI */ in wme_downgrade_ac()
41 case 4: in wme_downgrade_ac()
42 case 5: in wme_downgrade_ac()
43 skb->priority = 3; /* VI -> BE */ in wme_downgrade_ac()
45 case 0: in wme_downgrade_ac()
46 case 3: in wme_downgrade_ac()
47 skb->priority = 2; /* BE -> BK */ in wme_downgrade_ac()
50 return -1; in wme_downgrade_ac()
55 * ieee80211_fix_reserved_tid - return the TID to use if this one is reserved
56 * @tid: the assumed-reserved TID
58 * Returns: the alternative TID to use, or 0 on error
63 case 0: in ieee80211_fix_reserved_tid()
65 case 1: in ieee80211_fix_reserved_tid()
67 case 2: in ieee80211_fix_reserved_tid()
69 case 3: in ieee80211_fix_reserved_tid()
71 case 4: in ieee80211_fix_reserved_tid()
73 case 5: in ieee80211_fix_reserved_tid()
75 case 6: in ieee80211_fix_reserved_tid()
77 case 7: in ieee80211_fix_reserved_tid()
87 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; in ieee80211_downgrade_queue()
89 /* in case we are a client verify acm is not set for this ac */ in ieee80211_downgrade_queue()
90 while (sdata->wmm_acm & BIT(skb->priority)) { in ieee80211_downgrade_queue()
91 int ac = ieee802_1d_to_ac[skb->priority]; in ieee80211_downgrade_queue()
93 if (ifmgd->tx_tspec[ac].admitted_time && in ieee80211_downgrade_queue()
94 skb->priority == ifmgd->tx_tspec[ac].up) in ieee80211_downgrade_queue()
109 if (sta && sta->reserved_tid == skb->priority) in ieee80211_downgrade_queue()
110 skb->priority = ieee80211_fix_reserved_tid(skb->priority); in ieee80211_downgrade_queue()
112 /* look up which queue to use for frames with this 1d tag */ in ieee80211_downgrade_queue()
113 return ieee802_1d_to_ac[skb->priority]; in ieee80211_downgrade_queue()
116 /* Indicate which queue to use for this fully formed 802.11 frame */
121 struct ieee80211_local *local = sdata->local; in ieee80211_select_queue_80211()
128 if ((info->control.flags & IEEE80211_TX_CTRL_DONT_REORDER) || in ieee80211_select_queue_80211()
129 local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_select_queue_80211()
132 if (!ieee80211_is_data(hdr->frame_control)) { in ieee80211_select_queue_80211()
133 skb->priority = 7; in ieee80211_select_queue_80211()
134 return ieee802_1d_to_ac[skb->priority]; in ieee80211_select_queue_80211()
136 if (!ieee80211_is_data_qos(hdr->frame_control)) { in ieee80211_select_queue_80211()
137 skb->priority = 0; in ieee80211_select_queue_80211()
138 return ieee802_1d_to_ac[skb->priority]; in ieee80211_select_queue_80211()
142 skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK; in ieee80211_select_queue_80211()
150 const struct ethhdr *eth = (void *)skb->data; in ieee80211_select_queue()
158 if ((sdata->vif.type == NL80211_IFTYPE_MESH_POINT && in ieee80211_select_queue()
159 !is_multicast_ether_addr(eth->h_dest)) || in ieee80211_select_queue()
160 (sdata->vif.type == NL80211_IFTYPE_OCB && sta)) in ieee80211_select_queue()
163 qos = sta->sta.wme; in ieee80211_select_queue()
168 skb->priority = 0; /* required for correct WPA/11i MIC */ in ieee80211_select_queue()
172 if (skb->protocol == sdata->control_port_protocol) { in ieee80211_select_queue()
173 skb->priority = 7; in ieee80211_select_queue()
177 /* use the data classifier to determine what 802.1d tag the in ieee80211_select_queue()
179 qos_map = rcu_dereference(sdata->qos_map); in ieee80211_select_queue()
180 skb->priority = cfg80211_classify8021d(skb, qos_map ? in ieee80211_select_queue()
181 &qos_map->qos_map : NULL); in ieee80211_select_queue()
188 * ieee80211_set_qos_hdr - Fill in the QoS header if there is one.
196 struct ieee80211_hdr *hdr = (void *)skb->data; in ieee80211_set_qos_hdr()
198 u8 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; in ieee80211_set_qos_hdr()
202 if (!ieee80211_is_data_qos(hdr->frame_control)) in ieee80211_set_qos_hdr()
208 if (info->flags & IEEE80211_TX_CTL_INJECTED) { in ieee80211_set_qos_hdr()
211 info->flags |= IEEE80211_TX_CTL_NO_ACK; in ieee80211_set_qos_hdr()
224 if (is_multicast_ether_addr(hdr->addr1) || in ieee80211_set_qos_hdr()
225 sdata->noack_map & BIT(tid)) { in ieee80211_set_qos_hdr()
227 info->flags |= IEEE80211_TX_CTL_NO_ACK; in ieee80211_set_qos_hdr()
235 if (ieee80211_vif_is_mesh(&sdata->vif)) { in ieee80211_set_qos_hdr()
241 if (!ieee80211_is_qos_nullfunc(hdr->frame_control)) in ieee80211_set_qos_hdr()