offchannel: introduce new offchannel module
James Prestwood
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
@@ -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
@@ -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
Paul Menzel
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 100644src/offchannel.h
[…]
Excuse my ignorance, but what does the module do? Is there some documentation?
Kind regard,
Paul
James Prestwood
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 100644src/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