From patchwork Wed Jul 20 21:29:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 12924518 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.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 5396E7475 for ; Wed, 20 Jul 2022 21:31:40 +0000 (UTC) Received: by mail-pf1-f170.google.com with SMTP id c139so11308003pfc.2 for ; Wed, 20 Jul 2022 14:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0NMJ8OT3tYSx1a5FOr4/YBmdnssT7l39LN0oyZfg/wQ=; b=F9ElbvtwwGe+PfNcPRk+ifJ7N6UR4QEmRMEs0ivXx0ttT2sSAW72s81gwoJu9hJgRh OMmMVAKFEgYcAQyTdo9ROMLtwXZUughQkkGe3RJIdt4ksncq+G0CCyAbkkX6w01MMmQ2 T6qTV3gFbIWnElhkBrKLliRxz/73RXgbDCwg9MXpejpYsnDcsymVSJxCSDRezswQ7U50 5UVMmGS1GTjXvv8sVEg5XpH8T9a+oL/MF7X4aaMCtCfPeypV2BCQ2hvBRVpVLtHeltOZ PJ2mkuiVPswpE/Ix3prHWqTfoDCu9Y+JSO1RJnFTaOvltFG23TS2Xu+621djJbpNxBOq 9S/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0NMJ8OT3tYSx1a5FOr4/YBmdnssT7l39LN0oyZfg/wQ=; b=cod66/797feDLve6ePRxmeLd+rErM40c+4mNabI2Q+EfWnKGGIq053DY6bU7CJsEaC TPkQygNKbnnZkPBD2y16AbDeqasiiUXKJrOeS+1Jcew5q9Qd76mJTroocknrPD921TUF HynBFU+iD/WGUWtzEyr5P1GyJdD8LELvReX3KFsldovw8sXEDBibCFQjK64umqZqKeYZ JQxZe2mnuc4Nc0krxVStAHX7m3DVYJydgzWDJCKQ93sDLeG0nuVqNsBq6dVOZ5mHXb3T 5y0qkyF0iYQV0ZWvoLxez/8PbOOUF5rgMLaplctdZs+Kf2OdK/Fu8ZxpwXYN8bSxJRBh 4QhQ== X-Gm-Message-State: AJIora/W70jcpR1CtAfVg6sA8wsO4mYGEJswqlApAgw4MDklc1TIvXgO 0NEore0s9YZfGuXnNB9m3v+kwigOmtY= X-Google-Smtp-Source: AGRyM1vno3PdOVKiBu0AJ4fG7cpJbt5zhTxYm2GgXIgQpAGNRh0d9PUYlcQPEnNtrIIdLZG9Nv1mOw== X-Received: by 2002:a05:6a00:174f:b0:525:518e:71d6 with SMTP id j15-20020a056a00174f00b00525518e71d6mr41755232pfc.68.1658352699262; Wed, 20 Jul 2022 14:31:39 -0700 (PDT) Received: from localhost.localdomain ([50.45.187.22]) by smtp.gmail.com with ESMTPSA id y22-20020a170902b49600b0016c5306917fsm41475plr.53.2022.07.20.14.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 14:31:38 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v5 1/5] ie: add validation for HE Capabilities element Date: Wed, 20 Jul 2022 14:29:28 -0700 Message-Id: <20220720212932.873353-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 This makes sure the width set bits are sane, and validates the length depending on which MCS sets are enabled. --- src/ie.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ src/ie.h | 2 ++ 2 files changed, 50 insertions(+) diff --git a/src/ie.c b/src/ie.c index 7ef07c37..070454ef 100644 --- a/src/ie.c +++ b/src/ie.c @@ -2577,3 +2577,51 @@ int ie_parse_oci(const void *data, size_t len, const uint8_t **oci) return 0; } + +/* + * Checks the supported width set (Table 9-322b) meets the following + * requirements: + * - B0 and bits B1/B2/B3 are mutually exclusive. + * - B2 is only set if B1 is set + * - B3 is only set if B2 is set (and in turn, B1 is set) + * - The IE length supports B2 and B3 MCS sets + */ +bool ie_validate_he_capabilities(const void *data, size_t len) +{ + uint8_t width_set; + const uint8_t *ptr = data; + bool freq_2_4; + bool width_40_80; + bool width_160; + bool width_80p80; + + if (len < 22) + return false; + + width_set = bit_field((ptr + 7)[0], 1, 7); + + /* B0 indicates support for 40MHz, but only in 2.4GHz band */ + freq_2_4 = test_bit(&width_set, 0); + + /* B1 indicates support for 40/80MHz */ + width_40_80 = test_bit(&width_set, 1); + + if (width_40_80 && freq_2_4) + return false; + + /* B2 indicates support for 160MHz MCS table */ + width_160 = test_bit(&width_set, 2); + + /* Ensure B1 is set, not B0, and the length includes this MCS table */ + if (width_160 && (!width_40_80 || freq_2_4 || len < 26)) + return false; + + /* B3 indicates support for 80+80Mhz MCS table */ + width_80p80 = test_bit(&width_set, 3); + + /* Ensure B2 is set, not B0, and the length includes this MCS table */ + if (width_80p80 && (!width_160 || freq_2_4 || len < 30)) + return false; + + return true; +} diff --git a/src/ie.h b/src/ie.h index d38e9e8e..e56df984 100644 --- a/src/ie.h +++ b/src/ie.h @@ -682,3 +682,5 @@ int ie_parse_owe_transition(const void *data, size_t len, struct ie_owe_transition_info *info); int ie_parse_oci(const void *data, size_t len, const uint8_t **oci); + +bool ie_validate_he_capabilities(const void *data, size_t len); From patchwork Wed Jul 20 21:29:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 12924519 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.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 CDB27747B for ; Wed, 20 Jul 2022 21:31:40 +0000 (UTC) Received: by mail-pf1-f170.google.com with SMTP id e16so17583578pfm.11 for ; Wed, 20 Jul 2022 14:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jX5Jz6wpvPmfRZyxqfpqynSsVi7aM3tkBSczKbckP2s=; b=bI+Nwzo3MlTtpzws1Jp7F8nA3fcpHiC/buDfvAPQhCDISrKP3VqoCPcBzYIp2whVnz uLOZcjhFixDyyV8B176M6y4P3XgZB9nIoRd6SoZNlMLrhunJLhJNFM+jTQBsTQUm0KJI xC+Lt0QvxpZOiEdpQSWOkX1i7OxH3zQvitBpe3A48L66pEi7d+yGmvmsTNW9saRBzSk/ Af88nEgj8zPFwljHe9LKSZqBLimBGDuTcnPmF4HD+2oxdAQA0WY2zKPYWUnOdQuo01t5 DYGTww6eG6yKkzuhMagFn8oJ6FquUXVtgTCYCMlbHi4wPdUMUoCXbbcVPYvH5fgZwIjj GUVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jX5Jz6wpvPmfRZyxqfpqynSsVi7aM3tkBSczKbckP2s=; b=fCJ7fkKvHKQF7yGNNXTDxbXjUxq/kh8l4RNU9y1fscnk9qrey7lzkgMSicxR3FoGe3 UiCnT9UCW4y0HMLENK7DsMlIFGNH4vD2CBJnpl+lcmOKsekRo7RFq7TrjkBLbUdymEeX I71GAyulh33G0uLpsyBlRpMm+Lr5Sz3KEtOtMqF+QG3Vui3lzk3ONa859NdJjYunJw1i /bWsA5MS3f0NchwyeeFEgRHabBCuJW7YYvK1ioKVnne+Xo5mf1MVIGqjzQrf1vWg6/1u YE3o1MIY8Ud5BgxBWtcHUSq1vHs99vjDo+rC5Ho5HKsrVM7GHZWuU0ewNuuYSBaUQIXR jCPg== X-Gm-Message-State: AJIora93mEJvpd6P/DhfxQJPjLIWoeTzlUvEf8BKisHJ0bn2sNiTbqBU LI+Ib275hXoOhss8zWae/4ZXEDLc84I= X-Google-Smtp-Source: AGRyM1t+Jl6mLeadToKpXrERHnZuBD+cdi/28ILCo7nPDE0tQPehTPdOiybEUyTIG4EC1QVWuFmTiw== X-Received: by 2002:a05:6a00:17aa:b0:52a:e94b:67e5 with SMTP id s42-20020a056a0017aa00b0052ae94b67e5mr41402615pfg.76.1658352699805; Wed, 20 Jul 2022 14:31:39 -0700 (PDT) Received: from localhost.localdomain ([50.45.187.22]) by smtp.gmail.com with ESMTPSA id y22-20020a170902b49600b0016c5306917fsm41475plr.53.2022.07.20.14.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 14:31:39 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v5 2/5] band: add band_estimate_he_rx_rate Date: Wed, 20 Jul 2022 14:29:29 -0700 Message-Id: <20220720212932.873353-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220720212932.873353-1-prestwoj@gmail.com> References: <20220720212932.873353-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Similar to the HT/VHT APIs, this estimates the data rate based on the HE Capabilities element, in addition to our own capabilities. The logic is much the same as HT/VHT. The major difference being that HE uses several MCS tables depending on the channel width. Each width MCS set is checked (if supported) and the highest estimated rate out of all the MCS sets is used. --- src/band.c | 218 +++++++++++++++++++++++++++++++++++++++++++++++++++-- src/band.h | 3 +- 2 files changed, 212 insertions(+), 9 deletions(-) v5: * Removed length checks and sanity checks on the width set bits. This is now handled by ie_validate_he_capabilities diff --git a/src/band.c b/src/band.c index 0728b0cc..6ef9f9f3 100644 --- a/src/band.c +++ b/src/band.c @@ -28,7 +28,8 @@ #include "ell/useful.h" -#include "band.h" +#include "src/band.h" +#include "src/netdev.h" void band_free(struct band *band) { @@ -125,14 +126,21 @@ int band_estimate_nonht_rate(const struct band *band, } /* - * Base RSSI values for 20MHz (both HT and VHT) channel. These values can be + * Base RSSI values for 20MHz (HT, VHT and HE) channel. These values can be * used to calculate the minimum RSSI values for all other channel widths. HT - * MCS indexes are grouped into ranges of 8 (per spatial stream) where VHT are - * grouped in chunks of 10. This just means HT will not use the last two - * index's of this array. + * MCS indexes are grouped into ranges of 8 (per spatial stream), VHT in groups + * of 10 and HE in groups of 12. This just means HT will not use the last four + * index's of this array, and VHT won't use the last two. + * + * Note: The values here are not based on anything from 802.11 but data + * found elsewhere online (presumably from testing, we hope). The two + * indexes for HE (MCS 11/12) are not based on any data, but just + * increased by 3dB compared to the previous value. We consider this good + * enough for its purpose to estimate the date rate for network/BSS + * preference. */ -static const int32_t ht_vht_base_rssi[] = { - -82, -79, -77, -74, -70, -66, -65, -64, -59, -57 +static const int32_t ht_vht_he_base_rssi[] = { + -82, -79, -77, -74, -70, -66, -65, -64, -59, -57, -54, -51 }; /* @@ -194,7 +202,7 @@ bool band_ofdm_rate(uint8_t index, enum ofdm_channel_width width, uint64_t rate; int32_t width_adjust = width * 3; - if (rssi < ht_vht_base_rssi[index] + width_adjust) + if (rssi < ht_vht_he_base_rssi[index] + width_adjust) return false; rate = ht_vht_rates[width][index]; @@ -495,6 +503,200 @@ try_vht80: return -ENETUNREACH; } +/* + * Data Rate for HE is much the same as HT/VHT but some additional MCS indexes + * were added. This mean rfactors, and nbpscs will contain two additional + * values: + * + * rfactors.extend([3/4, 5/6]) + * nbpscs.extend([10, 10]) + * + * The guard interval also differs: + * + * Tdft = 12.8us + * Tgi = 0.8, 1.6 or 2.3us + * + * The Nsd values for HE are: + * + * Nsd = [234, 468, 980, 1960] + * + * The formula is identical to HT/VHT: + * + * Nsd * Nbpscs * R * Nss / (Tdft + Tgi) + * + * Note: The table below assumes a 0.8us GI. There isn't any way to know what + * GI will be used for an actual connection, so assume the best. + */ +static uint64_t he_rates[4][12] = { + [OFDM_CHANNEL_WIDTH_20MHZ] = { + 8600000ULL, 17200000ULL, 25800000ULL, 34400000ULL, + 51600000ULL, 68800000ULL, 77400000ULL, 86000000ULL, + 103200000ULL, 114700000ULL, 129000000ULL, 143300000ULL, + }, + [OFDM_CHANNEL_WIDTH_40MHZ] = { + 17200000ULL, 34400000ULL, 51600000ULL, 68800000ULL, + 103200000ULL, 137600000ULL, 154900000ULL, 172000000ULL, + 206500000ULL, 229400000ULL, 258000000ULL, 286800000ULL, + }, + [OFDM_CHANNEL_WIDTH_80MHZ] = { + 36000000ULL, 72000000ULL, 108000000ULL, 144100000ULL, + 216200000ULL, 288200000ULL, 324300000ULL, 360300000ULL, + 432400000ULL, 480400000ULL, 540400000ULL, 600500000ULL, + }, + [OFDM_CHANNEL_WIDTH_160MHZ] = { + 72000000ULL, 144100000ULL, 216200000ULL, 288200000ULL, + 432400000ULL, 576500000ULL, 648500000ULL, 720600000ULL, + 864700000ULL, 960800000ULL, 1080900000ULL, 1201000000ULL, + }, +}; + +static bool band_he_rate(uint8_t index, enum ofdm_channel_width width, + int32_t rssi, uint8_t nss, uint64_t *data_rate) +{ + uint64_t rate; + int32_t width_adjust; + + width_adjust = width * 3; + + if (rssi < ht_vht_he_base_rssi[index] + width_adjust) + return false; + + rate = he_rates[width][index]; + + rate *= nss; + + *data_rate = rate; + return true; +} + +static bool find_rate_he(const uint8_t *rx_map, const uint8_t *tx_map, + enum ofdm_channel_width width, int32_t rssi, + uint64_t *out_data_rate) +{ + uint32_t nss; + uint32_t max_mcs; + int i; + + if (!find_best_mcs_nss(rx_map, tx_map, 7, 9, 11, + &max_mcs, &nss)) + return false; + + for (i = max_mcs; i >= 0; i--) + if (band_he_rate(i, width, rssi, nss, out_data_rate)) + return true; + + return false; +} + +/* + * HE data rate is calculated based on 802.11ax - Section 27.5 + */ +int band_estimate_he_rx_rate(const struct band *band, const uint8_t *hec, + int32_t rssi, uint64_t *out_data_rate) +{ + enum ofdm_channel_width width = OFDM_CHANNEL_WIDTH_20MHZ; + int i; + const struct band_he_capabilities *he_cap = NULL; + const struct l_queue_entry *entry; + const uint8_t *rx_map; + const uint8_t *tx_map; + bool mcs80p80 = false; + uint64_t rate = 0; + uint64_t new_rate = 0; + uint8_t width_set; + + if (!hec || !band->he_capabilities) + return -EBADMSG; + + for (entry = l_queue_get_entries(band->he_capabilities); + entry; entry = entry->next) { + const struct band_he_capabilities *cap = entry->data; + + /* + * TODO: Station type is assumed here since it is the only + * consumer of these data rate estimation APIs. If this + * changes the iftype would need to be passed in. + */ + if (cap->iftypes & (1 << NETDEV_IFTYPE_STATION)) { + he_cap = cap; + break; + } + } + + if (!he_cap) + return -ENOTSUP; + + /* AND the width sets, giving the widths supported by both */ + width_set = bit_field(he_cap->he_phy_capa[0], 1, 7) & + bit_field((hec + 6)[0], 1, 7); + + /* + * 802.11ax Table 9-322b + */ + + /* B0 indicates support for 40MHz */ + if (test_bit(&width_set, 0)) + width = OFDM_CHANNEL_WIDTH_40MHZ; + + /* B1 indicates support for 40MHz and 80MHz, choose 80 */ + if (test_bit(&width_set, 1)) + width = OFDM_CHANNEL_WIDTH_80MHZ; + + /* B2 indicates support for 160MHz */ + if (test_bit(&width_set, 2)) + width = OFDM_CHANNEL_WIDTH_160MHZ; + + /* B3 indicates support for 80+80MHz */ + if (test_bit(&width_set, 3)) + mcs80p80 = true; + + /* + * The HE-MCS maps are 17 bytes into the HE Capabilities IE, and + * alternate RX/TX every 2 bytes. Start the TX map 17 + 2 bytes + * into the MCS set. For each MCS set find the best data rate. + */ + rx_map = he_cap->he_mcs_set; + tx_map = hec + 19; + + /* 80+80MHz MCS set */ + if (mcs80p80) { + if (find_rate_he(rx_map + 8, tx_map + 8, + OFDM_CHANNEL_WIDTH_160MHZ, rssi, &new_rate)) + rate = new_rate; + } + + /* 160MHz MCS set */ + if (width == OFDM_CHANNEL_WIDTH_160MHZ) { + if (find_rate_he(rx_map + 4, tx_map + 4, + OFDM_CHANNEL_WIDTH_160MHZ, rssi, &new_rate) && + new_rate > rate) + rate = new_rate; + } + + /* + * <= 80MHz MCS set. Adjust width to this range (if needed) and check + * every smaller width in case the rate is higher + */ + if (width > OFDM_CHANNEL_WIDTH_80MHZ) + width = OFDM_CHANNEL_WIDTH_80MHZ; + + for (i = width; i >= OFDM_CHANNEL_WIDTH_20MHZ; i--) { + if (find_rate_he(rx_map, tx_map, i, rssi, &new_rate)) { + if (new_rate > rate) + rate = new_rate; + + break; + } + } + + if (!rate) + return -EBADMSG; + + *out_data_rate = rate; + + return 0; +} + static int band_channel_info_get_bandwidth(const struct band_chandef *info) { switch (info->channel_width) { diff --git a/src/band.h b/src/band.h index 1f1269c7..9b307a77 100644 --- a/src/band.h +++ b/src/band.h @@ -74,7 +74,8 @@ void band_free(struct band *band); bool band_ofdm_rate(uint8_t index, enum ofdm_channel_width width, int32_t rssi, uint8_t nss, bool sgi, uint64_t *data_rate); - +int band_estimate_he_rx_rate(const struct band *band, const uint8_t *hec, + int32_t rssi, uint64_t *out_dat_rate); int band_estimate_vht_rx_rate(const struct band *band, const uint8_t *vhtc, const uint8_t *vhto, const uint8_t *htc, const uint8_t *hto, From patchwork Wed Jul 20 21:29:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 12924520 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 2A2EF747C for ; Wed, 20 Jul 2022 21:31:41 +0000 (UTC) Received: by mail-pl1-f182.google.com with SMTP id q5so16149124plr.11 for ; Wed, 20 Jul 2022 14:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0FUZ24uKdjXbXR5N8bxcxWhCdfkYHd6fP/PdcchXM+w=; b=NcwAmKqolUacdwuVEPOFRzAAKkhpH9bjtLIEQ86Yckn6RPoIc+M5AYMEtACzzxeCtF Yd+uif/FbFIjL9XwGOE9ODN1RQhEMIZMm0RAttuiBlxbbUCZ7OcRJZqyq0YhAwx8xsK5 OljQjS2kYX4ZZSlyQwWB0STtMK3qkRmGepu8DR6CYxo/CUJCipQSE5Y28uOuCeg1Nc3S hjoNZMKuNbBuxhj46hdHvwVf79FkvWeD9GgVOO20znQ/PAyYu6OJFg+zrH8JFoUAg+Ok auCI1CyiKUbxwJyIs7Y/jQ0ITghfCamnlyZ5VhR5fxMr0zupz8gLrx2PbZ/U+vkwcPzH HgDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0FUZ24uKdjXbXR5N8bxcxWhCdfkYHd6fP/PdcchXM+w=; b=yV0jpD2BV0xxaieWFzjUCUCLyRmInGkqxV/Az1ROE3r4BPp6i1ivM5EejmIIpQFWCt MgQOnojQIBGOEUVmtFJrt+9/OQVPT2DfszrGJnHH7PVpj37M9s6v7KsZ6r7pz42JND51 MoUDRu2Z72e8kLAWo+GGPS8v2Zx3cymF0u812oWBqakF+g30JBGz3G0YEFievDocrvdG kg528jRGQ4K3RaTnn3wREbqjSq2WKMMiHcvm8l4wVNBgmCXNAUM9vw+TGhGFwwTAB/hd hW6Sl8zqJASAMVSl66ELjB52hiQTkT3cChdn0nWg9akSX4F1AEi0OJhv0KneE9oNSQuD 479A== X-Gm-Message-State: AJIora83xk7LMx7Uo88Zd13UYNPtOeuUOTUxI4tUWA2aiY9PKrHsvz0H FnJpYUJ5gb9B6+s+szciZn4UY1e3Mrg= X-Google-Smtp-Source: AGRyM1vhEpRLf97ivp2GGgL+g/LEy4883gEZdLM8+XF7XT9+Bigj6QKrH5ZQf/nurEXomSylCT1XSg== X-Received: by 2002:a17:903:32c4:b0:16c:3cab:5918 with SMTP id i4-20020a17090332c400b0016c3cab5918mr39769341plr.16.1658352700307; Wed, 20 Jul 2022 14:31:40 -0700 (PDT) Received: from localhost.localdomain ([50.45.187.22]) by smtp.gmail.com with ESMTPSA id y22-20020a170902b49600b0016c5306917fsm41475plr.53.2022.07.20.14.31.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 14:31:40 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v5 3/5] wiphy: use HE element for data rate estimation Date: Wed, 20 Jul 2022 14:29:30 -0700 Message-Id: <20220720212932.873353-3-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220720212932.873353-1-prestwoj@gmail.com> References: <20220720212932.873353-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 If an HE element is found, prefer using this for the rate estimation since it will likely yield the fastest rate. --- src/wiphy.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wiphy.c b/src/wiphy.c index 696064c0..09b99fb2 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -788,6 +788,7 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy, const void *vht_operation = NULL; const void *ht_capabilities = NULL; const void *ht_operation = NULL; + const void *he_capabilities = NULL; const struct band *bandp; enum band_freq band; @@ -847,11 +848,22 @@ int wiphy_estimate_data_rate(struct wiphy *wiphy, vht_operation = iter.data - 2; break; + case IE_TYPE_HE_CAPABILITIES: + if (!ie_validate_he_capabilities(iter.data, iter.len)) + return -EBADMSG; + + he_capabilities = iter.data; + break; default: break; } } + if (!band_estimate_he_rx_rate(bandp, he_capabilities, + bss->signal_strength / 100, + out_data_rate)) + return 0; + if (!band_estimate_vht_rx_rate(bandp, vht_capabilities, vht_operation, ht_capabilities, ht_operation, bss->signal_strength / 100, From patchwork Wed Jul 20 21:29:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 12924521 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 829237475 for ; Wed, 20 Jul 2022 21:31:41 +0000 (UTC) Received: by mail-pg1-f177.google.com with SMTP id f11so17569585pgj.7 for ; Wed, 20 Jul 2022 14:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r28ZFcfxUrmrlT1fhyZI+HYXwvVxgOPhLo/OAmIYktY=; b=I3G4wbAiA1dc0JX/QXiVQZ3WCoAvbXSprcoj3J+m4FaBCrHqqe+lKd2oFT96VgpD+0 p6Al+hY0vD5Dw5Z5gQJ7x7yjUQTz/ERFDqmFG7GN2FeYNtIS7tYIO/vdJZyv23kzrYM/ myNEC9Zc+nUj2DAfEu2UhMC9JmYWTTv8H+MlTzwmQnmdc/jZI3omU2deKOCbV9n9+QPR pmG4eszGtqQIctDzakIV+SKdNu8SiE9c/TNEtcLXj8gQUKXHsE+nkfT/Rjw2KhVs5mwy H/t74MCUpc0MZbVTWbKNsVAhppA0gvWoUjvBg2AaGZv4DWeR/faoxppGP9unt+yZbNK6 uEJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r28ZFcfxUrmrlT1fhyZI+HYXwvVxgOPhLo/OAmIYktY=; b=eJCwpeVA20e3UuNs+8mgx14Vvhr6kVbCrGHYJahB9SEfENvxtgSOhGhW6WCF8uMWnt U6hvytWPf8xfCOw7rbTr8q/dR3TsMwIDAWKLl001zyx6TdMK6tlW3VFmdnMk+n+tff48 MnZujFzgQVk5b07N+d7Xca2L7KtbI8p+g+uWj9RQOvCG61P9xWd7NMMGoXW4DyqVakA9 TKT+dF2rDO6vX9ekZo2XjZii5OJnwNuNWUlhGaBcq29l6BpD/xzdL5/5p2Y5SKgLEkwI 2DWbesUyJCWTUN6Iy9GirwOxUo5+kghZeEsIY1nqruJRsaPtJhRoQbaxxBDmF3HCLYK8 Dxag== X-Gm-Message-State: AJIora8jwaCiczO+KvzECXvwU595BCmUoAVkNRwA0J79tOduBlP/0GTv bH7ZM0PdpeQqn4S+C9URm6a5HTdV4yo= X-Google-Smtp-Source: AGRyM1s/wfzxrzSW3UcOq3SnliR0btoCVAjJXtBbpkez5LNOZvMLL+w+5c6USbR+4wGd7Mhrc8uZ5g== X-Received: by 2002:a05:6a00:1248:b0:52b:ca7:f2b6 with SMTP id u8-20020a056a00124800b0052b0ca7f2b6mr40478451pfi.82.1658352700780; Wed, 20 Jul 2022 14:31:40 -0700 (PDT) Received: from localhost.localdomain ([50.45.187.22]) by smtp.gmail.com with ESMTPSA id y22-20020a170902b49600b0016c5306917fsm41475plr.53.2022.07.20.14.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 14:31:40 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v5 4/5] build: add ie.c/netdev.h to test-band build Date: Wed, 20 Jul 2022 14:29:31 -0700 Message-Id: <20220720212932.873353-4-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220720212932.873353-1-prestwoj@gmail.com> References: <20220720212932.873353-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 --- Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 80377613..cffb0738 100644 --- a/Makefile.am +++ b/Makefile.am @@ -466,7 +466,8 @@ unit_test_kdf_sha256_LDADD = $(ell_ldadd) unit_test_ie_SOURCES = unit/test-ie.c src/ie.h src/ie.c unit_test_ie_LDADD = $(ell_ldadd) -unit_test_band_SOURCES = unit/test-band.c src/band.h src/band.c +unit_test_band_SOURCES = unit/test-band.c src/band.h src/band.c src/netdev.h \ + src/ie.h src/ie.c unit_test_band_LDADD = $(ell_ldadd) unit_test_crypto_SOURCES = unit/test-crypto.c \ From patchwork Wed Jul 20 21:29:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Prestwood X-Patchwork-Id: 12924522 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.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 501E97482 for ; Wed, 20 Jul 2022 21:31:42 +0000 (UTC) Received: by mail-pg1-f171.google.com with SMTP id 72so17607499pge.0 for ; Wed, 20 Jul 2022 14:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Cym2Dk/UPwkyWfaFRs+bMw8sm+2E3/Ymulo/x6MDfU=; b=L1olZftlCiN6hEeY95FyuAr3Exx2bREqBFrd78avy8i5cz08HXzoBuBJOdOlvCBtiY 85OvIUE4oA+Eah9Nj0ROWU6cQbyqidMCIE6IQTgDtROwBuYdTqdF++KFlthLKOJW8md2 P7ZNgqtMQNDF8wFGt/415cwydI4Wr6ar4kmX+dalvJpBPLLnnXIm4XZtasPbySUgDZ/M pHl97vTWiQOyOVsahEpgwFe0J6CHo7xzvwL9Wd+etpNobd4Mpr9odX6sVntK3Dr/0n/A QPKAdZRM3+aa4EWdcxY+8JhdU/Y8LnvuYlcYWbk6sgl5asNDqxRMBQuyanMIzll+YlDt MHBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3Cym2Dk/UPwkyWfaFRs+bMw8sm+2E3/Ymulo/x6MDfU=; b=u1wwnN4a76GPnm8tzu8clT6Vt4kLxcMA14Siu4qIjR+mFOKYZRbuWI9xklEDJ9937N eG4DU0i+2bIMmzBFMa7Rcw3yCo1uGBrFHyXSJpejfXtgpuJYq4m7P1FSTCxz4HedF1d/ 1mbEdH9yZ5RkdQGrZNWhLO0g3IWmVR+fS9p1umlb9OF/u9FpEYDaTFD6eRaKdRdwAReo nJTv1Rq09/Fe7J6CC0ctpE5rBKXJBdKUxew7plV3ouWfqZ/Fx0KxnYzDUh4Piz8r2qUk G+o2ta7DaoZI0/ZDjeMTAaOAcJtAGaalVUq7Eot7CzdL1eZdZ4s6jNz/KzRw4JKl/71k gJUw== X-Gm-Message-State: AJIora/sXUkWdR5n3bACzJqJbXSIK37nkkH3AAK9s8v61XZFAXjtymnQ ddw/YkWeHVO9xikrgYm9mWUwO/Tj9xA= X-Google-Smtp-Source: AGRyM1u+egWUObXPPvLvSbob47kNZ2t8LbmOWEpxYOnu4Vg8fAa10FMY+nwwCmz3ocr77KB6bl/gOQ== X-Received: by 2002:aa7:80d3:0:b0:52b:9237:a355 with SMTP id a19-20020aa780d3000000b0052b9237a355mr8620008pfn.73.1658352701454; Wed, 20 Jul 2022 14:31:41 -0700 (PDT) Received: from localhost.localdomain ([50.45.187.22]) by smtp.gmail.com with ESMTPSA id y22-20020a170902b49600b0016c5306917fsm41475plr.53.2022.07.20.14.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 14:31:41 -0700 (PDT) From: James Prestwood To: iwd@lists.linux.dev Cc: James Prestwood Subject: [PATCH v5 5/5] unit: add HE tests to test-band Date: Wed, 20 Jul 2022 14:29:32 -0700 Message-Id: <20220720212932.873353-5-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220720212932.873353-1-prestwoj@gmail.com> References: <20220720212932.873353-1-prestwoj@gmail.com> Precedence: bulk X-Mailing-List: iwd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This tests for all the possible widths selected in 2.4 and 5/6GHz, as well as some failure tests. --- unit/test-band.c | 243 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) diff --git a/unit/test-band.c b/unit/test-band.c index 0dd9b67b..90b48f9f 100644 --- a/unit/test-band.c +++ b/unit/test-band.c @@ -32,6 +32,8 @@ #include #include "src/band.h" +#include "src/netdev.h" +#include "src/ie.h" static struct band *new_band() { @@ -284,6 +286,228 @@ static void band_test_vht_1(const void *data) band_free(band); } +struct he_test_data { + enum band_freq freq; + int32_t rssi; + uint64_t expected_rate; + int expected_return; + /* Own capabilities */ + struct band_he_capabilities capabilities; + /* Peer HE Capabilities IE */ + uint8_t he_capabilities[31]; + +}; + +/* IWD doesn't look at this */ +#define HE_MAC_CAPA 0, 0, 0, 0, 0, 0 +/* IWD only cares about the width set byte */ +#define HE_PHY_CAPA(wset) wset, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + +#define MCS7 0 +#define MCS9 1 +#define MCS11 2 +#define MCS_UNSUP 0xff, 0xff +/* A readable macro for defining MCS sets */ +#define HE_MCS_SET(mcs, nss) \ + (nss >= 1 ? mcs << 0 : 3 << 0) | \ + (nss >= 2 ? mcs << 2 : 3 << 2) | \ + (nss >= 3 ? mcs << 4 : 3 << 4) | \ + (nss >= 4 ? mcs << 6 : 3 << 6), \ + (nss >= 5 ? mcs << 0 : 3 << 0) | \ + (nss >= 6 ? mcs << 2 : 3 << 2) | \ + (nss >= 7 ? mcs << 4 : 3 << 4) | \ + (nss >= 8 ? mcs << 6 : 3 << 6) + +/* 2.4GHz, 20MHz, MCS 7, NSS 1 */ +const struct he_test_data he_test_2_4_20mhz_mcs_7_nss_1 = { + .freq = BAND_FREQ_2_4_GHZ, + .rssi = -20, + .expected_rate = 86000000ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS7, 1), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x00) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 22, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x00), MCS_UNSUP, HE_MCS_SET(MCS7, 1), + }, +}; + +/* 2.4GHz, 40MHz, MCS 7, NSS 1 */ +const struct he_test_data he_test_2_4_40mhz_mcs_7_nss_1 = { + .freq = BAND_FREQ_2_4_GHZ, + .rssi = -20, + .expected_rate = 172000000ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS7, 1), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x02) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 22, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x02), MCS_UNSUP, HE_MCS_SET(MCS7, 1), + }, +}; + +/* 5GHz, 20MHz, MCS 7, NSS 1 */ +const struct he_test_data he_test_5_20mhz_mcs_7_nss_1 = { + .freq = BAND_FREQ_5_GHZ, + .rssi = -20, + .expected_rate = 86000000ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS7, 1), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x00) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 22, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x00), MCS_UNSUP, HE_MCS_SET(MCS7, 1) + }, +}; + +/* 5GHz, 80MHz, MCS 7, NSS 1 */ +const struct he_test_data he_test_5_80mhz_mcs_7_nss_1 = { + .freq = BAND_FREQ_5_GHZ, + .rssi = -20, + .expected_rate = 360300000ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS7, 1), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x04) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 22, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x04), MCS_UNSUP, HE_MCS_SET(MCS7, 1) + }, +}; + +/* 5GHz, 160MHz, MCS 7, NSS 1 */ +const struct he_test_data he_test_5_160mhz_mcs_7_nss_1 = { + .freq = BAND_FREQ_5_GHZ, + .rssi = -20, + .expected_rate = 720600000ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS7, 1), MCS_UNSUP, + HE_MCS_SET(MCS7, 1), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x0c) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 26, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x0c), MCS_UNSUP, HE_MCS_SET(MCS7, 1), + MCS_UNSUP, HE_MCS_SET(MCS7, 1) + }, +}; + +/* 5GHz, 160/80+80MHz, MCS 7, NSS 1 */ +const struct he_test_data he_test_5_160_80_P_80_mhz_mcs_7_nss_1 = { + .freq = BAND_FREQ_5_GHZ, + .rssi = -20, + .expected_rate = 720600000ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS7, 1), MCS_UNSUP, + HE_MCS_SET(MCS7, 1), MCS_UNSUP, + HE_MCS_SET(MCS7, 1), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x1c) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 30, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x1c), MCS_UNSUP, HE_MCS_SET(MCS7, 1), + MCS_UNSUP, HE_MCS_SET(MCS7, 1), + MCS_UNSUP, HE_MCS_SET(MCS7, 1) + }, +}; + +/* 5GHz, max data rate */ +const struct he_test_data he_test_5_max_data_rate = { + .freq = BAND_FREQ_5_GHZ, + .rssi = -20, + .expected_rate = 1201000000ULL * 8ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS11, 8), MCS_UNSUP, + HE_MCS_SET(MCS11, 8), MCS_UNSUP, + HE_MCS_SET(MCS11, 8), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x1c) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 30, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x1c), MCS_UNSUP, HE_MCS_SET(MCS11, 8), + MCS_UNSUP, HE_MCS_SET(MCS11, 8), + MCS_UNSUP, HE_MCS_SET(MCS11, 8) + }, +}; + +const struct he_test_data he_all_mcs_unsupported = { + .freq = BAND_FREQ_5_GHZ, + .rssi = -20, + .expected_rate = 1201000000ULL * 8ULL, + .expected_return = -EBADMSG, + .capabilities = { + .he_mcs_set = { MCS_UNSUP, MCS_UNSUP, + MCS_UNSUP, MCS_UNSUP, + MCS_UNSUP, MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x1c) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 30, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x1c), MCS_UNSUP, MCS_UNSUP, + MCS_UNSUP, MCS_UNSUP, + MCS_UNSUP, MCS_UNSUP + }, +}; + +/* 5GHz, max data rate, low-rssi */ +const struct he_test_data he_test_5_low_rssi = { + .freq = BAND_FREQ_5_GHZ, + .rssi = -80, /* Should force 20MHz/MCS0 width to be used */ + .expected_rate = 8600000ULL * 8ULL, + .capabilities = { + .he_mcs_set = { HE_MCS_SET(MCS11, 8), MCS_UNSUP, + HE_MCS_SET(MCS11, 8), MCS_UNSUP, + HE_MCS_SET(MCS11, 8), MCS_UNSUP }, + .he_phy_capa = { HE_PHY_CAPA(0x1c) }, + .iftypes = 1 << NETDEV_IFTYPE_STATION, + }, + .he_capabilities = { + 30, IE_TYPE_HE_CAPABILITIES - 256, HE_MAC_CAPA, + HE_PHY_CAPA(0x1c), MCS_UNSUP, HE_MCS_SET(MCS11, 8), + MCS_UNSUP, HE_MCS_SET(MCS11, 8), + MCS_UNSUP, HE_MCS_SET(MCS11, 8) + }, +}; + +static void band_test_he(const void *data) +{ + const struct he_test_data *he_data = data; + struct band *band; + uint64_t rate = 0; + int ret; + + band = new_band(); + band->freq = he_data->freq; + band->he_capabilities = l_queue_new(); + + l_queue_push_tail(band->he_capabilities, + (void*)&(he_data->capabilities)); + + assert(ie_validate_he_capabilities(he_data->he_capabilities + 2, + he_data->he_capabilities[0])); + + ret = band_estimate_he_rx_rate(band, he_data->he_capabilities + 2, + he_data->rssi, &rate); + assert(ret == he_data->expected_return); + + if (ret == 0) + assert(rate == he_data->expected_rate); + + l_queue_destroy(band->he_capabilities, NULL); + l_free(band); +} + struct oci2freq_data { unsigned int op; unsigned int chan; @@ -436,6 +660,25 @@ int main(int argc, char *argv[]) l_test_add("/band/VHT/test1", band_test_vht_1, NULL); + l_test_add("/band/HE/test/2.4GHz/20MHz/MCS7/NSS1", band_test_he, + &he_test_2_4_20mhz_mcs_7_nss_1); + l_test_add("/band/HE/test/2.4GHz/40MHz/MCS7/NSS1", band_test_he, + &he_test_2_4_40mhz_mcs_7_nss_1); + l_test_add("/band/HE/test/5GHz/20MHz/MCS7/NSS1", band_test_he, + &he_test_5_20mhz_mcs_7_nss_1); + l_test_add("/band/HE/test/5GHz/80MHz/MCS7/NSS1", band_test_he, + &he_test_5_80mhz_mcs_7_nss_1); + l_test_add("/band/HE/test/5GHz/160MHz/MCS7/NSS1", band_test_he, + &he_test_5_160mhz_mcs_7_nss_1); + l_test_add("/band/HE/test/5GHz/160/80+80MHz/MCS7/NSS1", band_test_he, + &he_test_5_160_80_P_80_mhz_mcs_7_nss_1); + l_test_add("/band/HE/test/5GHz/max data rate", band_test_he, + &he_test_5_max_data_rate); + l_test_add("/band/HE/test/all MCS unsupported", band_test_he, + &he_all_mcs_unsupported); + l_test_add("/band/HE/test/low RSSI", band_test_he, + &he_test_5_low_rssi); + l_test_add("/band/oci2freq 1", test_oci2freq, &oci2freq_data_1); l_test_add("/band/oci2freq 2", test_oci2freq, &oci2freq_data_2); l_test_add("/band/oci2freq 3", test_oci2freq, &oci2freq_data_3);