Re: [PATCH v4 6/6] src: tests: Remove the word master.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 16, 2022 at 09:09:58PM -0800, Arowa Suliman wrote:
> 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.

Thanks. I applied the patch 1..5 with some cleanup. As far as this patch
6/6 is concerned, I applied one of the changes, but the other ones have
some issues as noted below.

>  ...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 ++++++++++++++++++

I dropped these extra copies of the patches.

> diff --git a/CONTRIBUTIONS b/CONTRIBUTIONS
> @@ -37,7 +37,7 @@ without moderation. You can subscribe to the list at this address:
> -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

I already changed that in an earlier commit when I renamed the branch.

> diff --git 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));

This is a bit of a borderline on correctness. WEXT calls this mode
IW_NODE_MASTER and the error message here is explicitly using that name
of the mode.

> diff --git 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,
>  		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);

This is not correct. IFLA_MASTER is a reference to the master device in
the kernel, i.e., the interface that a specific netdev is somehow
associated with. This is not for AP mode. The specific case here is for
the bridge interface. In any case, since this is talking about a
specific Linux kernel interface item, I'd rather not rename this unless
the kernel interface definition is changed first since use of a
different term would be quite confusing.

> @@ -1379,7 +1379,7 @@ static void wpa_driver_nl80211_event_rtm_dellink(void *ctx,
>  		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);

Same here.

> @@ -7652,7 +7652,7 @@ static void *i802_init(struct hostapd_data *hapd,
> -	char master_ifname[IFNAMSIZ];
> +	char ap_ifname[IFNAMSIZ];

Same here.

> @@ -7664,27 +7664,27 @@ static void *i802_init(struct hostapd_data *hapd,
> -	if (linux_br_get(master_ifname, params->ifname) == 0) {
> +	if (linux_br_get(ap_ifname, params->ifname) == 0) {
...

and matching changes here.

> @@ -7706,7 +7706,7 @@ static void *i802_init(struct hostapd_data *hapd,
> -		if (os_strcmp(params->bridge[0], master_ifname) != 0)
> +		if (os_strcmp(params->bridge[0], ap_ifname) != 0)

Same here.

> diff --git 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)

>  	/* 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;

This is also for the same case, i.e., the master device of a netdev; not
AP mode.

> diff --git a/src/drivers/linux_ioctl.h b/src/drivers/linux_ioctl.h
> -int linux_master_get(char *master_ifname, const char *ifname);
> +int linux_ap_get(char *ap_ifname, const char *ifname);

Same here.

> diff --git a/tests/hwsim/README b/tests/hwsim/README
> @@ -26,7 +26,7 @@ to verify that operations have been performed correctly and that the
>  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:

I applied this one.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux