]> git.ipfire.org Git - thirdparty/hostap.git/commit
P2P: Track peer 6 GHz capability more robustly
authorQiwei Cai <quic_qcai@quicinc.com>
Thu, 3 Nov 2022 02:33:09 +0000 (10:33 +0800)
committerJouni Malinen <j@w1.fi>
Sat, 5 Nov 2022 10:04:09 +0000 (12:04 +0200)
commit9c830d917800bff3a53c157063afcf9cd3087399
tree124bab20755a8df26638a55d0286c014f2b5af11
parent1ca403a8b13fa04ef574314ceb5e92276ea2bd92
P2P: Track peer 6 GHz capability more robustly

It's necessary to maintain knowledge of the 6 GHz capability of the
peer. Since the Device Capability field migth change between frames
depending on the context in which they are used, loooking at the last
received message might not always provide accurate information.

Add supports_6ghz bool variable in struct p2p_device, initialize it to
false and set to true if the P2P_DEV_CAPAB_6GHZ_BAND_CAPABLE bit is set
to 1 in any P2P frame that includes the P2P Capability attribute. This
boolean would not be cleared to false at any point in time so that the
info doesn't disappear dynamically.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/p2p/p2p.c
src/p2p/p2p_go_neg.c
src/p2p/p2p_i.h
src/p2p/p2p_pd.c