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

相关推荐
同学小张10 小时前
【端侧AI 与 C++】1. llama.cpp源码编译与本地运行
开发语言·c++·aigc·llama·agi·ai-native
踢球的打工仔11 小时前
PHP面向对象(7)
android·开发语言·php
t1987512813 小时前
在Ubuntu 22.04系统上安装libimobiledevice
linux·运维·ubuntu
skywalk816313 小时前
linux安装Code Server 以便Comate IDE和CodeBuddy等都可以远程连上来
linux·运维·服务器·vscode·comate
汤姆yu13 小时前
基于python的外卖配送及数据分析系统
开发语言·python·外卖分析
Yue丶越13 小时前
【C语言】字符函数和字符串函数
c语言·开发语言·算法
晚风吹人醒.14 小时前
缓存中间件Redis安装及功能演示、企业案例
linux·数据库·redis·ubuntu·缓存·中间件
翔云 OCR API14 小时前
人脸识别API开发者对接代码示例
开发语言·人工智能·python·计算机视觉·ocr
V***u45314 小时前
MS SQL Server partition by 函数实战二 编排考场人员
java·服务器·开发语言
Hard but lovely14 小时前
linux: pthread库的使用和理解
linux