3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-23 07:29:28 +01:00

station: Make station_create/station_free static

These two functions don't need to be used from outside of station.c
anymore so make them static and simplify the station_create arguments
slightly.
This commit is contained in:
Andrew Zaborowski 2018-09-22 18:48:26 +02:00 committed by Denis Kenzior
parent 567baed2c4
commit c96f44b2e6
2 changed files with 4 additions and 6 deletions

View File

@ -2214,7 +2214,7 @@ struct station *station_find(uint32_t ifindex)
return NULL; return NULL;
} }
struct station *station_create(struct wiphy *wiphy, struct netdev *netdev) static struct station *station_create(struct netdev *netdev)
{ {
struct station *station; struct station *station;
struct l_dbus *dbus = dbus_get_bus(); struct l_dbus *dbus = dbus_get_bus();
@ -2229,7 +2229,7 @@ struct station *station_create(struct wiphy *wiphy, struct netdev *netdev)
(l_hashmap_compare_func_t) strcmp); (l_hashmap_compare_func_t) strcmp);
station->networks_sorted = l_queue_new(); station->networks_sorted = l_queue_new();
station->wiphy = wiphy; station->wiphy = netdev_get_wiphy(netdev);
station->netdev = netdev; station->netdev = netdev;
l_queue_push_head(station_list, station); l_queue_push_head(station_list, station);
@ -2242,7 +2242,7 @@ struct station *station_create(struct wiphy *wiphy, struct netdev *netdev)
return station; return station;
} }
void station_free(struct station *station) static void station_free(struct station *station)
{ {
l_debug(""); l_debug("");
@ -2332,7 +2332,7 @@ static void station_netdev_watch(struct netdev *netdev,
case NETDEV_WATCH_EVENT_NEW: case NETDEV_WATCH_EVENT_NEW:
if (netdev_get_iftype(netdev) == NETDEV_IFTYPE_STATION && if (netdev_get_iftype(netdev) == NETDEV_IFTYPE_STATION &&
netdev_get_is_up(netdev)) netdev_get_is_up(netdev))
station_create(netdev_get_wiphy(netdev), netdev); station_create(netdev);
break; break;
case NETDEV_WATCH_EVENT_DOWN: case NETDEV_WATCH_EVENT_DOWN:
case NETDEV_WATCH_EVENT_DEL: case NETDEV_WATCH_EVENT_DEL:

View File

@ -75,5 +75,3 @@ int station_disconnect(struct station *station);
struct station *station_find(uint32_t ifindex); struct station *station_find(uint32_t ifindex);
void station_foreach(station_foreach_func_t func, void *user_data); void station_foreach(station_foreach_func_t func, void *user_data);
struct station *station_create(struct wiphy *wiphy, struct netdev *netdev);
void station_free(struct station *station);