Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp885689lqt; Fri, 7 Jun 2024 01:17:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9GYkWQhGOc/26rhltbIVFOJ+LVStuKHJJHAaFL0zUX/RfxIWK6V0Ql59jjxNf26QwaKaOtOEUMQHTE+HYry3KXhJn1IonNk1M0Ynv3Q== X-Google-Smtp-Source: AGHT+IEwzdFMJWO1IcmNq91xVlnnhjBDWlnudrChgg1n512gdUhHXaY6OovvxxEVDtKH9UkD4JXO X-Received: by 2002:a17:906:284d:b0:a6c:71af:64ac with SMTP id a640c23a62f3a-a6cd7891933mr114481166b.43.1717748221172; Fri, 07 Jun 2024 01:17:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717748221; cv=pass; d=google.com; s=arc-20160816; b=D31Zj87OQ7m84sQ0XQTSV6yz11IgK758VrCH4EEahI7yu1kKFoAIu9lsAiOTnc+V7S iNqm9p74EnO9Vv88OszCCAHA63KSDD9ceJtXcQVCi2xfEO3T1oTm273SCHRorovAeaOy MMqzKlTsAhL22sQSjceU4y8nTMG5wXSumqhxM8Ocobl5yVw6z832zp8/xWXq6WE+CkQa DAGuq1JHgilfiIV4++UQPEayPUS6a8RFGiztkigvlkIywCbojMSO3j41O8D5aRM/TsjC SwAfhJjMZhP5ijiL+t0stTC/Jc6RJPVuUkJ9A18eqislpfz16Hsy9fywbNCpPzVbvNLm in3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=qSdcj6LmBka1hZy7IqRD54LT4MuoIB0xcge0vS8JxtI=; fh=FWLqcmcJXA/Yc+Oa6pEJCbMdlHxZCj5KpkEYmY/2e+M=; b=iby1gPZhOVDFI+yDiE12XVTQqLEbyBEgIE7ryGblUbShd5FL+oNfJ8UHYXMmlZnQ2q lW+8H4qb7/RpQ2/P/fSwDFk0sTf12EikQrwHeJR3+n502XEvLPaCP1m307tGS+EweAhB AA1kCCjr53R1yvtrqO5SIr+FLkTQjEbch8ysb6Vv0Fnfo4eHA2WNhlRcEuFA4iYyaR9o N4vvlVP3KoHtUNkxKxvn+MMSoKjimQ00XyfuzEzOn7Blrz3W5FebAOPxbRFZ/auackWx tjG2t2twfb7N5x82QUO1UeNhA5yIsYerqsOHLnnlF1Rnwjd4SdsN6EykSIzylNHRbk7S 2wTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=GijL8YNw; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8667-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c8070812dsi159741666b.631.2024.06.07.01.17.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 01:17:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=GijL8YNw; arc=pass (i=1 dkim=pass dkdomain=nbd.name dmarc=pass fromdomain=nbd.name); spf=pass (google.com: domain of linux-wireless+bounces-8667-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8667-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AA00E1F224F0 for ; Fri, 7 Jun 2024 08:17:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C017C153512; Fri, 7 Jun 2024 08:16:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="GijL8YNw" X-Original-To: linux-wireless@vger.kernel.org Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C74C14EC75 for ; Fri, 7 Jun 2024 08:16:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.11.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717748216; cv=none; b=PAdFGHvJDidUNMfy06fktcmNqyO4VCHc6MeJD+2YZ6oK3soazrE5uwB9pmm8jy3ZC6NtV9My97crg+gfU3D8IPSrY6VPcGy1l+Hdm4f2XPIDfiDi/wBVQQluEoHwaw97NI903u7zf1/KOaxliCVmuzlAmpU3wNQ21oEWwLHLTyE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717748216; c=relaxed/simple; bh=QF5zWclbkFuKtQAzJO6XBl9mY92/r2s8ta+vAnximWo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=o+SmFdhqbNLgdbOuB8wHxEXqFsaGvU2d29l9zePVgHT+iEvHKanzpsZgqFiB6rZ+B9RPUpFPErUo9WVSjFJP2aBIDAIapwvbxS9Ey7CDYqCCGM8tOKPumF20ifystkArFPTaKSQhpl/EKFa8ES52TpJZ5vzC5rschNxdn+F+gKU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name; spf=none smtp.mailfrom=nbd.name; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b=GijL8YNw; arc=none smtp.client-ip=46.4.11.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nbd.name DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qSdcj6LmBka1hZy7IqRD54LT4MuoIB0xcge0vS8JxtI=; b=GijL8YNwYRyATOe2JYrKFX/ezT zbqQlGWdof0af1h26UKZ6Brft1hhgjZrdqp7i5L8W56H7kGyZ13X15T4HWm/ilaUh+Saypk7kIspj lNUCuQv5euJlGdCZTEJpOKYo3Zc+GUuxViDU3uu+pPokqJgzgRmSEuIhPT/IiJoT55YA=; Received: from p4ff13226.dip0.t-ipconnect.de ([79.241.50.38] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1sFUmJ-008pwr-0s; Fri, 07 Jun 2024 10:16:51 +0200 Message-ID: <80aed11e-12be-472a-8664-1bd1e6dce8f3@nbd.name> Date: Fri, 7 Jun 2024 10:16:50 +0200 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC v3 4/8] wifi: mac80211: add support for DFS with multiple radios To: Karthikeyan Periyasamy , linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, quic_adisi@quicinc.com, ath12k@lists.infradead.org References: <7cc3d89225f365c85b363874725cfbc77c9c1db5.1717696995.git-series.nbd@nbd.name> <2014e488-b930-43ff-86a6-c5a4801b82f5@quicinc.com> <21956735-3a04-4f29-8f13-0f84ed93cda2@nbd.name> <6704d2ba-8ac8-cd33-9d3b-95dae2613d9f@quicinc.com> Content-Language: en-US From: Felix Fietkau Autocrypt: addr=nbd@nbd.name; keydata= xsDiBEah5CcRBADIY7pu4LIv3jBlyQ/2u87iIZGe6f0f8pyB4UjzfJNXhJb8JylYYRzIOSxh ExKsdLCnJqsG1PY1mqTtoG8sONpwsHr2oJ4itjcGHfn5NJSUGTbtbbxLro13tHkGFCoCr4Z5 Pv+XRgiANSpYlIigiMbOkide6wbggQK32tC20QxUIwCg4k6dtV/4kwEeiOUfErq00TVqIiEE AKcUi4taOuh/PQWx/Ujjl/P1LfJXqLKRPa8PwD4j2yjoc9l+7LptSxJThL9KSu6gtXQjcoR2 vCK0OeYJhgO4kYMI78h1TSaxmtImEAnjFPYJYVsxrhay92jisYc7z5R/76AaELfF6RCjjGeP wdalulG+erWju710Bif7E1yjYVWeA/9Wd1lsOmx6uwwYgNqoFtcAunDaMKi9xVQW18FsUusM TdRvTZLBpoUAy+MajAL+R73TwLq3LnKpIcCwftyQXK5pEDKq57OhxJVv1Q8XkA9Dn1SBOjNB l25vJDFAT9ntp9THeDD2fv15yk4EKpWhu4H00/YX8KkhFsrtUs69+vZQwc0cRmVsaXggRmll dGthdSA8bmJkQG5iZC5uYW1lPsJgBBMRAgAgBQJGoeQnAhsjBgsJCAcDAgQVAggDBBYCAwEC HgECF4AACgkQ130UHQKnbvXsvgCgjsAIIOsY7xZ8VcSm7NABpi91yTMAniMMmH7FRenEAYMa VrwYTIThkTlQzsFNBEah5FQQCACMIep/hTzgPZ9HbCTKm9xN4bZX0JjrqjFem1Nxf3MBM5vN CYGBn8F4sGIzPmLhl4xFeq3k5irVg/YvxSDbQN6NJv8o+tP6zsMeWX2JjtV0P4aDIN1pK2/w VxcicArw0VYdv2ZCarccFBgH2a6GjswqlCqVM3gNIMI8ikzenKcso8YErGGiKYeMEZLwHaxE Y7mTPuOTrWL8uWWRL5mVjhZEVvDez6em/OYvzBwbkhImrryF29e3Po2cfY2n7EKjjr3/141K DHBBdgXlPNfDwROnA5ugjjEBjwkwBQqPpDA7AYPvpHh5vLbZnVGu5CwG7NAsrb2isRmjYoqk wu++3117AAMFB/9S0Sj7qFFQcD4laADVsabTpNNpaV4wAgVTRHKV/kC9luItzwDnUcsZUPdQ f3MueRJ3jIHU0UmRBG3uQftqbZJj3ikhnfvyLmkCNe+/hXhPu9sGvXyi2D4vszICvc1KL4RD aLSrOsROx22eZ26KqcW4ny7+va2FnvjsZgI8h4sDmaLzKczVRIiLITiMpLFEU/VoSv0m1F4B FtRgoiyjFzigWG0MsTdAN6FJzGh4mWWGIlE7o5JraNhnTd+yTUIPtw3ym6l8P+gbvfoZida0 TspgwBWLnXQvP5EDvlZnNaKa/3oBes6z0QdaSOwZCRA3QSLHBwtgUsrT6RxRSweLrcabwkkE GBECAAkFAkah5FQCGwwACgkQ130UHQKnbvW2GgCeMncXpbbWNT2AtoAYICrKyX5R3iMAoMhw cL98efvrjdstUfTCP2pfetyN In-Reply-To: <6704d2ba-8ac8-cd33-9d3b-95dae2613d9f@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 07.06.24 08:45, Karthikeyan Periyasamy wrote: > > > On 6/7/2024 10:33 AM, Felix Fietkau wrote: >> On 07.06.24 06:54, Karthikeyan Periyasamy wrote: >>> >>> >>> On 6/7/2024 10:05 AM, Felix Fietkau wrote: >>>> On 07.06.24 06:25, Karthikeyan Periyasamy wrote: >>>>> >>>>> >>>>> On 6/6/2024 11:37 PM, Felix Fietkau wrote: >>>>>> DFS can be supported with multi-channel combinations, as long as >>>>>> each DFS >>>>>> capable radio only supports one channel. >>>>>> >>>>>> Signed-off-by: Felix Fietkau >>>>>> --- >>>>>>   net/mac80211/main.c | 32 ++++++++++++++++++++++++-------- >>>>>>   1 file changed, 24 insertions(+), 8 deletions(-) >>>>>> >>>>>> diff --git a/net/mac80211/main.c b/net/mac80211/main.c >>>>>> index 40fbf397ce74..e9c4cf611e94 100644 >>>>>> --- a/net/mac80211/main.c >>>>>> +++ b/net/mac80211/main.c >>>>> >>>>> ... >>>>> >>>>>>   int ieee80211_register_hw(struct ieee80211_hw *hw) >>>>>>   { >>>>>>       struct ieee80211_local *local = hw_to_local(hw); >>>>>> @@ -1173,17 +1188,18 @@ int ieee80211_register_hw(struct >>>>>> ieee80211_hw *hw) >>>>>>               if (comb->num_different_channels > 1) >>>>>>                   return -EINVAL; >>>>>>           } >>>>>> -    } else { >>>>>> -        /* DFS is not supported with multi-channel combinations >>>>>> yet */ >>>>>> -        for (i = 0; i < local->hw.wiphy->n_iface_combinations; i++) { >>>>>> -            const struct ieee80211_iface_combination *comb; >>>>>> - >>>>>> -            comb = &local->hw.wiphy->iface_combinations[i]; >>>>>> +    } else if (hw->wiphy->n_radio) { >>>>>> +        for (i = 0; i < hw->wiphy->n_radio; i++) { >>>>>> +            const struct wiphy_radio *radio = &hw->wiphy->radio[i]; >>>>>> -            if (comb->radar_detect_widths && >>>>>> -                comb->num_different_channels > 1) >>>>>> +            if >>>>>> (!ieee80211_ifcomb_check_radar(radio->iface_combinations, >>>>>> +                              radio->n_iface_combinations)) >>>>>>                   return -EINVAL; >>>>>>           } >>>>>> +    } else { >>>>>> +        if >>>>>> (!ieee80211_ifcomb_check_radar(hw->wiphy->iface_combinations, >>>>>> +                          hw->wiphy->n_iface_combinations)) >>>>>> +            return -EINVAL; >>>>>>       } >>>>>>       /* Only HW csum features are currently compatible with >>>>>> mac80211 */ >>>>> >>>>> Are we omitting the "wiphy->iface_combinations" if the radio specific >>>>> iface combination advertised ? >>>>> >>>>> If so, it looks like unused "wiphy->iface_combinations" for radio >>>>> specific combination advertised. >>>> >>>> This patch series assumes that you have both >>>> wiphy->iface_combinations and radio->iface_combinations set. >>>> wiphy->iface_combinations applies to the full wiphy, whereas >>>> radio->iface_combinations only applies to vifs assigned to the radio. >>> >>> >>> If radio->iface_combinations is set then always vifs assigned to the >>> radio. so wiphy->iface_combinations get avoid for all the use cases. >>> >>> Ultimately either of one combination only get used by this proposal. >>> >>> or I am missing something here ? >> >> The functions that perform interface combination checks are called both >> with -1 as radio_idx (meaning per-wiphy), as well as with the assigned >> radio id. That way, both kinds of combinations/limits are checked and >> enforced. >> > In the radio specific iface advertisement, global iface combination > represent the union or intersection of all radio iface combination ? The global interface combination should be a union of all radio interface combinations. You can also use them to apply extra limits, e.g. if you have a limit on the per-wiphy number of interfaces (regardless of the assigned radio), you use the global interface combination to apply it. - Felix