Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3286592pxk; Mon, 7 Sep 2020 08:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX3a3ai3SH05POb1YNIULbVyRgfnz64M8/ZW+WM/elxMVl5PbjP0cqWy9DNRXjvuijHPqm X-Received: by 2002:aa7:cf05:: with SMTP id a5mr1382280edy.313.1599492693072; Mon, 07 Sep 2020 08:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599492693; cv=none; d=google.com; s=arc-20160816; b=HZvHpS/6b+l3+DqluNdx/PArrAvfXY+luWqG81oidFZ6iVJIZ5LOkCuFVsMVw/zXAj aOH0+EL1s+fPOl1pV7XF7QgEFGhv2gadCXDTIuuFla/qtyYLJuOSAfYJO4mKRFPmcVeZ NWe2CO2pxUdESEzI/yv7g0TTsOQjFxBx72PNqWPvsEpnJmV79g0l6FRFuLbXULBSrQxY jb/Gq1m2xmEy77FwjEAK7FTMKxklVz+FARhod5IRSw2fN/4dIzmR9+IP3AqywcqNMHHd gsCbUcs94dsOIvatGPCU+zX2hUeRMfsd2W2sp/64WP5pku6JuYT8Wtxzgk4kaGEl1cEj sGEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :message-id:in-reply-to:date:references:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=5DYIC2o6lOZiQeA+8vetIhVQ89xV0eT+Hctzn7KzX/c=; b=QxTRRh/lb5ZAKu3a2r+Bg+pzgHy1i8yzVJQpOr7htV02+85R15RDjZQLArkWTZQYHN 9jc/+t5vEJplbtW2VaAAqklhqjmnfwLtMhKbxJxWEvofQE2raSK+ozsy9MOvcZpYO/db v67LUiKBKx8rY5f2dxxBc3+nstJ8DTUzRZKDLCkjv0y+jL/LOxM1IDpG5HDpauuarOpB XcDZcgR/UlWrpG9d0oZZ7vvA+sbQpspfl8i4tv6RREDAFKZ5ihOCuHNyAJ02tgKW5vKe x3z2ffa5RbGGMh6BYWGR6pHFKvAHoqkXpOFyyVfiUQJJ/lDcoKgJ8CnizPvUpMVtxbvO EuLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=gmXYO6qK; dkim=pass header.i=@amazonses.com header.s=hsbnp7p3ensaochzwyq5wwmceodymuwv header.b=YV3YjJ9u; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si2376671ejr.574.2020.09.07.08.30.57; Mon, 07 Sep 2020 08:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=gmXYO6qK; dkim=pass header.i=@amazonses.com header.s=hsbnp7p3ensaochzwyq5wwmceodymuwv header.b=YV3YjJ9u; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730067AbgIGPad (ORCPT + 99 others); Mon, 7 Sep 2020 11:30:33 -0400 Received: from a27-18.smtp-out.us-west-2.amazonses.com ([54.240.27.18]:37910 "EHLO a27-18.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730125AbgIGP32 (ORCPT ); Mon, 7 Sep 2020 11:29:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1599492568; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:MIME-Version:Content-Type; bh=IcFaEJ09/p2rgp+bLxyiPBUfIuoi7mAchqyMMtfa8o4=; b=gmXYO6qKF/COapEk8at6xu5yYD5izJTbRF2nyIMZdbQXbBx716mYaC+X8tYFcfE6 ypDaO3FOrwQsKtMvBGBcn4urrq5+GcX9djlXM4y1skz/DfTE8SmNq3H6pcohwfDaha3 SPsRnZ7NkOrRF1F82FgAEq7ucOnFhcFayUvZRVgg= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=hsbnp7p3ensaochzwyq5wwmceodymuwv; d=amazonses.com; t=1599492568; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:MIME-Version:Content-Type:Feedback-ID; bh=IcFaEJ09/p2rgp+bLxyiPBUfIuoi7mAchqyMMtfa8o4=; b=YV3YjJ9u0/6ZNv85/i5wXcfIpffDZC65xoJfieM0+7VThsTqZMmwul9eS7Iy+PqG JJjR5dI6YRBiOmL2htLhseVBDQEOIgO9lQ0K1QdQhtFb0qBDqZo9Q7gpbuPXtS3zDmg SWxb+pxfit0d4A4vRFy4S3ESqMX4epgwUhXa4VgM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1EBF6C4344A Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Wright Feng Cc: Arend Van Spriel , "linux-wireless\@vger.kernel.org" , "brcm80211-dev-list\@broadcom.com" , brcm80211-dev-list , Franky Lin , Hante Meuleman , Chi-Hsien Lin Subject: Re: [PATCH 1/4] brcmfmac: add change_bss to support AP isolation References: <20200901063237.15549-1-wright.feng@cypress.com> <20200901063237.15549-2-wright.feng@cypress.com> <0101017467cf4336-e8ed5107-762a-431d-9ef0-a2631dd090be-000000@us-west-2.amazonses.com> <0101017467f80c0c-9d33c4e2-53c3-486a-8dec-40e51161feb4-000000@us-west-2.amazonses.com> <9c5de429-ff6f-cad2-39a7-d5812fd3df09@cypress.com> Date: Mon, 7 Sep 2020 15:29:28 +0000 In-Reply-To: <9c5de429-ff6f-cad2-39a7-d5812fd3df09@cypress.com> (Wright Feng's message of "Mon, 7 Sep 2020 10:09:17 +0000") Message-ID: <01010174692fb3ae-bbe3383d-9087-4078-9bbc-f44915df446b-000000@us-west-2.amazonses.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SES-Outgoing: 2020.09.07-54.240.27.18 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Wright Feng writes: >>>>> +brcmf_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev, >>>>> + struct bss_parameters *params) >>>>> +{ >>>>> + struct brcmf_if *ifp; >>>>> + int ret = 0; >>>>> + u32 ap_isolate; >>>>> + >>>>> + brcmf_dbg(TRACE, "Enter\n"); >>>>> + ifp = netdev_priv(dev); >>>>> + if (params->ap_isolate >= 0) { >>>>> + ap_isolate = (u32)params->ap_isolate; >>>>> + ret = brcmf_fil_iovar_int_set(ifp, "ap_isolate", ap_isolate); >>>> >>>> Is the cast to u32 really necessary? Please avoid casts as much as >>>> possible. >>> >>> It seems to me. struct bss_parameters::ap_isolate is typed as int. It >>> is passed to brcmf_fil_iovar_int_set() which requires a u32 (maybe >>> function name is causing the confusion). >> >> What extra value does this explicit type casting bring here? I don't see >> it. Implicit type casting would work the same, no? > > The value will be -1, 0 or 1. > I will submit v2 patch that ignores doing iovar if getting > params->ap_isolate -1 and removes explicit type casting. Thanks for the > comment. Oh, I didn't realise ap_isolate can be -1 as struct bss_parameters didn't document that. Can someone submit a patch to fix that? * @ap_isolate: do not forward packets between connected stations -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches