From patchwork Mon Apr 15 19:29:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13630498 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01DBFB656 for ; Mon, 15 Apr 2024 19:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209394; cv=none; b=YmZUwWTKx3q9Ku042FUZUrbq6fmtn0IHQ2RZNEKfFwMwId7enOoen9X5J+By57nL8wbdjCjibowRXG/81xmScsHqRBZ5dbFykQEcejXcoxOJ04uPczCZHZY1XFNLYyPuCLAKuSp8w/LCDxF4ElohxjrTBAqlF7AU9P0HrT233y8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209394; c=relaxed/simple; bh=/6+gEvNcTE7SbxKKsTVvfWqKZSR8OlnWEFQeuvx1/oE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=eQb0DslhO1knHplLACVPHL65o71vUygmxB80Wtojih97vFiXOM4Q18rD83KsgjpVUcgV5iF5pdMY/Vkoam2htHXXiHmuQbMFwSfLfy5z4vizdm+/nmmyHeR8GGB0dCZbFLBaqB8o/msD3bZxmagC3/dyUiKjuQXCtidl42XCWGg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Cz1lHdlZ; arc=none smtp.client-ip=209.85.222.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Cz1lHdlZ" Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-78edc0f9636so160045385a.2 for ; Mon, 15 Apr 2024 12:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713209392; x=1713814192; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nt9JLXtm+7jau8EIXdcris+h8YoBcqJmy42aFkfDLu4=; b=Cz1lHdlZwPDEvmi9ij2UMqr+iBn0fUmOwTq+a5eZn5tBxUi/0BArsve5wq1W8vn7sH g3qQ2wuT0NacBzTvjrHkhuwNmazUpLEXbuvUwffp3saJ8KTsp0TBeVMGVBi53Q18jNWC p5RqssV4E0ufzgpzbYf6lLBXM1e9Qn1W/xbfDsYVS/8BTRoxPMNLGhQbolwk822lsREb dyndDa2a8j9dECzqKJaUmJhWQZlWnmCzhBZQNG1zZSnO5Ji2XdGzf7wXZPUW+omE1Rme 6w+0ZFPM4qUdP0srLS5x0gsIntKhCkv+/DzYDi9wAjXBwHoOhW6Tdf7MSf/s5catlQ9r GUWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209392; x=1713814192; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nt9JLXtm+7jau8EIXdcris+h8YoBcqJmy42aFkfDLu4=; b=bfSD1rTdFxkpYLEbU7eHIpZ4ZVV+J0TW9PRtYbqRel2VWABE+i+u5TPFeeIm01zIXn TiFbk3X6noYatrQ/L3C9bUAiEFGevblrIP77f5WfkwHtVLxGhHvyL79Walch+zwwl2YR wwKXZPI5NM6m8xxf7KxVHu9DXmMX0tDITzHJq7ZW+E9U6R8/uqVdy8GE9MF+IU4k5L5p jYSVb731K8NNHp+dSeI+9gvj8li4s2h/jbQw8fMySmrp9q8YAz1EvTJGg8BrHjIGLkDD W0hv3MBvcpa7zRUSPRaGxxkMxWG7OQAW4gjOHzJ43cNhRcaXu4/xh5OAzwm+NUktb7yT ckww== X-Gm-Message-State: AOJu0Yw//6fNbt+Iqr5jlXRuTlKxv8I8XoFQ1XoTEMM/jIt1EshmV3/x vFh7UnSqfhsVaTP6OU6M5+VOX/BmSdvy1+BSxVkg5UCPjPWsWgsU3slC3A== X-Google-Smtp-Source: AGHT+IHK1FhL1aejfe2M9c40BM8jEg3LKy87En0svgJ0f7RHVxRVMaTfrbfN/vqDXlgU1cBhT+qpuQ== X-Received: by 2002:a05:620a:45a4:b0:78e:a3d3:eec1 with SMTP id bp36-20020a05620a45a400b0078ea3d3eec1mr14597127qkb.47.1713209391738; Mon, 15 Apr 2024 12:29:51 -0700 (PDT) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id wx8-20020a05620a5a4800b0078ecd71114dsm5003499qkn.69.2024.04.15.12.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:29:51 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 1/4] wiphy: include MAC of BSS with invalid HE capabilities Date: Mon, 15 Apr 2024 12:29:45 -0700 Message-Id: <20240415192948.65857-1-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The prior print was not very descriptive, and now will log the MAC of the offending BSS. --- src/wiphy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wiphy.c b/src/wiphy.c index 712d20cf..8f5e46bf 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -1039,7 +1039,8 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy, break; case IE_TYPE_HE_CAPABILITIES: if (!ie_validate_he_capabilities(iter.data, iter.len)) { - l_warn("invalid HE capabilities"); + l_warn("invalid HE capabilities for "MAC, + MAC_STR(bss->addr)); continue; } From patchwork Mon Apr 15 19:29:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13630499 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37A25155A27 for ; Mon, 15 Apr 2024 19:29:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209395; cv=none; b=K3vBIhputTJhx7yY7XLcWU8VFdQYbH04hH7FZGxhRNY81ybyOozGgN74nnqJj0bGIy4pRF2oG5NWj2TFMHzSuNjqPrb/e4JzVMeJDFh4TkGKMJkMp4pJ6DipvTRdHZzLG2Vrhg5uLMAtw+o0PIDJSkUYYdaKgMsm9wdTIqsdaFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209395; c=relaxed/simple; bh=JYUd1YnwzQR5fAxaQrB+vFPKMGMlev6sSku8tQpQPmw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dZjow1NYcq6DioiTmvLwPUzOxeyNk7kUHRlZIr4D3SMh8CMNIUk5Qo3G+VcU+hk4PbaKcq2MYjdQol6cuZlLijhAOXed8iVE7xT/1VvZjsLoV3cusaj8y2YDbHQDZtdG0mklTd4ajWqwK+OZrERXJNmV2y0Cw30W+wVhcx40a8w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Gs5Be+In; arc=none smtp.client-ip=209.85.222.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gs5Be+In" Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-78d54a3e462so262837885a.0 for ; Mon, 15 Apr 2024 12:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713209393; x=1713814193; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AE/16RdkwukYb4JDJ7+P5wfWqu1kgtUy20qtG5TQS/4=; b=Gs5Be+In7surjZAsmVE1O4S9+M9hfa16rKYzauhiUu5uU91ea9TopJfk8xlGIMGRv0 YdVH2KzIHXK8MhJWUj2LyOE08vHWlrUsGqUt8stdXMv+ToqgT282+jsUp1kXIHtGKW+J X1NmesFCMCBHh1q4r+bnFbH/RNY5tr85SGLUh45eL+d4gft01u+mnqQ+JxkSoI7i4Z7f 96S2bEd+TYe+53lU6wbGhL0JSasbc0U7znW6NH1Emx9u3xttEkmSK9716EzaLGuIIXj3 tgR2WU9q1PJwnxb1CaXUMFGKQnaR/OoglabzgqNCcf7t10Qpqh38TcEfgeGli6zPxZ3m nkIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209393; x=1713814193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AE/16RdkwukYb4JDJ7+P5wfWqu1kgtUy20qtG5TQS/4=; b=e8EQYmtj3nX9iaU84peNZ+xRr1uUmRdN+5N/TQw1vBrJSxQ3pXRMQ5h5SvyDZT6Svp glqq322UD92wcWufy9VHQIJ611DJW6KHKMVaKxfNqDaAjr3V3e+C9H85GO3HlLFc5bCb nRtjNCjUvQvlgTz6HFoavI3c1ZifoqjqqR2PtV3DYNTDCCzm6jyFQZ/LSuoaZKhAtn0B bI02gAudAT0aX47pfMHeFf0M18+EUv8HQrSiM0TBFgFKXmw4HifWpXPcCI3H/pElsO5n 81JsiQ05j4HyZLuwfWgLDK/nzkiUVQsTEpDke1qdLuu+K5bVAHiJoOzXZvt8r0glHE7A FGtQ== X-Gm-Message-State: AOJu0YzIDXGW8vojuqiDJ6subJEsyqjTybmeefL4YZsjeyfBAJtuLGNR FUFpKaTys4IqJUeUSqRCDh2JFnzKNhJ4CFagCOosB+RDOjYOuRDIZ52Uxw== X-Google-Smtp-Source: AGHT+IEryFjzgf+3xao6oLWel26TVacBaZHOjgntI6rvNTOc1HHDt29zWrd6DpI5Y9i2be4mFtZaNQ== X-Received: by 2002:a05:620a:3d1:b0:78d:69d6:43ca with SMTP id r17-20020a05620a03d100b0078d69d643camr11889447qkm.25.1713209392845; Mon, 15 Apr 2024 12:29:52 -0700 (PDT) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id wx8-20020a05620a5a4800b0078ecd71114dsm5003499qkn.69.2024.04.15.12.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:29:52 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 2/4] wiphy: handle -ENETUNREACH for rate estimation Date: Mon, 15 Apr 2024 12:29:46 -0700 Message-Id: <20240415192948.65857-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240415192948.65857-1-prestwoj@gmail.com> References: <20240415192948.65857-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 If the RSSI is too low or the local capabilities were not compatible to estimate the rate don't warn but instead treat this the same as -ENOTSUP and drop down to the next capability set. --- src/wiphy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) v2: * Check for -ENETUNREACH diff --git a/src/wiphy.c b/src/wiphy.c index 8f5e46bf..fb36ebb2 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -1056,7 +1056,7 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy, out_data_rate); if (!ret) return 0; - else if (ret != -ENOTSUP) + else if (ret != -ENOTSUP && ret != -ENETUNREACH) l_warn("error parsing HE capabilities"); ret = band_estimate_vht_rx_rate(bandp, vht_capabilities, vht_operation, @@ -1065,7 +1065,7 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy, out_data_rate); if (!ret) return 0; - else if (ret != -ENOTSUP) + else if (ret != -ENOTSUP && ret != -ENETUNREACH) l_warn("error parsing VHT capabilities"); ret = band_estimate_ht_rx_rate(bandp, ht_capabilities, ht_operation, @@ -1073,14 +1073,14 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy, out_data_rate); if (!ret) return 0; - else if (ret != -ENOTSUP) + else if (ret != -ENOTSUP && ret != -ENETUNREACH) l_warn("error parsing HT capabilities"); ret = band_estimate_nonht_rate(bandp, supported_rates, ext_supported_rates, bss->signal_strength / 100, out_data_rate); - if (ret != 0 && ret != -ENOTSUP) + if (ret != 0 && ret != -ENOTSUP && ret != -ENETUNREACH) l_warn("error parsing non-HT rates"); return ret; From patchwork Mon Apr 15 19:29:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13630500 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 301C0B656 for ; Mon, 15 Apr 2024 19:29:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209396; cv=none; b=lm+P0jePuh5eL7OcqKMeZTb36Irt+JL124ceLkQAsFVESqs79JdaRNKAAuZdKoPACYqlFqonx9NdBEewiyJE2+gRQUYmdbpRwK2FOCVLcGjMH+EXzKhxX4Vgn/oVA1pEowjzFfSHAe+XDL8r0gGSmO053Xsa35AJPeC7vYRl+mA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209396; c=relaxed/simple; bh=9e8fXaxoiyGcuJnIKd+Ot45gqR/t7USfEcfrn9EWXl4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GarutCmkOq+S56+Sl+Gq3Q/xXs+b1JRJBsv4GgkSLpNhy3KVcIrHD/frakZmMqhWlxfG5ukb8dM54PxFfc99E3FfbkuTERlqd3I38bNsyuQwNfz//T9HYaWtoGdO5WmXCzP+hZiGxG12KW9qYEXffTRuJF3T4z9W2951HZEcasw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Bi1ufK4D; arc=none smtp.client-ip=209.85.222.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bi1ufK4D" Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-789f00aba19so204782685a.0 for ; Mon, 15 Apr 2024 12:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713209394; x=1713814194; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vxKwqw3e+B3TZiTyFUBpnnUNUraD1JDLJeaUr1aESjU=; b=Bi1ufK4DDlZriwR9LS3+9Sh79GugEBK57YByKVCZmmV28zv3dkxbe7CgJK7+9Xmvcx zVa2EjFqJqxOR5KaPGECj9T71VErURJkRZLrDQPVmaVwBg9Ka2X9sa2XJA5AKiTQZEFO Wv1oLmlkmOvitjOv+rd2tsOiLH/NeNFqcj2nEerjnnImOVG9P0MPOU71quHzD098rPQm Xl/h/9cbabVZTpvTih7pBOtt3mCywt+a0RpStfYeJSYT7IgobMdZ2GxDoFzI9HROCIKp ++4YqxMH2EKEAu2je7hVpVgJxjs2lhYTgTXEb/FoBkEFp1jj5TA9l1CahZlEu0gVpDkQ Q1yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209394; x=1713814194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vxKwqw3e+B3TZiTyFUBpnnUNUraD1JDLJeaUr1aESjU=; b=SJMP8jCqABTQbHK7ovWJFMOZd+NpVBbC/Bxo/Z2eNP8NSDhrbCSYaZJ4fub2bxNBfl DbCwaVDGsut6DsumnhNP7Zs0tHQCD491IvCcjcyM3PXk/TxU4P3OqJY/m3+db0/Lesxm qbpLmu5/iYPK6LDexNolQIDIUogjAtl7iLmSj3QC4ZIuQMk6auzPCZZVmrQMawhtp+LK AAes4J99GGge8MFnZP6ho/vWV7PiqE1BcnoZuf/i7bdkPV4M+goIudibZTAnUsN3Uv9Y Z7ImLZuUasZRiW3EkA5GOYgVU9F+mLhdt+ekbN/5UiPwrUWXNS70IctFDD2gcoSgm+ha iKZg== X-Gm-Message-State: AOJu0Yyhk+VDcTXlC96Z1KJOP+pLl4JQoNqY6sql4fELst5koqI6Ta7y T6GbaDhtH6l4iqT1Hi/QE0jxEFe8O//QfComDSBT61tskiQKCa2iJKCRMA== X-Google-Smtp-Source: AGHT+IF40Xp6M8IyKlwMyb0hufBHC3lAMbPPruviS9y6pHXqKS7pPgA59vjg2L49axAe0jm+LIIYvQ== X-Received: by 2002:a05:620a:110c:b0:78a:5bfa:3619 with SMTP id o12-20020a05620a110c00b0078a5bfa3619mr11036376qkk.17.1713209393884; Mon, 15 Apr 2024 12:29:53 -0700 (PDT) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id wx8-20020a05620a5a4800b0078ecd71114dsm5003499qkn.69.2024.04.15.12.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:29:53 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 3/4] band: return -ENETUNREACH for HE rate estimation Date: Mon, 15 Apr 2024 12:29:47 -0700 Message-Id: <20240415192948.65857-3-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240415192948.65857-1-prestwoj@gmail.com> References: <20240415192948.65857-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This was overlooked in a prior patch and causes warnings to be printed when the RSSI is too low to estimate an HE data rate or due to incompatible local capabilities (e.g. MCS support). Similar to the other estimations, return -ENETUNREACH if the IE was valid but incompatible. --- src/band.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) v2: * Remove the -ENOTSUP return and keep -ENETUNREACH diff --git a/src/band.c b/src/band.c index 11cd965e..906d6197 100644 --- a/src/band.c +++ b/src/band.c @@ -678,7 +678,7 @@ int band_estimate_he_rx_rate(const struct band *band, const uint8_t *hec, } if (!rate) - return -EBADMSG; + return -ENETUNREACH; *out_data_rate = rate; From patchwork Mon Apr 15 19:29:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 13630501 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FF3D155A27 for ; Mon, 15 Apr 2024 19:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209397; cv=none; b=Cn4LksU+/JZX0HQTYeQ8lwKlyTmdCzylQsrNcYOV3l1FoaOlQUZG+EtKlKwpHyIQqplqNutFrtQ11t4IRKc6tQnwY5xG0CeNVIkkifO6eFsEYfPEOzHgaAqu85BddNrrh6OeOdTJK+nvZWVERp6dTZrtjfgUOWyRhmIMe9FEu2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209397; c=relaxed/simple; bh=Iy+ojwGdkv3SyJuGE6BXBA19Hq0UUnfSW4oo5EqztpU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u0nME5OvW+R4U0Qp0/kJ9ZGx1e7dPLQk/5fzJdhj35N2PzwVYILR1l33yRxfzqoHREcnFpJbYTd1/jV5iR/r7j/AU3xRoIpm4UUtfRfAd435hd4Wws+wqGC4qtIn+ulZEesM/JPIox14i7VjsnLNBUxgOtKbABvdFbfkG/+HKiQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mKUPNRA8; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mKUPNRA8" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-78d743f3654so344637685a.0 for ; Mon, 15 Apr 2024 12:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713209395; x=1713814195; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Tw3PnF0pewxK46H6PlI7dMmkCXgs/NL0bnDpvMH5PFA=; b=mKUPNRA84Tj9fcMUb5wFSlxru6TijOfok+xqa16nh5jACw3evrYGEsQJ0wPWqTq6k1 MMRMqN+Mt6DnuEvG6HzX+9mn/YioU/0EthK7LIwxU8RdZcly6vD09E0S8IK+0af+6FWO /iR6BgARDLW6zemfVftZrh/hRriXMbB2XdvifatrwG7n+3grfqDKyQBBa3rRI6+7ykQf L5b3CGuYaFgrl3A7Bmw1JNtLXbFmKrfV4c4CPoJMj9J5vP1Ku/0NyTZB6x+kpQqYG9PQ jQJ/rj3E+o+klAkA97BSwVOeYmf5ICYYQIheGDOPe/wLW/Pyx7PmIz5eXe2aLun/u6SH VolA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713209395; x=1713814195; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tw3PnF0pewxK46H6PlI7dMmkCXgs/NL0bnDpvMH5PFA=; b=FGo/fuYjYoTCwGLb/2EDbwtds6TIaTMYFEtcCn105SOo0rPmPRkRbQdG1X9M7xIL9/ eD67QXRTeyUHZ0C8MZfFF2rh89x0m4opR2iqLaXNt38bQp4uuibxHHV4LhBbK8zMe1vw WPnYm6MxaV6Y59IzX7OnzPzFDDOgB49tEJqQLXTahhrSVTL7YSOsBbAiUMw2SaVn9rM4 szblgjtbjGDcTSWggFWK8qIoQJ5x5ZXBybmajaN9rNjZL48GbYi7gujVRnonPD2xxYV5 vIA2DWCTKKdzJu5d463rtZOnZjApTHn4k2+HZ5PYcnCg3M4fmLpYsLc9twqr0qLsqkGG Apmg== X-Gm-Message-State: AOJu0YxZk8qKsDPFZsyX9t4qnhjjk2NPLR8IANDN1IIOrPxEDjJWxPZS uD7gMsVh/TslV8IiPkzc+C0dChGfvZx1KzDZdfl8terz/QBGD9HTigInvg== X-Google-Smtp-Source: AGHT+IGG+Y2vU8N7Pl4HS1o2FNnpTCbKxIAd7VeG6RD4LmScZapqDznpR3qde4AUm+T+ZXhiSXs2LA== X-Received: by 2002:a37:e116:0:b0:78d:58bb:e183 with SMTP id c22-20020a37e116000000b0078d58bbe183mr11079747qkm.63.1713209394967; Mon, 15 Apr 2024 12:29:54 -0700 (PDT) Received: from LOCLAP699.rst-02.locus ([208.195.13.130]) by smtp.gmail.com with ESMTPSA id wx8-20020a05620a5a4800b0078ecd71114dsm5003499qkn.69.2024.04.15.12.29.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:29:54 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v2 4/4] unit: fix test-band with new rate estimation returns Date: Mon, 15 Apr 2024 12:29:48 -0700 Message-Id: <20240415192948.65857-4-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240415192948.65857-1-prestwoj@gmail.com> References: <20240415192948.65857-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 -ENETUNREACH is the correct return to check as this indicates either the RSSI was too low or the local capabilities were not compatible. --- unit/test-band.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unit/test-band.c b/unit/test-band.c index 8140b272..855fb67f 100644 --- a/unit/test-band.c +++ b/unit/test-band.c @@ -444,7 +444,7 @@ const struct he_test_data he_all_mcs_unsupported = { .freq = BAND_FREQ_5_GHZ, .rssi = -20, .expected_rate = 1201000000ULL * 8ULL, - .expected_return = -EBADMSG, + .expected_return = -ENETUNREACH, .capabilities = { .he_mcs_set = { MCS_UNSUP, MCS_UNSUP, MCS_UNSUP, MCS_UNSUP,