diff options
author | Thomas Haller <thaller@redhat.com> | 2018-02-16 17:15:24 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-02-21 12:08:46 +0100 |
commit | 9071e8cc050cef531420534f470347d2d9616143 (patch) | |
tree | cf2b053da59dc75a982aebd1d8cd8220937371c1 | |
parent | 4da2a19a873d6cc51720d54c6f4183783ad4a56d (diff) |
wifi: drop unused netlink callback instance
-rw-r--r-- | src/platform/wifi/wifi-utils-nl80211.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/platform/wifi/wifi-utils-nl80211.c b/src/platform/wifi/wifi-utils-nl80211.c index 8624c607a4..d90e99c49a 100644 --- a/src/platform/wifi/wifi-utils-nl80211.c +++ b/src/platform/wifi/wifi-utils-nl80211.c @@ -143,7 +143,6 @@ out: typedef struct { WifiData parent; struct nl_sock *nl_sock; - struct nl_cb *nl_cb; guint32 *freqs; int id; int num_freqs; @@ -203,7 +202,6 @@ nl80211_alloc_msg (WifiDataNl80211 *nl80211, guint32 cmd, guint32 flags) /* NOTE: this function consumes 'msg' */ static int _nl80211_send_and_recv (struct nl_sock *nl_sock, - struct nl_cb *nl_cb, struct nl_msg *msg, int (*valid_handler) (struct nl_msg *, void *), void *valid_data) @@ -213,7 +211,7 @@ _nl80211_send_and_recv (struct nl_sock *nl_sock, g_return_val_if_fail (msg != NULL, -ENOMEM); - cb = nl_cb_clone (nl_cb); + cb = nl_cb_alloc (NL_CB_DEFAULT); if (!cb) { err = -ENOMEM; goto out; @@ -265,7 +263,7 @@ nl80211_send_and_recv (WifiDataNl80211 *nl80211, int (*valid_handler) (struct nl_msg *, void *), void *valid_data) { - return _nl80211_send_and_recv (nl80211->nl_sock, nl80211->nl_cb, msg, + return _nl80211_send_and_recv (nl80211->nl_sock, msg, valid_handler, valid_data); } @@ -276,8 +274,6 @@ wifi_nl80211_deinit (WifiData *parent) if (nl80211->nl_sock) nl_socket_free (nl80211->nl_sock); - if (nl80211->nl_cb) - nl_cb_put (nl80211->nl_cb); g_free (nl80211->freqs); } @@ -991,10 +987,6 @@ wifi_nl80211_init (int ifindex) if (nl80211->id < 0) goto error; - nl80211->nl_cb = nl_cb_alloc (NL_CB_DEFAULT); - if (nl80211->nl_cb == NULL) - goto error; - nl80211->phy = -1; msg = nl80211_alloc_msg (nl80211, NL80211_CMD_GET_WIPHY, 0); |