mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-01-28 01:47:18 +01:00
T#10174: WiFi: Add a vendor extension to expose multi_ap
This commit is contained in:
parent
183330e9d0
commit
61f1c14076
3 changed files with 66 additions and 0 deletions
2
dmtree/vendor/iopsys/tr181/vendor.c
vendored
2
dmtree/vendor/iopsys/tr181/vendor.c
vendored
|
|
@ -15,6 +15,7 @@
|
|||
#include "ethernet.h"
|
||||
#include "ip.h"
|
||||
#include "times.h"
|
||||
#include "wifi.h"
|
||||
#include "../tr104/servicesvoiceservicecallcontrol.h"
|
||||
#include "../tr104/servicesvoiceservicecalllog.h"
|
||||
#include "../tr104/servicesvoiceservicedect.h"
|
||||
|
|
@ -32,5 +33,6 @@ DM_MAP_OBJ tVendorExtensionIOPSYS[] = {
|
|||
{"Device.Services.VoiceService.{i}.CallLog.{i}.Session.{i}.Destination.RTP.", NULL, tIOPSYS_VoiceServiceCallLogSessionDestinationRTPParams},
|
||||
{"Device.Services.VoiceService.{i}.DECT.Portable.{i}.", NULL, tIOPSYS_VoiceServiceDECTPortableParams},
|
||||
{"Device.Services.VoiceService.{i}.CallControl.Extension.{i}.", NULL, tIOPSYS_VoiceServiceCallControlExtensionParams},
|
||||
{"Device.WiFi.AccessPoint.{i}.", NULL, tIOPSYS_WiFiAccessPointParams},
|
||||
{0}
|
||||
};
|
||||
|
|
|
|||
45
dmtree/vendor/iopsys/tr181/wifi.c
vendored
Normal file
45
dmtree/vendor/iopsys/tr181/wifi.c
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (C) 2023 iopsys Software Solutions AB
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 2.1
|
||||
* as published by the Free Software Foundation
|
||||
*
|
||||
* Author Amin Ben Romdhane <amin.benromdhane@iopsys.eu>
|
||||
*
|
||||
*/
|
||||
|
||||
#include "wifi.h"
|
||||
|
||||
struct wifi_acp_args
|
||||
{
|
||||
struct dmmap_dup *sections;
|
||||
char *ifname;
|
||||
};
|
||||
|
||||
static int get_multi_ap_mode(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
char *multi_ap = NULL;
|
||||
|
||||
dmuci_get_value_by_section_string((((struct wifi_acp_args *)data)->sections)->config_section, "multi_ap", &multi_ap);
|
||||
|
||||
if (DM_STRCMP(multi_ap, "1") == 0)
|
||||
*value = "Backhaul";
|
||||
else if (DM_STRCMP(multi_ap, "2") == 0)
|
||||
*value = "Fronthaul";
|
||||
else if (DM_STRCMP(multi_ap, "3") == 0)
|
||||
*value = "Combined";
|
||||
else
|
||||
*value = "None";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************************
|
||||
* OBJ & PARAM DEFINITION
|
||||
***********************************************************************************************************************************/
|
||||
DMLEAF tIOPSYS_WiFiAccessPointParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{BBF_VENDOR_PREFIX"MultiAPMode", &DMREAD, DMT_STRING, get_multi_ap_mode, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
19
dmtree/vendor/iopsys/tr181/wifi.h
vendored
Normal file
19
dmtree/vendor/iopsys/tr181/wifi.h
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2023 iopsys Software Solutions AB
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 2.1
|
||||
* as published by the Free Software Foundation
|
||||
*
|
||||
* Author Amin Ben Romdhane <amin.benromdhane@iopsys.eu>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __IOPSYS_WIFI_H
|
||||
#define __IOPSYS_WIFI_H
|
||||
|
||||
#include "libbbf_api/dmcommon.h"
|
||||
|
||||
extern DMLEAF tIOPSYS_WiFiAccessPointParams[];
|
||||
|
||||
#endif //__IOPSYS_WIFI_H
|
||||
Loading…
Add table
Reference in a new issue