Search Linux Wireless

Re: [PATCHv6 3/9] nl80211: Add netlink attribute for AMPDU aggregation enable/disable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

johannes




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux