From: Jouni Malinen Date: Sun, 8 Mar 2020 14:38:57 +0000 (+0200) Subject: nl80211: Fix tx_control_port error print X-Git-Tag: hostap_2_10~1647 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17ba51b14dc19c0e1ec86888ff6a010479c25fdf;p=thirdparty%2Fhostap.git nl80211: Fix tx_control_port error print 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 --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 93aa5d702..254a47a7f 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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; }