[PATCH v4 6/6] src: tests: Remove the word master.
Arowa Suliman
arowa at chromium.org
Sun Jan 16 21:09:58 PST 2022
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 <arowa at chromium.org>
---
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 <arowa at google.com>
+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 <arowa at chromium.org>
+---
+ 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 <arowa at google.com>
+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 <arowa at chromium.org>
+---
+ 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 <arowa at google.com>
+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 <arowa at chromium.org>
+---
+ 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 <arowa at google.com>
+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 <arowa at chromium.org>
+---
+ 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 <arowa at google.com>
+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 <arowa at chromium.org>
+---
+ 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 <arowa at google.com>
+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 <arowa at chromium.org>
+---
+ 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
+
--
2.34.1.703.g22d0c6ccf7-goog
More information about the Hostap
mailing list