All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Cc: linux-wireless@vger.kernel.org, arien.judge@morsemicro.com
Subject: Re: [wireless-next v2 2/4] wifi: mac80211: support initialising an S1G short beaconing BSS
Date: Wed, 16 Jul 2025 11:08:00 +0200	[thread overview]
Message-ID: <625f49d3963b7b5c17ebbb3c201633befc16a8ad.camel@sipsolutions.net> (raw)
In-Reply-To: <3rvtczj6c3svz273xdeowocxfx5cln4qsxqatkvtyfdujjwnrb@o3vc3ekryfrj> (sfid-20250716_110122_087167_0F5DB5C1)

On Wed, 2025-07-16 at 19:01 +1000, Lachlan Hodges wrote:
> An interface can't be modified such that we can disable short beaconing
> without tearing it down.

OK, that's fair. No objection to that, just wanted to clarify if that
was what you intended.

> > This should probably be on the cfg80211 patch, but now that I'm writing
> > here ... If there is no new short beacon update cannot currently be set
> > to true, I think? And also, right now by the policy you can't set the
> > long_beacon_interval == 1 from userspace, but what if you actively want
> > to _remove_ the short beacon entirely?
> > 
> 
> I initially did think so that this should be in a cfg80211 targetted
> patch but since cfg.c since within mac80211 I did such. Can do either.

Oh, sorry, what I said was confusing. I meant I should be _commenting_
on the cfg80211 patch instead (about the logic of being able to remove
the short beacon or not). But you clarified that above.

> So you are correct, It's not legal to disable short beaconing without
> tearing the interface down (as mentioned above). Thats why within
> ieee80211_change_beacon() we check if we are short beaconing first
> and if theres an update proceed with said update. This function should
> really just be setting the new pointers and discarding the old pointers
> if they exist i.e during an update. 

Right, makes sense.

> Yea.. this seems to be a case of me stealing the beacon change code...
> :).

OK, I don't know what that code does off-hand, maybe there we have some
other things that don't always need to change.

> static int
> ieee80211_set_s1g_short_beacon(struct ieee80211_sub_if_data *sdata,
> 			       struct cfg80211_s1g_short_beacon *params,
> 			       struct ieee80211_link_data *link)
> {
...

> 	/* Memory layout: | struct | head | tail | */
> 	new->short_head = ((u8 *)new) + sizeof(*new);

You probably don't need the extra () around "(u8 *)new".

> seems more robust, where we simply update the new beacon given
> the parameters and discard the old, else if theres no update
> we do nothing.

Yeah, that looks good to me.

johannes

  reply	other threads:[~2025-07-16  9:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16  5:32 [wireless-next v2 0/4] [v2] wifi: S1G short beacon support Lachlan Hodges
2025-07-16  5:32 ` [wireless-next v2 1/4] wifi: cfg80211: support configuring an S1G short beaconing BSS Lachlan Hodges
2025-07-16  5:32 ` [wireless-next v2 2/4] wifi: mac80211: support initialising " Lachlan Hodges
2025-07-16  7:55   ` Johannes Berg
2025-07-16  9:01     ` Lachlan Hodges
2025-07-16  9:08       ` Johannes Berg [this message]
2025-07-16  5:32 ` [wireless-next v2 3/4] wifi: mac80211: support initialising current short beacon index Lachlan Hodges
2025-07-16  5:32 ` [wireless-next v2 4/4] wifi: mac80211: support returning the S1G short beacon skb Lachlan Hodges

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=625f49d3963b7b5c17ebbb3c201633befc16a8ad.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=arien.judge@morsemicro.com \
    --cc=lachlan.hodges@morsemicro.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.