public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: RE: [PATCH 2/2] wifi: mac80211: improve station iteration ergonomics
Date: Wed, 11 Feb 2026 06:49:19 +0000	[thread overview]
Message-ID: <fb7526f0a2e64e229446e3faa03edc3a@realtek.com> (raw)
In-Reply-To: <20260108143431.d2b641f6f6af.I4470024f7404446052564b15bcf8b3f1ada33655@changeid>

Hi Johannes,

> +/**
> + * for_each_station - iterate stations under wiphy mutex
> + * @sta: the iterator variable
> + * @hw: the HW to iterate for
> + */
> +#define for_each_station(sta, hw)                                      \
> +       for (sta = __ieee80211_iterate_stations(hw, NULL);              \
> +            sta;                                                       \
> +            sta = __ieee80211_iterate_stations(hw, sta))
> +

I'm going to use for_each_station() in rtw89 driver, and the code in driver side
looks very simple! Thanks for this new API.

However, without other callers rather than ieee80211_iterate_xxx(), I'd like
to know if it is expected that driver uses for_each_station()? Since help
text is added, I think it can be, right?

Another question is that adding ieee80211_ prefix would be consistent with
other API? If you agree, I can make patches.

As well as for_each_interface().

Ping-Ke


  reply	other threads:[~2026-02-11  6:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 13:34 [PATCH 1/2] wifi: mac80211: improve interface iteration ergonomics Johannes Berg
2026-01-08 13:34 ` [PATCH 2/2] wifi: mac80211: improve station " Johannes Berg
2026-02-11  6:49   ` Ping-Ke Shih [this message]
2026-02-11  7:54     ` Johannes Berg
2026-02-11  8:08       ` Ping-Ke Shih

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=fb7526f0a2e64e229446e3faa03edc3a@realtek.com \
    --to=pkshih@realtek.com \
    --cc=johannes.berg@intel.com \
    --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