cfg80211/mac80211: Add support for TID specific configuration
Subsystems (2)
v8 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 (6):
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
include/net/cfg80211.h | 55 +++++++++ include/net/mac80211.h | 8 ++ include/uapi/linux/nl80211.h | 190 +++++++++++++++++++++++++++++ net/mac80211/cfg.c | 28 +++++ net/mac80211/driver-ops.h | 15 +++ net/wireless/nl80211.c | 276 +++++++++++++++++++++++++++++++++++++++--- net/wireless/rdev-ops.h | 12 ++ net/wireless/trace.h | 17 +++ 8 files changed, 584 insertions(+), 17 deletions(-)
v8:
* Fixed enum typecast warning.
v7:
* Fixed compilation error and removed tid config variables from mac80211
v6:
* Addressed Johannes comments.
v5:
* Fixed possible memleak of 'tid_conf' in nl80211_set_tid_config.
v4:
* Fixed kbuild warnings.
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
Signature · 1 line
1.7.9.5
PATCH v8 1/6 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_TID_CONFIG_ATTR_TID which is a nested attribute. This patch adds support to configure per TID noack policy through NL80211_TID_CONFIG_ATTR_NOACK attribute. Data TID value for this configuration will be passed through NL80211_TID_CONFIG_ATTR_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 | 59 ++++++++++++++++++++ net/wireless/nl80211.c | 122 ++++++++++++++++++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 12 +++++ net/wireless/trace.h | 17 ++++++ 5 files changed, 245 insertions(+)
include/net/cfg80211.h +35 -0
@@ -596,6 +596,35 @@ struct cfg80211_chan_def {struct ieee80211_edmg edmg; }; +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; +u32 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
@@ -3625,6 +3654,10 @@ struct cfg80211_update_owe_info {* * @probe_mesh_link: Probe direct Mesh peer's link quality by sending data frame * and overrule HWMP path selection algorithm. +* @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);
@@ -3943,6 +3976,8 @@ struct cfg80211_ops { struct cfg80211_update_owe_info *owe_info);int (*probe_mesh_link)(struct wiphy *wiphy,struct net_device *dev,const u8 *buf,size_t len); +int (*set_tid_config)(struct wiphy *wiphy,struct net_device *dev, +struct ieee80211_tid_config *tid_conf); };/*
include/uapi/linux/nl80211.h +59 -0
101 lines not on this page · raw message
net/wireless/nl80211.c +122 -0
146 lines not on this page · raw message
net/wireless/rdev-ops.h +12 -0
@@ -1299,4 +1299,16 @@ static inline int rdev_update_owe_info(struct cfg80211_registered_device *rdev, return ret; } +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 +17 -0
@@ -3458,6 +3458,23 @@ WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dest)) ); +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 · 1 line
1.7.9.5
Johannes Berg
maintainerRe: [PATCHv8 1/6] nl80211: New netlink command for TID specific configuration
Hi,
I was tempted to fix this up myself and finally get it over with, but then I thought it's probably better if I don't - it's a lot of things.
Quoted 8 lines
Add a new NL command,
NL80211_CMD_SET_TID_CONFIGto support data TID specific configuration. This per TID configurations are passed inNL80211_TID_CONFIG_ATTR_TIDwhich is a nested attribute. This patch adds support to configure per TID noack policy throughNL80211_TID_CONFIG_ATTR_NOACKattribute. Data TID value for this configuration will be passed throughNL80211_TID_CONFIG_ATTR_TIDattribute. When the user-space wants this configuration peer specific rather than being applied for
Quoted 8 lines
all the connected stations, MAC address of the peer can be passed in
NL80211_ATTR_MACattribute. This patch introduced
enumieee80211_tid_conf_maskto notify the driver that which configuration modified.
Driver supporting data TID specific noack policy configuration should be advertise throughNL80211_EXT_FEATURE_PER_TID_NOACK_CONFIGand supporting per STA data TID noack policy configuration should be advertise throughNL80211_EXT_FEATURE_PER_STA_NOACK_CONFIG
This is just a wall of text, it's also wrong in some places. I was going to replace it with this:
nl80211: add command for TID specific configuration
Add the new NL80211_CMD_SET_TID_CONFIG command to support data TID specific configuration. Per TID configuration is passed in the nested NL80211_ATTR_TID_CONFIG attribute.
This patch adds support to configure per TID noack policy through the NL80211_TID_CONFIG_ATTR_NOACK attribute.
Configuration can be STA-specific (if supported) or for all stations on a given interface if no STA is selected.
Two new feature flags are added:
* NL80211_EXT_FEATURE_PER_TID_NOACK_CONFIG for noack, and
* NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIG for STA-specific noack support.
which IMHO makes more sense. Can you rewrite it? Feel free to copy this I guess.
include/net/cfg80211.h struct cfg80211_chan_def { · line 601
Quoted 3 lines
include/net/cfg80211.h +3
-0+enum ieee80211_tid_conf_mask { +IEEE80211_TID_CONF_NOACK =BIT (0 ), +};
Why not remove this and use BIT(NL80211_TID_CONFIG_ATTR_NOACK)?
Quoted 2 lines
+ * @tid_conf_mask: bitmap indicating which parameter changed
+ * see %enumieee80211_tid_conf_mask
Either way use &enum so you get a link.
Quoted 1 line
+ * @noack: noack configuration value for the TID
Should be enum nl80211_tid_config not u8?
include/net/cfg80211.h struct cfg80211_update_owe_info { · line 3660
Quoted 8 lines
include/net/cfg80211.h +4
-0@@ -3625,6 +3654,10 @@ struct cfg80211_update_owe_info {* * @probe_mesh_link: Probe direct Mesh peer's link quality by sending data frame * and overrule HWMP path selection algorithm. +* @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.
This should document the stuff discussed with Sergey, whatever we decide there.
include/uapi/linux/nl80211.h line 1113
Quoted 2 lines
include/uapi/linux/nl80211.h +2
-0+* @NL80211_CMD_SET_TID_CONFIG: Data frame TID specific configuration +* is passed through this command using %NL80211_ATTR_TID_CONFIG
to not through
include/uapi/linux/nl80211.h line 1114
Quoted 1 line
include/uapi/linux/nl80211.h +1
-0+* nested attributes.
Using the %NL80211_ATTR_TID_CONFIG attribute.
Quoted 2 lines
+ * @NL80211_ATTR_TID_CONFIG: TID specific configuration in a
+ * nested attribute with %NL80211_TID_CONFIG_ATTR_* sub-attributes.
Would be worthwhile to link to the enum (&enum nl80211_tid_config_attr) instead of giving the %NL80211_... thing.
Quoted 7 lines
/**
+ * enumnl80211_tid_config- TID config state
+ * @NL80211_TID_CONFIG_DEFAULT: Default config for the TID. This is to
+ * notify driver to reset the previous config and use vif specific
+ * default config
+ * @NL80211_TID_CONFIG_ENABLE: Enable config for the TID
+ *NL80211_TID_CONFIG_DISABLE: Disable config for the TID
missing @
I'm still a bit on the fence on this.
How about we add an explicit "reset" API instead? So you could say
set_tid(sta=..., tid=7, reset=BIT(NL80211_TID_CONFIG_ATTR_NOACK) or so?
(or IEEE80211_TID_CONF_NOACK if we prefer that, not sure)
Just throwing that out here for ideas, not for you to go implement it right now :)
Then we don't really need NL80211_TID_CONFIG_DEFAULT. We still need ENABLE/DISABLE to allow "leave unchanged", though I'd probably formulate that a bit more generic than anything with "TID" in the name then.
That would also address something you can't do now - you cannot reset the TX rate to the default this way, i.e. removing the STA override for a TX rate isn't possible.
Quoted 7 lines
+ * @NL80211_TID_CONFIG_ATTR_TID: a TID value (u8 attribute).
+ * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID.
+ * specified in %NL80211_TID_CONFIG_ATTR_TID. see %enumnl80211_tid_config.
+ * Its type is u8, if the peer MAC address is passed in %NL80211_ATTR_MAC,
+ * then the noack configuration is applied to the data frame for the tid
+ * to that connected station. This configuration is valid only for STA's
+ * current connection. i.e. the configuration will be reset to default when
Quoted 8 lines
+ * the station connects back after disconnection/roaming.
+ * when user-space does not include %NL80211_ATTR_MAC, then 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
+ * advertiseNL80211_EXT_FEATURE_PER_TID_NOACK_CONFIGand
+ *NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIGfor supporting per sta
+ * configuration.
Most of this text should be somewhere else, in a general text about the TID-specific configuration, in particular all the stuff about the lifetime etc. You can put it into the method documentation, but it might be better to just add a "DOC:" section explaining it all.
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13808
Quoted 2 lines
net/wireless/nl80211.c +2
-0+if (!wiphy_ext_feature_isset (&rdev->wiphy, per_tid_config)) { +NL_SET_ERR_MSG_ATTR (extack, attr,"TID specific configuration not supported" );
please add linebreaks - it'll still be longer than 80 cols, but at least if you break after "attr," it's not *that* long.
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13811
Quoted 3 lines
net/wireless/nl80211.c +3
-0+return -ENOTSUPP ; + } +
there's a stray space here
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13813
Quoted 2 lines
net/wireless/nl80211.c +2
-0+if (peer && !wiphy_ext_feature_isset (&rdev->wiphy, per_sta_config)) { +NL_SET_ERR_MSG_ATTR (extack, attr,"peer specific TID configuration not supported" );
same as above
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13837
Quoted 10 lines
net/wireless/nl80211.c +10
-0+ tid_conf->tid =nla_get_u8 (attrs[NL80211_TID_CONFIG_ATTR_TID ]); +if (attrs[NL80211_TID_CONFIG_ATTR_NOACK ]) { + err =nl80211_check_tid_config_support (rdev, extack, peer, + attrs[NL80211_TID_CONFIG_ATTR_NOACK ], +NL80211_EXT_FEATURE_PER_TID_NOACK_CONFIG , +NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIG ); +if (err) +return err; + + tid_conf->tid_conf_mask |=IEEE80211_TID_CONF_NOACK ;
If you change the tid_conf_mask to be BIT() you can roll that |= into the nl80211_check_tid_config_support() function, which seems nicer?
I might go as far as suggesting a wrapper macro for this that lets you save typing on the whole "NL80211_*" prefixes, so you just have
err = nl80211_check_tid_config_supoprt(rdev, extack, peer, attrs,
NOACK);
and the other arguments are generated by the macro based on the NOACK portion. That'll save a lot of typing in the next patches ...
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13839
Quoted 2 lines
net/wireless/nl80211.c +2
-0+ tid_conf->noack = +nla_get_u8 (attrs[NL80211_TID_CONFIG_ATTR_NOACK ]);
Maybe even roll that in by having some kind of function pointer, like the mesh code did? But that's harder, might not be worth it. But if you do then you can also roll in the "if (attr[])" presence check and make this a lot more streamlined.
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13888
Quoted 4 lines
net/wireless/nl80211.c +4
-0+if (!attrs[NL80211_TID_CONFIG_ATTR_TID ]) { + ret = -EINVAL ; + goto bad_tid_conf; + }
Maybe move that into the function:
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13892
Quoted 3 lines
net/wireless/nl80211.c +3
-0+ ret =parse_tid_conf (rdev, attrs, + &tid_config->tid_conf[conf_idx], + info, tid_config->peer);
johannes
Re: [PATCHv8 1/6] nl80211: New netlink command for TID specific configuration
Hi Johannes/Sergey,
Thanks for your review comments
Quoted 37 lines
Hi,
I was tempted to fix this up myself and finally get it over with, but then I thought it's probably better if I don't - it's a lot of things.
Quoted 8 lines
Add a new NL command,
NL80211_CMD_SET_TID_CONFIGto support data TID specific configuration. This per TID configurations are passed inNL80211_TID_CONFIG_ATTR_TIDwhich is a nested attribute. This patch adds support to configure per TID noack policy throughNL80211_TID_CONFIG_ATTR_NOACKattribute. Data TID value for this configuration will be passed throughNL80211_TID_CONFIG_ATTR_TIDattribute. When the user-space wants this configuration peer specific rather than being applied forQuoted 8 lines
all the connected stations, MAC address of the peer can be passed in
NL80211_ATTR_MACattribute. This patch introduced
enumieee80211_tid_conf_maskto notify the driver that which configuration modified.
Driver supporting data TID specific noack policy configuration should be advertise throughNL80211_EXT_FEATURE_PER_TID_NOACK_CONFIGand supporting per STA data TID noack policy configuration should be advertise throughNL80211_EXT_FEATURE_PER_STA_NOACK_CONFIGThis is just a wall of text, it's also wrong in some places. I was going to replace it with this:
nl80211: add command for TID specific configuration
Add the new
NL80211_CMD_SET_TID_CONFIGcommand to support data TID specific configuration. Per TID configuration is passed in the nestedNL80211_ATTR_TID_CONFIGattribute.This patch adds support to configure per TID noack policy through the
NL80211_TID_CONFIG_ATTR_NOACKattribute.Configuration can be STA-specific (if supported) or for all stations on a given interface if no STA is selected.
Quoted 8 lines
Two new feature flags are added:
*NL80211_EXT_FEATURE_PER_TID_NOACK_CONFIGfor noack, and
*NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIGfor STA-specific noack support.which IMHO makes more sense. Can you rewrite it? Feel free to copy this I guess.
Sure, I will use this.
Quoted 6 lines
include/net/cfg80211.h struct cfg80211_chan_def { · line 601
Quoted 3 lines
include/net/cfg80211.h +3
-0+enum ieee80211_tid_conf_mask { +IEEE80211_TID_CONF_NOACK =BIT (0 ), +};Why not remove this and use
BIT(NL80211_TID_CONFIG_ATTR_NOACK)?
Sure.
Quoted 5 lines
Quoted 2 lines
+ * @tid_conf_mask: bitmap indicating which parameter changed
+ * see %enumieee80211_tid_conf_maskEither way use &enum so you get a link.
Sure.
Quoted 4 lines
Quoted 1 line
+ * @noack: noack configuration value for the TID
Should be enum
nl80211_tid_confignot u8?
Yes, I will change it.
Quoted 5 lines
Quoted 5 lines
(quoted diff) +0
-0@@ -3625,6 +3654,10 @@ struct cfg80211_update_owe_info { * * @probe_mesh_link: Probe direct Mesh peer's link quality by sendingdata frame
* and overrule HWMP path selection algorithm.
Quoted 8 lines
Quoted 5 lines
+ * @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.This should document the stuff discussed with Sergey, whatever we decide there.
Sure.
Quoted 10 lines
Quoted 3 lines
+ * @NL80211_CMD_SET_TID_CONFIG: Data frame TID specific configuration
+ * is passed through this command using %NL80211_ATTR_TID_CONFIGto not through
Quoted 1 line
+ * nested attributes.
Using the %NL80211_ATTR_TID_CONFIG attribute.
Sure.
Quoted 6 lines
Quoted 2 lines
+ * @NL80211_ATTR_TID_CONFIG: TID specific configuration in a
+ * nested attribute with %NL80211_TID_CONFIG_ATTR_* sub-attributes.Would be worthwhile to link to the enum (&enum
nl80211_tid_config_attr) instead of giving the %NL80211_... thing.
Sure.
Quoted 23 lines
Quoted 8 lines
/**
+ * enumnl80211_tid_config- TID config state
+ * @NL80211_TID_CONFIG_DEFAULT: Default config for the TID. This is to
+ * notify driver to reset the previous config and use vif specific
+ * default config
+ * @NL80211_TID_CONFIG_ENABLE: Enable config for the TID
+ *NL80211_TID_CONFIG_DISABLE: Disable config for the TIDmissing @
I'm still a bit on the fence on this.
How about we add an explicit "reset" API instead? So you could say
set_tid(sta=..., tid=7, reset=BIT(NL80211_TID_CONFIG_ATTR_NOACK) or so?
(or
IEEE80211_TID_CONF_NOACKif we prefer that, not sure)Just throwing that out here for ideas, not for you to go implement it right now :)
Quoted 8 lines
Then we don't really need
NL80211_TID_CONFIG_DEFAULT. We still need ENABLE/DISABLE to allow "leave unchanged", though I'd probably formulate that a bit more generic than anything with "TID" in the name then.That would also address something you can't do now - you cannot reset the TX rate to the default this way, i.e. removing the STA override for a TX rate isn't possible.
I thought of resetting it through "NL80211_TX_RATE_AUTOMATIC". Are you okay with that ? I will document that in the next patchset.
Quoted 23 lines
Quoted 14 lines
+ * @NL80211_TID_CONFIG_ATTR_TID: a TID value (u8 attribute).
+ * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID.
+ * specified in %NL80211_TID_CONFIG_ATTR_TID. see %enumnl80211_tid_config.
+ * Its type is u8, if the peer MAC address is passed in
%NL80211_ATTR_MAC,
+ * then the noack configuration is applied to the data frame for the
tid
+ * to that connected station. This 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, then thisQuoted 8 lines
+ * 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
+ * advertiseNL80211_EXT_FEATURE_PER_TID_NOACK_CONFIGand
+ *NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIGfor supporting per sta
+ * configuration.
Quoted 5 lines
Most of this text should be somewhere else, in a general text about the TID-specific configuration, in particular all the stuff about the lifetime etc. You can put it into the method documentation, but it might be better to just add a "DOC:" section explaining it all.
Okay sure, I will reduce these texts in the commit log and add it to DOC: section.
Quoted 7 lines
Quoted 3 lines
(quoted diff) +2
-0+ if (!wiphy_ext_feature_isset(&rdev->wiphy, per_tid_config)) { + NL_SET_ERR_MSG_ATTR(extack, attr, "TID specific configuration notsupported");
please add linebreaks - it'll still be longer than 80 cols, but at least if you break after "attr," it's not *that* long.
Okay.
Quoted 6 lines
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13811
Quoted 3 lines
net/wireless/nl80211.c +3
-0+return -ENOTSUPP ; + } +there's a stray space here
Will fix this in next patchset.
Quoted 21 lines
Quoted 4 lines
(quoted diff) +1
-0+ if (peer && !wiphy_ext_feature_isset(&rdev->wiphy, per_sta_config)){
(quoted diff) +1
-0+ NL_SET_ERR_MSG_ATTR(extack, attr, "peer specific TID configurationnot supported");
same as above
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13837
Quoted 10 lines
net/wireless/nl80211.c +10
-0+ tid_conf->tid =nla_get_u8 (attrs[NL80211_TID_CONFIG_ATTR_TID ]); +if (attrs[NL80211_TID_CONFIG_ATTR_NOACK ]) { + err =nl80211_check_tid_config_support (rdev, extack, peer, + attrs[NL80211_TID_CONFIG_ATTR_NOACK ], +NL80211_EXT_FEATURE_PER_TID_NOACK_CONFIG , +NL80211_EXT_FEATURE_PER_STA_NOACK_CONFIG ); +if (err) +return err; + + tid_conf->tid_conf_mask |=IEEE80211_TID_CONF_NOACK ;If you change the
tid_conf_maskto beBIT()you can roll that |= into thenl80211_check_tid_config_support()function, which seems nicer?
Quoted 9 lines
I might go as far as suggesting a wrapper macro for this that lets you save typing on the whole "NL80211_*" prefixes, so you just have
err = nl80211_check_tid_config_supoprt(rdev, extack, peer, attrs,
NOACK);and the other arguments are generated by the macro based on the NOACK portion. That'll save a lot of typing in the next patches ...
Sure, I will go with wrapper macro method.
Quoted 8 lines
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13839
Quoted 2 lines
net/wireless/nl80211.c +2
-0+ tid_conf->noack = +nla_get_u8 (attrs[NL80211_TID_CONFIG_ATTR_NOACK ]);Maybe even roll that in by having some kind of function pointer, like the mesh code did? But that's harder, might not be worth it. But if you do then you can also roll in the "if (attr[])" presence check and make this a lot more streamlined.
Quoted 7 lines
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13888
Quoted 4 lines
net/wireless/nl80211.c +4
-0+if (!attrs[NL80211_TID_CONFIG_ATTR_TID ]) { + ret = -EINVAL ; + goto bad_tid_conf; + }Maybe move that into the function:
Sure.
Quoted 4 lines
net/wireless/nl80211.c static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info) · line 13892
Quoted 3 lines
net/wireless/nl80211.c +3
-0+ ret =parse_tid_conf (rdev, attrs, + &tid_config->tid_conf[conf_idx], + info, tid_config->peer);
Tamizh.
Johannes Berg
maintainerRe: [PATCHv8 1/6] nl80211: New netlink command for TID specific configuration
Quoted 2 lines · Tamizh chelvam
I thought of resetting it through "
NL80211_TX_RATE_AUTOMATIC". Are you okay with that ?
"automatic" can also be a legitimate non-reset option though, right? If all stations are fixed to 10 dBm, then setting one station to automatic is still a difference?
I think I'd prefer this whole reset to be handled independent of the type of value/attribute, like I described earlier with a "reset bitmap" or so.
johannes
PATCH v8 2/6 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_TID_CONFIG_ATTR_RETRYNL80211_TID_CONFIG_ATTR_RETRY_SHORTNL80211_TID_CONFIG_ATTR_RETRY_LONG
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 | 9 ++++++++ include/uapi/linux/nl80211.h | 48 ++++++++++++++++++++++++++++++++++++++++++ net/wireless/nl80211.c | 45 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+)
include/net/cfg80211.h +9 -0
@@ -598,6 +598,7 @@ struct cfg80211_chan_def {enum ieee80211_tid_conf_mask {IEEE80211_TID_CONF_NOACK =BIT (0 ), +IEEE80211_TID_CONF_RETRY =BIT (1 ), };/**
@@ -606,11 +607,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;u32 tid_conf_mask;u8 noack; +int retry_long; +int retry_short; };/**
@@ -4567,6 +4572,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 */
@@ -4711,6 +4718,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 +45 -0
63 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Johannes Berg
maintainerRe: [PATCHv8 2/6] nl80211: Add new netlink attribute for TID speicific retry count
Quoted 14 lines
+ * 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. When retry count has never been configured using this command, the
+ * other available radio level retry configuration
+ * (%NL80211_ATTR_WIPHY_RETRY_SHORT and %NL80211_ATTR_WIPHY_RETRY_LONG)
+ * should be used. Driver supporting this feature should advertise
+ *NL80211_EXT_FEATURE_PER_TID_RETRY_CONFIGand supporting per station
+ * retry count configuration should advertise
+ *NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG.
Here you pretty much copy-pasted all this text ... that's why I think it should be in some other section. We want *everything* to be like that, not have to check every single thing for different validity rules.
Quoted 4 lines
+ * @NL80211_TID_CONFIG_ATTR_RETRY_SHORT: Number of retries used with data frame
+ * transmission, user-space sets this configuration in
+ *&NL80211_CMD_SET_TID_CONFIG. It is u8 type, min value is 1 and
+ * the max value should be advertised by the driver through
Quoted 8 lines
+ *
max_data_retry_count. when this attribute is not present, the driver
+ * would use the default configuration.
+ * @NL80211_TID_CONFIG_ATTR_RETRY_LONG: Number of retries used with data frame
+ * transmission, user-space sets this configuration in
+ *&NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and
+ * 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.
I'm almost thinking that these should be a struct with two u8 values instead of two separate attributes, and then renamed to NL80211_TID_CONFIG_ATTR_RETRY, to carry both and really ensure thaty they're always together as a single configuration.
This only really works right if we go for the reset= approach I outlined in the previous patch though, since you otherwise need NL80211_TID_CONFIG_ATTR_RETRY for the reset ... but that's a pretty weird thing.
(there are also some typos here like "notfiy")
net/wireless/nl80211.c static int validate_ie_attr(const struct nlattr *attr, · line 331
Quoted 9 lines
net/wireless/nl80211.c +3
-0@@ -326,6 +326,9 @@ static int validate_ie_attr(const struct nlattr *attr, [NL80211_TID_CONFIG_ATTR_TID] = { .type = NLA_U8 }, [NL80211_TID_CONFIG_ATTR_NOACK ] = NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), + [NL80211_TID_CONFIG_ATTR_RETRY] = { .type = NLA_FLAG }, + [NL80211_TID_CONFIG_ATTR_RETRY_SHORT] = { .type = NLA_U8}, + [NL80211_TID_CONFIG_ATTR_RETRY_LONG] = { .type = NLA_U8},
The min value of 1 should be reflected in the policy.
net/wireless/nl80211.c static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · line 2036
Quoted 3 lines
net/wireless/nl80211.c +3
-0+if (rdev->wiphy.max_data_retry_count) { +if (nla_put_u8 (msg,NL80211_ATTR_MAX_RETRY_COUNT , + rdev->wiphy.max_data_retry_count))
bad indentation
net/wireless/nl80211.c static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · line 2042
Quoted 6 lines
net/wireless/nl80211.c +3
-0+ goto nla_put_failure; + } + state->split_start++;if (state->split)break ;
Also not sure which section you put this in, but it looks almost like it's under "case 1:" where it really shouldn't be ... move it to the end please.
johannes
Re: [PATCHv8 2/6] nl80211: Add new netlink attribute for TID speicific retry count
Quoted 21 lines · Johannes Berg
Quoted 12 lines
+ * 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. When retry count has never been configured using this
command, theQuoted 8 lines
+ * other available radio level retry configuration
+ * (%NL80211_ATTR_WIPHY_RETRY_SHORT and
%NL80211_ATTR_WIPHY_RETRY_LONG)
+ * should be used. Driver supporting this feature should advertise
+ *NL80211_EXT_FEATURE_PER_TID_RETRY_CONFIGand supporting per
station
+ * retry count configuration should advertise
+ *NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG.
Quoted 4 lines
Here you pretty much copy-pasted all this text ... that's why I think it should be in some other section. We want *everything* to be like that, not have to check every single thing for different validity rules.
Sure, I will add these things in DOC: section.
Quoted 17 lines
Quoted 8 lines
+ * @NL80211_TID_CONFIG_ATTR_RETRY_SHORT: Number of retries used with data frame
+ * transmission, user-space sets this configuration in
+ *&NL80211_CMD_SET_TID_CONFIG. It is u8 type, min value is 1 and
+ * 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.Quoted 8 lines
+ * @NL80211_TID_CONFIG_ATTR_RETRY_LONG: Number of retries used with data frame
+ * transmission, user-space sets this configuration in
+ *&NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and
+ * 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.
Quoted 5 lines
I'm almost thinking that these should be a struct with two u8 values instead of two separate attributes, and then renamed to
NL80211_TID_CONFIG_ATTR_RETRY, to carry both and really ensure thaty they're always together as a single configuration.
This will make mandatory for user to send both values know ? I have did it similar to NL80211_ATTR_WIPHY_RETRY_SHORT and NL80211_ATTR_WIPHY_RETRY_LONG. This way we can have option to configure single parameter know ?
Quoted 7 lines
This only really works right if we go for the reset= approach I outlined in the previous patch though, since you otherwise need
NL80211_TID_CONFIG_ATTR_RETRYfor the reset ... but that's a pretty weird thing.(there are also some typos here like "notfiy")
I will fix this.
Quoted 4 lines
Quoted 4 lines
net/wireless/nl80211.c +0
-0@@ -326,6 +326,9 @@ static int validate_ie_attr(const struct nlattr *attr,
Quoted 9 lines
net/wireless/nl80211.c static int validate_ie_attr(const struct nlattr *attr, · line 331
Quoted 6 lines
net/wireless/nl80211.c +3
-0[NL80211_TID_CONFIG_ATTR_TID] = { .type = NLA_U8 }, [NL80211_TID_CONFIG_ATTR_NOACK ] = NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), + [NL80211_TID_CONFIG_ATTR_RETRY] = { .type = NLA_FLAG }, + [NL80211_TID_CONFIG_ATTR_RETRY_SHORT] = { .type = NLA_U8}, + [NL80211_TID_CONFIG_ATTR_RETRY_LONG] = { .type = NLA_U8},The min value of 1 should be reflected in the policy.
Yeah, It was there in the previous patchset and removed due to confusion. Do you want to keep MIN value of 1 policy ?
Quoted 5 lines
net/wireless/nl80211.c static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · line 2036
Quoted 3 lines
net/wireless/nl80211.c +3
-0+if (rdev->wiphy.max_data_retry_count) { +if (nla_put_u8 (msg,NL80211_ATTR_MAX_RETRY_COUNT , + rdev->wiphy.max_data_retry_count))bad indentation
I will fix this.
Quoted 12 lines
net/wireless/nl80211.c static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · line 2042
Quoted 7 lines
net/wireless/nl80211.c +3
-0+ goto nla_put_failure; + } + state->split_start++;if (state->split)break ;Also not sure which section you put this in, but it looks almost like it's under "case 1:" where it really shouldn't be ... move it to the end please.
Sure.
Thanks,
Tamizh.
Johannes Berg
maintainerRe: [PATCHv8 2/6] nl80211: Add new netlink attribute for TID speicific retry count
Quoted 7 lines · Tamizh chelvam
Quoted 6 lines
I'm almost thinking that these should be a struct with two u8 values instead of two separate attributes, and then renamed to
NL80211_TID_CONFIG_ATTR_RETRY, to carry both and really ensure thaty they're always together as a single configuration.This will make mandatory for user to send both values know ?
Yes.
Quoted 5 lines
I have did
it similar toNL80211_ATTR_WIPHY_RETRY_SHORTandNL80211_ATTR_WIPHY_RETRY_LONG. This way we can have
option to configure single parameter know ?
Is it worth it? If you need them to be separate, then you should actually separate them and let each one be managed per station with override etc., but that seems a lot of effort?
Quoted 9 lines
Quoted 6 lines
net/wireless/nl80211.c static int validate_ie_attr(const struct nlattr *attr, · line 331
Quoted 3 lines
net/wireless/nl80211.c +3
-0+ [NL80211_TID_CONFIG_ATTR_RETRY] = { .type = NLA_FLAG }, + [NL80211_TID_CONFIG_ATTR_RETRY_SHORT] = { .type = NLA_U8}, + [NL80211_TID_CONFIG_ATTR_RETRY_LONG] = { .type = NLA_U8},The min value of 1 should be reflected in the policy.
Yeah, It was there in the previous patchset and removed due to confusion.
Do you want to keep MIN value of 1 policy ?
If 0 is invalid, yeah, keep min 1 in the policy.
johannes
PATCH v8 3/6 nl80211: Add netlink attribute for AMPDU aggregation enable/disable
In reply to Tamizh chelvamIntroduce NL80211_TID_CONFIG_ATTR_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_TID_CONFIG_ATTR_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 | 14 ++++++++++++++ 3 files changed, 39 insertions(+)
include/net/cfg80211.h +3 -0
@@ -599,6 +599,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 ), };/**
@@ -609,6 +610,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;
@@ -616,6 +618,7 @@ struct ieee80211_tid_cfg {u8 noack;int retry_long;int retry_short; +u8 ampdu; };/**
include/uapi/linux/nl80211.h +22 -0
@@ -4761,6 +4761,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_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable aggregation for the TID +* specified in %%NL80211_TID_CONFIG_ATTR_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_tid_config_attr { __NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4769,6 +4784,7 @@ enum nl80211_tid_config_attr {NL80211_TID_CONFIG_ATTR_RETRY ,NL80211_TID_CONFIG_ATTR_RETRY_SHORT ,NL80211_TID_CONFIG_ATTR_RETRY_LONG , +NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ,/* keep last */ __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
@@ -5594,6 +5610,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.
@@ -5644,6 +5664,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 +14 -0
@@ -329,6 +329,8 @@ static int validate_ie_attr(const struct nlattr *attr, [NL80211_TID_CONFIG_ATTR_RETRY] = { .type = NLA_FLAG }, [NL80211_TID_CONFIG_ATTR_RETRY_SHORT] = { .type = NLA_U8}, [NL80211_TID_CONFIG_ATTR_RETRY_LONG] = { .type = NLA_U8}, + [NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ] = + NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), };const struct nla_policy nl80211_policy[NUM_NL80211_ATTR ] = {
@@ -13884,6 +13886,18 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, } } +if (attrs[NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ]) { + err =nl80211_check_tid_config_support (rdev, extack, peer, + attrs[NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ], +NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL , +NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL ); +if (err) +return err; + + tid_conf->tid_conf_mask |=IEEE80211_TID_CONF_AMPDU ; + tid_conf->ampdu = +nla_get_u8 (attrs[NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ]); + }return 0 ; }
Signature · 1 line
1.7.9.5
PATCH v8 4/6 nl80211: Add netlink attribute to enable/disable RTS_CTS
In reply to Tamizh chelvamIntroduce NL80211_TID_CONFIG_ATTR_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_TID_CONFIG_ATTR_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 | 16 ++++++++++++++++ 3 files changed, 41 insertions(+)
include/net/cfg80211.h +3 -0
@@ -600,6 +600,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), };/**
@@ -611,6 +612,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;
@@ -619,6 +621,7 @@ struct ieee80211_tid_cfg {int retry_long;int retry_short;u8 ampdu; +u8 rtscts; };/**
include/uapi/linux/nl80211.h +22 -0
@@ -4776,6 +4776,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_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TID +* specified in %%NL80211_TID_CONFIG_ATTR_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_tid_config_attr { __NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4785,6 +4800,7 @@ enum nl80211_tid_config_attr {NL80211_TID_CONFIG_ATTR_RETRY_SHORT ,NL80211_TID_CONFIG_ATTR_RETRY_LONG ,NL80211_TID_CONFIG_ATTR_AMPDU_CTRL , +NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL ,/* keep last */ __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
@@ -5614,6 +5630,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.
@@ -5666,6 +5686,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 +16 -0
@@ -331,6 +331,8 @@ static int validate_ie_attr(const struct nlattr *attr, [NL80211_TID_CONFIG_ATTR_RETRY_LONG] = { .type = NLA_U8}, [NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ] = NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), + [NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL ] = + NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), };const struct nla_policy nl80211_policy[NUM_NL80211_ATTR ] = {
@@ -13898,6 +13900,20 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, tid_conf->ampdu =nla_get_u8 (attrs[NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ]); } + +if (attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL ]) { + err =nl80211_check_tid_config_support (rdev, extack, peer, + attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL ], +NL80211_EXT_FEATURE_PER_TID_RTSCTS_CTRL , +NL80211_EXT_FEATURE_PER_STA_RTSCTS_CTRL ); +if (err) +return err; + + tid_conf->tid_conf_mask |=IEEE80211_TID_CONF_RTSCTS ; + tid_conf->rtscts = +nla_get_u8 (attrs[NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL ]); + } +return 0 ; }
Signature · 1 line
1.7.9.5
PATCH v8 5/6 nl80211: Add netlink attribute to configure TID specific tx rate
In reply to Tamizh chelvamIntroduce NL80211_TID_CONFIG_ATTR_TX_RATES in nl80211_tid_attr_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_TID_CONFIG_ATTR_TID attribute. TX bitrate mask values passed in NL80211_ATTR_TX_RATES attribute and NL80211_TID_CONFIG_ATTR_TX_RATES attribute will have types of the TX rate should be applied. This uses nl80211_parse_tx_bitrate_mask to validate and calculate the bitrate mask. 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 | 79 +++++++++++++++++++++++++++++++++--------- 3 files changed, 106 insertions(+), 17 deletions(-)
include/net/cfg80211.h +5 -0
@@ -601,6 +601,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), };/**
@@ -613,6 +614,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;
@@ -622,6 +625,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
@@ -4696,6 +4696,18 @@ enum nl80211_tx_power_setting { };/** +* 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 - TID config state * @NL80211_TID_CONFIG_DEFAULT: Default config for the TID. This is to * notify driver to reset the previous config and use vif specific
@@ -4791,6 +4803,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_TID_CONFIG_ATTR_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_TID_CONFIG_ATTR_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_tid_config_attr { __NL80211_TID_CONFIG_ATTR_INVALID,
@@ -4801,6 +4832,8 @@ enum nl80211_tid_config_attr {NL80211_TID_CONFIG_ATTR_RETRY_LONG ,NL80211_TID_CONFIG_ATTR_AMPDU_CTRL ,NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL , +NL80211_TID_CONFIG_ATTR_TX_RATES_TYPE , +NL80211_TID_CONFIG_ATTR_TX_RATES ,/* keep last */ __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
@@ -5634,6 +5667,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.
@@ -5688,6 +5725,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 +62 -17
134 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v8 6/6 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 | 8 ++++++++ net/mac80211/cfg.c | 28 ++++++++++++++++++++++++++++ net/mac80211/driver-ops.h | 15 +++++++++++++++ 3 files changed, 51 insertions(+)
include/net/mac80211.h +8 -0
@@ -3756,6 +3756,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,
@@ -4060,6 +4064,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
@@ -3942,6 +3942,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,
@@ -4040,4 +4067,5 @@ static int ieee80211_get_txq_stats(struct wiphy *wiphy, .start_pmsr = ieee80211_start_pmsr, .abort_pmsr = ieee80211_abort_pmsr, .probe_mesh_link = ieee80211_probe_mesh_link, + .set_tid_config = ieee80211_set_tid_config, };
net/mac80211/driver-ops.h +15 -0
@@ -1358,4 +1358,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 · 1 line
1.7.9.5
Quoted 23 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 (6):
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
Quoted 9 lines
include/net/cfg80211.h | 55 +++++++++ include/net/mac80211.h | 8 ++ include/uapi/linux/nl80211.h | 190 +++++++++++++++++++++++++++++ net/mac80211/cfg.c | 28 +++++ net/mac80211/driver-ops.h | 15 +++ net/wireless/nl80211.c | 276 +++++++++++++++++++++++++++++++++++++++--- net/wireless/rdev-ops.h | 12 ++ net/wireless/trace.h | 17 +++ 8 files changed, 584 insertions(+), 17 deletions(-)
Hi Tamizh, Johannes, and all,
Looks very good to me:
BTW, there are two open questions remaining from the previous reviews:
- NL80211_TX_RATE_LIMITED and NL80211_TX_RATE_FIXED Interpretation and validation of these two rate options is left up to drivers.
- 'apply to all TIDs' usecase
Currently, if peer is not specified, then configuration is applied to all the connected STAs. It is tempting to use some spare TID value to inform drivers that provided configuration should be applied to all TIDs of the specified STA or even to all TIDS and STAs. But that can not be left up to drivers since this value needs to be passed from userspace tools, e.g. from iw.
IIUC, the first question could be addressed later, after we see some actual users and figure out generic use-cases. But what about the second question ? Maybe it worth to add and document a single define, e.g. using TID value 0xff, that can be used between userspace and drivers for such usecases ?
Regards,
Sergey
Johannes Berg
maintainerHi Sergey,
Thanks for looking!
Quoted 5 lines
BTW, there are two open questions remaining from the previous reviews:
-
NL80211_TX_RATE_LIMITEDandNL80211_TX_RATE_FIXEDInterpretation and validation of these two rate options is left up to drivers.
(need to look at this still)
Quoted 7 lines
- 'apply to all TIDs' usecase
Currently, if peer is not specified, then configuration is applied to all the connected STAs. It is tempting to use some spare TID value to inform drivers that provided configuration should be applied to all TIDs of the specified STA or even to all TIDS and STAs. But that can not be left up to drivers since this value needs to be passed from userspace tools, e.g. from iw.
I was *just* replying on exactly the same point over in patch 1 (not sent yet). It's actually not even clear to me that the configuration really would be applied to *all* STAs, it's sort of left open for the driver, afaict?
But I agree with you that this is not a good thing.
I don't think using a spare TID value is the right signalling, we can add another attribute? E.g. we could easily add
NL80211_TID_CONFIG_ATTR_OVERRIDE
and make that be
@NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribute, valid only if no STA
is selected, if set indicates that the new configuration overrides all previous STA configurations, otherwise previous STA-specific configurations should be left untouched
You also raise a good point wrt. "all TIDs" - but then we should probably just remove NL80211_TID_CONFIG_ATTR_TID and add a new NL80211_TID_CONFIG_ATTR_TIDS as a bitmap? OTOH, it's not hard to just explicitly spell out all TIDs either, I guess, just makes the message a bit bigger.
johannes
Quoted 27 lines
Quoted 7 lines
- 'apply to all TIDs' usecase
Currently, if peer is not specified, then configuration is applied to all the connected STAs. It is tempting to use some spare TID value to inform drivers that provided configuration should be applied to all TIDs of the specified STA or even to all TIDS and STAs. But that can not be left up to drivers since this value needs to be passed from userspace tools, e.g. from iw.I was *just* replying on exactly the same point over in patch 1 (not sent yet). It's actually not even clear to me that the configuration really would be applied to *all* STAs, it's sort of left open for the driver, afaict?
But I agree with you that this is not a good thing.
I don't think using a spare TID value is the right signalling, we can add another attribute? E.g. we could easily add
NL80211_TID_CONFIG_ATTR_OVERRIDEand make that be
@NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribute, valid only if no STA
is selected, if set indicates that the new configuration overrides all previous STA configurations, otherwise previous STA-specific configurations should be left untouched
Quoted 5 lines
You also raise a good point wrt. "all TIDs" - but then we should probably just remove
NL80211_TID_CONFIG_ATTR_TIDand add a newNL80211_TID_CONFIG_ATTR_TIDSas a bitmap? OTOH, it's not hard to just explicitly spell out all TIDs either, I guess, just makes the message a bit bigger.
The idea with bitmask for TIDs looks good. It eliminates the need for both 'all TIDs' define and additional attribute NL80211_TID_CONFIG_ATTR_OVERRIDE. In fact, almost no changes are needed for the patch, mostly comments need to be updated. Manual typing in iw will be less convenient, but I guess this interface is not supposed to be used by humans after all...
Regards,
Sergey
Johannes Berg
maintainerQuoted 5 lines · Sergey Matyukevich
Quoted 5 lines
@NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribute, valid only if no STA
is selected, if set indicates that the new configuration overrides all previous STA configurations, otherwise previous STA-specific configurations should be left untouched
Quoted 8 lines
Quoted 5 lines
You also raise a good point wrt. "all TIDs" - but then we should probably just remove
NL80211_TID_CONFIG_ATTR_TIDand add a newNL80211_TID_CONFIG_ATTR_TIDSas a bitmap? OTOH, it's not hard to just explicitly spell out all TIDs either, I guess, just makes the message a bit bigger.The idea with bitmask for TIDs looks good. It eliminates the need for both 'all TIDs' define and additional attribute
NL80211_TID_CONFIG_ATTR_OVERRIDE.
I think we still need NL80211_TID_CONFIG_ATTR_OVERRIDE in some way (maybe only as a flag attribute), since you could have
* change all stations (some subset of TIDs) *including* already configured stations
* or *excluding* already configured stations
Quoted 3 lines
In fact, almost no changes are needed for the patch, mostly comments need to be updated. Manual typing in iw will be less convenient, but I guess this interface is not supposed to be used by humans after all...
If that's a concern we can parse a list in iw, e.g. "0,1,2,3" instaed of "0xf", right?
johannes
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines
@NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribute, valid only if no STA
is selected, if set indicates that the new configuration overrides all previous STA configurations, otherwise previous STA-specific configurations should be left untouchedQuoted 8 lines
Quoted 5 lines
You also raise a good point wrt. "all TIDs" - but then we should probably just remove
NL80211_TID_CONFIG_ATTR_TIDand add a newNL80211_TID_CONFIG_ATTR_TIDSas a bitmap? OTOH, it's not hard to just explicitly spell out all TIDs either, I guess, just makes the message a bit bigger.The idea with bitmask for TIDs looks good. It eliminates the need for both 'all TIDs' define and additional attribute
NL80211_TID_CONFIG_ATTR_OVERRIDE.
Quoted 6 lines
I think we still need
NL80211_TID_CONFIG_ATTR_OVERRIDEin some way (maybe only as a flag attribute), since you could have* change all stations (some subset of TIDs) *including* already configured stations
* or *excluding* already configured stations
Hmmm... Logic is straightforwad without this flag:
- settings are applied to bitmasked TIDs of a single peer if address is specifed
- settings are applied to bitmasked TIDs of all the peers if no address is specified
It looks like you want to infer too much from a single flag. Why keep this logic in cfg80211/mac80211/driver ?
Quoted 6 lines
Quoted 3 lines
In fact, almost no changes are needed for the patch, mostly comments need to be updated. Manual typing in iw will be less convenient, but I guess this interface is not supposed to be used by humans after all...
If that's a concern we can parse a list in iw, e.g. "0,1,2,3" instaed of "
0xf", right?
Oh, right, it can be that simple. But this is by no means a concern.
Regards,
Sergey
Johannes Berg
maintainerQuoted 10 lines · Sergey Matyukevich
Quoted 6 lines
I think we still need
NL80211_TID_CONFIG_ATTR_OVERRIDEin some way (maybe only as a flag attribute), since you could have* change all stations (some subset of TIDs) *including* already configured stations
* or *excluding* already configured stationsHmmm... Logic is straightforwad without this flag:
- settings are applied to bitmasked TIDs of a single peer if address is specifed
- settings are applied to bitmasked TIDs of all the peers if no address is specified
Sure, this is obvious, but what exactly does "all the peers" mean?
Say I do
set_tid_config(tids=0x1, peer=02:11:22:33:44:55, noack=yes) set_tid_config(tids=0x1, peer=NULL, noack=no)
Does that reset peer 02:11:22:33:44:55, or not? This is not documented right now, and one could argue both ways - the override for that particular peer should stick, or should be removed. Which one is it?
Quoted 2 lines
It looks like you want to infer too much from a single flag. Why keep this logic in cfg80211/mac80211/driver ?
I just want to disambiguate what "all the peers" means. Not sure what you mean by keeping the logic?
johannes
Quoted 13 lines
Quoted 10 lines
Quoted 6 lines
I think we still need
NL80211_TID_CONFIG_ATTR_OVERRIDEin some way (maybe only as a flag attribute), since you could have* change all stations (some subset of TIDs) *including* already configured stations
* or *excluding* already configured stationsHmmm... Logic is straightforwad without this flag:
- settings are applied to bitmasked TIDs of a single peer if address is specifed
- settings are applied to bitmasked TIDs of all the peers if no address is specifiedSure, this is obvious, but what exactly does "all the peers" mean?
Quoted 8 lines
Say I do
set_tid_config(tids=0x1, peer=02:11:22:33:44:55, noack=yes)set_tid_config(tids=0x1, peer=NULL, noack=no)Does that reset peer 02:11:22:33:44:55, or not? This is not documented right now, and one could argue both ways - the override for that particular peer should stick, or should be removed. Which one is it?
Ok, I got the point. My understanding was that any further command would rewrite the previous settings. But now I agree that this is not obvious and should be explicitly documented.
Sergey
Quoted 17 lines · Johannes Berg
Quoted 7 lines · Sergey Matyukevich
Quoted 6 lines
I think we still need
NL80211_TID_CONFIG_ATTR_OVERRIDEin some way (maybe only as a flag attribute), since you could have* change all stations (some subset of TIDs) *including* already configured stations
* or *excluding* already configured stationsQuoted 5 lines
Hmmm... Logic is straightforwad without this flag:
- settings are applied to bitmasked TIDs of a single peer if address is specifed
- settings are applied to bitmasked TIDs of all the peers if no address is specifiedSure, this is obvious, but what exactly does "all the peers" mean?
Quoted 9 lines
Say I do
set_tid_config(tids=0x1, peer=02:11:22:33:44:55, noack=yes)set_tid_config(tids=0x1, peer=NULL, noack=no)Does that reset peer 02:11:22:33:44:55, or not? This is not documented right now, and one could argue both ways - the override for that particular peer should stick, or should be removed. Which one is it?
Here, the second command won't reset the peer 02:11:22:33:44:55. Here we are giving more
preference to the peer specific configuration. We have to reset the peer 02:11:22:33:44:55 using the set_tid_config(tids=0x1, peer=02:11:22:33:44:55, DEFAULT). I will add these in the DOC section and send it in next patchset.
Quoted 6 lines
Quoted 2 lines
It looks like you want to infer too much from a single flag. Why keep this logic in cfg80211/mac80211/driver ?
I just want to disambiguate what "all the peers" means. Not sure what you mean by keeping the logic?
Thanks,
Tamizh.
Johannes Berg
maintainerQuoted 27 lines · Tamizh chelvam
Quoted 17 lines · Johannes Berg
Quoted 7 lines · Sergey Matyukevich
Quoted 6 lines
I think we still need
NL80211_TID_CONFIG_ATTR_OVERRIDEin some way (maybe only as a flag attribute), since you could have* change all stations (some subset of TIDs) *including* already configured stations
* or *excluding* already configured stationsQuoted 5 lines
Hmmm... Logic is straightforwad without this flag:
- settings are applied to bitmasked TIDs of a single peer if address is specifed
- settings are applied to bitmasked TIDs of all the peers if no address is specifiedSure, this is obvious, but what exactly does "all the peers" mean?
Quoted 9 lines
Say I do
set_tid_config(tids=0x1, peer=02:11:22:33:44:55, noack=yes)set_tid_config(tids=0x1, peer=NULL, noack=no)Does that reset peer 02:11:22:33:44:55, or not? This is not documented right now, and one could argue both ways - the override for that particular peer should stick, or should be removed. Which one is it?
Quoted 6 lines
Here, the second command won't reset the peer 02:11:22:33:44:55. Here we are giving more
preference to the peer specific configuration. We have to reset the peer 02:11:22:33:44:55 using theset_tid_config(tids=0x1, peer=02:11:22:33:44:55, DEFAULT). I will add these in the DOC section and send it in next patchset.
OK, but maybe in some cases it _is_ desired to actually clear all peer- specific overrides (somehow)?
johannes