3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-01-03 19:02:34 +01:00

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
This commit is contained in:
Denis Kenzior 2018-09-24 14:12:43 -05:00
parent 916bde3a02
commit 7eb59602df
4 changed files with 0 additions and 20 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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: