Search Linux Wireless

Re: [PATCH v4] iw: scan: add EHT beacon info support

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

 



On Wed, 2024-07-31 at 09:20 -0700, Dylan Eskew wrote:
> 
> -	if (!(he_phy_cap[0] & ((BIT(2) | BIT(3) | BIT(4)) << 8))){
> -		for (i = 0; i < 4; i++)
> -			printf("%s\t\tEHT bw=20 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n",
> -			       pre, mcs[i],
> -			       mcs_set[i] & 0xf, mcs_set[i] >> 4);
> -	} else {
> -		if (he_phy_cap[0] & (BIT(2) << 8)) {
> -			for (i = 0; i < 3; i++)
> -				printf("%s\t\tEHT bw <= 80 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n",
> -				       pre, mcs[i + 1],
> -				       mcs_set[i] & 0xf, mcs_set[i] >> 4);
> -		}
> -		mcs_set += 3;
> +	for (i = 0; i < 3; i++) {
> +		char *bw[] = { "<= 80", "160", "320" };
> +		char *mcs[] = { "0-9", "10-11", "12-13" };
> +		int j;
>  
> -		if (he_phy_cap[0] & (BIT(3) << 8)) {
> -			for (i = 0; i < 3; i++)
> -				printf("%s\t\tEHT bw=160 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n",
> -				       pre, mcs[i + 1],
> -				       mcs_set[i] & 0xf, mcs_set[i] >> 4);
> -		}
> +		if ((i * 3 + 2) * sizeof(mcs_set[0]) >= mcs_len)
> +		   break;

nit: a bunch of places here have weird indentation suddenly,


> -		mcs_set += 3;
> -		if (band == NL80211_BAND_6GHZ && (phy_cap[0] & BIT(1))) {
> -			for (i = 0; i < 3; i++)
> -				printf("%s\t\tEHT bw=320 MHz, max NSS for MCS %s: Rx=%u, Tx=%u\n",
> -				       pre, mcs[i + 1],
> -				       mcs_set[i] & 0xf, mcs_set[i] >> 4);
> +		printf("%s\t\tEHT MCS and NSS set %s MHz\n", pre, bw[i]);
> +		for (j = 0; j < 6; j++) {
> +			__u8 nss = mcs_set[(i * 3) + j / 2];
> +			nss >>= (j % 2) * 4;
> +			nss &= 0xF;
> +
> +			printf("%s\t\t\t%s Max NSS that supports MCS %s: ",
> +			      pre, j % 2 ? "TX" : "RX", mcs[j / 2]);
> +			if (nss == 0)
> +				printf("not supported\n");
> +			else
> +			   printf("%d streams\n", nss);

e.g. this especially - are you using 3 spaces for tabs and didn't see it
or something?

I'm a bit more concerned though with the changes about the EHT MCS/NSS
set. You don't have the HE stuff now, and you're not handling "20 MHz-
only non-AP STA" here any more, which seems relevant for local
capability printing?

johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux