Skip to contentSkip to conversation

cfg80211 and QoS mapping

DISCUSSION Andrey Erokhin 1 participant 1 message Sep 25, 2024

lore
Share & tools
lore
#0 lore raw

IEEE Std 802.11-2012 8.4.2.97 says that if a non-AP STA could not find DHCP neither in the exceptions nor in DHCP ranges, it sets UP to 0

However, cfg80211_classify8021d has the following code

	if (qos_map) {
		unsigned int i, tmp_dscp = dscp >> 2;

		for (i = 0; i < qos_map->num_des; i++) {
			if (tmp_dscp == qos_map->dscp_exception[i].dscp) {
				ret = qos_map->dscp_exception[i].up;
				goto out;
			}
		}

		for (i = 0; i < 8; i++) {
			if (tmp_dscp >= qos_map->up[i].low &&
			    tmp_dscp <= qos_map->up[i].high) {
				ret = i;
				goto out;
			}
		}
	}

	/* The default mapping as defined Section 2.3 in RFC8325: The three
	 * Most Significant Bits (MSBs) of the DSCP are used as the
	 * corresponding L2 markings.
	 */
	ret = dscp >> 5;

As you can see, even in the presence of qos_map, it falls through to the default DSCP mapping, instead of assigning 0

Is this intended? If so, why?