From: Johannes Berg Date: Wed, 20 Feb 2013 11:54:44 +0000 (+0100) Subject: override default buffer size X-Git-Tag: v3.10~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9be893613e136a639fd4bcf67a9d6fc7acae60b;p=thirdparty%2Fiw.git override default buffer size With the TCP WoWLAN, larger messages may be needed. To simplify the code, always use larger messages. --- diff --git a/iw.c b/iw.c index 63f1a61..dc99566 100644 --- 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;