From: Jouni Malinen <j@w1.fi>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: hostap@lists.infradead.org, linux-wireless@vger.kernel.org,
nbd@nbd.name, ryder.lee@mediatek.com, evelyn.tsai@mediatek.com,
lorenzo.bianconi@redhat.com
Subject: Re: [PATCH 6/9] DFS: introduce hostapd_dfs_request_channel_switch routine
Date: Fri, 4 Mar 2022 00:54:39 +0200 [thread overview]
Message-ID: <20220303225439.GD33342@w1.fi> (raw)
In-Reply-To: <c1bf7dc195281330e7108c533da5770adf479d84.1640014128.git.lorenzo@kernel.org>
On Mon, Dec 20, 2021 at 04:48:21PM +0100, Lorenzo Bianconi wrote:
> This is a preliminary patch to add Channel Switch Announcement for
> background radar detection.
> diff --git a/src/ap/dfs.c b/src/ap/dfs.c
> @@ -940,6 +940,85 @@ int hostapd_is_dfs_chan_available(struct hostapd_iface *iface)
>
> +static int hostapd_dfs_request_channel_switch(struct hostapd_iface *iface,
> + struct hostapd_hw_modes *cmode = iface->current_mode;
> + int ieee80211_mode = IEEE80211_MODE_AP, err, i;
That i needs to be unsigned int (like it was in the function from which
it was moved to here) to avoid a compiler warning.
> + u8 new_vht_oper_chwidth;
> + new_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
> + hostapd_set_oper_chwidth(iface->conf,
> + hostapd_get_oper_chwidth(iface->conf));
This looks quite strange.. hostapd_dfs_start_channel_switch() used
current_vht_oper_chwidth to store the current value from beginning of
the function and restored it at this location. The new version in this
helper function seems to something strange, or well, nothing. That does
not feel correct.
> static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
> {
> - unsigned int i;
That's where i was unsigned..
> - u8 current_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
And that's where the current value is picked at the beginning of
hostapd_dfs_start_channel_switch().
> - new_vht_oper_chwidth = hostapd_get_oper_chwidth(iface->conf);
> - hostapd_set_oper_chwidth(iface->conf, current_vht_oper_chwidth);
And this looks quite different compared to what was in the new helper
function.
--
Jouni Malinen PGP id EFC895FA
next prev parent reply other threads:[~2022-03-03 22:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 15:48 [PATCH 0/9] introduce background radar detection support Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 1/9] Sync include/uapi/linux/nl80211.h with mac80211-next.git Lorenzo Bianconi
2022-03-03 21:58 ` Jouni Malinen
2021-12-20 15:48 ` [PATCH 2/9] DFS: introduce dfs_set_valid_channel utility routine Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 3/9] DFS: add capability select radar-only channels Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 4/9] nl80211: report background radar/cac detection capability Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 5/9] DFS: configure background radar/cac detection Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 6/9] DFS: introduce hostapd_dfs_request_channel_switch routine Lorenzo Bianconi
2022-03-03 22:54 ` Jouni Malinen [this message]
2022-03-04 11:52 ` Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 7/9] DFS: enable CSA for background radar detection Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 8/9] DFS: switch to background radar channel if available Lorenzo Bianconi
2022-03-03 22:20 ` Jouni Malinen
2022-03-04 13:46 ` Lorenzo Bianconi
2021-12-20 15:48 ` [PATCH 9/9] DFS: introduce radar_background parameter to config file Lorenzo Bianconi
2022-03-03 21:56 ` Jouni Malinen
2022-03-04 11:08 ` Lorenzo Bianconi
2022-03-03 23:19 ` [PATCH 0/9] introduce background radar detection support Jouni Malinen
2022-03-04 9:48 ` Lorenzo Bianconi
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=20220303225439.GD33342@w1.fi \
--to=j@w1.fi \
--cc=evelyn.tsai@mediatek.com \
--cc=hostap@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.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).