]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
override default buffer size
authorJohannes Berg <johannes.berg@intel.com>
Wed, 20 Feb 2013 11:54:44 +0000 (12:54 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 20 Feb 2013 11:54:44 +0000 (12:54 +0100)
With the TCP WoWLAN, larger messages may be needed.
To simplify the code, always use larger messages.

iw.c

diff --git a/iw.c b/iw.c
index 63f1a610d0baab074950134c5ae0141efac4cf06..dc99566653cadbd2c3f98b78b0b13b93e97510f0 100644 (file)
--- a/iw.c
+++ b/iw.c
@@ -34,6 +34,12 @@ static inline void nl_socket_free(struct nl_sock *h)
 {
        nl_handle_destroy(h);
 }
+
+static inline int nl_socket_set_buffer_size(struct nl_sock *sk,
+                                           int rxbuf, int txbuf)
+{
+       return nl_set_buffer_size(sk, rxbuf, txbuf);
+}
 #endif /* CONFIG_LIBNL20 && CONFIG_LIBNL30 */
 
 int iw_debug = 0;
@@ -48,6 +54,8 @@ static int nl80211_init(struct nl80211_state *state)
                return -ENOMEM;
        }
 
+       nl_socket_set_buffer_size(state->nl_sock, 8192, 8192);
+
        if (genl_connect(state->nl_sock)) {
                fprintf(stderr, "Failed to connect to generic netlink.\n");
                err = -ENOLINK;