On 2019-07-31 14:58, Johannes Berg wrote:
On Tue, 2019-06-18 at 10:57 +0530, Tamizh chelvam wrote:+ if (!wiphy_ext_feature_isset(&rdev->wiphy, + NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL)) { + NL_SET_ERR_MSG_ATTR(extack, + attrs[NL80211_TID_ATTR_CONFIG_AMPDU_CTRL], + "TID specific configuration not " + "supported"); + return -ENOTSUPP; + } + + if (peer && !wiphy_ext_feature_isset(&rdev->wiphy, + NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL)) { + NL_SET_ERR_MSG_ATTR(extack, + attrs[NL80211_TID_ATTR_CONFIG_AMPDU_CTRL], + "peer specfic TID configuration not " + "supported"); + return -ENOTSUPP; + }I think you should probably make this be a function to which you pass the attribute pointer and feature flags. err = nl80211_check_tid_config_supported(extack, attrs[NL80211_TID_ATTR_CONFIG_AMPDU_CTRL], NL80211_EXT_FEATURE_PER_TID_AMPDU_CTRL, NL80211_EXT_FEATURE_PER_STA_AMPDU_CTRL); since you have this code a lot?
Sure, I will make that change in the next version of patchset. Thanks, Tamizh.
