Skip to contentSkip to conversation

offchannel: introduce new offchannel module

PATCH Superseded James Prestwood 2 participants 3 messages Nov 29, 2021 – Nov 30, 2021 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/1 offchannel: introduce new offchannel module

---
 Makefile.am      |   1 +
 src/offchannel.c | 338 +++++++++++++++++++++++++++++++++++++++++++++++
 src/offchannel.h |  29 ++++
 3 files changed, 368 insertions(+)
 create mode 100644 src/offchannel.c
 create mode 100644 src/offchannel.h
Makefile.am +1 -0
index 275dd1b9..5c5db879 100644
@@ -247,6 +247,7 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h src/missing.h \
 					src/ip-pool.h src/ip-pool.c \
 					src/band.h src/band.c \
 					src/sysfs.h src/sysfs.c \
+					src/offchannel.h src/offchannel.c \
 					$(eap_sources) \
 					$(builtin_sources)
 
src/offchannel.c new file +338 -0

338 lines not on this page · raw message

src/offchannel.h new file +29 -0
new file mode 100644
index 00000000..1ffa94f1
@@ -0,0 +1,29 @@
+/*
+ *
+ *  Wireless daemon for Linux
+ *
+ *  Copyright (C) 2021  Intel Corporation. All rights reserved.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2.1 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+typedef void (*offchannel_started_cb_t)(void *user_data);
+typedef void (*offchannel_destroy_cb_t)(int error, void *user_data);
+
+uint32_t offchannel_start(uint64_t wdev_id, uint32_t freq, uint32_t duration,
+			offchannel_started_cb_t started, void *user_data,
+			offchannel_destroy_cb_t destroy);
+void offchannel_cancel(uint64_t wdev_id, uint32_t id);
Signature · 1 line
2.31.1
#1 lore raw

Dear James,

Am 30.11.21 um 00:16 schrieb James Prestwood:

Quoted 7 lines
---
  Makefile.am      |   1 +
  src/offchannel.c | 338 +++++++++++++++++++++++++++++++++++++++++++++++
  src/offchannel.h |  29 ++++
  3 files changed, 368 insertions(+)

create mode 100644 src/offchannel.c
create mode 100644 src/offchannel.h

[…]

Excuse my ignorance, but what does the module do? Is there some documentation?

Kind regard,

Paul

author
#2 lore raw

Hi Paul,

Quoted 13 lines · Paul Menzel

Dear James,

Am 30.11.21 um 00:16 schrieb James Prestwood:

Quoted 8 lines

---
  Makefile.am      |   1 +
  src/offchannel.c | 338
+++++++++++++++++++++++++++++++++++++++++++++++
  src/offchannel.h |  29 ++++

  3 files changed, 368 insertions(+)

  create mode 100644 src/offchannel.c
  create mode 100644 src/offchannel.h

Quoted 4 lines

[…]

Excuse my ignorance, but what does the module do? Is there some documentation?

Its basically a wrapper around NL80211_CMD_[CANCEL_]REMAIN_ON_CHANNEL. i.e. telling the driver to go onto a frequency/channel for some duration.

No docs since its not something part of a public API, but as far as the two APIs they are very simple. Go offchannel for some duration, and a way to cancel it.

I can put some details in the commit description for next versions.

Thanks,
James

Quoted 5 lines

Kind regard,

Paul