Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5729856ybi; Wed, 31 Jul 2019 02:25:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5LZISWkN5ag4gP+2BVhbXG4cIDGXfYyEjRK5ZCDtpTG8DLBu1vnkMDTQfVg1mDsfQbyRi X-Received: by 2002:a17:90a:cb01:: with SMTP id z1mr1909805pjt.93.1564565120291; Wed, 31 Jul 2019 02:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564565120; cv=none; d=google.com; s=arc-20160816; b=uILTXlRRFC/0JxcDfetPygB25BXz/hYiBfNl33V9zavYWoNUtFsaS2t6pU0xCBfEWu LtQ1SoYfnCgujJ7iscrdSt3y7LEerW37o/cKqiA72OtaqGfFl3VxwkEFJ+eUrPW3zybH HczZV0jqm9Miq8DVG+pvPoGim+s9HhKHth/aOhNaAeK3nNdwu00VwREtDrSf8kcdcNbj BReM/klwk3j0kYJtZwd9rIMnTl8UEEIEH9J5VifzSDk77pTmIlN1vihmlmmh8yApR3Uq c4rUX7IG405AVbQAcqfHAZmUdi1HVFcW9SNbM2/iuViveGjQmY24U0DqKul6vdx5UB8L oLtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=PcRrKAHP7YpQiLHMQhBjxBg6Ym4/0wCt7JLduy5us7Y=; b=IpLBhbVfv72DGfG9uxgbzWnrc1sZpvXiegdfgnivUPKoN9l75wuK6U6ugvKY+DxtN0 WwOlP7wYamnmokGRG2z1/tmXmSnRF6pDE7NHFiGVchz6CHF2ykoI6zIVvXDLPauTC4zf lhBf+QI3RtHAljIUzP+r6ARFDVN71YuCGV8xtnJAiZp3Tfi7A+/u2mlqXcgcfvFStbjM 1kofrmxASQ1L8Uf0e6bGhgjL9KUePM7K31G/iTtxNkNf7ksArvsW3/CbQ4jm9zKBnOOW xQZe3ljMY3zJ5VyfKVaDK1kfuGUCPTNU2DYbu9e2S6sGdR8mNkRdyzxziNfkIGetQIKb X8hA== ARC-Authentication-Results: i=1; mx.google.com; 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 f139si61800405pfa.2.2019.07.31.02.25.05; Wed, 31 Jul 2019 02:25:20 -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; 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 S2387399AbfGaJYZ (ORCPT + 99 others); Wed, 31 Jul 2019 05:24:25 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:55414 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727077AbfGaJYZ (ORCPT ); Wed, 31 Jul 2019 05:24:25 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hskqM-0004Zv-0w; Wed, 31 Jul 2019 11:24:22 +0200 Message-ID: <6351a05f5c205db47740116b4bec5a6476317792.camel@sipsolutions.net> Subject: Re: [PATCHv6 2/9] nl80211: Add new netlink attribute for TID speicific retry count From: Johannes Berg To: Tamizh chelvam , ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Date: Wed, 31 Jul 2019 11:24:21 +0200 In-Reply-To: <1560835632-17405-3-git-send-email-tamizhr@codeaurora.org> References: <1560835632-17405-1-git-send-email-tamizhr@codeaurora.org> <1560835632-17405-3-git-send-email-tamizhr@codeaurora.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org ^^ there's a typo in the subject > @@ -3951,6 +3957,7 @@ enum wiphy_flags { > WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), > WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23), > WIPHY_FLAG_HAS_STATIC_WEP = BIT(24), > + WIPHY_FLAG_HAS_MAX_DATA_RETRY_COUNT = BIT(25), This is never used, so that doesn't make sense? You probably want to advertise the max_data_retry_count value contingent on this flag (*) in some attribute, so that userspace can also detect the presence/absence of the flag for the feature? (*) doesn't really need to be contingent on the flag - could just be contingent on max_data_retry_count being non-zero and then you don't need the flag. > + * @NL80211_ATTR_MAX_RETRY_COUNT: The upper limit for the retry count > + * configuration that the driver can accept. > * > * @NUM_NL80211_ATTR: total number of nl80211_attrs available > * @NL80211_ATTR_MAX: highest attribute number currently defined > @@ -2823,6 +2825,7 @@ enum nl80211_attrs { > NL80211_ATTR_TWT_RESPONDER, > > NL80211_ATTR_TID_CONFIG, > + NL80211_ATTR_MAX_RETRY_COUNT, You already have the attribute, but again, aren't using it. > + * @NL80211_EXT_FEATURE_PER_TID_RETRY_CONFIG: Driver supports per TID data retry > + * count functionality. > + * @NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG: Driver supports STA specific > + * data retry count functionality. and if you have these you don't need the WIPHY_FLAG anyway? > + [NL80211_TID_ATTR_CONFIG_RETRY] = { .type = NLA_FLAG }, > + [NL80211_TID_ATTR_CONFIG_RETRY_SHORT] = NLA_POLICY_MIN(NLA_U8, 0), > + [NL80211_TID_ATTR_CONFIG_RETRY_LONG] = NLA_POLICY_MIN(NLA_U8, 0), min of 0 doesn't make sense, maybe you meant 1? otherwise just don't set anything here. > + "TID specific configuration not " > + "supported"); This applies to all the patches - please don't break strings across multiple lines, even if they cross 80 columns. Even checkpatch won't give you any warning on this. > + tid_conf->tid_conf_mask |= IEEE80211_TID_CONF_RETRY; > + if (attrs[NL80211_TID_ATTR_CONFIG_RETRY_SHORT]) { > + tid_conf->retry_short = > + nla_get_u8(attrs[NL80211_TID_ATTR_CONFIG_RETRY_SHORT]); > + if (tid_conf->retry_short > > + rdev->wiphy.max_data_retry_count) > + return -EINVAL; > + } else { > + tid_conf->retry_short = -1; > + I guess you should document that -1 means no changes? Not sure how the IEEE80211_TID_CONF_RETRY comes in, you're always setting it, so that's useless - better remove that and document that -1 means no changes? johannes