mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
67 lines
2.1 KiB
Diff
67 lines
2.1 KiB
Diff
From 579c417598ac24c60ef12a762e67a07ab1046234 Mon Sep 17 00:00:00 2001
|
|
From: saleemuddin shaik <quic_saleemud@quicinc.com>
|
|
Date: Tue, 7 Mar 2023 16:47:53 +0530
|
|
Subject: [PATCH] hostapd: add vendor_oui and UNII band into sta_info
|
|
|
|
multiple calls of WPA_GET_BE24 and right shifting avoided.
|
|
Introduced condition to extract vendor oui by looping through the ies.
|
|
|
|
Signed-off-by: saleemuddin shaik <quic_saleemud@quicinc.com>
|
|
---
|
|
src/ap/ctrl_iface_ap.c | 6 ++++++
|
|
src/ap/ieee802_11.c | 9 +++++++++
|
|
src/ap/sta_info.h | 3 +++
|
|
3 files changed, 18 insertions(+)
|
|
|
|
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
|
|
index e85395f..3ddddaf 100644
|
|
--- a/src/ap/ctrl_iface_ap.c
|
|
+++ b/src/ap/ctrl_iface_ap.c
|
|
@@ -374,6 +374,12 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
|
|
return len;
|
|
len += ret;
|
|
|
|
+ ret = os_snprintf(buf + len, buflen - len, "vendor_oui=%02x:%02x:%02x\n",
|
|
+ sta->vendor_oui[0], sta->vendor_oui[1], sta->vendor_oui[2]);
|
|
+ if (os_snprintf_error(buflen - len, ret))
|
|
+ return len;
|
|
+ len += ret;
|
|
+
|
|
res = ieee802_11_get_mib_sta(hapd, sta, buf + len, buflen - len);
|
|
if (res >= 0)
|
|
len += res;
|
|
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
|
|
index ce2af50..8483a08 100644
|
|
--- a/src/ap/ieee802_11.c
|
|
+++ b/src/ap/ieee802_11.c
|
|
@@ -3819,6 +3819,15 @@ static int __check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
|
|
size_t wpa_ie_len;
|
|
const u8 *p2p_dev_addr = NULL;
|
|
|
|
+ const struct element *elem;
|
|
+
|
|
+ for_each_element(elem, ies, ies_len) {
|
|
+ memcpy(sta->vendor_oui, elem->data, 3);
|
|
+ if(elem->id == WLAN_EID_VENDOR_SPECIFIC &&
|
|
+ !WPA_GET_BE24(sta->vendor_oui))
|
|
+ break;
|
|
+ }
|
|
+
|
|
resp = check_ssid(hapd, sta, elems->ssid, elems->ssid_len);
|
|
if (resp != WLAN_STATUS_SUCCESS)
|
|
return resp;
|
|
diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h
|
|
index c9326fe..60644cd 100644
|
|
--- a/src/ap/sta_info.h
|
|
+++ b/src/ap/sta_info.h
|
|
@@ -331,6 +331,9 @@ struct sta_info {
|
|
struct pasn_data *pasn;
|
|
#endif /* CONFIG_PASN */
|
|
|
|
+ /* Vendor Specific OUI from associated STA */
|
|
+ u8 vendor_oui[3];
|
|
+
|
|
#ifdef CONFIG_IEEE80211BE
|
|
struct mld_info mld_info;
|
|
u8 mld_assoc_link_id;
|