]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: don't set stupid socket buffer size
authorJohannes Berg <johannes.berg@intel.com>
Thu, 28 Aug 2025 13:06:33 +0000 (15:06 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Sep 2025 07:43:39 +0000 (09:43 +0200)
Setting the socket buffer size to 8KiB is completely stupid.
It seems I originally though it'd be smaller by default for
some reason, the real issue there was something else but we
never got rid of this setting. Remove it.

Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250828130632.1170501-2-johannes@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
iw.c

diff --git a/iw.c b/iw.c
index c99edb1292e750d7403722392cfe44bfa7ad75ca..6a4a9ad2c5fbd457cd663cbf4bb8e3eb88a06f7e 100644 (file)
--- a/iw.c
+++ b/iw.c
@@ -35,12 +35,6 @@ 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;
@@ -61,8 +55,6 @@ static int nl80211_init(struct nl80211_state *state)
                goto out_handle_destroy;
        }
 
-       nl_socket_set_buffer_size(state->nl_sock, 8192, 8192);
-
        /* try to set NETLINK_EXT_ACK to 1, ignoring errors */
        err = 1;
        setsockopt(nl_socket_get_fd(state->nl_sock), SOL_NETLINK,