mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:12:48 +01:00
ap: set link/operstate on AP start/stop
Prior to this netdev_connect_ok set setting this which really only applies to station mode. In addition this happens for each new station that connects to the AP. Instead set the operstate / link mode when AP starts and stops.
This commit is contained in:
parent
e0ffd94832
commit
06aa84ccaf
11
src/ap.c
11
src/ap.c
@ -28,6 +28,7 @@
|
|||||||
#include <linux/if_ether.h>
|
#include <linux/if_ether.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
#include <linux/if.h>
|
||||||
|
|
||||||
#include <ell/ell.h>
|
#include <ell/ell.h>
|
||||||
|
|
||||||
@ -3174,6 +3175,11 @@ static void ap_if_event_func(enum ap_event_type type, const void *event_data,
|
|||||||
l_dbus_property_changed(dbus_get_bus(),
|
l_dbus_property_changed(dbus_get_bus(),
|
||||||
netdev_get_path(ap_if->netdev),
|
netdev_get_path(ap_if->netdev),
|
||||||
IWD_AP_INTERFACE, "Name");
|
IWD_AP_INTERFACE, "Name");
|
||||||
|
|
||||||
|
l_rtnl_set_linkmode_and_operstate(rtnl,
|
||||||
|
netdev_get_ifindex(ap_if->netdev),
|
||||||
|
IF_LINK_MODE_DEFAULT, IF_OPER_UP,
|
||||||
|
NULL, NULL, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AP_EVENT_STOPPING:
|
case AP_EVENT_STOPPING:
|
||||||
@ -3188,6 +3194,11 @@ static void ap_if_event_func(enum ap_event_type type, const void *event_data,
|
|||||||
netdev_get_path(ap_if->netdev),
|
netdev_get_path(ap_if->netdev),
|
||||||
IWD_AP_INTERFACE, "Name");
|
IWD_AP_INTERFACE, "Name");
|
||||||
|
|
||||||
|
l_rtnl_set_linkmode_and_operstate(rtnl,
|
||||||
|
netdev_get_ifindex(ap_if->netdev),
|
||||||
|
IF_LINK_MODE_DORMANT, IF_OPER_DOWN,
|
||||||
|
NULL, NULL, NULL);
|
||||||
|
|
||||||
if (!ap_if->pending)
|
if (!ap_if->pending)
|
||||||
ap_if->ap = NULL;
|
ap_if->ap = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user