From: James Prestwood <prestwoj at gmail.com>
To: iwd at lists.01.org
Subject: [PATCH 2/5] dpp: don't allow StartEnrollee while connected
Date: Fri, 07 Jan 2022 14:31:09 -0800 [thread overview]
Message-ID: <20220107223112.715855-2-prestwoj@gmail.com> (raw)
In-Reply-To: 20220107223112.715855-1-prestwoj@gmail.com
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
While connected the driver ends up choosing quite small ROC
durations leading to excessive calls to ROC. This also will
negatively effect any wireless performance for the current
network and possibly lead to missed DPP frames.
---
src/dpp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/dpp.c b/src/dpp.c
index 61c6b36d..5d52e007 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -1638,10 +1638,16 @@ static struct l_dbus_message *dpp_dbus_start_enrollee(struct l_dbus *dbus,
struct dpp_sm *dpp = user_data;
uint32_t freq = band_channel_to_freq(6, BAND_FREQ_2_4_GHZ);
struct l_dbus_message *reply;
+ struct station *station = station_find(netdev_get_ifindex(dpp->netdev));
if (dpp->state != DPP_STATE_NOTHING)
return dbus_error_busy(message);
+ if (!station || station_get_connected_network(station)) {
+ l_warn("cannot be enrollee while connected, please disconnect");
+ return dbus_error_busy(message);
+ }
+
dpp->uri = dpp_generate_uri(dpp->pub_asn1, dpp->pub_asn1_len, 2,
netdev_get_address(dpp->netdev), &freq,
1, NULL, NULL);
--
2.31.1
reply other threads:[~2022-01-07 22:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220107223112.715855-2-prestwoj@gmail.com \
--to=iwd@lists.linux.dev \
/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