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

相关推荐
2601_9491465316 分钟前
C语言语音通知接口接入教程:如何使用C语言直接调用语音预警API
c语言·开发语言
曹牧22 分钟前
Spring Boot:如何测试Java Controller中的POST请求?
java·开发语言
KYGALYX28 分钟前
服务异步通信
开发语言·后端·微服务·ruby
zmzb010334 分钟前
C++课后习题训练记录Day98
开发语言·c++
wdfk_prog1 小时前
[Linux]学习笔记系列 -- [drivers][input]input
linux·笔记·学习
盟接之桥1 小时前
盟接之桥说制造:引流品 × 利润品,全球电商平台高效产品组合策略(供讨论)
大数据·linux·服务器·网络·人工智能·制造
猫头虎1 小时前
如何排查并解决项目启动时报错Error encountered while processing: java.io.IOException: closed 的问题
java·开发语言·jvm·spring boot·python·开源·maven
YUJIANYUE2 小时前
PHP纹路验证码
开发语言·php
忆~遂愿2 小时前
ops-cv 算子库深度解析:面向视觉任务的硬件优化与数据布局(NCHW/NHWC)策略
java·大数据·linux·人工智能
湘-枫叶情缘2 小时前
1990:种下那棵不落叶的树-第6集 圆明园的对话
linux·系统架构