diff options
| author | Kyeyoon Park <kyeyoonp@qca.qualcomm.com> | 2013-12-17 02:01:30 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-19 10:29:22 -0500 |
| commit | fa9ffc745610f31c6bc136d5a6a1782e00870e72 (patch) | |
| tree | adb2799c4d6a78a95d291582a02c42027b2527c2 /include/net | |
| parent | 567ffc3509b2d3f965a49a18631d3da7f9a96d4f (diff) | |
cfg80211: Add support for QoS mapping
This allows QoS mapping from external networks to be implemented as
defined in IEEE Std 802.11-2012, 10.24.9. APs can use this to advertise
DSCP ranges and exceptions for mapping frames to a specific UP over
Wi-Fi.
The payload of the QoS Map Set element (IEEE Std 802.11-2012, 8.4.2.97)
is sent to the driver through the new NL80211_ATTR_QOS_MAP attribute to
configure the local behavior either on the AP (based on local
configuration) or on a station (based on information received from the
AP).
Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cfg80211.h | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 6d238a4331bd..56c597793d6d 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -1972,6 +1972,50 @@ struct cfg80211_mgmt_tx_params { | |||
| 1972 | }; | 1972 | }; |
| 1973 | 1973 | ||
| 1974 | /** | 1974 | /** |
| 1975 | * struct cfg80211_dscp_exception - DSCP exception | ||
| 1976 | * | ||
| 1977 | * @dscp: DSCP value that does not adhere to the user priority range definition | ||
| 1978 | * @up: user priority value to which the corresponding DSCP value belongs | ||
| 1979 | */ | ||
| 1980 | struct cfg80211_dscp_exception { | ||
| 1981 | u8 dscp; | ||
| 1982 | u8 up; | ||
| 1983 | }; | ||
| 1984 | |||
| 1985 | /** | ||
| 1986 | * struct cfg80211_dscp_range - DSCP range definition for user priority | ||
| 1987 | * | ||
| 1988 | * @low: lowest DSCP value of this user priority range, inclusive | ||
| 1989 | * @high: highest DSCP value of this user priority range, inclusive | ||
| 1990 | */ | ||
| 1991 | struct cfg80211_dscp_range { | ||
| 1992 | u8 low; | ||
| 1993 | u8 high; | ||
| 1994 | }; | ||
| 1995 | |||
| 1996 | /* QoS Map Set element length defined in IEEE Std 802.11-2012, 8.4.2.97 */ | ||
| 1997 | #define IEEE80211_QOS_MAP_MAX_EX 21 | ||
| 1998 | #define IEEE80211_QOS_MAP_LEN_MIN 16 | ||
| 1999 | #define IEEE80211_QOS_MAP_LEN_MAX \ | ||
| 2000 | (IEEE80211_QOS_MAP_LEN_MIN + 2 * IEEE80211_QOS_MAP_MAX_EX) | ||
| 2001 | |||
| 2002 | /** | ||
| 2003 | * struct cfg80211_qos_map - QoS Map Information | ||
| 2004 | * | ||
| 2005 | * This struct defines the Interworking QoS map setting for DSCP values | ||
| 2006 | * | ||
| 2007 | * @num_des: number of DSCP exceptions (0..21) | ||
| 2008 | * @dscp_exception: optionally up to maximum of 21 DSCP exceptions from | ||
| 2009 | * the user priority DSCP range definition | ||
| 2010 | * @up: DSCP range definition for a particular user priority | ||
| 2011 | */ | ||
| 2012 | struct cfg80211_qos_map { | ||
| 2013 | u8 num_des; | ||
| 2014 | struct cfg80211_dscp_exception dscp_exception[IEEE80211_QOS_MAP_MAX_EX]; | ||
| 2015 | struct cfg80211_dscp_range up[8]; | ||
| 2016 | }; | ||
| 2017 | |||
| 2018 | /** | ||
| 1975 | * struct cfg80211_ops - backend description for wireless configuration | 2019 | * struct cfg80211_ops - backend description for wireless configuration |
| 1976 | * | 2020 | * |
| 1977 | * This struct is registered by fullmac card drivers and/or wireless stacks | 2021 | * This struct is registered by fullmac card drivers and/or wireless stacks |
| @@ -2213,6 +2257,8 @@ struct cfg80211_mgmt_tx_params { | |||
| 2213 | * @set_coalesce: Set coalesce parameters. | 2257 | * @set_coalesce: Set coalesce parameters. |
| 2214 | * | 2258 | * |
| 2215 | * @channel_switch: initiate channel-switch procedure (with CSA) | 2259 | * @channel_switch: initiate channel-switch procedure (with CSA) |
| 2260 | * | ||
| 2261 | * @set_qos_map: Set QoS mapping information to the driver | ||
| 2216 | */ | 2262 | */ |
| 2217 | struct cfg80211_ops { | 2263 | struct cfg80211_ops { |
| 2218 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 2264 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
| @@ -2454,6 +2500,9 @@ struct cfg80211_ops { | |||
| 2454 | int (*channel_switch)(struct wiphy *wiphy, | 2500 | int (*channel_switch)(struct wiphy *wiphy, |
| 2455 | struct net_device *dev, | 2501 | struct net_device *dev, |
| 2456 | struct cfg80211_csa_settings *params); | 2502 | struct cfg80211_csa_settings *params); |
| 2503 | int (*set_qos_map)(struct wiphy *wiphy, | ||
| 2504 | struct net_device *dev, | ||
| 2505 | struct cfg80211_qos_map *qos_map); | ||
| 2457 | }; | 2506 | }; |
| 2458 | 2507 | ||
| 2459 | /* | 2508 | /* |
| @@ -3432,9 +3481,11 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, | |||
| 3432 | /** | 3481 | /** |
| 3433 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | 3482 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame |
| 3434 | * @skb: the data frame | 3483 | * @skb: the data frame |
| 3484 | * @qos_map: Interworking QoS mapping or %NULL if not in use | ||
| 3435 | * Return: The 802.1p/1d tag. | 3485 | * Return: The 802.1p/1d tag. |
| 3436 | */ | 3486 | */ |
| 3437 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); | 3487 | unsigned int cfg80211_classify8021d(struct sk_buff *skb, |
| 3488 | struct cfg80211_qos_map *qos_map); | ||
| 3438 | 3489 | ||
| 3439 | /** | 3490 | /** |
| 3440 | * cfg80211_find_ie - find information element in data | 3491 | * cfg80211_find_ie - find information element in data |
