From: Jouni Malinen Date: Mon, 10 Aug 2020 20:52:11 +0000 (+0300) Subject: dpp-nfc: Update listen channel based on channel list when writing a tag X-Git-Tag: hostap_2_10~1026 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=315422196ab5109930c20a2f77cdd88204b9a1b6;p=thirdparty%2Fhostap.git dpp-nfc: Update listen channel based on channel list when writing a tag Do not use the hardcoded channel 1 (2412 MHz) with DPP_LISTEN if a channel list is specified when writing an NFC Tag. Instead, pick the first channel from that list as the listen channel. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/examples/dpp-nfc.py b/wpa_supplicant/examples/dpp-nfc.py index 5c5d947f0..4027c5e23 100755 --- a/wpa_supplicant/examples/dpp-nfc.py +++ b/wpa_supplicant/examples/dpp-nfc.py @@ -202,6 +202,8 @@ def wpas_get_nfc_uri(start_listen=True, pick_channel=False, chan_override=None): chan = chan_override else: chan = chanlist + if chan and chan.startswith("81/"): + listen_freq = int(chan[3:].split(',')[0]) * 5 + 2407 if chan is None and get_status_field(wpas, "bssid[0]"): freq = get_status_field(wpas, "freq") if freq: