Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1545774ybl; Sat, 10 Aug 2019 05:41:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxh4vU1GgOgibvQee8ooCJybnHif7e9MWRpqttDpPlflJD8stbCABafB/oPnCx9akAIVxhQ X-Received: by 2002:a63:4612:: with SMTP id t18mr22043180pga.85.1565440899419; Sat, 10 Aug 2019 05:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565440899; cv=none; d=google.com; s=arc-20160816; b=XTDzpaxKS7vCp42ufJlTqMoYpNJhRb1sh34CIldLu7wP4CrEatllh3F4KyDPkW6g09 NOfEXDGKVCiwe3IvrdOjobL6sydKOtvyPaB3alrbpGP+2OIuZxjbRAupsEcPkfoAc8Pt sHS/VpG04+PBdwWmysReywChHobO2ml4WYlH0M9WbLOvJf/XaNoX3TT1HuumSPjQSV6S oDnTW5X9opZftHCZzuuNEhyXuxPzLTQ/mdUh1JDqtX2/TQtNFdiQStI0P22y+P/k+2ji NTeqKzeUa7iC8blzwu8RFd7OWA37hbaPgtdQYah3+GdhaBoy8AXTh0zwluSU/mPzN7F4 3bFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=0OwUnCjtP4rsJe30FvNwjc2deoz1oNY8TXw/ccKkBL8=; b=WCQsLbvOmuy816c4RIe7wepx2DoVJ28xv/lk3C1cHbbhDSp5/6Uj7RitYbnVypEZU+ MDsYfhBqT+r1U84Ybg8BOw7xEdGW/woJ8MPEnhF5aP+G8aI/8xJALxObLjq8TXrCcA/B O1LM2nlRFgue+bmolg7cSZU3jm/oog2WyRl4dk4q1sZBB7wQoX64qusby6DJKvhTTNbn Px8Pc398DZn+QhfeQYtkm1A2+1xII7j8/mcI4knvfCFTkIxXEBbPBeTnhtRp702gSmhB h4PIpQ410izw2SeJAX9M22qVrrQe1f0gocIOJ9pIhkGoNgUSlpNehq/IaK+tA9IIzol1 1w3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=f+OFtFpg; dkim=pass header.i=@codeaurora.org header.s=default header.b=TDowV+u6; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184si59439372pga.23.2019.08.10.05.41.24; Sat, 10 Aug 2019 05:41:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=f+OFtFpg; dkim=pass header.i=@codeaurora.org header.s=default header.b=TDowV+u6; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726350AbfHJMlP (ORCPT + 99 others); Sat, 10 Aug 2019 08:41:15 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37776 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbfHJMlP (ORCPT ); Sat, 10 Aug 2019 08:41:15 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 08D996063F; Sat, 10 Aug 2019 12:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565440875; bh=yJ1BlyP2N+MGDpUxAHU8VlyACH1I6LtPj6CRxZyqCX8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=f+OFtFpgwFDZ07ppEVkE+P0/Huiv5wzYVmVKwVCOtHD6QGTvGb8j66QG5ztbCML5w sWSjgNfQZ34zvldTFLAqCdiTI7mzApdRSBFSm9BMomKFu4nkAyZjC3Zb+PxPqentq5 l8tSiQu37Wlnyot29/zJomDI7dUsimElDHP3sxHw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id A3B56602ED; Sat, 10 Aug 2019 12:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565440874; bh=yJ1BlyP2N+MGDpUxAHU8VlyACH1I6LtPj6CRxZyqCX8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TDowV+u6LOHcpW402dXkH7Nnj9bAKaX824lvHMaHyyevfnVn9Y6fyOFKEmeaiqiqn 3PShPpe0Os4RVdOtTH0i8vdGxihb64Mh5zPORP1GQef/LE4IFfScA1bZmnlbGLAICQ 63eJtLbUds1jnuLvTaPuDfmYWcc6Sgev3vuz/uJI= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 10 Aug 2019 18:11:14 +0530 From: Tamizh chelvam To: Johannes Berg Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: Re: [PATCHv6 3/9] nl80211: Add netlink attribute for AMPDU aggregation enable/disable In-Reply-To: <1077c62701b31cfcb4436e6b13be64ade6b1ae1b.camel@sipsolutions.net> References: <1560835632-17405-1-git-send-email-tamizhr@codeaurora.org> <1560835632-17405-4-git-send-email-tamizhr@codeaurora.org> <1077c62701b31cfcb4436e6b13be64ade6b1ae1b.camel@sipsolutions.net> Message-ID: X-Sender: tamizhr@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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.