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) {

相关推荐
念恒123063 分钟前
进程控制---自定义Shell
linux·c语言
Slow菜鸟10 分钟前
Codex CLI 教程(五)| AI 驱动项目从零到一:面向 Java 全栈工程师打造个人 ECC(V2版)
java·开发语言·人工智能
lsx20240610 分钟前
Julia 基本运算符
开发语言
风曦Kisaki25 分钟前
# Linux Shell 编程入门 Day02:条件测试、if 判断、循环与随机数
linux·运维·chrome
李日灐39 分钟前
< 6 > Linux 自动化构建工具:makefile 详解 + 进度条实战小项目
linux·运维·服务器·后端·自动化·进度条·makefile
2501_9216494940 分钟前
企业定制金融数据 API:从架构设计到 Python 接入实战
大数据·开发语言·python·websocket·金融·量化
直奔標竿43 分钟前
SpringAI + RAG + MCP + Agent 零基础全栈实战(完结篇)| 27课完整汇总,Java开发者AI转型必看
java·开发语言·人工智能·spring boot·后端·spring
嵌入式×边缘AI:打怪升级日志1 小时前
嵌入式Linux开发:开源组件、第三方库与许可证详解
linux
reasonsummer1 小时前
【教学类-160-13】20260422 AI视频培训-练习013“豆包AI视频《师幼互动》+豆包图片风格:CG动画”
开发语言·python
计算机安禾1 小时前
【Linux从入门到精通】第34篇:搭建FTP与Samba——跨平台文件共享解决方案
linux·运维·服务器