commit 7eb59602df4458472dbfcb03e71e30d23992997d
parent 916bde3a02621c018752cada83ebf4040fd1194d
Author: Denis Kenzior <denkenz@gmail.com>
Date: Mon, 24 Sep 2018 14:12:43 -0500
netdev: Drop redundant netdev_get_device checks
As a consequence of the previous commit, netdev watches are always
called when the device object is valid. As a result, we can drop the
netdev_get_device calls and checks from individual AP/AdHoc/Station/WSC
netdev watches
Diffstat:
4 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/src/adhoc.c b/src/adhoc.c
@@ -540,11 +540,6 @@ static void adhoc_remove_interface(struct netdev *netdev)
static void adhoc_netdev_watch(struct netdev *netdev,
enum netdev_watch_event event, void *userdata)
{
- struct device *device = netdev_get_device(netdev);
-
- if (!device)
- return;
-
switch (event) {
case NETDEV_WATCH_EVENT_UP:
case NETDEV_WATCH_EVENT_NEW:
diff --git a/src/ap.c b/src/ap.c
@@ -1452,11 +1452,6 @@ static void ap_remove_interface(struct netdev *netdev)
static void ap_netdev_watch(struct netdev *netdev,
enum netdev_watch_event event, void *userdata)
{
- struct device *device = netdev_get_device(netdev);
-
- if (!device)
- return;
-
switch (event) {
case NETDEV_WATCH_EVENT_UP:
case NETDEV_WATCH_EVENT_NEW:
diff --git a/src/station.c b/src/station.c
@@ -2322,11 +2322,6 @@ static void station_destroy_interface(void *user_data)
static void station_netdev_watch(struct netdev *netdev,
enum netdev_watch_event event, void *userdata)
{
- struct device *device = netdev_get_device(netdev);
-
- if (!device)
- return;
-
switch (event) {
case NETDEV_WATCH_EVENT_UP:
case NETDEV_WATCH_EVENT_NEW:
diff --git a/src/wsc.c b/src/wsc.c
@@ -1080,11 +1080,6 @@ static void wsc_remove_interface(struct netdev *netdev)
static void wsc_netdev_watch(struct netdev *netdev,
enum netdev_watch_event event, void *userdata)
{
- struct device *device = netdev_get_device(netdev);
-
- if (!device)
- return;
-
switch (event) {
case NETDEV_WATCH_EVENT_UP:
case NETDEV_WATCH_EVENT_NEW: