diff mbox series

AP: Correctly set the BSS parameters change count in RNR

Message ID 20231221114521.639268-1-andrei.otcheretianski@intel.com
State Changes Requested
Headers show
Series AP: Correctly set the BSS parameters change count in RNR | expand

Commit Message

Andrei Otcheretianski Dec. 21, 2023, 11:45 a.m. UTC
From: Ilan Peer <ilan.peer@intel.com>

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 src/ap/ieee802_11.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jouni Malinen Dec. 22, 2023, 3:03 p.m. UTC | #1
On Thu, Dec 21, 2023 at 01:45:21PM +0200, Andrei Otcheretianski wrote:
> diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
> @@ -7599,7 +7599,8 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
>  				else
>  					*eid++ = hapd->conf->mld_id;
>  
> -				*eid++ = hapd->mld_link_id | (1 << 4);
> +				*eid++ = hapd->mld_link_id |
> +					(hapd->eht_mld_bss_param_change << 4);
>  				*eid++ = 0;

That would not work correctly for values larger than 15. The BSS
Parameters Change Count field is in B12..B19, i.e., half of it is in the
third octet that would not be modified here.
Andrei Otcheretianski Dec. 24, 2023, 4:01 p.m. UTC | #2
> 
> That would not work correctly for values larger than 15. The BSS Parameters
> Change Count field is in B12..B19, i.e., half of it is in the third octet that would
> not be modified here.
> 

Right. I sent a fixed version.
Thanks,
Andrei

> --
> Jouni Malinen                                            PGP id EFC895FA
diff mbox series

Patch

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index a65287d77e..b2c16f2950 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7599,7 +7599,8 @@  static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
 				else
 					*eid++ = hapd->conf->mld_id;
 
-				*eid++ = hapd->mld_link_id | (1 << 4);
+				*eid++ = hapd->mld_link_id |
+					(hapd->eht_mld_bss_param_change << 4);
 				*eid++ = 0;
 				len += RNR_TBTT_INFO_MLD_LEN;
 #endif /* CONFIG_IEEE80211BE */