wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

f1340704@lhbvm177:~/work4/ti_yocto$ git diff

diff --git /wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

/wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

index b055e684a..31cf7f4f1 100644

--- /wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

+++ /wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

@@ -867,12 +867,28 @@ struct nl80211_bss_info_arg {

const u8 *bssid;

};

+#define WLAN_EID_SSID 0

+static const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie)

+{

  • size_t ie_len = res->ie_len;

  • /* Use the Beacon frame IEs if res->ie_len is not available */

  • if (!ie_len)

  • ie_len = res->beacon_ie_len;

  • return get_ie((const u8 *) (res + 1), ie_len, ie);

+}

static int bss_info_handler(struct nl_msg *msg, void *arg)

{

diff --git a/wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

b/wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

index b055e684a..31cf7f4f1 100644

--- a//wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

+++ b/wpa_supplicant-2.11/src/drivers/driver_nl80211_scan.c

@@ -867,12 +867,28 @@ struct nl80211_bss_info_arg {

const u8 *bssid;

};

+#define WLAN_EID_SSID 0

+static const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie)

+{

  • size_t ie_len = res->ie_len;

  • /* Use the Beacon frame IEs if res->ie_len is not available */

  • if (!ie_len)

  • ie_len = res->beacon_ie_len;

  • return get_ie((const u8 *) (res + 1), ie_len, ie);

+}

static int bss_info_handler(struct nl_msg *msg, void *arg)

{

struct nl80211_bss_info_arg *_arg = arg;

struct wpa_scan_results *res = _arg->res;

struct wpa_scan_res **tmp;

struct wpa_scan_res *r;

  • const u8 *ssid;

  • u8 ssid_name[36] = {0};

r = nl80211_parse_bss_info(_arg->drv, msg, _arg->bssid);

if (!r)

@@ -882,6 +898,12 @@ static int bss_info_handler(struct nl_msg *msg, void *arg)

os_free(r);

return NL_SKIP;

}

  • ssid = wpa_scan_get_ie(r, WLAN_EID_SSID);

  • strncpy(ssid_name, ssid + 2, (size_t)ssid[1]);

  • wpa_printf(MSG_DEBUG, "[ssh] ssid_name: %s ", ssid_name);

tmp = os_realloc_array(res->res, res->num + 1,

sizeof(struct wpa_scan_res *));

if (tmp == NULL) {

相关推荐
蝎子莱莱爱打怪6 小时前
ESXi 强制断电后恢复CentOS7虚拟机避坑指南:解决重复注册&目录清理难题
linux·后端·程序员
xlp666hub1 天前
Leetcode第五题:用C++解决盛最多水的容器问题
linux·c++·leetcode
张宏2361 天前
原子操作 (基于Linux 应用层 C 语言)
linux
kymjs张涛2 天前
OpenClaw 学习小组:初识
android·linux·人工智能
程序设计实验室2 天前
经历分享,发现挖矿木马后,服务器快速备份与重装(腾讯云平台)
linux
Miku162 天前
OpenClaw-Linux+飞书官方Plugin安装指南
linux·人工智能·agent
Miku162 天前
OpenClaw 接入 QQ Bot 完整实践指南
linux·人工智能·agent
Yogurt_cry2 天前
[树莓派4B] 闲置近10年的爱普生 L310 打印机爆改无线打印机
linux·物联网·树莓派
Johny_Zhao3 天前
OpenClaw中级到高级教程
linux·人工智能·信息安全·kubernetes·云计算·yum源·系统运维·openclaw
Sheffield4 天前
Docker的跨主机服务与其对应的优缺点
linux·网络协议·docker