Search Linux Wireless

Re: [PATCH v2 12/22] mac80211: convert S1G beacon to scan results

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

 



On 2020-09-18 03:48, Johannes Berg wrote:
On Mon, 2020-08-31 at 13:55 -0700, Thomas Pedersen wrote:


+	if (!elems->parse_error && elems->s1g_capab)
+		bss->s1g = true;

It seems odd to set this only if it's in error - why not always set it
if the band is right?

True.

In fact, why set it at all, since you always know the band?

It seemed like a convenient shorthand, but looking at net/mac80211/mlme.c the band/channel is available (sband->band or cbss->channel->band) wherever we
check s1g->bss so maybe it's not needed. I'll remove it to keep things
simple.

+		case WLAN_EID_S1G_CAPABILITIES:
+			if (elen == 15)
+				elems->s1g_capab = (void *)pos;
+			else
+				elem_parse_failed = true;
+			break;
+		case WLAN_EID_S1G_OPERATION:
+			if (elen == 6)
+				elems->s1g_oper = (void *)pos;
+			else
+				elem_parse_failed = true;
+			break;
+		case WLAN_EID_S1G_SHORT_BCN_INTERVAL:
+			if (elen == 2)
+				elems->s1g_tsbtt = (void *)pos;
+			else
+				elem_parse_failed = true;
+			break;

Seems like you ought to have some structs/sizeof or defines for the
sizes?

Yes I'll find something. Thanks.

--
thomas



[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