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

1 // SPDX-License-Identifier: GPL-2.0-only
4 * Copyright 2013-2014 Intel Mobile Communications GmbH
35 switch (skb->priority) { in wme_downgrade_ac()
36 case 6: in wme_downgrade_ac()
37 case 7: in wme_downgrade_ac()
38 skb->priority = 5; /* VO -> VI */ in wme_downgrade_ac()
40 case 4: in wme_downgrade_ac()
41 case 5: in wme_downgrade_ac()
42 skb->priority = 3; /* VI -> BE */ in wme_downgrade_ac()
44 case 0: in wme_downgrade_ac()
45 case 3: in wme_downgrade_ac()
46 skb->priority = 2; /* BE -> BK */ in wme_downgrade_ac()
49 return -1; in wme_downgrade_ac()
54 * ieee80211_fix_reserved_tid - return the TID to use if this one is reserved
55 * @tid: the assumed-reserved TID
57 * Returns: the alternative TID to use, or 0 on error
62 case 0: in ieee80211_fix_reserved_tid()
64 case 1: in ieee80211_fix_reserved_tid()
66 case 2: in ieee80211_fix_reserved_tid()
68 case 3: in ieee80211_fix_reserved_tid()
70 case 4: in ieee80211_fix_reserved_tid()
72 case 5: in ieee80211_fix_reserved_tid()
74 case 6: in ieee80211_fix_reserved_tid()
76 case 7: in ieee80211_fix_reserved_tid()
86 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; in ieee80211_downgrade_queue()
88 /* in case we are a client verify acm is not set for this ac */ in ieee80211_downgrade_queue()
89 while (sdata->wmm_acm & BIT(skb->priority)) { in ieee80211_downgrade_queue()
90 int ac = ieee802_1d_to_ac[skb->priority]; in ieee80211_downgrade_queue()
92 if (ifmgd->tx_tspec[ac].admitted_time && in ieee80211_downgrade_queue()
93 skb->priority == ifmgd->tx_tspec[ac].up) in ieee80211_downgrade_queue()
108 if (sta && sta->reserved_tid == skb->priority) in ieee80211_downgrade_queue()
109 skb->priority = ieee80211_fix_reserved_tid(skb->priority); in ieee80211_downgrade_queue()
111 /* look up which queue to use for frames with this 1d tag */ in ieee80211_downgrade_queue()
112 return ieee802_1d_to_ac[skb->priority]; in ieee80211_downgrade_queue()
115 /* Indicate which queue to use for this fully formed 802.11 frame */
120 struct ieee80211_local *local = sdata->local; in ieee80211_select_queue_80211()
123 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_select_queue_80211()
126 if (!ieee80211_is_data(hdr->frame_control)) { in ieee80211_select_queue_80211()
127 skb->priority = 7; in ieee80211_select_queue_80211()
128 return ieee802_1d_to_ac[skb->priority]; in ieee80211_select_queue_80211()
130 if (!ieee80211_is_data_qos(hdr->frame_control)) { in ieee80211_select_queue_80211()
131 skb->priority = 0; in ieee80211_select_queue_80211()
132 return ieee802_1d_to_ac[skb->priority]; in ieee80211_select_queue_80211()
136 skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK; in ieee80211_select_queue_80211()
148 if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT || in __ieee80211_select_queue()
149 sdata->vif.type == NL80211_IFTYPE_OCB) in __ieee80211_select_queue()
152 qos = sta->sta.wme; in __ieee80211_select_queue()
157 skb->priority = 0; /* required for correct WPA/11i MIC */ in __ieee80211_select_queue()
161 if (skb->protocol == sdata->control_port_protocol) { in __ieee80211_select_queue()
162 skb->priority = 7; in __ieee80211_select_queue()
166 /* use the data classifier to determine what 802.1d tag the in __ieee80211_select_queue()
168 qos_map = rcu_dereference(sdata->qos_map); in __ieee80211_select_queue()
169 skb->priority = cfg80211_classify8021d(skb, qos_map ? in __ieee80211_select_queue()
170 &qos_map->qos_map : NULL); in __ieee80211_select_queue()
177 /* Indicate which queue to use. */
181 struct ieee80211_local *local = sdata->local; in ieee80211_select_queue()
187 if (local->ops->wake_tx_queue) in ieee80211_select_queue()
190 if (local->hw.queues < IEEE80211_NUM_ACS || skb->len < 6) { in ieee80211_select_queue()
191 skb->priority = 0; /* required for correct WPA/11i MIC */ in ieee80211_select_queue()
196 switch (sdata->vif.type) { in ieee80211_select_queue()
197 case NL80211_IFTYPE_AP_VLAN: in ieee80211_select_queue()
198 sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_select_queue()
202 case NL80211_IFTYPE_AP: in ieee80211_select_queue()
203 ra = skb->data; in ieee80211_select_queue()
205 case NL80211_IFTYPE_WDS: in ieee80211_select_queue()
206 ra = sdata->u.wds.remote_addr; in ieee80211_select_queue()
208 case NL80211_IFTYPE_STATION: in ieee80211_select_queue()
210 sta = sta_info_get(sdata, skb->data); in ieee80211_select_queue()
214 ra = sdata->u.mgd.bssid; in ieee80211_select_queue()
216 case NL80211_IFTYPE_ADHOC: in ieee80211_select_queue()
217 ra = skb->data; in ieee80211_select_queue()
233 * ieee80211_set_qos_hdr - Fill in the QoS header if there is one.
241 struct ieee80211_hdr *hdr = (void *)skb->data; in ieee80211_set_qos_hdr()
243 u8 tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; in ieee80211_set_qos_hdr()
247 if (!ieee80211_is_data_qos(hdr->frame_control)) in ieee80211_set_qos_hdr()
261 if (is_multicast_ether_addr(hdr->addr1) || in ieee80211_set_qos_hdr()
262 sdata->noack_map & BIT(tid)) { in ieee80211_set_qos_hdr()
264 info->flags |= IEEE80211_TX_CTL_NO_ACK; in ieee80211_set_qos_hdr()
272 if (ieee80211_vif_is_mesh(&sdata->vif)) { in ieee80211_set_qos_hdr()
278 if (!ieee80211_is_qos_nullfunc(hdr->frame_control)) in ieee80211_set_qos_hdr()