Commit c0336955 authored by Sergey Matyukevich's avatar Sergey Matyukevich Committed by Johannes Berg

nl80211: simplify peer specific TID configuration

Current rule for applying TID configuration for specific peer looks overly
complicated. No need to reject new TID configuration when override flag is
specified. Another call with the same TID configuration, but without
override flag, allows to apply new configuration anyway.

Use the same approach as for the 'all peers' case: if override flag is
specified, then reset existing TID configuration and immediately
apply a new one.
Signed-off-by: default avatarSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Link: https://lore.kernel.org/r/20200424112905.26770-5-sergey.matyukevich.os@quantenna.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 33462e68
...@@ -4823,12 +4823,10 @@ enum nl80211_tid_config { ...@@ -4823,12 +4823,10 @@ enum nl80211_tid_config {
* (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE). * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE).
* @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but
* per peer instead. * per peer instead.
* @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if no peer * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates
* is selected, if set indicates that the new configuration overrides * that the new configuration overrides all previous peer
* all previous peer configurations, otherwise previous peer specific * configurations, otherwise previous peer specific configurations
* configurations should be left untouched. If peer is selected then * should be left untouched.
* it will reset particular TID configuration of that peer and it will
* not accept other TID config attributes along with peer.
* @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7) * @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7)
* Its type is u16. * Its type is u16.
* @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID. * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID.
......
...@@ -14036,10 +14036,7 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev, ...@@ -14036,10 +14036,7 @@ static int parse_tid_conf(struct cfg80211_registered_device *rdev,
if (rdev->ops->reset_tid_config) { if (rdev->ops->reset_tid_config) {
err = rdev_reset_tid_config(rdev, dev, peer, err = rdev_reset_tid_config(rdev, dev, peer,
tid_conf->tids); tid_conf->tids);
/* If peer is there no other configuration will be if (err)
* allowed
*/
if (err || peer)
return err; return err;
} else { } else {
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment