From: Aloka Dixit <alokad@codeaurora.org>
To: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Cc: alokad=codeaurora.org@codeaurora.org
Subject: Re: [v13 1/3] mac80211: split beacon retrieval functions
Date: Wed, 06 Oct 2021 13:20:09 -0700 [thread overview]
Message-ID: <ad3a3412669925daaa35c143f84172fb@codeaurora.org> (raw)
In-Reply-To: <20211006040938.9531-2-alokad@codeaurora.org>
On 2021-10-05 21:09, Aloka Dixit wrote:
> Split __ieee80211_beacon_get() into a separate function for AP mode
> ieee80211_beacon_get_ap().
> Also, move the code common to all modes (AP, adhoc and mesh) to
> a separate function ieee80211_beacon_get_finish().
>
> Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
> ---
> v13:New addition to the patch series compared to v12.
> This change is added in a separate patch for better readability.
>
> net/mac80211/tx.c | 203 +++++++++++++++++++++++++++-------------------
> 1 file changed, 118 insertions(+), 85 deletions(-)
>
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 2d1193ed3eb5..ac9ab007dc6f 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -4979,6 +4979,115 @@ static int ieee80211_beacon_protect(struct
> sk_buff *skb,
> return 0;
> }
>
> +static void
> +ieee80211_beacon_get_finish(struct ieee80211_hw *hw,
> + struct ieee80211_vif *vif,
> + struct ieee80211_mutable_offsets *offs,
> + struct beacon_data *beacon,
> + struct sk_buff *skb,
> + struct ieee80211_chanctx_conf *chanctx_conf,
> + u16 csa_off_base)
> +{
> + struct ieee80211_local *local = hw_to_local(hw);
> + struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
> + struct ieee80211_tx_info *info;
> + enum nl80211_band band;
> + struct ieee80211_tx_rate_control txrc;
> +
> + /* CSA offsets */
> + if (offs && beacon) {
> + u16 i;
> +
> + for (i = 0; i < IEEE80211_MAX_CNTDWN_COUNTERS_NUM; i++) {
> + u16 csa_off = beacon->cntdwn_counter_offsets[i];
> +
> + if (!csa_off)
> + continue;
> +
> + offs->cntdwn_counter_offs[i] = csa_off_base + csa_off;
> + }
> + }
> +
I just now realized that the CSA offset part can be moved to the AP
specific function.
ieee80211_beacon_get_finish() won't even need csa_off_base as an input
in that case.
Will wait for other comments and then move it.
next prev parent reply other threads:[~2021-10-06 20:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-06 4:09 [v13 0/3] MBSSID and EMA support in AP mode Aloka Dixit
2021-10-06 4:09 ` [v13 1/3] mac80211: split beacon retrieval functions Aloka Dixit
2021-10-06 20:20 ` Aloka Dixit [this message]
2021-10-06 4:09 ` [v13 2/3] mac80211: MBSSID and EMA beacon handling in AP mode Aloka Dixit
2021-11-26 11:23 ` Johannes Berg
2022-01-14 19:23 ` Aloka Dixit
2022-01-14 20:12 ` Johannes Berg
2022-01-14 20:34 ` Aloka Dixit
2022-01-14 20:50 ` Johannes Berg
2021-10-06 4:09 ` [v13 3/3] mac80211: MBSSID channel switch Aloka Dixit
2021-11-26 11:16 ` Johannes Berg
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=ad3a3412669925daaa35c143f84172fb@codeaurora.org \
--to=alokad@codeaurora.org \
--cc=alokad=codeaurora.org@codeaurora.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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).