Search Linux Wireless

Re: [PATCH 2/2] mac80211: support RNR for EMA AP

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

 



On 2/14/2023 8:03 PM, Johannes Berg wrote:
On Mon, 2022-11-14 at 15:04 -0800, Aloka Dixit wrote:

  	if (params->mbssid_ies) {
  		mbssid = params->mbssid_ies;
  		size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
-		size += ieee80211_get_mbssid_beacon_len(mbssid, mbssid->cnt);
+		if (params->rnr_ies) {
+			rnr = params->rnr_ies;
+			size += struct_size(new->rnr_ies, elem, rnr->cnt);
+		}

Is this right? The struct_size() is only the size of the struct, but you
need the size of the elements contained in it here, i.e. the sum of the
.len fields?

johannes


Yes, I modified ieee80211_get_mbssid_beacon_len() to include the 'len' fields if rnr_ies is present. It is called right after the lines you have copied here with the new input parameter.



[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