mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
dbus: Use the new /net/connman/iwd root path
This commit is contained in:
parent
ab5a1d5d7d
commit
ccc114fa5f
@ -36,7 +36,8 @@
|
|||||||
#define IWD_ADHOC_INTERFACE "net.connman.iwd.AdHoc"
|
#define IWD_ADHOC_INTERFACE "net.connman.iwd.AdHoc"
|
||||||
#define IWD_STATION_INTERFACE "net.connman.iwd.Station"
|
#define IWD_STATION_INTERFACE "net.connman.iwd.Station"
|
||||||
|
|
||||||
#define IWD_AGENT_MANAGER_PATH "/"
|
#define IWD_BASE_PATH "/net/connman/iwd"
|
||||||
|
#define IWD_AGENT_MANAGER_PATH IWD_BASE_PATH
|
||||||
|
|
||||||
struct l_dbus;
|
struct l_dbus;
|
||||||
|
|
||||||
|
@ -77,7 +77,8 @@ static const char *known_network_get_path(const struct network_info *network)
|
|||||||
static char path[256];
|
static char path[256];
|
||||||
unsigned int pos = 0, i;
|
unsigned int pos = 0, i;
|
||||||
|
|
||||||
path[pos++] = '/';
|
L_WARN_ON((pos = snprintf(path, sizeof(path), "%s/",
|
||||||
|
IWD_BASE_PATH)) >= (int) sizeof(path));
|
||||||
|
|
||||||
for (i = 0; network->ssid[i] && pos < sizeof(path); i++)
|
for (i = 0; network->ssid[i] && pos < sizeof(path); i++)
|
||||||
pos += snprintf(path + pos, sizeof(path) - pos, "%02x",
|
pos += snprintf(path + pos, sizeof(path) - pos, "%02x",
|
||||||
@ -85,6 +86,7 @@ static const char *known_network_get_path(const struct network_info *network)
|
|||||||
|
|
||||||
snprintf(path + pos, sizeof(path) - pos, "_%s",
|
snprintf(path + pos, sizeof(path) - pos, "_%s",
|
||||||
security_to_str(network->type));
|
security_to_str(network->type));
|
||||||
|
path[sizeof(path) - 1] = '\0';
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
@ -310,10 +310,13 @@ struct device *netdev_get_device(struct netdev *netdev)
|
|||||||
|
|
||||||
const char *netdev_get_path(struct netdev *netdev)
|
const char *netdev_get_path(struct netdev *netdev)
|
||||||
{
|
{
|
||||||
static char path[26];
|
static char path[256];
|
||||||
|
|
||||||
|
L_WARN_ON(snprintf(path, sizeof(path), "%s/%u",
|
||||||
|
wiphy_get_path(netdev->wiphy),
|
||||||
|
netdev->index) >= (int) sizeof(path));
|
||||||
|
path[sizeof(path) - 1] = '\0';
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "%s/%u", wiphy_get_path(netdev->wiphy),
|
|
||||||
netdev->index);
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,9 +267,12 @@ check_blacklist:
|
|||||||
|
|
||||||
const char *wiphy_get_path(struct wiphy *wiphy)
|
const char *wiphy_get_path(struct wiphy *wiphy)
|
||||||
{
|
{
|
||||||
static char path[15];
|
static char path[256];
|
||||||
|
|
||||||
|
L_WARN_ON(snprintf(path, sizeof(path), "%s/%d", IWD_BASE_PATH,
|
||||||
|
wiphy->id) >= (int) sizeof(path));
|
||||||
|
path[sizeof(path) - 1] = '\0';
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "/%d", wiphy->id);
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user