]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix tx_control_port error print
authorJouni Malinen <j@w1.fi>
Sun, 8 Mar 2020 14:38:57 +0000 (16:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 8 Mar 2020 14:38:57 +0000 (16:38 +0200)
send_and_recv_msgs() returns a negative number as the error code and
that needs to be negated for strerror().

Fixes: 8759e9116aa6 ("nl80211: Control port over nl80211 helpers")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c

index 93aa5d702cac51a84565ec5aba8b367f826c21ee..254a47a7ff89a0b3a600c8b68984c53876d7a888 100644 (file)
@@ -5219,7 +5219,7 @@ static int nl80211_tx_control_port(void *priv, const u8 *dest,
        if (ret)
                wpa_printf(MSG_DEBUG,
                           "nl80211: tx_control_port failed: ret=%d (%s)",
-                          ret, strerror(ret));
+                          ret, strerror(-ret));
 
        return ret;
 }