From patchwork Mon Jan 17 05:09:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arowa Suliman X-Patchwork-Id: 1580594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=A3wy61Fa; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=dFdjdkpa; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Jcg4g6bpwz9sSs for ; Mon, 17 Jan 2022 16:12:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Cg1upAiSp2xIDjwcF620+vt5/GBE7lKkthyOM64lGW0=; b=A3wy61FaxVpN28 bKN4A877ykszJWwcw88Oln87K1o6bfPxSPM234/sAIDVNrFEEaDW3lH982kZmu8wIUAhMflpa53Nh 35f3T0HJAjkEKlUO4C8+mbwzq9rTHCmWtsmgQZYqFveyvOoHI3szh7lHZ8yjI3FthKW21YoPtMPyc yYS7r97rbIFgl544nTYOyidf28d47zL900G4B8iERDJFO+R2Hb1+NU5XXDEp0+eTtGwQder/ZnGsO j5QMbkXP70KhcOqTFH/NlkQOIMCGhF7eTOk7OFvZa904ZuKgCaD9ta4FAoG50fvtS2f5yIz7+UV9C G811sjO2aXgE8b9BJ3KA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9KIM-00DR8S-LL; Mon, 17 Jan 2022 05:11:06 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9KHU-00DQx8-Sy for hostap@lists.infradead.org; Mon, 17 Jan 2022 05:10:16 +0000 Received: by mail-pl1-x634.google.com with SMTP id n8so6917254plc.3 for ; Sun, 16 Jan 2022 21:10:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RmeZyC0Lr9EbIo95dI9dcxFWMMBLnuGjLJQwL6Qy4AE=; b=dFdjdkpauNsDQQ573NX3e6Z0C35mLzCJC/7lJA64MOL9a+HWs6SZq8p2HnQfEGiyhD GKp27gPAUmKyxE6uYA98yKDi5h1cOzc7iCGG9Sb0w01klMgzmMz5CirL7TfyXEHRX9ap oTfpLj+bdSAGkp3H3mgE1EJ1JhMvN+YIxM4mw= 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=RmeZyC0Lr9EbIo95dI9dcxFWMMBLnuGjLJQwL6Qy4AE=; b=LfUXwOD962QMQkVbGrWRpS4sRwg1KAqskNhjcP4o4skFTZGjvmnN7UW8epokBQkBI2 8DW3UhrvTmoywVpFnInzk4DW3kSFqThPqXWO4ewWXr0rozP2Sc2LEATG9r2zIeGt0Aip PWYY5hrPi4rCFogWIfOFlmVFeen3WqOgAczqsDHVFNlTrJG/0MX0lrhL3gHKcrcOwG38 bU9S/VX5+tkxSWRm6JEbnXNxxF9ZBKUX1CchpcPCaKT3U3xlO6ixWwDNvRPGY5DOX9df AqQ5rEJ+lZ6E9lXOkNq/V5oXaVYAIljdGn5sfd8PYVioxx2927TM/jD8ETM2LNSrb2Se 8qig== X-Gm-Message-State: AOAM5322Ylo+oWUoPUbfwOuz2zt951Z5sxN5AkKmMQsE+fLA0p1x97UZ o4trgnyyd+E6u0FCoEZRMUKZRZjyaKCXMw== X-Google-Smtp-Source: ABdhPJwiXEu6qXaVg9EURKAnU04bKtbGCUt9UpPkX/qHUigLkKL4MjLdc48AiXRKX7wg4ytMK1zRpw== X-Received: by 2002:a17:90b:1646:: with SMTP id il6mr23304900pjb.153.1642396211136; Sun, 16 Jan 2022 21:10:11 -0800 (PST) Received: from arowa.mtv.corp.google.com ([2620:15c:202:201:5517:8c13:d625:5388]) by smtp.gmail.com with ESMTPSA id q19sm13107995pfk.131.2022.01.16.21.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jan 2022 21:10:10 -0800 (PST) From: Arowa Suliman X-Google-Original-From: Arowa Suliman To: hostap@lists.infradead.org Cc: Arowa Suliman , Arowa Suliman Subject: [PATCH v4 6/6] src: tests: Remove the word master. Date: Sun, 16 Jan 2022 21:09:58 -0800 Message-Id: <20220117050958.2806403-6-arowa@google.com> X-Mailer: git-send-email 2.34.1.703.g22d0c6ccf7-goog In-Reply-To: <20220117050958.2806403-1-arowa@google.com> References: <20220117050958.2806403-1-arowa@google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220116_211013_000221_33C496CB X-CRM114-Status: GOOD ( 34.85 ) X-Spam-Score: -0.4 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Replace the word "master" with another inclusive word such as "main". Changed some instances of the old branch name "master". Replaced instances referring to the master mode to AP mode which should have the same meaning. Content analysis details: (-0.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:634 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Replace the word "master" with another inclusive word such as "main". Changed some instances of the old branch name "master". Replaced instances referring to the master mode to AP mode which should have the same meaning. Signed-off-by: Arowa Suliman --- CONTRIBUTIONS | 2 +- src/drivers/driver_atheros.c | 2 +- src/drivers/driver_nl80211.c | 40 ++-- src/drivers/linux_ioctl.c | 14 +- src/drivers/linux_ioctl.h | 2 +- tests/hwsim/README | 2 +- ...licant-src-Remove-the-word-whitelist.patch | 76 +++++++ v4-0002-src-Remove-the-word-blacklist.patch | 37 ++++ ...003-wpa_supplicant-ap-Update-comment.patch | 29 +++ ...rc-Remove-the-word-whitelist-in-enum.patch | 88 ++++++++ ...rc-Remove-the-word-blacklist-in-enum.patch | 56 +++++ ...006-src-tests-Remove-the-word-master.patch | 196 ++++++++++++++++++ 12 files changed, 513 insertions(+), 31 deletions(-) create mode 100644 v4-0001-wpa_supplicant-src-Remove-the-word-whitelist.patch create mode 100644 v4-0002-src-Remove-the-word-blacklist.patch create mode 100644 v4-0003-wpa_supplicant-ap-Update-comment.patch create mode 100644 v4-0004-src-Remove-the-word-whitelist-in-enum.patch create mode 100644 v4-0005-src-Remove-the-word-blacklist-in-enum.patch create mode 100644 v4-0006-src-tests-Remove-the-word-master.patch diff --git a/CONTRIBUTIONS b/CONTRIBUTIONS index 1b4caf7ac..b40b29e92 100644 --- a/CONTRIBUTIONS +++ b/CONTRIBUTIONS @@ -37,7 +37,7 @@ without moderation. You can subscribe to the list at this address: http://lists.infradead.org/mailman/listinfo/hostap The message should contain an inlined patch against the current -development branch (i.e., the master branch of +development branch (i.e., the main branch of git://w1.fi/hostap.git). Please make sure the software you use for sending the patch does not corrupt whitespace. If that cannot be fixed for some reason, it is better to include an attached version of the diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c index 9b4166d22..fc5d450fc 100644 --- a/src/drivers/driver_atheros.c +++ b/src/drivers/driver_atheros.c @@ -1779,7 +1779,7 @@ atheros_init(struct hostapd_data *hapd, struct wpa_init_params *params) if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0) { wpa_printf(MSG_ERROR, - "Could not set interface to master mode! ioctl[SIOCSIWMODE]: %s", + "Could not set interface to AP mode! ioctl[SIOCSIWMODE]: %s", strerror(errno)); goto bad; } diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index aec179ac3..7b0556248 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -1204,7 +1204,7 @@ static void wpa_driver_nl80211_event_rtm_newlink(void *ctx, break; case IFLA_MASTER: brid = nla_get_u32((struct nlattr *) attr); - pos += os_snprintf(pos, end - pos, " master=%u", brid); + pos += os_snprintf(pos, end - pos, " AP=%u", brid); break; case IFLA_WIRELESS: pos += os_snprintf(pos, end - pos, " wext"); @@ -1379,7 +1379,7 @@ static void wpa_driver_nl80211_event_rtm_dellink(void *ctx, break; case IFLA_MASTER: brid = nla_get_u32((struct nlattr *) attr); - pos += os_snprintf(pos, end - pos, " master=%u", brid); + pos += os_snprintf(pos, end - pos, " AP=%u", brid); break; case IFLA_OPERSTATE: pos += os_snprintf(pos, end - pos, " operstate=%u", @@ -7652,7 +7652,7 @@ static void *i802_init(struct hostapd_data *hapd, struct wpa_driver_nl80211_data *drv; struct i802_bss *bss; size_t i; - char master_ifname[IFNAMSIZ]; + char ap_ifname[IFNAMSIZ]; int ifindex, br_ifindex = 0; int br_added = 0; @@ -7664,27 +7664,27 @@ static void *i802_init(struct hostapd_data *hapd, drv = bss->drv; - if (linux_br_get(master_ifname, params->ifname) == 0) { + if (linux_br_get(ap_ifname, params->ifname) == 0) { wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in bridge %s", - params->ifname, master_ifname); - br_ifindex = if_nametoindex(master_ifname); - os_strlcpy(bss->brname, master_ifname, IFNAMSIZ); + params->ifname, ap_ifname); + br_ifindex = if_nametoindex(ap_ifname); + os_strlcpy(bss->brname, ap_ifname, IFNAMSIZ); } else if ((params->num_bridge == 0 || !params->bridge[0]) && - linux_master_get(master_ifname, params->ifname) == 0) { - wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in master %s", - params->ifname, master_ifname); - /* start listening for EAPOL on the master interface */ - add_ifidx(drv, if_nametoindex(master_ifname), drv->ifindex); - - /* check if master itself is under bridge */ - if (linux_br_get(master_ifname, master_ifname) == 0) { + linux_ap_get(ap_ifname, params->ifname) == 0) { + wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in AP %s", + params->ifname, ap_ifname); + /* start listening for EAPOL on the AP interface */ + add_ifidx(drv, if_nametoindex(ap_ifname), drv->ifindex); + + /* check if AP itself is under bridge */ + if (linux_br_get(ap_ifname, ap_ifname) == 0) { wpa_printf(MSG_DEBUG, "nl80211: which is in bridge %s", - master_ifname); - br_ifindex = if_nametoindex(master_ifname); - os_strlcpy(bss->brname, master_ifname, IFNAMSIZ); + ap_ifname); + br_ifindex = if_nametoindex(ap_ifname); + os_strlcpy(bss->brname, ap_ifname, IFNAMSIZ); } } else { - master_ifname[0] = '\0'; + ap_ifname[0] = '\0'; } bss->br_ifindex = br_ifindex; @@ -7706,7 +7706,7 @@ static void *i802_init(struct hostapd_data *hapd, if (i802_check_bridge(drv, bss, params->bridge[0], params->ifname) < 0) goto failed; - if (os_strcmp(params->bridge[0], master_ifname) != 0) + if (os_strcmp(params->bridge[0], ap_ifname) != 0) br_added = 1; } diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c index 7edb9df2e..33ce13f84 100644 --- a/src/drivers/linux_ioctl.c +++ b/src/drivers/linux_ioctl.c @@ -214,24 +214,24 @@ int linux_br_get(char *brname, const char *ifname) } -int linux_master_get(char *master_ifname, const char *ifname) +int linux_ap_get(char *ap_ifname, const char *ifname) { - char buf[128], masterlink[128], *pos; + char buf[128], aplink[128], *pos; ssize_t res; /* check whether there is a master */ os_snprintf(buf, sizeof(buf), "/sys/class/net/%s/master", ifname); - res = readlink(buf, masterlink, sizeof(masterlink)); - if (res < 0 || (size_t) res >= sizeof(masterlink)) + res = readlink(buf, aplink, sizeof(aplink)); + if (res < 0 || (size_t) res >= sizeof(aplink)) return -1; - masterlink[res] = '\0'; + aplink[res] = '\0'; - pos = os_strrchr(masterlink, '/'); + pos = os_strrchr(aplink, '/'); if (pos == NULL) return -1; pos++; - os_strlcpy(master_ifname, pos, IFNAMSIZ); + os_strlcpy(ap_ifname, pos, IFNAMSIZ); return 0; } diff --git a/src/drivers/linux_ioctl.h b/src/drivers/linux_ioctl.h index 6de4d9b88..96edc3c72 100644 --- a/src/drivers/linux_ioctl.h +++ b/src/drivers/linux_ioctl.h @@ -18,6 +18,6 @@ int linux_br_del(int sock, const char *brname); int linux_br_add_if(int sock, const char *brname, const char *ifname); int linux_br_del_if(int sock, const char *brname, const char *ifname); int linux_br_get(char *brname, const char *ifname); -int linux_master_get(char *master_ifname, const char *ifname); +int linux_ap_get(char *ap_ifname, const char *ifname); #endif /* LINUX_IOCTL_H */ diff --git a/tests/hwsim/README b/tests/hwsim/README index f0d8b18e3..0891e4ed5 100644 --- a/tests/hwsim/README +++ b/tests/hwsim/README @@ -26,7 +26,7 @@ to verify that operations have been performed correctly and that the network connection works in the expected way. These test cases are run automatically against the hostap.git commits -for regression testing and to help in keeping the hostap.git master +for regression testing and to help in keeping the hostap.git main branch in stable state. Results from these tests are available here: http://buildbot.w1.fi/hwsim/ diff --git a/v4-0001-wpa_supplicant-src-Remove-the-word-whitelist.patch b/v4-0001-wpa_supplicant-src-Remove-the-word-whitelist.patch new file mode 100644 index 000000000..5af6d66d5 --- /dev/null +++ b/v4-0001-wpa_supplicant-src-Remove-the-word-whitelist.patch @@ -0,0 +1,76 @@ +From 11b13691df65e22ab3f4e532f1037c3d3372858c Mon Sep 17 00:00:00 2001 +From: Arowa Suliman +Date: Mon, 10 Jan 2022 18:39:16 -0800 +Subject: [PATCH v4 1/6] wpa_supplicant: src: Remove the word "whitelist" + +Replace the word "whitelist" with the inclusive word "allowlist" + +Signed-off-by: Arowa Suliman +--- + src/common/qca-vendor.h | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h +index d9eab0212..6e2d51fac 100644 +--- a/src/common/qca-vendor.h ++++ b/src/common/qca-vendor.h +@@ -4863,14 +4863,14 @@ enum qca_vendor_attr_roam_control { + * ignored BSSIDs and accordingly clear the respective ones with the + * matching ID. + * +- * @QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_NUM_NETWORKS: Unsigned +- * 32-bit value.Represents the number of whitelist SSIDs configured. ++ * @QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_NUM_NETWORKS: Unsigned ++ * 32-bit value.Represents the number of allowlist SSIDs configured. + * +- * @QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_LIST: Nested attribute +- * to carry the list of Whitelist SSIDs. ++ * @QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_LIST: Nested attribute ++ * to carry the list of Allowlist SSIDs. + * +- * @QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID: SSID (binary attribute, +- * 0..32 octets). Represents the white list SSID. Whitelist SSIDs ++ * @QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID: SSID (binary attribute, ++ * 0..32 octets). Represents the allow list SSID. Allowlist SSIDs + * represent the list of SSIDs to which the firmware/driver can consider + * to roam to. + * +@@ -4908,7 +4908,7 @@ enum qca_vendor_attr_roam_control { + * + * @QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_LAZY_ROAM_ENABLE: Unsigned 32-bit + * value. 1-Enable, 0-Disable. Represents "Lazy" mode, where +- * firmware is hunting for a better BSSID or white listed SSID even though ++ * firmware is hunting for a better BSSID or allow listed SSID even though + * the RSSI of the link is good. The parameters enabling the roaming are + * configured through the PARAM_A_BAND_XX attrbutes. + * +@@ -4950,7 +4950,7 @@ enum qca_wlan_vendor_attr_roaming_config_params { + QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD = 1, + QCA_WLAN_VENDOR_ATTR_ROAMING_REQ_ID = 2, + +- /* Attributes for wifi_set_ssid_white_list */ ++ /* Attributes for wifi_set_ssid_allow_list */ + QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_NUM_NETWORKS = 3, + QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_LIST = 4, + QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID = 5, +@@ -4992,12 +4992,12 @@ enum qca_wlan_vendor_attr_roaming_config_params { + * enum qca_wlan_vendor_roaming_subcmd: Referred by + * QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD. + * +- * @QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_WHITE_LIST: Sub command to +- * configure the white list SSIDs. These are configured through ++ * @QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_ALLOW_LIST: Sub command to ++ * configure the allow list SSIDs. These are configured through + * the following attributes. +- * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_NUM_NETWORKS, +- * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_LIST, +- * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID ++ * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_NUM_NETWORKS, ++ * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_LIST, ++ * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID + * + * @QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_GSCAN_ROAM_PARAMS: Sub command to + * configure the Roam params. These parameters are evaluated on the GScan +-- +2.34.1.703.g22d0c6ccf7-goog + diff --git a/v4-0002-src-Remove-the-word-blacklist.patch b/v4-0002-src-Remove-the-word-blacklist.patch new file mode 100644 index 000000000..2c22b6506 --- /dev/null +++ b/v4-0002-src-Remove-the-word-blacklist.patch @@ -0,0 +1,37 @@ +From 8c089cae71356d612435aebf38842dffa7357f72 Mon Sep 17 00:00:00 2001 +From: Arowa Suliman +Date: Mon, 10 Jan 2022 18:50:41 -0800 +Subject: [PATCH v4 2/6] src: Remove the word "blacklist" + +Replace the word "blacklist" with the inclusive word "denylist" + +Signed-off-by: Arowa Suliman +--- + src/common/qca-vendor.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h +index 6e2d51fac..3a4306ddb 100644 +--- a/src/common/qca-vendor.h ++++ b/src/common/qca-vendor.h +@@ -5013,7 +5013,7 @@ enum qca_wlan_vendor_attr_roaming_config_params { + * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PREFS to set the BSSID + * preference. + * +- * @QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BLACKLIST_BSSID: Sets the list of BSSIDs ++ * @QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_DENYLIST_BSSID: Sets the list of BSSIDs + * to ignore in roaming decision. Uses + * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PARAMS to set the list. + * +@@ -5414,7 +5414,7 @@ enum qca_wlan_vendor_attr_gscan_results { + /* Unsigned 32-bit value; a GSCAN Capabilities attribute. + * This is used to limit the maximum number of BSSIDs while sending + * the vendor command QCA_NL80211_VENDOR_SUBCMD_ROAM with subcmd +- * QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BLACKLIST_BSSID and attribute ++ * QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_DENYLIST_BSSID and attribute + * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PARAMS_NUM_BSSID. + */ + QCA_WLAN_VENDOR_ATTR_GSCAN_MAX_NUM_BLACKLISTED_BSSID = 46, +-- +2.34.1.703.g22d0c6ccf7-goog + diff --git a/v4-0003-wpa_supplicant-ap-Update-comment.patch b/v4-0003-wpa_supplicant-ap-Update-comment.patch new file mode 100644 index 000000000..147f14c46 --- /dev/null +++ b/v4-0003-wpa_supplicant-ap-Update-comment.patch @@ -0,0 +1,29 @@ +From 5a410f54aac9f2cd9e8e1dd7add06ac7c2815935 Mon Sep 17 00:00:00 2001 +From: Arowa Suliman +Date: Tue, 11 Jan 2022 15:45:15 -0800 +Subject: [PATCH v4 3/6] wpa_supplicant: ap: Update comment + +Update the comment to use the word "include" instead of the oppressive +term "white-list". + +Signed-off-by: Arowa Suliman +--- + wpa_supplicant/ap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c +index 6a0a69e68..37d39e674 100644 +--- a/wpa_supplicant/ap.c ++++ b/wpa_supplicant/ap.c +@@ -382,7 +382,7 @@ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, + HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET; + + /* +- * white-list capabilities that won't cause issues ++ * include capabilities that won't cause issues + * to connecting stations, while leaving the current + * capabilities intact (currently disabled SMPS). + */ +-- +2.34.1.703.g22d0c6ccf7-goog + diff --git a/v4-0004-src-Remove-the-word-whitelist-in-enum.patch b/v4-0004-src-Remove-the-word-whitelist-in-enum.patch new file mode 100644 index 000000000..be1c7c1fe --- /dev/null +++ b/v4-0004-src-Remove-the-word-whitelist-in-enum.patch @@ -0,0 +1,88 @@ +From 50da79316ca1102bc8fd991c1dbd88d5f5cd2126 Mon Sep 17 00:00:00 2001 +From: Arowa Suliman +Date: Wed, 12 Jan 2022 18:30:05 -0800 +Subject: [PATCH v4 4/6] src: Remove the word "whitelist" in enum + +Replace the word "whitelist" with the inclusive word "allowlist" and add +aliases for backward compatibility. + +Signed-off-by: Arowa Suliman +--- + src/common/qca-vendor.h | 26 +++++++++++++++++++++----- + 1 file changed, 21 insertions(+), 5 deletions(-) + +diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h +index 3a4306ddb..6c5b9f0dc 100644 +--- a/src/common/qca-vendor.h ++++ b/src/common/qca-vendor.h +@@ -4951,9 +4951,9 @@ enum qca_wlan_vendor_attr_roaming_config_params { + QCA_WLAN_VENDOR_ATTR_ROAMING_REQ_ID = 2, + + /* Attributes for wifi_set_ssid_allow_list */ +- QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_NUM_NETWORKS = 3, +- QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_LIST = 4, +- QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID = 5, ++ QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_NUM_NETWORKS = 3, ++ QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_LIST = 4, ++ QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID = 5, + + /* Attributes for set_roam_params */ + QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_A_BAND_BOOST_THRESHOLD = 6, +@@ -4988,6 +4988,14 @@ enum qca_wlan_vendor_attr_roaming_config_params { + QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_AFTER_LAST - 1, + }; + ++/* old names for API compatibility */ ++#define QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_NUM_NETWORKS \ ++ QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_NUM_NETWORKS ++#define QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_LIST \ ++ QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID_LIST ++#define QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID \ ++ QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALLOW_LIST_SSID ++ + /* + * enum qca_wlan_vendor_roaming_subcmd: Referred by + * QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD. +@@ -5037,7 +5045,7 @@ enum qca_wlan_vendor_attr_roaming_config_params { + */ + enum qca_wlan_vendor_roaming_subcmd { + QCA_WLAN_VENDOR_ROAMING_SUBCMD_INVALID = 0, +- QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_WHITE_LIST = 1, ++ QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_ALLOW_LIST = 1, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_GSCAN_ROAM_PARAMS = 2, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_LAZY_ROAM = 3, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BSSID_PREFS = 4, +@@ -5048,6 +5056,10 @@ enum qca_wlan_vendor_roaming_subcmd { + QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_CLEAR = 9, + }; + ++/* old names for API compatibility */ ++#define QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_WHITE_LIST \ ++ QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_ALLOW_LIST ++ + enum qca_wlan_vendor_attr_gscan_config_params { + QCA_WLAN_VENDOR_ATTR_GSCAN_SUBCMD_CONFIG_PARAM_INVALID = 0, + +@@ -5406,7 +5418,7 @@ enum qca_wlan_vendor_attr_gscan_results { + QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_NUM_EPNO_NETS_BY_SSID + = 43, + /* Unsigned 32-bit value; a GSCAN Capabilities attribute. */ +- QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_NUM_WHITELISTED_SSID ++ QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_NUM_ALLOWLISTED_SSID + = 44, + + QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_BUCKETS_SCANNED = 45, +@@ -5425,6 +5437,10 @@ enum qca_wlan_vendor_attr_gscan_results { + QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_AFTER_LAST - 1, + }; + ++/* old names for API compatibility */ ++#define QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_NUM_WHITELISTED_SSID \ ++ QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_NUM_ALLOWLISTED_SSID ++ + enum qca_wlan_vendor_attr_pno_config_params { + QCA_WLAN_VENDOR_ATTR_PNO_INVALID = 0, + /* Attributes for data used by +-- +2.34.1.703.g22d0c6ccf7-goog + diff --git a/v4-0005-src-Remove-the-word-blacklist-in-enum.patch b/v4-0005-src-Remove-the-word-blacklist-in-enum.patch new file mode 100644 index 000000000..1c0d122c1 --- /dev/null +++ b/v4-0005-src-Remove-the-word-blacklist-in-enum.patch @@ -0,0 +1,56 @@ +From db0c3dd25f5661fc8ae2f8b705d8d87c1f0a8666 Mon Sep 17 00:00:00 2001 +From: Arowa Suliman +Date: Wed, 12 Jan 2022 18:38:23 -0800 +Subject: [PATCH v4 5/6] src: Remove the word "blacklist" in enum + +Replace the word "blacklist" with the inclusive word "denylist" and add +aliases for backward compatibility. + +Signed-off-by: Arowa Suliman +--- + src/common/qca-vendor.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h +index 6c5b9f0dc..c1a872b81 100644 +--- a/src/common/qca-vendor.h ++++ b/src/common/qca-vendor.h +@@ -5050,7 +5050,7 @@ enum qca_wlan_vendor_roaming_subcmd { + QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_LAZY_ROAM = 3, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BSSID_PREFS = 4, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BSSID_PARAMS = 5, +- QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BLACKLIST_BSSID = 6, ++ QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_DENYLIST_BSSID = 6, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_SET = 7, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_GET = 8, + QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_CLEAR = 9, +@@ -5059,6 +5059,8 @@ enum qca_wlan_vendor_roaming_subcmd { + /* old names for API compatibility */ + #define QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_WHITE_LIST \ + QCA_WLAN_VENDOR_ROAMING_SUBCMD_SSID_ALLOW_LIST ++#define QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BLACKLIST_BSSID \ ++ QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_DENYLIST_BSSID + + enum qca_wlan_vendor_attr_gscan_config_params { + QCA_WLAN_VENDOR_ATTR_GSCAN_SUBCMD_CONFIG_PARAM_INVALID = 0, +@@ -5429,7 +5431,7 @@ enum qca_wlan_vendor_attr_gscan_results { + * QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_DENYLIST_BSSID and attribute + * QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PARAMS_NUM_BSSID. + */ +- QCA_WLAN_VENDOR_ATTR_GSCAN_MAX_NUM_BLACKLISTED_BSSID = 46, ++ QCA_WLAN_VENDOR_ATTR_GSCAN_MAX_NUM_DENYLISTED_BSSID = 46, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_AFTER_LAST, +@@ -5440,6 +5442,8 @@ enum qca_wlan_vendor_attr_gscan_results { + /* old names for API compatibility */ + #define QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_NUM_WHITELISTED_SSID \ + QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_CAPABILITIES_MAX_NUM_ALLOWLISTED_SSID ++#define QCA_WLAN_VENDOR_ATTR_GSCAN_MAX_NUM_BLACKLISTED_BSSID \ ++ QCA_WLAN_VENDOR_ATTR_GSCAN_MAX_NUM_DENYLISTED_BSSID + + enum qca_wlan_vendor_attr_pno_config_params { + QCA_WLAN_VENDOR_ATTR_PNO_INVALID = 0, +-- +2.34.1.703.g22d0c6ccf7-goog + diff --git a/v4-0006-src-tests-Remove-the-word-master.patch b/v4-0006-src-tests-Remove-the-word-master.patch new file mode 100644 index 000000000..3165b45aa --- /dev/null +++ b/v4-0006-src-tests-Remove-the-word-master.patch @@ -0,0 +1,196 @@ +From 738049ba84db05fd63c99ff3afaeafb4f93c7037 Mon Sep 17 00:00:00 2001 +From: Arowa Suliman +Date: Sun, 16 Jan 2022 20:05:29 -0800 +Subject: [PATCH v4 6/6] src: tests: Remove the word master. + +Replace the word "master" with another inclusive word such as "main". + +Changed some instances of the old branch name "master". + +Replaced instances referring to the master mode to AP mode which should +have the same meaning. + +Signed-off-by: Arowa Suliman +--- + CONTRIBUTIONS | 2 +- + src/drivers/driver_atheros.c | 2 +- + src/drivers/driver_nl80211.c | 40 ++++++++++++++++++------------------ + src/drivers/linux_ioctl.c | 14 ++++++------- + src/drivers/linux_ioctl.h | 2 +- + tests/hwsim/README | 2 +- + 6 files changed, 31 insertions(+), 31 deletions(-) + +diff --git a/CONTRIBUTIONS b/CONTRIBUTIONS +index 1b4caf7ac..b40b29e92 100644 +--- a/CONTRIBUTIONS ++++ b/CONTRIBUTIONS +@@ -37,7 +37,7 @@ without moderation. You can subscribe to the list at this address: + http://lists.infradead.org/mailman/listinfo/hostap + + The message should contain an inlined patch against the current +-development branch (i.e., the master branch of ++development branch (i.e., the main branch of + git://w1.fi/hostap.git). Please make sure the software you use for + sending the patch does not corrupt whitespace. If that cannot be fixed + for some reason, it is better to include an attached version of the +diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c +index 9b4166d22..fc5d450fc 100644 +--- a/src/drivers/driver_atheros.c ++++ b/src/drivers/driver_atheros.c +@@ -1779,7 +1779,7 @@ atheros_init(struct hostapd_data *hapd, struct wpa_init_params *params) + + if (ioctl(drv->ioctl_sock, SIOCSIWMODE, &iwr) < 0) { + wpa_printf(MSG_ERROR, +- "Could not set interface to master mode! ioctl[SIOCSIWMODE]: %s", ++ "Could not set interface to AP mode! ioctl[SIOCSIWMODE]: %s", + strerror(errno)); + goto bad; + } +diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c +index aec179ac3..7b0556248 100644 +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c +@@ -1204,7 +1204,7 @@ static void wpa_driver_nl80211_event_rtm_newlink(void *ctx, + break; + case IFLA_MASTER: + brid = nla_get_u32((struct nlattr *) attr); +- pos += os_snprintf(pos, end - pos, " master=%u", brid); ++ pos += os_snprintf(pos, end - pos, " AP=%u", brid); + break; + case IFLA_WIRELESS: + pos += os_snprintf(pos, end - pos, " wext"); +@@ -1379,7 +1379,7 @@ static void wpa_driver_nl80211_event_rtm_dellink(void *ctx, + break; + case IFLA_MASTER: + brid = nla_get_u32((struct nlattr *) attr); +- pos += os_snprintf(pos, end - pos, " master=%u", brid); ++ pos += os_snprintf(pos, end - pos, " AP=%u", brid); + break; + case IFLA_OPERSTATE: + pos += os_snprintf(pos, end - pos, " operstate=%u", +@@ -7652,7 +7652,7 @@ static void *i802_init(struct hostapd_data *hapd, + struct wpa_driver_nl80211_data *drv; + struct i802_bss *bss; + size_t i; +- char master_ifname[IFNAMSIZ]; ++ char ap_ifname[IFNAMSIZ]; + int ifindex, br_ifindex = 0; + int br_added = 0; + +@@ -7664,27 +7664,27 @@ static void *i802_init(struct hostapd_data *hapd, + + drv = bss->drv; + +- if (linux_br_get(master_ifname, params->ifname) == 0) { ++ if (linux_br_get(ap_ifname, params->ifname) == 0) { + wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in bridge %s", +- params->ifname, master_ifname); +- br_ifindex = if_nametoindex(master_ifname); +- os_strlcpy(bss->brname, master_ifname, IFNAMSIZ); ++ params->ifname, ap_ifname); ++ br_ifindex = if_nametoindex(ap_ifname); ++ os_strlcpy(bss->brname, ap_ifname, IFNAMSIZ); + } else if ((params->num_bridge == 0 || !params->bridge[0]) && +- linux_master_get(master_ifname, params->ifname) == 0) { +- wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in master %s", +- params->ifname, master_ifname); +- /* start listening for EAPOL on the master interface */ +- add_ifidx(drv, if_nametoindex(master_ifname), drv->ifindex); +- +- /* check if master itself is under bridge */ +- if (linux_br_get(master_ifname, master_ifname) == 0) { ++ linux_ap_get(ap_ifname, params->ifname) == 0) { ++ wpa_printf(MSG_DEBUG, "nl80211: Interface %s is in AP %s", ++ params->ifname, ap_ifname); ++ /* start listening for EAPOL on the AP interface */ ++ add_ifidx(drv, if_nametoindex(ap_ifname), drv->ifindex); ++ ++ /* check if AP itself is under bridge */ ++ if (linux_br_get(ap_ifname, ap_ifname) == 0) { + wpa_printf(MSG_DEBUG, "nl80211: which is in bridge %s", +- master_ifname); +- br_ifindex = if_nametoindex(master_ifname); +- os_strlcpy(bss->brname, master_ifname, IFNAMSIZ); ++ ap_ifname); ++ br_ifindex = if_nametoindex(ap_ifname); ++ os_strlcpy(bss->brname, ap_ifname, IFNAMSIZ); + } + } else { +- master_ifname[0] = '\0'; ++ ap_ifname[0] = '\0'; + } + + bss->br_ifindex = br_ifindex; +@@ -7706,7 +7706,7 @@ static void *i802_init(struct hostapd_data *hapd, + if (i802_check_bridge(drv, bss, params->bridge[0], + params->ifname) < 0) + goto failed; +- if (os_strcmp(params->bridge[0], master_ifname) != 0) ++ if (os_strcmp(params->bridge[0], ap_ifname) != 0) + br_added = 1; + } + +diff --git a/src/drivers/linux_ioctl.c b/src/drivers/linux_ioctl.c +index 7edb9df2e..33ce13f84 100644 +--- a/src/drivers/linux_ioctl.c ++++ b/src/drivers/linux_ioctl.c +@@ -214,24 +214,24 @@ int linux_br_get(char *brname, const char *ifname) + } + + +-int linux_master_get(char *master_ifname, const char *ifname) ++int linux_ap_get(char *ap_ifname, const char *ifname) + { +- char buf[128], masterlink[128], *pos; ++ char buf[128], aplink[128], *pos; + ssize_t res; + + /* check whether there is a master */ + os_snprintf(buf, sizeof(buf), "/sys/class/net/%s/master", ifname); + +- res = readlink(buf, masterlink, sizeof(masterlink)); +- if (res < 0 || (size_t) res >= sizeof(masterlink)) ++ res = readlink(buf, aplink, sizeof(aplink)); ++ if (res < 0 || (size_t) res >= sizeof(aplink)) + return -1; + +- masterlink[res] = '\0'; ++ aplink[res] = '\0'; + +- pos = os_strrchr(masterlink, '/'); ++ pos = os_strrchr(aplink, '/'); + if (pos == NULL) + return -1; + pos++; +- os_strlcpy(master_ifname, pos, IFNAMSIZ); ++ os_strlcpy(ap_ifname, pos, IFNAMSIZ); + return 0; + } +diff --git a/src/drivers/linux_ioctl.h b/src/drivers/linux_ioctl.h +index 6de4d9b88..20629bdbc 100644 +--- a/src/drivers/linux_ioctl.h ++++ b/src/drivers/linux_ioctl.h +@@ -18,6 +18,6 @@ int linux_br_del(int sock, const char *brname); + int linux_br_add_if(int sock, const char *brname, const char *ifname); + int linux_br_del_if(int sock, const char *brname, const char *ifname); + int linux_br_get(char *brname, const char *ifname); +-int linux_master_get(char *master_ifname, const char *ifname); ++int linux_ao_get(char *ap_ifname, const char *ifname); + + #endif /* LINUX_IOCTL_H */ +diff --git a/tests/hwsim/README b/tests/hwsim/README +index f0d8b18e3..0891e4ed5 100644 +--- a/tests/hwsim/README ++++ b/tests/hwsim/README +@@ -26,7 +26,7 @@ to verify that operations have been performed correctly and that the + network connection works in the expected way. + + These test cases are run automatically against the hostap.git commits +-for regression testing and to help in keeping the hostap.git master ++for regression testing and to help in keeping the hostap.git main + branch in stable state. Results from these tests are available here: + http://buildbot.w1.fi/hwsim/ + +-- +2.34.1.703.g22d0c6ccf7-goog +