linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Wright Feng <wright.feng@cypress.com>
Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com,
	brcm80211-dev-list@cypress.com,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	chi-hsien.lin@cypress.com, Ting-Ying Li <tingying.li@cypress.com>
Subject: Re: [PATCH 4/4] brcmfmac: add a variable for packet forwarding condition
Date: Mon, 7 Sep 2020 09:21:32 +0000	[thread overview]
Message-ID: <0101017467dedc38-3e3a7b7e-3e16-4eb2-adcf-5b6f502178ac-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <20200901063237.15549-5-wright.feng@cypress.com> (Wright Feng's message of "Tue, 1 Sep 2020 01:32:37 -0500")

Wright Feng <wright.feng@cypress.com> writes:

> From: Ting-Ying Li <tingying.li@cypress.com>
>
> When the "ap_isolate" function is not set by the host,
> host-based packet forwarding will be enabled if the packet
> forwarding mechanism is not offloaded to the lower layer.
>
> Signed-off-by: Ting-Ying Li <tingying.li@cypress.com>
> Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>

[...]

> +	/* Get ap_isolate value from firmware to detemine whether fmac */
> +	/* driver supports packet forwarding. */
> +	if (brcmf_fil_iovar_int_get(ifp, "ap_isolate", &val) == 0) {
> +		ifp->fmac_pkt_fwd_en =
> +			((params->ap_isolate == 0) && (val == 1)) ?
> +			true : false;
> +	} else {
> +		brcmf_err("get ap_isolate iovar failed: ret=%d\n", ret);
> +		ifp->fmac_pkt_fwd_en = false;
> +	}

This is hard to read, you can simplify it to:

if (brcmf_fil_iovar_int_get(ifp, "ap_isolate", &val) == 0 &&
    params->ap_isolate == 0 &&
    val == 1) {
	ifp->fmac_pkt_fwd_en = true;
} else {
	brcmf_err("get ap_isolate iovar failed: ret=%d\n", ret);
	ifp->fmac_pkt_fwd_en = false;
}


-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

      reply	other threads:[~2020-09-07  9:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01  6:32 [PATCH 0/4] brcmfmac: Add few features in AP mode Wright Feng
2020-09-01  6:32 ` [PATCH 1/4] brcmfmac: add change_bss to support AP isolation Wright Feng
2020-09-07  9:04   ` Kalle Valo
2020-09-07  9:21     ` Arend Van Spriel
2020-09-07  9:49       ` Kalle Valo
2020-09-07 10:09         ` Wright Feng
2020-09-07 15:29           ` Kalle Valo
     [not found]           ` <01010174692f7c3f-4b7369b2-0665-4324-b1c8-57bd22ac9ce7-000000@us-west-2.amazonses.com>
2020-09-07 15:57             ` Arend Van Spriel
2020-09-08  2:13               ` Wright Feng
2020-09-08  4:29                 ` Kalle Valo
2020-09-01  6:32 ` [PATCH 2/4] brcmfmac: don't allow arp/nd offload to be enabled if ap mode exists Wright Feng
2020-09-01  6:32 ` [PATCH 3/4] brcmfmac: support the forwarding packet Wright Feng
2020-09-01  9:39   ` Arend Van Spriel
2020-09-03  3:30   ` kernel test robot
2020-09-03  3:30   ` [RFC PATCH] brcmfmac: brcmf_add_sta can be static kernel test robot
2020-09-01  6:32 ` [PATCH 4/4] brcmfmac: add a variable for packet forwarding condition Wright Feng
2020-09-07  9:21   ` Kalle Valo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0101017467dedc38-3e3a7b7e-3e16-4eb2-adcf-5b6f502178ac-000000@us-west-2.amazonses.com \
    --to=kvalo@codeaurora.org \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=chi-hsien.lin@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tingying.li@cypress.com \
    --cc=wright.feng@cypress.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).