cfg80211/mac80211: Add support for TID specific configuration
v3 cover cfg80211/mac80211: Add support for TID specific configuration
Add infrastructure to support per TID configurations like noack policy, retry count, AMPDU control(disable/enable), RTSCTS control(enable/disable) and TX rate mask configurations.
This will be useful for the driver which can supports data TID specific configuration rather than phy level configurations. Here NL80211_CMD_SET_TID_CONFIG added to support this operation by accepting TID configuration.
This command can accept STA mac addreess to make the configuration station specific rather than applying to all the connected stations to the netdev.
And this nested command configuration can accept multiple number of data TID specific configuration in a single command,
enum ieee80211_tid_conf_mask used to notify the driver that which configuration got modified for the TID.
Tamizh chelvam (9):
nl80211: New netlink command for TID specific configuration
nl80211: Add new netlink attribute for TID speicific retry count
nl80211: Add netlink attribute for AMPDU aggregation enable/disable
nl80211: Add netlink attribute to enable/disable RTS_CTS
nl80211: Add netlink attribute to configure TID specific tx rate
mac80211: Add api to support configuring TID specific configuration
ath10k: Add wmi command support for station specific TID config
ath10k: Add new api to support TID specific configuration
ath10k: Add extended TID configuration support
v3:
* Modified "nl80211: Add netlink attribute to configure TID specific tx rate" patch to accept multiple TX rate configuration at a time.
* Modified noack and ampdu variable data type to int in
"mac80211: Add api to support configuring TID specific configuration" patch to store default configuration.
* Modified "ath10k: Add new api to support TID specific configuration" patch to handle default values for noack and ampdu. And added sta pointer sanity check in ath10k_mac_tid_bitrate_config function.
* Fixed "ath10k: Add extended TID configuration support" wmi command parameters assigned part.
v2:
* Added support to accept multiple TID configuration
* Added support to configure TX rate and RTSCTS control
drivers/net/wireless/ath/ath10k/core.c | 4 + drivers/net/wireless/ath/ath10k/core.h | 6 + drivers/net/wireless/ath/ath10k/mac.c | 679 ++++++++++++++++++++++++++---- drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 + drivers/net/wireless/ath/ath10k/wmi.c | 35 ++ drivers/net/wireless/ath/ath10k/wmi.h | 72 ++++ include/net/cfg80211.h | 57 +++ include/net/mac80211.h | 35 ++ include/uapi/linux/nl80211.h | 182 ++++++++ net/mac80211/cfg.c | 28 ++ net/mac80211/driver-ops.h | 15 + net/wireless/nl80211.c | 253 ++++++++++- net/wireless/rdev-ops.h | 11 + net/wireless/trace.h | 18 + 14 files changed, 1316 insertions(+), 98 deletions(-)
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v3 1/9 nl80211: New netlink command for TID specific configuration
Add a new NL command, NL80211_CMD_SET_TID_CONFIG to support data TID specific configuration. This per TID configurations are passed in NL80211_ATTR_TID_CONFIG which is a nested attribute. This patch adds support to configure per TID noack policy through NL80211_ATTR_TID_CONFIG_NOACK attribute. Data TID value for this configuration will be passed through NL80211_ATTR_TID_CONFIG_TID attribute. When the user-space wants this configuration peer specific rather than being applied for all the connected stations, MAC address of the peer can be passed in NL80211_ATTR_MAC attribute. This patch introduced
enum ieee80211_tid_conf_mask to notify the driver that which configuration modified.
Driver supporting data TID specific noack policy configuration should be advertise through NL80211_EXT_FEATURE_PER_TID_NOACK_CONFIG and supporting per STA data TID noack policy configuration should be advertise through NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIG
--- include/net/cfg80211.h | 35 +++++++++++++++ include/uapi/linux/nl80211.h | 51 ++++++++++++++++++++++ net/wireless/nl80211.c | 102 +++++++++++++++++++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 11 +++++ net/wireless/trace.h | 18 ++++++++ 5 files changed, 217 insertions(+)
include/net/cfg80211.h +35 -0
@@ -509,6 +509,35 @@ struct cfg80211_chan_def {u32 center_freq2; }; +enum ieee80211_tid_conf_mask { +IEEE80211_TID_CONF_NOACK =BIT (0 ), +}; + +/** +* struct ieee80211_tid_cfg - TID specific configuration +* @tid: TID number +* @tid_conf_mask: bitmap indicating which parameter changed +* see %enum ieee80211_tid_conf_mask +* @noack: noack configuration value for the TID +*/ +struct ieee80211_tid_cfg { +u8 tid; +enum ieee80211_tid_conf_mask tid_conf_mask; +u8 noack; +}; + +/** +* struct ieee80211_tid_config - TID configuration +* @peer: Station's MAC address +* @n_tid_conf: Number of TID specific configurations to be applied +* @tid_conf: Configuration change info +*/ +struct ieee80211_tid_config { +const u8 *peer; +u32 n_tid_conf; +struct ieee80211_tid_cfg tid_conf[]; +}; +/** * cfg80211_get_chandef_type - return old channel type from chandef * @chandef: the channel definition
@@ -3436,6 +3465,10 @@ struct cfg80211_pmsr_request {* Statistics should be cumulative, currently no way to reset is provided. * @start_pmsr: start peer measurement (e.g. FTM) * @abort_pmsr: abort peer measurement +* @set_tid_config: TID specific configuration. Apply this configuration for +* all the connected stations in the BSS if peer is NULL. Otherwise +* apply this configuration to the specific station. +* This callback may sleep. */ struct cfg80211_ops {int (*suspend)(struct wiphy *wiphy,struct cfg80211_wowlan *wow);
@@ -3750,6 +3783,8 @@ struct cfg80211_ops { struct cfg80211_pmsr_request *request);void (*abort_pmsr)(struct wiphy *wiphy,struct wireless_dev *wdev,struct cfg80211_pmsr_request *request); +int (*set_tid_config)(struct wiphy *wiphy,struct net_device *dev, +struct ieee80211_tid_config *tid_conf); };/*
include/uapi/linux/nl80211.h +51 -0
93 lines not on this page · raw message
net/wireless/nl80211.c +102 -0
126 lines not on this page · raw message
net/wireless/rdev-ops.h +11 -0
@@ -1272,4 +1272,15 @@ static inline int rdev_del_pmk(struct cfg80211_registered_device *rdev, trace_rdev_return_void(&rdev->wiphy); } +static inline int rdev_set_tid_config (struct cfg80211_registered_device *rdev, +struct net_device *dev, +struct ieee80211_tid_config *tid_conf) +{ +int ret; + +trace_rdev_set_tid_config (&rdev->wiphy, dev, tid_conf); + ret = rdev->ops->set_tid_config (&rdev->wiphy, dev, tid_conf); +trace_rdev_return_int (&rdev->wiphy, ret); +return ret; +}#endif /* __CFG80211_RDEV_OPS */
net/wireless/trace.h +18 -0
@@ -3362,6 +3362,24 @@WIPHY_PR_ARG ,WDEV_PR_ARG , (unsigned long long)__entry->cookie) ); + +TRACE_EVENT (rdev_set_tid_config, + TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, + struct ieee80211_tid_config *tid_conf), +TP_ARGS (wiphy, netdev, tid_conf), +TP_STRUCT__entry ( + WIPHY_ENTRY + NETDEV_ENTRY +MAC_ENTRY (peer) + ), +TP_fast_assign ( + WIPHY_ASSIGN; + NETDEV_ASSIGN; + MAC_ASSIGN(peer, tid_conf->peer); + ), +TP_printk (WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT , +WIPHY_PR_ARG ,NETDEV_PR_ARG ,MAC_PR_ARG (peer)) +);#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ #undef TRACE_INCLUDE_PATH
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCHv3 1/9] nl80211: New netlink command for TID specific configuration
Hi Tamizh,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/Tamizh-chelvam/cfg80211-mac80211-Add-support-for-TID-specific-configuration/20190308-195433 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
New smatch warnings:net/wireless/nl80211.c:13336 nl80211_set_tid_config() warn: possible memory leak of 'tid_conf'
Old smatch warnings:net/wireless/nl80211.c:13339 nl80211_set_tid_config() warn: possible memory leak of 'tid_conf'
# https://github.com/0day-ci/linux/commit/e462f4e99ba46deede4c2e78bd343211d372246d
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout e462f4e99ba46deede4c2e78bd343211d372246d
vim +/tid_conf +13336 net/wireless/nl80211.c
e462f4e9 Tamizh chelvam 2019-03-06 13293
e462f4e9 Tamizh chelvam 2019-03-06 13294 static int nl80211_set_tid_config(struct sk_buff *skb,
e462f4e9 Tamizh chelvam 2019-03-06 13295 struct genl_info *info)
e462f4e9 Tamizh chelvam 2019-03-06 13296 {
e462f4e9 Tamizh chelvam 2019-03-06 13297 struct cfg80211_registered_device *rdev = info->user_ptr[0];
e462f4e9 Tamizh chelvam 2019-03-06 13298 struct nlattr *attrs[NL80211_ATTR_TID_CONFIG_MAX + 1];
e462f4e9 Tamizh chelvam 2019-03-06 13299 struct net_device *dev = info->user_ptr[1];
e462f4e9 Tamizh chelvam 2019-03-06 13300 struct ieee80211_tid_config *tid_conf;
e462f4e9 Tamizh chelvam 2019-03-06 13301 struct nlattr *tid;
e462f4e9 Tamizh chelvam 2019-03-06 13302 int conf_idx = 0, rem_conf;
e462f4e9 Tamizh chelvam 2019-03-06 13303 u32 num_conf = 0, size_of_conf;
e462f4e9 Tamizh chelvam 2019-03-06 13304 int ret = -EINVAL;
e462f4e9 Tamizh chelvam 2019-03-06 13305
e462f4e9 Tamizh chelvam 2019-03-06 13306 if (!info->attrs[NL80211_ATTR_TID_CONFIG])
e462f4e9 Tamizh chelvam 2019-03-06 13307 return -EINVAL;
e462f4e9 Tamizh chelvam 2019-03-06 13308
e462f4e9 Tamizh chelvam 2019-03-06 13309 if (!rdev->ops->set_tid_config)
e462f4e9 Tamizh chelvam 2019-03-06 13310 return -EOPNOTSUPP;
e462f4e9 Tamizh chelvam 2019-03-06 13311
e462f4e9 Tamizh chelvam 2019-03-06 13312 nla_for_each_nested(tid, info->attrs[NL80211_ATTR_TID_CONFIG],
e462f4e9 Tamizh chelvam 2019-03-06 13313 rem_conf)
e462f4e9 Tamizh chelvam 2019-03-06 13314 num_conf++;
e462f4e9 Tamizh chelvam 2019-03-06 13315
e462f4e9 Tamizh chelvam 2019-03-06 13316 size_of_conf = sizeof(struct ieee80211_tid_config) +
e462f4e9 Tamizh chelvam 2019-03-06 13317 num_conf * sizeof(struct ieee80211_tid_cfg);
e462f4e9 Tamizh chelvam 2019-03-06 13318
e462f4e9 Tamizh chelvam 2019-03-06 13319 tid_conf = kzalloc(size_of_conf, GFP_KERNEL);
e462f4e9 Tamizh chelvam 2019-03-06 13320 if (!tid_conf)
e462f4e9 Tamizh chelvam 2019-03-06 13321 return -ENOMEM;
e462f4e9 Tamizh chelvam 2019-03-06 13322
e462f4e9 Tamizh chelvam 2019-03-06 13323 tid_conf->n_tid_conf = num_conf;
e462f4e9 Tamizh chelvam 2019-03-06 13324
e462f4e9 Tamizh chelvam 2019-03-06 13325 if (info->attrs[NL80211_ATTR_MAC])
e462f4e9 Tamizh chelvam 2019-03-06 13326 tid_conf->peer = nla_data(info->attrs[NL80211_ATTR_MAC]);
e462f4e9 Tamizh chelvam 2019-03-06 13327 else
e462f4e9 Tamizh chelvam 2019-03-06 13328 tid_conf->peer = NULL;
e462f4e9 Tamizh chelvam 2019-03-06 13329
e462f4e9 Tamizh chelvam 2019-03-06 13330 nla_for_each_nested(tid, info->attrs[NL80211_ATTR_TID_CONFIG],
e462f4e9 Tamizh chelvam 2019-03-06 13331 rem_conf) {
e462f4e9 Tamizh chelvam 2019-03-06 13332 ret = nla_parse_nested(attrs, NL80211_ATTR_TID_CONFIG_MAX, tid,
e462f4e9 Tamizh chelvam 2019-03-06 13333 NULL, NULL);
e462f4e9 Tamizh chelvam 2019-03-06 13334
e462f4e9 Tamizh chelvam 2019-03-06 13335 if (ret)
e462f4e9 Tamizh chelvam 2019-03-06 @13336 return ret;
e462f4e9 Tamizh chelvam 2019-03-06 13337
e462f4e9 Tamizh chelvam 2019-03-06 13338 if (!attrs[NL80211_ATTR_TID_CONFIG_TID])
e462f4e9 Tamizh chelvam 2019-03-06 13339 return -EINVAL;
e462f4e9 Tamizh chelvam 2019-03-06 13340
e462f4e9 Tamizh chelvam 2019-03-06 13341 ret = parse_tid_conf(rdev, attrs, &tid_conf->tid_conf[conf_idx],
e462f4e9 Tamizh chelvam 2019-03-06 13342 tid_conf->peer);
e462f4e9 Tamizh chelvam 2019-03-06 13343 if (ret)
e462f4e9 Tamizh chelvam 2019-03-06 13344 goto bad_tid_conf;
e462f4e9 Tamizh chelvam 2019-03-06 13345
e462f4e9 Tamizh chelvam 2019-03-06 13346 conf_idx++;
e462f4e9 Tamizh chelvam 2019-03-06 13347 }
e462f4e9 Tamizh chelvam 2019-03-06 13348
e462f4e9 Tamizh chelvam 2019-03-06 13349 ret = rdev_set_tid_config(rdev, dev, tid_conf);
e462f4e9 Tamizh chelvam 2019-03-06 13350
e462f4e9 Tamizh chelvam 2019-03-06 13351 bad_tid_conf:
e462f4e9 Tamizh chelvam 2019-03-06 13352 kfree(tid_conf);
e462f4e9 Tamizh chelvam 2019-03-06 13353 return ret;
e462f4e9 Tamizh chelvam 2019-03-06 13354 }
e462f4e9 Tamizh chelvam 2019-03-06 13355 ---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v3 2/9 nl80211: Add new netlink attribute for TID speicific retry count
In reply to Tamizh chelvamThis patch introduced below NL attributes to add support for configuring data TID specific retry count
NL80211_ATTR_TID_CONFIG_RETRYNL80211_ATTR_TID_CONFIG_RETRY_LONGNL80211_ATTR_TID_CONFIG_RETRY_SHORT
These attributes are added in NL80211_ATTR_TID_CONFIG nested attribute. This will be useful for the driver which supports data TID specific retry count configuration rather using phy level retry configuration. This TID specific retry configuration will have more precedence than phy level configuration. This configuration can be applied for a specific peer. To apply this configuration specific to a peer rather than being applied for all the connected stations,
MAC address of the peer can be passed in NL80211_ATTR_MAC attribute.
Driver should advertise WIPHY_FLAG_HAS_MAX_DATA_RETRY_COUNT and max_data_retry_count value to notify user space to avoid of passing greater than the allowed limit.
Driver supporting TID specific retry configuration should advertise NL80211_EXT_FEATURE_PER_TID_RETRY_CONFIG and per STA specific data TID retry configuration should advertise NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG.
--- include/net/cfg80211.h | 11 ++++++++++ include/uapi/linux/nl80211.h | 48 ++++++++++++++++++++++++++++++++++++++++++++ net/wireless/nl80211.c | 34 +++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+)
include/net/cfg80211.h +11 -0
@@ -511,6 +511,7 @@ struct cfg80211_chan_def {enum ieee80211_tid_conf_mask {IEEE80211_TID_CONF_NOACK =BIT (0 ), +IEEE80211_TID_CONF_RETRY =BIT (1 ), };/**
@@ -519,11 +520,15 @@ enum ieee80211_tid_conf_mask {* @tid_conf_mask: bitmap indicating which parameter changed * see %enum ieee80211_tid_conf_mask * @noack: noack configuration value for the TID +* @retry_long: retry count value +* @retry_short: retry count value */ struct ieee80211_tid_cfg {u8 tid;enum ieee80211_tid_conf_mask tid_conf_mask;u8 noack; +int retry_long; +int retry_short; };/**
@@ -3832,6 +3837,7 @@ struct cfg80211_ops {* beaconing mode (AP, IBSS, Mesh, ...). * @WIPHY_FLAG_HAS_STATIC_WEP: The device supports static WEP key installation * before connection. +* @WIPHY_FLAG_HAS_MAX_DATA_RETRY_COUNT: Device supports data retry count call. */ enum wiphy_flags {/* use hole at 0 */
@@ -3858,6 +3864,7 @@ enum wiphy_flags {WIPHY_FLAG_SUPPORTS_5_10_MHZ =BIT (22 ),WIPHY_FLAG_HAS_CHANNEL_SWITCH =BIT (23 ),WIPHY_FLAG_HAS_STATIC_WEP =BIT (24 ), + WIPHY_FLAG_HAS_MAX_DATA_RETRY_COUNT = BIT(25), };/**
@@ -4365,6 +4372,8 @@ struct cfg80211_pmsr_capabilities {* @support_mbssid must be set for this to have any effect. * * @pmsr_capa: peer measurement capabilities +* @max_data_retry_count: Maximum limit can be configured as retry count +* for a TID. */ struct wiphy {/* assign these fields before you register the wiphy */
@@ -4509,6 +4518,8 @@ struct wiphy {const struct cfg80211_pmsr_capabilities *pmsr_capa; +u8 max_data_retry_count; +char priv[0 ]__aligned(NETDEV_ALIGN) ; };
include/uapi/linux/nl80211.h +48 -0
83 lines not on this page · raw message
net/wireless/nl80211.c +34 -0
@@ -285,6 +285,9 @@ static int validate_ie_attr(const struct nlattr *attr, [NL80211_ATTR_TID_CONFIG_TID] = { .type = NLA_U8 }, [NL80211_ATTR_TID_CONFIG_NOACK ] = NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), + [NL80211_ATTR_TID_CONFIG_RETRY] = { .type = NLA_FLAG }, + [NL80211_ATTR_TID_CONFIG_RETRY_SHORT] = NLA_POLICY_MIN(NLA_U8, 1), + [NL80211_ATTR_TID_CONFIG_RETRY_LONG] = NLA_POLICY_MIN(NLA_U8, 1), };const struct nla_policy nl80211_policy[NUM_NL80211_ATTR ] = {
@@ -13288,6 +13291,37 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev,nla_get_u8 (attrs[NL80211_ATTR_TID_CONFIG_NOACK ]); } +if (nla_get_flag (attrs[NL80211_ATTR_TID_CONFIG_RETRY ])) { +if (!wiphy_ext_feature_isset (&rdev->wiphy, +NL80211_EXT_FEATURE_PER_TID_RETRY_CONFIG )) +return -ENOTSUPP ; + +if (peer && !wiphy_ext_feature_isset (&rdev->wiphy, +NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG )) +return -ENOTSUPP ; + + tid_conf->tid_conf_mask |=IEEE80211_TID_CONF_RETRY ; +if (attrs[NL80211_ATTR_TID_CONFIG_RETRY_SHORT ]) { + tid_conf->retry_short = +nla_get_u8 (attrs[NL80211_ATTR_TID_CONFIG_RETRY_SHORT ]); +if (tid_conf->retry_short > + rdev->wiphy.max_data_retry_count) +return -EINVAL ; + }else { + tid_conf->retry_short =-1 ; + } + +if (attrs[NL80211_ATTR_TID_CONFIG_RETRY_LONG ]) { + tid_conf->retry_long = +nla_get_u8 (attrs[NL80211_ATTR_TID_CONFIG_RETRY_LONG ]); +if (tid_conf->retry_long > + rdev->wiphy.max_data_retry_count) +return -EINVAL ; + }else { + tid_conf->retry_long =-1 ; + } + } +return 0 ; }
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v3 3/9 nl80211: Add netlink attribute for AMPDU aggregation enable/disable
In reply to Tamizh chelvamIntroduce NL80211_ATTR_TID_CONFIG_AMPDU_CTRL in nl80211_attr_tid_config to accept TID specific AMPDU aggregation enable/disable configuration through NL80211_CMD_SET_TID_CONFIG command. TID for which the aggregation control configuration is to be applied is passed in NL80211_ATTR_TID_CONFIG_TID attribute. When the user-space wants this configuration peer specific rather than being applied for all the connected stations, MAC address of the peer can be passed in NL80211_ATTR_MAC attribute.
Driver supporting this feature should advertise NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL and supporting per-STA data TID ampdu configuration should advertise NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL.
--- include/net/cfg80211.h | 3 +++ include/uapi/linux/nl80211.h | 22 ++++++++++++++++++++++ net/wireless/nl80211.c | 15 +++++++++++++++ 3 files changed, 40 insertions(+)
include/net/cfg80211.h +3 -0
@@ -512,6 +512,7 @@ struct cfg80211_chan_def {enum ieee80211_tid_conf_mask {IEEE80211_TID_CONF_NOACK =BIT (0 ),IEEE80211_TID_CONF_RETRY =BIT (1 ), +IEEE80211_TID_CONF_AMPDU =BIT (2 ), };/**
@@ -522,6 +523,7 @@ enum ieee80211_tid_conf_mask {* @noack: noack configuration value for the TID * @retry_long: retry count value * @retry_short: retry count value +* @ampdu: Enable/Disable aggregation */ struct ieee80211_tid_cfg {u8 tid;
@@ -529,6 +531,7 @@ struct ieee80211_tid_cfg {u8 noack;int retry_long;int retry_short; +u8 ampdu; };/**
include/uapi/linux/nl80211.h +22 -0
@@ -4615,6 +4615,21 @@ enum nl80211_tid_config {* the max value should be advertised by the driver through * max_data_retry_count. when this attribute is not present, the driver * would use the default configuration. +* @NL80211_ATTR_TID_CONFIG_AMPDU_CTRL: Enable/Disable aggregation for the TID +* specified in %%NL80211_ATTR_TID_CONFIG_TID. Its type is u8, +* if the peer MAC address is passed in %NL80211_ATTR_MAC, the aggregation +* configuration is applied +* to the data frame for the tid to that connected station. +* Station specific aggregation configuration is valid only for STA's +* current connection. i.e. the configuration will be reset to default when +* the station connects back after disconnection/roaming. +* when user-space does not include %NL80211_ATTR_MAC, this configuration +* should be treated as per-netdev configuration. This configuration will +* be cleared when the interface goes down and on the disconnection from a +* BSS. Driver supporting this feature should advertise +* NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL and supporting per station +* aggregation configuration should advertise +* NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL. */ enum nl80211_attr_tid_config { __NL80211_ATTR_TID_INVALID,
@@ -4623,6 +4638,7 @@ enum nl80211_attr_tid_config {NL80211_ATTR_TID_CONFIG_RETRY ,NL80211_ATTR_TID_CONFIG_RETRY_SHORT ,NL80211_ATTR_TID_CONFIG_RETRY_LONG , +NL80211_ATTR_TID_CONFIG_AMPDU_CTRL ,/* keep last */ __NL80211_ATTR_TID_CONFIG_AFTER_LAST,
@@ -5437,6 +5453,10 @@ enum nl80211_feature_flags {* count functionality. * @NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG: Driver supports STA specific * data retry count functionality. +* @NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL: Driver supports TID specific +* aggregation control(enable/disable). +* @NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL: Driver supports per STA +* specific TID aggregation control(enable/disable). * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -5483,6 +5503,8 @@ enum nl80211_ext_feature_index {NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIG ,NL80211_EXT_FEATURE_PER_TID_RETRY_CONFIG ,NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG , +NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL , +NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL ,/* add new features before the definition below */ NUM_NL80211_EXT_FEATURES,
net/wireless/nl80211.c +15 -0
@@ -288,6 +288,8 @@ static int validate_ie_attr(const struct nlattr *attr, [NL80211_ATTR_TID_CONFIG_RETRY] = { .type = NLA_FLAG }, [NL80211_ATTR_TID_CONFIG_RETRY_SHORT] = NLA_POLICY_MIN(NLA_U8, 1), [NL80211_ATTR_TID_CONFIG_RETRY_LONG] = NLA_POLICY_MIN(NLA_U8, 1), + [NL80211_ATTR_TID_CONFIG_AMPDU_CTRL ] = + NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), };const struct nla_policy nl80211_policy[NUM_NL80211_ATTR ] = {
@@ -13322,6 +13324,19 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, } } +if (attrs[NL80211_ATTR_TID_CONFIG_AMPDU_CTRL ]) { +if (!wiphy_ext_feature_isset (&rdev->wiphy, +NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL )) +return -ENOTSUPP ; + +if (peer && !wiphy_ext_feature_isset (&rdev->wiphy, +NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL )) +return -ENOTSUPP ; + + tid_conf->tid_conf_mask |=IEEE80211_TID_CONF_AMPDU ; + tid_conf->ampdu = +nla_get_u8 (attrs[NL80211_ATTR_TID_CONFIG_AMPDU_CTRL ]); + }return 0 ; }
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v3 4/9 nl80211: Add netlink attribute to enable/disable RTS_CTS
In reply to Tamizh chelvamIntroduce NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL in nl80211_attr_tid_config to accept TID specific RTS_CTS enable/disable configuration through NL80211_CMD_SET_TID_CONFIG command. TID for which the RTS_CTS control configuration is to be applied is passed in NL80211_ATTR_TID_CONFIG_TID attribute. When the user-space wants this configuration peer specific rather than being applied for all the connected stations, MAC address of the peer can be passed in NL80211_ATTR_MAC attribute.
Driver supporting this feature should advertise NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL and supporting per-STA data TID RTS_CTS configuration should advertise NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL.
--- include/net/cfg80211.h | 3 +++ include/uapi/linux/nl80211.h | 22 ++++++++++++++++++++++ net/wireless/nl80211.c | 17 +++++++++++++++++ 3 files changed, 42 insertions(+)
include/net/cfg80211.h +3 -0
@@ -513,6 +513,7 @@ enum ieee80211_tid_conf_mask {IEEE80211_TID_CONF_NOACK =BIT (0 ),IEEE80211_TID_CONF_RETRY =BIT (1 ),IEEE80211_TID_CONF_AMPDU =BIT (2 ), + IEEE80211_TID_CONF_RTSCTS = BIT(3), };/**
@@ -524,6 +525,7 @@ enum ieee80211_tid_conf_mask {* @retry_long: retry count value * @retry_short: retry count value * @ampdu: Enable/Disable aggregation +* @rtscts: Enable/Disable RTS/CTS */ struct ieee80211_tid_cfg {u8 tid;
@@ -532,6 +534,7 @@ struct ieee80211_tid_cfg {int retry_long;int retry_short;u8 ampdu; +u8 rtscts; };/**
include/uapi/linux/nl80211.h +22 -0
@@ -4630,6 +4630,21 @@ enum nl80211_tid_config {* NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL and supporting per station * aggregation configuration should advertise * NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL. +* @NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TID +* specified in %%NL80211_ATTR_TID_CONFIG_TID. It is u8 type, if the +* peer MAC address is passed in %NL80211_ATTR_MAC, then this +* configuration is applied to the data frame for the tid to that +* connected station. +* Station specific RTS_CTS configuration is valid only for STA's +* current connection. i.e. the configuration will be reset to default when +* the station connects back after disconnection/roaming. +* when user-space does not include %NL80211_ATTR_MAC, this configuration +* should be treated as per-netdev configuration. This configuration will +* be cleared when the interface goes down and on the disconnection from a +* BSS. Driver supporting this feature should advertise +* NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL and supporting per station +* RTS_CTS configuration should advertise +* NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL. */ enum nl80211_attr_tid_config { __NL80211_ATTR_TID_INVALID,
@@ -4639,6 +4654,7 @@ enum nl80211_attr_tid_config {NL80211_ATTR_TID_CONFIG_RETRY_SHORT ,NL80211_ATTR_TID_CONFIG_RETRY_LONG ,NL80211_ATTR_TID_CONFIG_AMPDU_CTRL , +NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL ,/* keep last */ __NL80211_ATTR_TID_CONFIG_AFTER_LAST,
@@ -5457,6 +5473,10 @@ enum nl80211_feature_flags {* aggregation control(enable/disable). * @NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL: Driver supports per STA * specific TID aggregation control(enable/disable). +* @NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL: Driver supports TID specific +* RTS_CTS control(enable/disable). +* @NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL: Driver supports STA specific +* RTS_CTS control(enable/disable). * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -5505,6 +5525,8 @@ enum nl80211_ext_feature_index {NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG ,NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL ,NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL , +NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL , +NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL ,/* add new features before the definition below */ NUM_NL80211_EXT_FEATURES,
net/wireless/nl80211.c +17 -0
@@ -290,6 +290,8 @@ static int validate_ie_attr(const struct nlattr *attr, [NL80211_ATTR_TID_CONFIG_RETRY_LONG] = NLA_POLICY_MIN(NLA_U8, 1), [NL80211_ATTR_TID_CONFIG_AMPDU_CTRL ] = NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), + [NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL ] = + NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), };const struct nla_policy nl80211_policy[NUM_NL80211_ATTR ] = {
@@ -13337,6 +13339,21 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, tid_conf->ampdu =nla_get_u8 (attrs[NL80211_ATTR_TID_CONFIG_AMPDU_CTRL ]); } + +if (attrs[NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL ]) { +if (!wiphy_ext_feature_isset (&rdev->wiphy, +NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL )) +return -ENOTSUPP ; + +if (peer && !wiphy_ext_feature_isset (&rdev->wiphy, +NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL )) +return -ENOTSUPP ; + + tid_conf->tid_conf_mask |=IEEE80211_TID_CONF_RTSCTS ; + tid_conf->rtscts = +nla_get_u8 (attrs[NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL ]); + } +return 0 ; }
Signature · 1 line
1.9.1
PATCH v3 5/9 nl80211: Add netlink attribute to configure TID specific tx rate
In reply to Tamizh chelvamIntroduce NL80211_ATTR_TID_CONFIG_TX_RATES in nl80211_attr_tid_config to accept data TID specific TX bitrate configuration
through NL80211_CMD_SET_TID_CONFIG command. TID for which the this configuration is to be applied is passed in NL80211_ATTR_TID_CONFIG_TID attribute. TX bitrate mask values passed in NL80211_ATTR_TX_RATES attribute and NL80211_ATTR_TID_CONFIG_TX_RATES attribute will have types of the TX rate should be applied. When the user-space wants this configuration peer specific rather than being applied for all the connected stations, MAC address of the peer can be passed in NL80211_ATTR_MAC attribute.
Driver supporting this feature should advertise NL80211_EXT_FEATURE_PER_TID_TX_BITRATE_MASK and supporting per-STA data TID TX bitrate configuration should advertise NL80211_EXT_FEATURE_PER_STA_TX_BITRATE_MASK.
--- include/net/cfg80211.h | 5 +++ include/uapi/linux/nl80211.h | 39 +++++++++++++++++++ net/wireless/nl80211.c | 89 ++++++++++++++++++++++++++++++++++---------- 3 files changed, 113 insertions(+), 20 deletions(-)
include/net/cfg80211.h +5 -0
@@ -514,6 +514,7 @@ enum ieee80211_tid_conf_mask {IEEE80211_TID_CONF_RETRY =BIT (1 ),IEEE80211_TID_CONF_AMPDU =BIT (2 ),IEEE80211_TID_CONF_RTSCTS =BIT (3 ), + IEEE80211_TID_CONF_TX_BITRATE = BIT(4), };/**
@@ -526,6 +527,8 @@ enum ieee80211_tid_conf_mask {* @retry_short: retry count value * @ampdu: Enable/Disable aggregation * @rtscts: Enable/Disable RTS/CTS +* @txrate_type: TX bitrate mask type +* @mask: bitrate to be applied for the TID */ struct ieee80211_tid_cfg {u8 tid;
@@ -535,6 +538,8 @@ struct ieee80211_tid_cfg {int retry_short;u8 ampdu;u8 rtscts; +enum nl80211_tx_rate_setting txrate_type; +struct cfg80211_bitrate_mask *mask; };/**
include/uapi/linux/nl80211.h +39 -0
@@ -4557,6 +4557,18 @@ enum nl80211_tx_power_setting { NL80211_TX_POWER_FIXED, }; +/** +* enum nl80211_tx_rate_setting - TX rate configuration type +* @NL80211_TX_RATE_AUTOMATIC: automatically determine TX rate +* @NL80211_TX_RATE_LIMITED: limit the TX rate by the TX rate parameter +* @NL80211_TX_RATE_FIXED: fix TX rate to the TX rate parameter +*/ +enum nl80211_tx_rate_setting { +NL80211_TX_RATE_AUTOMATIC , +NL80211_TX_RATE_LIMITED , +NL80211_TX_RATE_FIXED , +}; +enum nl80211_tid_config {NL80211_TID_CONFIG_DEFAULT ,NL80211_TID_CONFIG_ENABLE ,
@@ -4645,6 +4657,25 @@ enum nl80211_tid_config {* NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL and supporting per station * RTS_CTS configuration should advertise * NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL. +* @NL80211_ATTR_TID_CONFIG_TX_RATES: Data frame TX rate mask should be applied +* with the parameters passed through %NL80211_ATTR_TX_RATES. This +* configuration is per TID, TID is specified with +* %NL80211_ATTR_TID_CONFIG_TID. +* If the peer MAC address is passed in %NL80211_ATTR_MAC, then this +* configuration is applied to the data frame for the tid to that connected +* station. This attribute will be useful to notfiy the driver that what +* type of txrate should be applied(%enum enum nl80211_tx_rate_setting) +* for the connected station (%NL80211_ATTR_MAC), +* Station specific retry configuration is valid only for STA's +* current connection. i.e. the configuration will be reset to default when +* the station connects back after disconnection/roaming. +* when user-space does not include %NL80211_ATTR_MAC, this configuration +* should be treated as per-netdev configuration. This configuration will +* be cleared when the interface goes down and on the disconnection from a +* BSS. Driver supporting this feature should advertise +* NL80211_EXT_FEATURE_PER_TID_TX_BITRATE_MASK and supporting per station +* TX bitrate configuration should advertise +* NL80211_EXT_FEATURE_PER_STA_TX_BITRATE_MASK. */ enum nl80211_attr_tid_config { __NL80211_ATTR_TID_INVALID,
@@ -4655,6 +4686,8 @@ enum nl80211_attr_tid_config {NL80211_ATTR_TID_CONFIG_RETRY_LONG ,NL80211_ATTR_TID_CONFIG_AMPDU_CTRL ,NL80211_ATTR_TID_CONFIG_RTSCTS_CTRL , +NL80211_ATTR_TID_CONFIG_TX_RATES_TYPE , +NL80211_ATTR_TID_CONFIG_TX_RATES ,/* keep last */ __NL80211_ATTR_TID_CONFIG_AFTER_LAST,
@@ -5477,6 +5510,10 @@ enum nl80211_feature_flags {* RTS_CTS control(enable/disable). * @NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL: Driver supports STA specific * RTS_CTS control(enable/disable). +* @NL80211_EXT_FEATURE_PER_TID_TX_BITRATE_MASK: Driver supports TID specific +* TX bitrate configuration. +* @NL80211_EXT_FEATURE_PER_STA_TX_BITRATE_MASK: Driver supports STA specific +* TX bitrate configuration. * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -5527,6 +5564,8 @@ enum nl80211_ext_feature_index {NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL ,NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL ,NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL , +NL80211_EXT_FEATURE_PER_TID_TX_BITRATE_MASK , +NL80211_EXT_FEATURE_PER_STA_TX_BITRATE_MASK ,/* add new features before the definition below */ NUM_NL80211_EXT_FEATURES,
net/wireless/nl80211.c +69 -20
171 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 6/9 mac80211: Add api to support configuring TID specific configuration
In reply to Tamizh chelvamImplement drv_set_tid_config api to allow TID specific configuration. This per-TID configuration
will be applied for all the connected stations when MAC is NULL.
--- include/net/mac80211.h | 35 +++++++++++++++++++++++++++++++++++ net/mac80211/cfg.c | 28 ++++++++++++++++++++++++++++ net/mac80211/driver-ops.h | 15 +++++++++++++++ 3 files changed, 78 insertions(+)
include/net/mac80211.h +35 -0
@@ -1556,6 +1556,8 @@ enum ieee80211_vif_flags { IEEE80211_VIF_GET_NOA_UPDATE = BIT(3), }; +#define IEEE80211_TID_MAX 8 +/** * struct ieee80211_vif - per-interface data *
@@ -1593,6 +1595,11 @@ enum ieee80211_vif_flags {* @txq: the multicast data TX queue (if driver uses the TXQ abstraction) * @txqs_stopped: per AC flag to indicate that intermediate TXQs are stopped, * protected by fq->lock. +* @noack: per-TID noack policy. +* @retry_short: per-TID retry count. +* @retry_long: per-TID count. +* @ampdu: per-TID Aggregation-MPDU. +* @tx_rate_mask: per-TID tx rate value. */ struct ieee80211_vif {enum nl80211_iftype type;
@@ -1619,6 +1626,14 @@ struct ieee80211_vif {bool txqs_stopped[IEEE80211_NUM_ACS ]; +int noack[IEEE80211_TID_MAX ]; +int retry_short[IEEE80211_TID_MAX ]; +int retry_long[IEEE80211_TID_MAX ]; +int ampdu[IEEE80211_TID_MAX ]; +u8 rate_ctrl[IEEE80211_TID_MAX ]; +u32 rate_code[IEEE80211_TID_MAX ]; +u8 rtscts[IEEE80211_TID_MAX ]; +/* must be last */ u8 drv_priv[0 ]__aligned(sizeof(void *)) ; };
@@ -1933,6 +1948,11 @@ struct ieee80211_sta_rates {* @max_tid_amsdu_len: Maximum A-MSDU size in bytes for this TID * @txq: per-TID data TX queues (if driver uses the TXQ abstraction); note that * the last entry (%IEEE80211_NUM_TIDS) is used for non-data frames +* @noack: per-TID noack policy. +* @retry_short: per-TID retry count. +* @retry_long: per-TID count. +* @ampdu: per-TID Aggregation-MPDU. +* @tx_rate_mask: per-TID tx rate value. */ struct ieee80211_sta {u32 supp_rates[NUM_NL80211_BANDS ];
@@ -1976,6 +1996,13 @@ struct ieee80211_sta {struct ieee80211_txq *txq[IEEE80211_NUM_TIDS +1 ]; +int noack[IEEE80211_TID_MAX ]; +int retry_short[IEEE80211_TID_MAX ]; +int retry_long[IEEE80211_TID_MAX ]; +int ampdu[IEEE80211_TID_MAX ]; +u8 rate_ctrl[IEEE80211_TID_MAX ]; +u8 rtscts[IEEE80211_TID_MAX ]; +/* must be last */ u8 drv_priv[0 ]__aligned(sizeof(void *)) ; };
@@ -3707,6 +3734,10 @@ enum ieee80211_reconfig_type {* * @start_pmsr: start peer measurement (e.g. FTM) (this call can sleep) * @abort_pmsr: abort peer measurement (this call can sleep) +* @set_tid_config: TID specific configurations will be applied for a particular +* station when @sta is non-NULL. When @sta is NULL, then the configuration +* will be for all the connected clients in the vif. +* This callback may sleep. */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw,
@@ -4004,6 +4035,10 @@ struct ieee80211_ops { struct cfg80211_pmsr_request *request);void (*abort_pmsr)(struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct cfg80211_pmsr_request *request); +int (*set_tid_config)(struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +struct ieee80211_sta *sta, +struct ieee80211_tid_config *tid_conf); };/**
net/mac80211/cfg.c +28 -0
@@ -3893,6 +3893,33 @@ static int ieee80211_get_txq_stats(struct wiphy *wiphy,return drv_abort_pmsr (local, sdata, request); } +static int ieee80211_set_tid_config (struct wiphy *wiphy, +struct net_device *dev, +struct ieee80211_tid_config *tid_conf) +{ +struct ieee80211_sub_if_data *sdata =IEEE80211_DEV_TO_SUB_IF (dev); +struct sta_info *sta; +int ret; + +if (!sdata->local->ops->set_tid_config) +return -EOPNOTSUPP ; + +if (!tid_conf->peer) +return drv_set_tid_config (sdata->local, sdata,NULL , tid_conf); + +mutex_lock (&sdata->local->sta_mtx); + + sta =sta_info_get_bss (sdata, tid_conf->peer); +if (!sta) { +mutex_unlock (&sdata->local->sta_mtx); +return -ENOENT ; + } + + ret =drv_set_tid_config (sdata->local, sdata, &sta->sta, tid_conf); +mutex_unlock (&sdata->local->sta_mtx); +return ret; +} +const struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, .del_virtual_intf = ieee80211_del_iface,
@@ -3990,4 +4017,5 @@ static int ieee80211_get_txq_stats(struct wiphy *wiphy, .get_ftm_responder_stats = ieee80211_get_ftm_responder_stats, .start_pmsr = ieee80211_start_pmsr, .abort_pmsr = ieee80211_abort_pmsr, + .set_tid_config = ieee80211_set_tid_config, };
net/mac80211/driver-ops.h +15 -0
@@ -1348,4 +1348,19 @@ static inline void drv_del_nan_func(struct ieee80211_local *local, trace_drv_return_void(local); } +static inline int drv_set_tid_config (struct ieee80211_local *local, +struct ieee80211_sub_if_data *sdata, +struct ieee80211_sta *sta, +struct ieee80211_tid_config *tid_conf) +{ +int ret; + +might_sleep (); + ret = local->ops->set_tid_config (&local->hw, &sdata->vif, sta, + tid_conf); +trace_drv_return_int (local, ret); + +return ret; +} +#endif /* __MAC80211_DRIVER_OPS */
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
kbuild test robot
build botRe: [PATCHv3 6/9] mac80211: Add api to support configuring TID specific configuration
Thank you for the patch! Perhaps something to improve:
Hi Tamizh,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mac80211-next/master]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Tamizh-chelvam/cfg80211-mac80211-Add-support-for-TID-specific-configuration/20190308-195433 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master reproduce: make htmldocs
All warnings (new ones prefixed by >>):
WARNING: convert(1) not found, for SVG to PDF conversion install ImageMagick (https://www.imagemagick.org)
include/linux/rcupdate_wait.h:1: warning: no structured comments found include/linux/rcutree.h:1: warning: no structured comments found
kernel/rcu/tree.c:710: warning: Excess function parameter 'irq' description in 'rcu_nmi_exit' include/linux/gfp.h:1: warning: no structured comments found
>> include/net/mac80211.h:1639: warning: Function parameter or member 'rate_ctrl' not described in 'ieee80211_vif' >> include/net/mac80211.h:1639: warning: Function parameter or member 'rate_code' not described in 'ieee80211_vif' >> include/net/mac80211.h:1639: warning: Function parameter or member 'rtscts' not described in 'ieee80211_vif' >> include/net/mac80211.h:2008: warning: Function parameter or member 'rate_ctrl' not described in 'ieee80211_sta' >> include/net/mac80211.h:2008: warning: Function parameter or member 'rtscts' not described in 'ieee80211_sta'
kernel/rcu/tree.c:711: warning: Excess function parameter 'irq' description in 'rcu_nmi_exit'
include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.cb' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.poll' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.active' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.cb' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.poll' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.active' not described in 'dma_buf' include/linux/dma-fence-array.h:54: warning: Function parameter or member 'work' not described in 'dma_fence_array' include/linux/firmware/intel/stratix10-svc-client.h:1: warning: no structured comments found
include/linux/gpio/driver.h:371: warning: Function parameter or member 'init_valid_mask' not described in 'gpio_chip' include/linux/iio/hw-consumer.h:1: warning: no structured comments found
include/linux/input/sparse-keymap.h:46: warning: Function parameter or member 'sw' not described in 'key_entry' include/linux/regulator/machine.h:199: warning: Function parameter or member 'max_uV_step' not described in 'regulation_constraints' include/linux/regulator/driver.h:228: warning: Function parameter or member 'resume' not described in 'regulator_ops' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw0' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw1' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw2' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw3' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.eadm' not described in 'irb' drivers/slimbus/stream.c:1: warning: no structured comments found
include/linux/spi/spi.h:180: warning: Function parameter or member 'driver_override' not described in 'spi_device' drivers/target/target_core_device.c:1: warning: no structured comments found
drivers/usb/typec/bus.c:1: warning: no structured comments found
drivers/usb/typec/class.c:1: warning: no structured comments found
include/linux/w1.h:281: warning: Function parameter or member 'of_match_table' not described in 'w1_family'
fs/direct-io.c:257: warning: Excess function parameter 'offset' description in 'dio_complete'
fs/file_table.c:1: warning: no structured comments found
fs/libfs.c:477: warning: Excess function parameter 'available' description in 'simple_write_end'
fs/posix_acl.c:646: warning: Function parameter or member 'inode' not described in 'posix_acl_update_mode'
fs/posix_acl.c:646: warning: Function parameter or member 'mode_p' not described in 'posix_acl_update_mode'
fs/posix_acl.c:646: warning: Function parameter or member 'acl' not described in 'posix_acl_update_mode' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:183: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_read_lock' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Function parameter or member 'range' not described in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Function parameter or member 'range' not described in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:344: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:382: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor ' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:383: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor ' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:555: warning: Function parameter or member 'adev' not described in 'for_each_amdgpu_vm_pt_leaf' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:555: warning: Function parameter or member 'vm' not described in 'for_each_amdgpu_vm_pt_leaf' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:555: warning: Function parameter or member 'start' not described in 'for_each_amdgpu_vm_pt_leaf' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:555: warning: Function parameter or member 'end' not described in 'for_each_amdgpu_vm_pt_leaf' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:555: warning: Function parameter or member 'cursor' not described in 'for_each_amdgpu_vm_pt_leaf' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:603: warning: Function parameter or member 'adev' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:603: warning: Function parameter or member 'vm' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:603: warning: Function parameter or member 'cursor' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:603: warning: Function parameter or member 'entry' not described in 'for_each_amdgpu_vm_pt_dfs_safe' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:847: warning: Function parameter or member 'level' not described in 'amdgpu_vm_bo_param' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'params' not described in 'amdgpu_vm_update_func' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'bo' not described in 'amdgpu_vm_update_func' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'pe' not described in 'amdgpu_vm_update_func' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'addr' not described in 'amdgpu_vm_update_func' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'count' not described in 'amdgpu_vm_update_func' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'incr' not described in 'amdgpu_vm_update_func' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'flags' not described in 'amdgpu_vm_update_func' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'params' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'bo' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'level' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'pe' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'addr' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'count' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'incr' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1519: warning: Function parameter or member 'flags' not described in 'amdgpu_vm_update_huge' drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:3095: warning: Function parameter or member 'pasid' not described in 'amdgpu_vm_make_compute' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:128: warning: Incorrect use of kernel-doc format: Documentation Makefile include scripts source @atomic_obj drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:203: warning: Function parameter or member 'atomic_obj' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:203: warning: Function parameter or member 'atomic_obj_lock' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:203: warning: Function parameter or member 'backlight_link' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:203: warning: Function parameter or member 'backlight_caps' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:203: warning: Function parameter or member 'freesync_module' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:203: warning: Function parameter or member 'fw_dmcu' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:203: warning: Function parameter or member 'dmcu_fw_version' not described in 'amdgpu_display_manager' drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1: warning: no structured comments found
include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_pin' not described in 'drm_driver' include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_unpin' not described in 'drm_driver' include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_res_obj' not described in 'drm_driver' include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_get_sg_table' not described in 'drm_driver' include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_import_sg_table' not described in 'drm_driver' include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_vmap' not described in 'drm_driver' include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_vunmap' not described in 'drm_driver' include/drm/drm_drv.h:618: warning: Function parameter or member 'gem_prime_mmap' not described in 'drm_driver' include/drm/drm_atomic_state_helper.h:1: warning: no structured comments found
drivers/gpu/drm/drm_dp_helper.c:1364: warning: Function parameter or member 'dsc_dpcd' not described in 'drm_dp_dsc_sink_max_slice_count' drivers/gpu/drm/drm_dp_helper.c:1364: warning: Function parameter or member 'is_edp' not described in 'drm_dp_dsc_sink_max_slice_count' drivers/gpu/drm/i915/i915_vma.h:49: warning: cannot understand function prototype: 'struct i915_vma ' drivers/gpu/drm/i915/i915_vma.h:1: warning: no structured comments found
drivers/gpu/drm/i915/intel_guc_fwif.h:536: warning: cannot understand function prototype: 'struct guc_log_buffer_state ' drivers/gpu/drm/i915/i915_trace.h:1: warning: no structured comments found
include/linux/skbuff.h:876: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff' include/linux/skbuff.h:876: warning: Function parameter or member 'list' not described in 'sk_buff'
vim +1639 include/net/mac80211.h
ddbfe860 Stanislaw Gruszka 2013-03-08 1624 1b09b556 Andrei Otcheretianski 2015-08-15 1625 unsigned int probe_req_reg; 1b09b556 Andrei Otcheretianski 2015-08-15 1626 21a5d4c3 Manikanta Pubbisetty 2018-07-11 1627 bool txqs_stopped[IEEE80211_NUM_ACS]; 21a5d4c3 Manikanta Pubbisetty 2018-07-11 1628 94e2e2e9 Tamizh chelvam 2019-03-06 1629 int noack[IEEE80211_TID_MAX]; 94e2e2e9 Tamizh chelvam 2019-03-06 1630 int retry_short[IEEE80211_TID_MAX]; 94e2e2e9 Tamizh chelvam 2019-03-06 1631 int retry_long[IEEE80211_TID_MAX]; 94e2e2e9 Tamizh chelvam 2019-03-06 1632 int ampdu[IEEE80211_TID_MAX]; 94e2e2e9 Tamizh chelvam 2019-03-06 1633 u8 rate_ctrl[IEEE80211_TID_MAX]; 94e2e2e9 Tamizh chelvam 2019-03-06 1634 u32 rate_code[IEEE80211_TID_MAX]; 94e2e2e9 Tamizh chelvam 2019-03-06 1635 u8 rtscts[IEEE80211_TID_MAX]; 94e2e2e9 Tamizh chelvam 2019-03-06 1636 32bfd35d Johannes Berg 2007-12-19 1637 /* must be last */ 1c06ef98 Johannes Berg 2012-12-28 1638 u8 drv_priv[0] __aligned(sizeof(void *));
32bfd35d Johannes Berg 2007-12-19 @1639 };32bfd35d Johannes Berg 2007-12-19 1640
:::::: The code at line 1639 was first introduced by commit
:::::: 32bfd35d4b63bd63de4bb0d791ef049c3c868726 mac80211: dont use interface indices in drivers
:::::: TO: Johannes Berg <[email protected]> :::::: CC: David S. Miller <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH v3 7/9 ath10k: Add wmi command support for station specific TID config
In reply to Tamizh chelvamThis patch adds WMI interface to configure station specific TID configuration . Host needs to send station's MAC address along with TID number and its configuration to target through WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID.
WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT flag is added to advertise this support.
Testing:
* Tested HW: QCA9888
* Tested FW: 10.4-3.5.1-00052
--- drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 +++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 32 +++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 52 +++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+)
drivers/net/wireless/ath/ath10k/wmi-ops.h +19 -0
@@ -216,6 +216,8 @@ struct wmi_ops {struct sk_buff *(*gen_bb_timing) (struct ath10k *ar,const struct wmi_bb_timing_cfg_arg *arg); +struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar, +const struct wmi_per_peer_per_tid_cfg_arg *arg); };
@@ -1616,4 +1618,21 @@ struct wmi_ops {return ath10k_wmi_cmd_send (ar, skb, ar->wmi.cmd->set_bb_timing_cmdid); } + +static inline int +ath10k_wmi_set_per_peer_per_tid_cfg (struct ath10k *ar, +const struct wmi_per_peer_per_tid_cfg_arg *arg) +{ +struct sk_buff *skb; + +if (!ar->wmi.ops->gen_per_peer_per_tid_cfg) +return -EOPNOTSUPP ; + + skb = ar->wmi.ops->gen_per_peer_per_tid_cfg (ar, arg); +if (IS_ERR (skb)) +return PTR_ERR (skb); + +return ath10k_wmi_cmd_send (ar, skb, + ar->wmi.cmd->per_peer_per_tid_config_cmdid); +}#endif
drivers/net/wireless/ath/ath10k/wmi.c +32 -0
@@ -740,6 +740,7 @@ .tdls_peer_update_cmdid = WMI_10_4_TDLS_PEER_UPDATE_CMDID, .tdls_set_offchan_mode_cmdid = WMI_10_4_TDLS_SET_OFFCHAN_MODE_CMDID, .radar_found_cmdid = WMI_10_4_RADAR_FOUND_CMDID, + .per_peer_per_tid_config_cmdid = WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID, };/* MAIN WMI VDEV param map */
@@ -8880,6 +8881,36 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) }static struct sk_buff * +ath10k_wmi_10_4_gen_per_peer_per_tid_cfg (struct ath10k *ar, +const struct wmi_per_peer_per_tid_cfg_arg *arg) +{ +struct wmi_peer_per_tid_cfg_cmd *cmd; +struct sk_buff *skb; + + skb =ath10k_wmi_alloc_skb (ar,sizeof (*cmd)); +if (!skb) +return ERR_PTR (-ENOMEM ); + +memset (skb->data,0 ,sizeof (*cmd)); + + cmd = (struct wmi_peer_per_tid_cfg_cmd *)skb->data; + cmd->vdev_id =cpu_to_le32 (arg->vdev_id); +ether_addr_copy (cmd->peer_macaddr.addr, arg->peer_macaddr.addr); + cmd->tid =cpu_to_le32 (arg->tid); + cmd->ack_policy =cpu_to_le32 (arg->ack_policy); + cmd->aggr_control =cpu_to_le32 (arg->aggr_control); + cmd->rate_control =cpu_to_le32 (arg->rate_ctrl); + cmd->retry_count =cpu_to_le32 (arg->retry_count); + cmd->rcode_flags =cpu_to_le32 (arg->rcode_flags); + +ath10k_dbg (ar,ATH10K_DBG_WMI , +"wmi noack tid %d vdev id %d ack_policy %d aggr %u rate_ctrl %u rcflag %u retry_count %d mac_addr %pM\n" , + arg->tid, arg->vdev_id, arg->ack_policy, arg->aggr_control, arg->rate_ctrl, + arg->rcode_flags, arg->retry_count, arg->peer_macaddr.addr); +return skb; +} + +static struct sk_buff *ath10k_wmi_op_gen_echo (struct ath10k *ar,u32 value) {struct wmi_echo_cmd *cmd;
@@ -9288,6 +9319,7 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) .gen_pdev_get_tpc_table_cmdid = ath10k_wmi_10_4_op_gen_pdev_get_tpc_table_cmdid, .gen_radar_found = ath10k_wmi_10_4_gen_radar_found, + .gen_per_peer_per_tid_cfg = ath10k_wmi_10_4_gen_per_peer_per_tid_cfg,/* shared with 10.2 */ .pull_echo_ev = ath10k_wmi_op_pull_echo_ev,
drivers/net/wireless/ath/ath10k/wmi.h +52 -0
88 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 8/9 ath10k: Add new api to support TID specific configuration
In reply to Tamizh chelvamThis patch add ops for set_tid_config to support TID specific configuration. STA information along with the TID config change mask to notify driver that which configuration needs to be applied for this current command.
If the STA info not available in the command then the configuration will be applied for all connected stations in the vif. TID specific noack configuration requires aggregation disabled and rate for the data TID packets should be basic rates. So, if the TID already configured with noack policy then driver will ignore the aggregation or TX rate related configuration for the same data TID. In TX rate configuration should be applied with highest preamble configuration(HT rates should not be applied for the station which supports vht rates).
Vif specific TID configuration will be applied for all the connected stations except for the station which already applied with the same configuration for the TID through station specific command. Newly connecting stations will be applied with vif TID configuration which will be stored in ieee80211_vif.
Testing:
* Tested HW: QCA9888
* Tested FW: 10.4-3.5.1-00052
--- drivers/net/wireless/ath/ath10k/core.h | 6 + drivers/net/wireless/ath/ath10k/mac.c | 631 ++++++++++++++++++++++++++++----- 2 files changed, 557 insertions(+), 80 deletions(-)
drivers/net/wireless/ath/ath10k/core.h +6 -0
@@ -82,6 +82,8 @@/* Default Airtime weight multipler (Tuned for multiclient performance) */ #define ATH10K_AIRTIME_WEIGHT_MULTIPLIER 4 +#define ATH10K_MAX_RETRY_COUNT 30 +struct ath10k ;static inline const char *ath10k_bus_str (enum ath10k_bus bus)
@@ -504,6 +506,7 @@ struct ath10k_sta {#endif /* Protected with ar->data_lock */ u32 peer_ps_state; +struct work_struct tid_config_wk; };#define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5 * HZ)
@@ -571,6 +574,9 @@ struct ath10k_vif {struct work_struct ap_csa_work;struct delayed_work connection_loss_work;struct cfg80211_bitrate_mask bitrate_mask; +u32 tid_conf_changed[IEEE80211_TID_MAX ]; + +struct ieee80211_tid_config *tid_config; };struct ath10k_vif_iter {
drivers/net/wireless/ath/ath10k/mac.c +551 -80
692 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCHv3 8/9] ath10k: Add new api to support TID specific configuration
Hi Tamizh,
url: https://github.com/0day-ci/linux/commits/Tamizh-chelvam/cfg80211-mac80211-Add-support-for-TID-specific-configuration/20190308-195433 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
smatch warnings:drivers/net/wireless/ath/ath10k/mac.c:8438 ath10k_mac_op_set_tid_config() error: uninitialized symbol 'ret'.
# https://github.com/0day-ci/linux/commit/2eab2d81c36efa0cf08b02bfe2df3f83a2e2d756
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 2eab2d81c36efa0cf08b02bfe2df3f83a2e2d756
vim +/ret +8438 drivers/net/wireless/ath/ath10k/mac.c
6a7f8911 Anilkumar Kolli 2017-12-05 8306
2eab2d81 Tamizh chelvam 2019-03-06 8307 static int ath10k_mac_op_set_tid_config(struct ieee80211_hw *hw,
2eab2d81 Tamizh chelvam 2019-03-06 8308 struct ieee80211_vif *vif,
2eab2d81 Tamizh chelvam 2019-03-06 8309 struct ieee80211_sta *sta,
2eab2d81 Tamizh chelvam 2019-03-06 8310 struct ieee80211_tid_config *tid_config)
2eab2d81 Tamizh chelvam 2019-03-06 8311 {
2eab2d81 Tamizh chelvam 2019-03-06 8312 struct ath10k *ar = hw->priv;
2eab2d81 Tamizh chelvam 2019-03-06 8313 struct ath10k_vif *arvif = (void *)vif->drv_priv;
2eab2d81 Tamizh chelvam 2019-03-06 8314 struct ath10k_mac_iter_tid_conf_data data = {};
2eab2d81 Tamizh chelvam 2019-03-06 8315 struct wmi_per_peer_per_tid_cfg_arg arg = {};
2eab2d81 Tamizh chelvam 2019-03-06 8316 int ret, i;
2eab2d81 Tamizh chelvam 2019-03-06 8317 u8 changed;
2eab2d81 Tamizh chelvam 2019-03-06 8318
2eab2d81 Tamizh chelvam 2019-03-06 8319 mutex_lock(&ar->conf_mutex);
2eab2d81 Tamizh chelvam 2019-03-06 8320 arg.vdev_id = arvif->vdev_id;
2eab2d81 Tamizh chelvam 2019-03-06 8321
2eab2d81 Tamizh chelvam 2019-03-06 8322 memset(arvif->tid_conf_changed, 0, sizeof(arvif->tid_conf_changed));
2eab2d81 Tamizh chelvam 2019-03-06 8323
2eab2d81 Tamizh chelvam 2019-03-06 8324 for (i = 0; i < tid_config->n_tid_conf; i++) {
2eab2d81 Tamizh chelvam 2019-03-06 8325 if (tid_config->tid_conf[i].tid >= IEEE80211_TID_MAX)
2eab2d81 Tamizh chelvam 2019-03-06 8326 continue;
^^^^^^^^^We would have to hit this continue over and over and "sta" would have to be non-NULL for this to be an issue.
2eab2d81 Tamizh chelvam 2019-03-06 8327
2eab2d81 Tamizh chelvam 2019-03-06 8328 ath10k_mac_parse_tid_config(ar, sta, vif,
2eab2d81 Tamizh chelvam 2019-03-06 8329 &tid_config->tid_conf[i],
2eab2d81 Tamizh chelvam 2019-03-06 8330 &arg);
2eab2d81 Tamizh chelvam 2019-03-06 8331 changed = tid_config->tid_conf[i].tid_conf_mask;
2eab2d81 Tamizh chelvam 2019-03-06 8332 if (sta) {
2eab2d81 Tamizh chelvam 2019-03-06 8333 if (!sta->wme) {
2eab2d81 Tamizh chelvam 2019-03-06 8334 ret = -ENOTSUPP;
2eab2d81 Tamizh chelvam 2019-03-06 8335 goto exit;
2eab2d81 Tamizh chelvam 2019-03-06 8336 }
2eab2d81 Tamizh chelvam 2019-03-06 8337
2eab2d81 Tamizh chelvam 2019-03-06 8338 if (changed & IEEE80211_TID_CONF_RETRY) {
2eab2d81 Tamizh chelvam 2019-03-06 8339 if (sta->noack[arg.tid] == WMI_PEER_TID_CONFIG_NOACK ||
2eab2d81 Tamizh chelvam 2019-03-06 8340 vif->noack[arg.tid] == WMI_PEER_TID_CONFIG_NOACK)
2eab2d81 Tamizh chelvam 2019-03-06 8341 arg.retry_count = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8342 }
2eab2d81 Tamizh chelvam 2019-03-06 8343
2eab2d81 Tamizh chelvam 2019-03-06 8344 if (changed & IEEE80211_TID_CONF_AMPDU) {
2eab2d81 Tamizh chelvam 2019-03-06 8345 if (sta->noack[arg.tid] == WMI_PEER_TID_CONFIG_NOACK ||
2eab2d81 Tamizh chelvam 2019-03-06 8346 vif->noack[arg.tid] == WMI_PEER_TID_CONFIG_NOACK)
2eab2d81 Tamizh chelvam 2019-03-06 8347 arg.aggr_control = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8348 }
2eab2d81 Tamizh chelvam 2019-03-06 8349
2eab2d81 Tamizh chelvam 2019-03-06 8350 if (changed & IEEE80211_TID_CONF_TX_BITRATE) {
2eab2d81 Tamizh chelvam 2019-03-06 8351 if (sta->noack[arg.tid] == WMI_PEER_TID_CONFIG_NOACK ||
2eab2d81 Tamizh chelvam 2019-03-06 8352 vif->noack[arg.tid] == WMI_PEER_TID_CONFIG_NOACK) {
2eab2d81 Tamizh chelvam 2019-03-06 8353 arg.rate_ctrl = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8354 arg.rcode_flags = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8355 }
2eab2d81 Tamizh chelvam 2019-03-06 8356 }
2eab2d81 Tamizh chelvam 2019-03-06 8357
2eab2d81 Tamizh chelvam 2019-03-06 8358 ether_addr_copy(arg.peer_macaddr.addr, sta->addr);
2eab2d81 Tamizh chelvam 2019-03-06 8359 ret = ath10k_wmi_set_per_peer_per_tid_cfg(ar, &arg);
2eab2d81 Tamizh chelvam 2019-03-06 8360 if (ret)
2eab2d81 Tamizh chelvam 2019-03-06 8361 goto exit;
2eab2d81 Tamizh chelvam 2019-03-06 8362
2eab2d81 Tamizh chelvam 2019-03-06 8363 /* Store the configured parameters in success case */
2eab2d81 Tamizh chelvam 2019-03-06 8364 if (changed & IEEE80211_TID_CONF_NOACK) {
2eab2d81 Tamizh chelvam 2019-03-06 8365 if (tid_config->tid_conf[i].noack ==
2eab2d81 Tamizh chelvam 2019-03-06 8366 NL80211_TID_CONFIG_DEFAULT) {
2eab2d81 Tamizh chelvam 2019-03-06 8367 sta->noack[arg.tid] = -1;
2eab2d81 Tamizh chelvam 2019-03-06 8368 } else {
2eab2d81 Tamizh chelvam 2019-03-06 8369 sta->noack[arg.tid] = arg.ack_policy;
2eab2d81 Tamizh chelvam 2019-03-06 8370 }
2eab2d81 Tamizh chelvam 2019-03-06 8371
2eab2d81 Tamizh chelvam 2019-03-06 8372 arg.ack_policy = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8373 arg.aggr_control = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8374 arg.rate_ctrl = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8375 arg.rcode_flags = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8376 }
2eab2d81 Tamizh chelvam 2019-03-06 8377
2eab2d81 Tamizh chelvam 2019-03-06 8378 if (changed & IEEE80211_TID_CONF_RETRY) {
2eab2d81 Tamizh chelvam 2019-03-06 8379 if (tid_config->tid_conf[i].retry_long == -1) {
2eab2d81 Tamizh chelvam 2019-03-06 8380 sta->retry_long[arg.tid] = -1;
2eab2d81 Tamizh chelvam 2019-03-06 8381 } else {
2eab2d81 Tamizh chelvam 2019-03-06 8382 sta->retry_long[arg.tid] = arg.retry_count;
2eab2d81 Tamizh chelvam 2019-03-06 8383 }
2eab2d81 Tamizh chelvam 2019-03-06 8384
2eab2d81 Tamizh chelvam 2019-03-06 8385 arg.retry_count = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8386 }
2eab2d81 Tamizh chelvam 2019-03-06 8387
2eab2d81 Tamizh chelvam 2019-03-06 8388 if (changed & IEEE80211_TID_CONF_AMPDU) {
2eab2d81 Tamizh chelvam 2019-03-06 8389 if (tid_config->tid_conf[i].ampdu ==
2eab2d81 Tamizh chelvam 2019-03-06 8390 NL80211_TID_CONFIG_DEFAULT) {
2eab2d81 Tamizh chelvam 2019-03-06 8391 sta->ampdu[arg.tid] = -1;
2eab2d81 Tamizh chelvam 2019-03-06 8392 } else {
2eab2d81 Tamizh chelvam 2019-03-06 8393 sta->ampdu[arg.tid] = arg.aggr_control;
2eab2d81 Tamizh chelvam 2019-03-06 8394 }
2eab2d81 Tamizh chelvam 2019-03-06 8395
2eab2d81 Tamizh chelvam 2019-03-06 8396 arg.aggr_control = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8397 }
2eab2d81 Tamizh chelvam 2019-03-06 8398
2eab2d81 Tamizh chelvam 2019-03-06 8399 if (changed & IEEE80211_TID_CONF_TX_BITRATE) {
2eab2d81 Tamizh chelvam 2019-03-06 8400 sta->rate_ctrl[arg.tid] = arg.rate_ctrl;
2eab2d81 Tamizh chelvam 2019-03-06 8401 arg.rate_ctrl = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8402 arg.rcode_flags = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8403 }
2eab2d81 Tamizh chelvam 2019-03-06 8404 } else {
2eab2d81 Tamizh chelvam 2019-03-06 8405 arvif->tid_conf_changed[arg.tid] |= changed;
2eab2d81 Tamizh chelvam 2019-03-06 8406
2eab2d81 Tamizh chelvam 2019-03-06 8407 if (changed & IEEE80211_TID_CONF_NOACK) {
2eab2d81 Tamizh chelvam 2019-03-06 8408 vif->noack[arg.tid] = arg.ack_policy;
2eab2d81 Tamizh chelvam 2019-03-06 8409 vif->ampdu[arg.tid] = arg.aggr_control;
2eab2d81 Tamizh chelvam 2019-03-06 8410 vif->rate_ctrl[arg.tid] = arg.rate_ctrl;
2eab2d81 Tamizh chelvam 2019-03-06 8411 }
2eab2d81 Tamizh chelvam 2019-03-06 8412
2eab2d81 Tamizh chelvam 2019-03-06 8413 if (changed & IEEE80211_TID_CONF_RETRY)
2eab2d81 Tamizh chelvam 2019-03-06 8414 vif->retry_long[arg.tid] = arg.retry_count;
2eab2d81 Tamizh chelvam 2019-03-06 8415
2eab2d81 Tamizh chelvam 2019-03-06 8416 if (changed & IEEE80211_TID_CONF_AMPDU)
2eab2d81 Tamizh chelvam 2019-03-06 8417 vif->ampdu[arg.tid] = arg.aggr_control;
2eab2d81 Tamizh chelvam 2019-03-06 8418
2eab2d81 Tamizh chelvam 2019-03-06 8419 if (changed & IEEE80211_TID_CONF_TX_BITRATE) {
2eab2d81 Tamizh chelvam 2019-03-06 8420 vif->rate_ctrl[arg.tid] = arg.rate_ctrl;
2eab2d81 Tamizh chelvam 2019-03-06 8421 vif->rate_code[arg.tid] = arg.rcode_flags;
2eab2d81 Tamizh chelvam 2019-03-06 8422 }
2eab2d81 Tamizh chelvam 2019-03-06 8423 }
2eab2d81 Tamizh chelvam 2019-03-06 8424 }
2eab2d81 Tamizh chelvam 2019-03-06 8425
2eab2d81 Tamizh chelvam 2019-03-06 8426 if (sta)
2eab2d81 Tamizh chelvam 2019-03-06 8427 goto exit;
2eab2d81 Tamizh chelvam 2019-03-06 8428
2eab2d81 Tamizh chelvam 2019-03-06 8429 ret = 0;
2eab2d81 Tamizh chelvam 2019-03-06 8430 data.curr_vif = vif;
2eab2d81 Tamizh chelvam 2019-03-06 8431 data.ar = ar;
2eab2d81 Tamizh chelvam 2019-03-06 8432
2eab2d81 Tamizh chelvam 2019-03-06 8433 ieee80211_iterate_stations_atomic(hw, ath10k_mac_vif_stations_tid_conf,
2eab2d81 Tamizh chelvam 2019-03-06 8434 &data);
2eab2d81 Tamizh chelvam 2019-03-06 8435
2eab2d81 Tamizh chelvam 2019-03-06 8436 exit:
2eab2d81 Tamizh chelvam 2019-03-06 8437 mutex_unlock(&ar->conf_mutex);
2eab2d81 Tamizh chelvam 2019-03-06 @8438 return ret;
2eab2d81 Tamizh chelvam 2019-03-06 8439 }
2eab2d81 Tamizh chelvam 2019-03-06 8440 ---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
PATCH v3 9/9 ath10k: Add extended TID configuration support
In reply to Tamizh chelvamThis patch extend TID configuration support to configure RTS_CTS control and TX rate limit. Tx rate limit is similar to auto rate but it will be limited to the user configured rate mask rather than the station's highest supported rate mask. Here ext_tid_cfg_bitmap added to notify the target which extended configuration parameter has modified(here RTS_CTS).
WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT service flag introduced to advertise this support.
Testing:
* Tested HW: QCA9984
* Tested FW: 10.4-3.9.0.2-00021
--- drivers/net/wireless/ath/ath10k/core.c | 4 +++ drivers/net/wireless/ath/ath10k/mac.c | 48 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 9 ++++--- drivers/net/wireless/ath/ath10k/wmi.h | 20 ++++++++++++++ 4 files changed, 78 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath10k/core.c +4 -0
@@ -2636,6 +2636,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,if (test_bit (WMI_SERVICE_REPORT_AIRTIME , ar->wmi.svc_map)) val |=WMI_10_4_REPORT_AIRTIME ; +if (test_bit (WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT , + ar->wmi.svc_map)) + val |=WMI_10_4_EXT_PEER_TID_CONFIGS_SUPPORT ; + status =ath10k_mac_ext_resource_config (ar, val);if (status) { ath10k_err(ar,
drivers/net/wireless/ath/ath10k/mac.c +48 -0
90 lines not on this page · raw message
drivers/net/wireless/ath/ath10k/wmi.c +6 -3
@@ -8902,11 +8902,14 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) cmd->rate_control =cpu_to_le32 (arg->rate_ctrl); cmd->retry_count =cpu_to_le32 (arg->retry_count); cmd->rcode_flags =cpu_to_le32 (arg->rcode_flags); + cmd->ext_tid_cfg_bitmap =cpu_to_le32 (arg->ext_tid_cfg_bitmap); + cmd->rtscts_ctrl =cpu_to_le32 (arg->rtscts_ctrl);ath10k_dbg (ar,ATH10K_DBG_WMI , -"wmi noack tid %d vdev id %d ack_policy %d aggr %u rate_ctrl %u rcflag %u retry_count %d mac_addr %pM\n" , - arg->tid, arg->vdev_id, arg->ack_policy, arg->aggr_control, arg->rate_ctrl, - arg->rcode_flags, arg->retry_count, arg->peer_macaddr.addr); +"wmi noack tid %d vdev id %d ack_policy %d aggr %u rate_ctrl %u rcflag %u retry_count %d rtscts %d ext_tid_cfg_bitmap %d mac_addr %pM\n" , + arg->tid, arg->vdev_id, arg->ack_policy, arg->aggr_control, + arg->rate_ctrl, arg->rcode_flags, arg->retry_count, arg->rtscts_ctrl, + arg->ext_tid_cfg_bitmap, arg->peer_macaddr.addr);return skb; }
drivers/net/wireless/ath/ath10k/wmi.h +20 -0
@@ -201,6 +201,7 @@ enum wmi_service {WMI_SERVICE_PER_PACKET_SW_ENCRYPT ,WMI_SERVICE_REPORT_AIRTIME ,WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT , + WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,/* Remember to add the new value to wmi_service_name()! */
@@ -493,6 +494,7 @@ static inline char *wmi_service_name(enum wmi_service service_id)SVCSTR (WMI_SERVICE_PER_PACKET_SW_ENCRYPT );SVCSTR (WMI_SERVICE_REPORT_AIRTIME );SVCSTR (WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT ); +SVCSTR (WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT );case WMI_SERVICE_MAX :return NULL ;
@@ -822,6 +824,8 @@ static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out, WMI_SERVICE_REPORT_AIRTIME, len);SVCMAP (WMI_10_4_SERVICE_PEER_TID_CONFIGS_SUPPORT ,WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT , len); +SVCMAP (WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT , +WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT , len); }#undef SVCMAP
@@ -7180,6 +7184,16 @@ enum wmi_tid_rate_ctrl_conf {WMI_TID_CONFIG_RATE_CONTROL_AUTO ,WMI_TID_CONFIG_RATE_CONTROL_FIXED_RATE ,WMI_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE , + WMI_PEER_TID_CONFIG_RATE_UPPER_CAP, +}; + +enum wmi_tid_rtscts_control_conf { +WMI_TID_CONFIG_RTSCTS_CONTROL_ENABLE , +WMI_TID_CONFIG_RTSCTS_CONTROL_DISABLE , +}; + +enum wmi_ext_tid_config_map { +WMI_EXT_TID_RTS_CTS_CONFIG =BIT (0 ), }; struct wmi_per_peer_per_tid_cfg_arg {
@@ -7191,6 +7205,8 @@ struct wmi_per_peer_per_tid_cfg_arg {u8 rate_ctrl;u32 retry_count;u32 rcode_flags; +u32 ext_tid_cfg_bitmap; +u32 rtscts_ctrl; };struct wmi_peer_per_tid_cfg_cmd {
@@ -7206,6 +7222,10 @@ struct wmi_peer_per_tid_cfg_cmd {__le32 rate_control;__le32 rcode_flags;__le32 retry_count; +/* See enum wmi_ext_tid_config_map */ +__le32 ext_tid_cfg_bitmap; +/* see enum wmi_tid_rtscts_control_conf */ +__le32 rtscts_ctrl; } __packed;enum wmi_txbf_conf {
Signature · 7 lines
1.9.1 _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Hello Tamizh,
Quoted 42 lines
Add infrastructure to support per TID configurations like noack policy, retry count, AMPDU control(disable/enable), RTSCTS control(enable/disable) and TX rate mask configurations.
This will be useful for the driver which can supports data TID specific configuration rather than phy level configurations. HereNL80211_CMD_SET_TID_CONFIGadded to support this operation by accepting TID configuration.
This command can accept STA mac addreess to make the configuration station specific rather than applying to all the connected stations to the netdev.
And this nested command configuration can accept multiple number of data TID specific configuration in a single command,
enumieee80211_tid_conf_maskused to notify the driver that which configuration got modified for the TID.Tamizh chelvam (9):
nl80211: New netlink command for TID specific configuration
nl80211: Add new netlink attribute for TID speicific retry count
nl80211: Add netlink attribute for AMPDU aggregation enable/disable
nl80211: Add netlink attribute to enable/disableRTS_CTS
nl80211: Add netlink attribute to configure TID specific tx rate
mac80211: Add api to support configuring TID specific configuration
ath10k: Add wmi command support for station specific TID config
ath10k: Add new api to support TID specific configuration
ath10k: Add extended TID configuration supportv3:
* Modified "nl80211: Add netlink attribute to configure TID specific tx rate" patch to accept multiple TX rate configuration at a time.
* Modified noack and ampdu variable data type to int in
"mac80211: Add api to support configuring TID specific configuration" patch to store default configuration.
* Modified "ath10k: Add new api to support TID specific configuration" patch to handle default values for noack and ampdu. And added sta pointer sanity check inath10k_mac_tid_bitrate_configfunction.
* Fixed "ath10k: Add extended TID configuration support" wmi command parameters assigned part.v2:
* Added support to accept multiple TID configuration
* Added support to configure TX rate and RTSCTS control
Quoted 15 lines
drivers/net/wireless/ath/ath10k/core.c | 4 + drivers/net/wireless/ath/ath10k/core.h | 6 + drivers/net/wireless/ath/ath10k/mac.c | 679 ++++++++++++++++++++++++++---- drivers/net/wireless/ath/ath10k/wmi-ops.h | 19 + drivers/net/wireless/ath/ath10k/wmi.c | 35 ++ drivers/net/wireless/ath/ath10k/wmi.h | 72 ++++ include/net/cfg80211.h | 57 +++ include/net/mac80211.h | 35 ++ include/uapi/linux/nl80211.h | 182 ++++++++ net/mac80211/cfg.c | 28 ++ net/mac80211/driver-ops.h | 15 + net/wireless/nl80211.c | 253 ++++++++++- net/wireless/rdev-ops.h | 11 + net/wireless/trace.h | 18 + 14 files changed, 1316 insertions(+), 98 deletions(-)
I am not familiar with ath10k driver internals. But for cfg80211/nl80211:
Regards,
Sergey
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k